Can someone explain what is the difference between calling JavaScript Remoting in two different ways -  One way is mentioned @   Another way is mentioned @
Digging in deeper to Javascript Remoting and I'm a bit confused.  The  starts off by showing how to set up everything and uses code like the following:  function getRemoteAccount() {     var accountName = document.getElementById('acctSearch').value;      // This remoting call will use the page's timeout value     Visualforce.remoting.Manager.invokeAction(         '{!$RemoteAction.AccountRemoter.getAccount}',         accountName,          handleResult     ); }   However, I've also seen examples where Visualforce.remoting.Manager.invokeAction is never called.  They end up looking something like the following:  function getText() {   var text = "";   JSRemotingBasicsController.doGetText(     function(result, event) {       // do something here     }   ); }   I'm wondering what is the point to using Visualforce.remoting.Manager.invokeAction when you can just reference the RemoteAction directly like the second example?  Is there something I'm missing?  Is there a time where the second example doesn't work?
Prove $\sin^2\theta + \cos^2\theta = 1$ How do you prove the following trigonometric identity: $$ \sin^2\theta+\cos^2\theta=1$$  I'm curious to know of the different ways of proving this depending on different characterizations of sine and cosine. How to merge partitions? I have two partitions, one of them has a file system and the other is unallocated.  How to merge two partitions? How do you Xforward windows using ssh? What to do when visa admission expires during lockdown? I was admitted to the US as a visitor for a period which expires soon.  Until tonight, I had solid plans to return to Europe soon, prior to the expiration of the visa entry, but that is no longer an option.  I do not wish to overstay or do anything that would cause problems with future admissions or visa applications.  However, I can't go back to Europe because of new travel restrictions put in place by the US government (/resulting flight cancellations).    My passport still has years of validity left.  What is the best course of action? Is there any official guidance on this subject?  I am a little concerned that contacting officials to explain the situation would just lead me to be flagged for prompt enforcement action, but I don't want future problems.    Related:  and .    Update: OP now planning an escape to Canada.  The question still stands, though. What is the best way to clone/deep copy a .NET generic Dictionary? I read this set of stories in the 80's.  What I recall is this:  A planet where the ruling caste was made up of humanoid women.  These women would, as almost pubescent girls, go out into the wilderness with only a spear and attempt to kill an animal in a life or death struggle.  When it happened, they would burst open a DNA packet in themselves that caused them to rapidly mature, their skin to become bronze colored, and give them some kinds of other "powers", I think over fire.  They were called "Bahronas", I think.  The population of this planet was primitive, but they were in contact with an advanced humanoid species, I think of actual homo-sapiens, who were there observing and advising them.  The advanced species wasn't allowed to intervene, just advise and watch.  The main character was a castaway boy, crash landed on their planet and stranded.  He became friendly with the ruling family of Bahronas and entered their confidence.  We find out through the course of the story that he's been genetically engineered and is not a normal boy.  At some point, the advanced species notices him and explains that he is a clone of a famous explorer and a spy, and they explain that they won't do anything in front of him.  The central part of the story is something of a blur, but, the final part of the story is told in a dramatically different style and shifts to a planet populated by catlike creatures who live in boughs of silk scarves, some of which sing.  THey are recording devices which play back the songs.  On this planet, there is another silk scarf, a white one, which doesn't play a song at all.  The cat creatures are greatly disturbed by it when they hear it's message, which they don't understand.  The narrator then goes on to say that it's a spoken word recording, made by the explorer which the boy was a clone of, explaining that he is captured and held hostage on the planet which makes the scarves, and forced to help make them (I think.) How to reduce the fan noise and how to increase battery life? I have a brand new Sony Vaio S series laptop.() It came factory installed with Windows 7 professional Edition 64bit. Runs Intel core i5, 500 GB HDD , 4GB Ram. First I installed ubuntu 11.10 64 bit along side Windows to dual boot. Later,since the problem did not solve, I installed ubuntu 12.04 64bit along side Windows to dual boot. However the problem keeps annoying me.  Problem: When running ubuntu 11.10/12.04, the battery lasts only about 1.5 hours. The Fan runs loud and continuously. And there is a lot of heat generated. System monitor shows less than 5% CPU used. My laptop enjoys hybrid graphic and I tried turning off ADM graphic card and keep Intel graphic card on. However I can not get the Fan noise or heat to go away and consequently the battery drain continues. BTW, in windows, the laptop gives 4-5 hours of battery power, Fan is silent and there is no heat problem. Any ideas on how to reduce the fan noise and how to increase battery life in ubuntu 11.10/12.04? I have recently purchased a hybrid bike with suspension (not sure if that is relevant to this question). It came with two pieces of plastic. Any ideas what they may be for? Feedback Request: New Timeline Question View There is an experimental timeline view for questions now available on meta ONLY! (Now working on SO, SF, and SU as well)  This is partially motivated by comments about how difficult it is to follow very active questions which have a lot of activity, and also the feedback on the API which was heavily dominated by "we need to know what happened in this time range" type responses.  It can only be accessed through URL hackery at the moment. To get to it, enter question URLs like so:  https://meta.stackexchange.com/posts/{id}/timeline  This is a chronological timeline of everything that happened on a question, including   initial question ask answers  revisions comments closure, deletion, reopen, undelete, etc votes   all based on when they happened in chronological order.  We are thinking about making this a fourth tab on the question, like so:  Timeline | Oldest | Newest | Votes  Please try it out and provide feedback. It is still a little rough, so we are not looking for highly detailed bug reports, just more general feedback.  Timeline view for this question: Word or idiom for someone holding (seemingly) contradictory views I think some good words would be conflicted, or confused. As an example of context, think of someone who believes in freedom of speech, but, at the same time, they would support banning comedians who make jokes about certain issues that person cares about. How does long to int cast work in Java? Continuous Fibonacci number F(n) How to copy all files from a directory to a remote directory using scp? What causes the portraits of Wizards to behave interactively? Is doing two PhDs a good path? I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them? In a Poisson model, what is the difference between using time as a covariate or an offset? I recently discovered how to model exposures over time using the log of (e.g.) time as an offset in a Poisson regression.  I understood that the offset corresponds to having time as covariate with coefficient 1.  I'd like to better understand the difference between using time as an offset or as a normal covariate (therefore estimating the coefficient). In which situation should I want to use one method or the other?  UPGRADE: I don't know if it is interesting, but I ran a validation of the two methods using randomly split data repeated 500 times and I noticed that using the offset method leads to a larger test error. Flying EU to UK to EU. Can I get duty free alcohol? On the 20 of March this year I will be flying from Ireland to the UK and then on the another EU country.  Can I buy duty free alcohol (as in alcohol with no tax) leaving the UK ? In the movies, the pack of Uruk-Hai capture Merry and Pippin, and are bringing them back to Saruman as quickly as possible.  Why didn't they use Wargs to carry the Hobbits instead of packing them on their backs?    Or, better yet, why didn't the Nazgul fly down and take them on their Fell Beasts? Choosing numbers without consecutive numbers. In how many ways can we choose $r$ numbers from $\{1,2,3,...,n\}$,   In a way where we have no consecutive numbers in the set? (like $1,2$) I have been using and making LED flashlights for years now and I am VERY familiar with all of the circuitry and technology inside of them, but I just got my first LED house light bulb that runs off of 110v AC electricity.  It is very similar to a flashlight - it has a large heatsink, and 1 or more LEDs inside of it (brand and specs of emitters, I do not know).  The part that I am most curious about is how the electricity from the socket gets to the emitter.  In a flashlight the power comes from a DC battery through a current regulator (LED driver) and into the LED itself.  This is not difficult because the voltage of common LED emitters is about the same voltage as Lithium batteries (3.7v, 7.4v, etc) which makes the current limiting relatively simple coming from a one or two cell light.  How does this work for a high voltage AC bulb?  Is there a transformer and rectifier inside of EVERY bulb (I sure hope not), or are the emitters manufactured to run off of 110v AC power and just use half of the wave cycle?