A question about gradient direction
Why is gradient the direction of steepest ascent?
How to fake a package version installed? Being an early adopter and using 11.04 daily builds I sometimes meet a situation when some packages require earlier versions of other packages than those I have installed. Usually newer (but refused) versions of needed packages provide all the functionality of their older versions.  If I use dpkg -i --force-depends-version to install dependent packages everything works fine, I've never seen a problem.  Instead of manually downloading and installing every package, can I just make the system pretend there is a specific package version installed when there is a newer? Or is there a --force-depends-version key equivalent for apt-get? I came across a  where a comprehensive example would be very useful. So I wrote an example program showing one way to solve their problem.  My problem is that when I was done creating it, and testing to make sure it worked, it was over 400 lines in 18 files. My example included source code, header files, and scripts for building the example in a variety of circumstances.   It's a working and tested, so it's of huge value to illustrate the tricky solution, but because it's all there, my response was huge! Is there a better way of posting my code dump?  Edit:  I guess there isn't a current "best way" to include a large chunk of code, so I made this a feature request and tried to add some ideas.  Perhaps code entries that are longer then a certain number of lines, or ones that have been specifically marked could initially be displayed as "collapsed", and someone could expand them if they want to see them?  Or maybe, like attaching images, users with enough reputation could attach an archive of files. They could be displayed as "attached code" (initially collapsed also).  Some problems have simple answers that unfortunately touch disproportionately large parts of the program, or can be solved in slightly different ways depending on the environment. I feel that stackoverflow needs a way of capturing these large solutions. Sometimes, they're large chunks of code. In my case, the code was small, but there were many files.  Using github or a similar code repository is great, but we risk linkrot (even for big guys like github) and loose the community editing, commenting, and voting abilities.  I understand the problems that could come from with people dumping whole "I can't get this to work" packages, but surely we already have a solution for that in moderation.  Edit again:  I'm starting to see that this may have been already addressed in posts like    , and    If you feel this a dupe, I'm open to having it "closed as already addressed" The Chinese government has a really specific list of requirements for visa photos:    I had an old unused photo from last time I applied for a visa or passport, and compared it to the requirements (decided not to use it because it was damaged). It seemed to match most of the requirements, except that it seems that they want a photo which isn't square: The required width is less than the required height.  Assuming most drugstores are still providing square passport photos, the question becomes: Should I cut the photo to match the specified width?   What adds to the confusion is if you look at the  the box for the photo is nearly square, not the oblong shape in the requirements. And I have seen other advice that you need to make sure it fully fits the box.  Any advice about what to do here? After lethal first strike damage to an indestructible creature, will it still do damage? If I were to attack with a 4/4 indestructible creature and it's blocked by a 4/2 creature with first strike, would my indestructible creature still attack during the second combat damage step, or would it just tap, not assigning any damage? Should confidence intervals for linear regression coefficients be based on the normal or $t$ distribution? Where can I learn the meanings of RPG terminology? Words like 'campaign', 'system', 'dX', etc. Is there a good web resource with them all on a single page? How can I rename many files at once? In a complex vector space, $\langle Tx,x \rangle=0 \implies T = 0$ I have been having extreme difficulties with this integral. I would appreciate any and all help. $$ \int \sqrt{\tan x} ~ \mathrm{d}{x}. $$ I have found the command to delete files older than 5 days in a folder  find /path/to/files* -mtime +5 -exec rm {} \;   But how do I also do this for subdirectories in that folder? Applescript run from menu bar? Why am I getting "line 1: $' :\r': command not found"? I use Cygwin on my laptop (DOS). I have a collection of scripts from my colleagues, and my own. I am not an IT person, not knowledgeable in Unix. I am following my colleagues' syntax and able to manage a few simple things. The scripts worked well on my old laptop. I just changed laptop and installed Cygwin. When I run my scripts, they do not work. Here is one example of the error message I get: line 1: $':\r': command not found line 5: syntax error near unexpected token `$'\r'' line 5: `fi  Here are the top 5 lines of my script : iter=1 if [ -f iter.txt ]    then rm ./iter.txt  fi    Can someone please explain how I can get around this problem? How to create script with auto-complete? As made clear in update 3 on , this notation: var hash = {}; hash[X]  does not actually hash the object X; it actually just converts X to a string (via .toString() if it's an object, or some other built-in conversions for various primitive types) and then looks that string up, without hashing it, in &quot;hash&quot;. Object equality is also not checked - if two different objects have the same string conversion, they will just overwrite each other. Given this - are there any efficient implementations of hashmaps in JavaScript? (For example, the second Google result of  yields an implementation which is O(n) for any operation. Various other results ignore the fact that different objects with equivalent string representations overwrite each other. Why is it wrong to serial voteup someone you like his answers?  Sometimes I just came to stackoverflow to read certain people answers(there are 4 guys currently) I have their profile bookmarked in my browser and in my free time at office I go to their profile and read their answers and learn a lot from them, but because I'm afraid to be a serial voter, I dont voteup them.   I think there is nothing wrong with that, if there is, please let me know. Android Phone SD Card Problem My Samsung Galaxy Admire phone is saying that an SD card isn't found when the SD card is inside the phone: it shows "Please insert SD Card".  What could be wrong? Conditional sentences not starting with "if" Were I rich, I would live on Long Island.   If I were rich, I would live on Long Island.   Is the first sentence still used, or is used in particular contexts (in example, to give emphasis to the sentence)? Is it legal to study while on a tourist Schengen visa? If, say, you acquired a 90-day tourist Schengen visa, would it be legal to use it for the purpose of visiting a language course or a university class? Or do you have to apply for a special education visa if you have such intents?  Answers linking to official EU pages on that matter would be highly appreciated :) Interpreting exp(B) in multinomial logistic regression This is somewhat of a beginner's question, but how does one interpret an exp(B) result of 6.012 in a multinomial logistic regression model?  1) is it 6.012-1.0 = 5.012 = 5012% increase in risk?  or  2) 6.012/(1+6.012) = 0.857 = 85.7% increase in risk?  In case both alternatives are incorrect, can someone please mention the correct way?  Ive searched many resources on the internet and I get to these two alternatives, and I am not entirely sure which one is correct. Check for internet connection with Swift