I missed semicolons in some of the places in my JavaScript, but its not throwing error in any of the browsers. Is the ; at the end needed?
In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?  If you're unfamiliar with the rules, there's a description of semicolon insertion on the . Here's the key point:     If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a virtual semicolon token between the nth and the n+1st tokens.   That description may be incomplete, because it doesn't explain @Dreas's example. Anybody have a link to the complete rules, or see why the example gets a semicolon? (I tried it in JScript.NET.)   is related, but only talks about a specific scenario.
As a(n) noun vs as only I am programming with normal pointers, but I have heard about libraries like Boost that implement smart pointers. I have also seen that in Ogre3D rendering engine there is a deep use of shared pointers.  What exactly is the difference between the three, and should I stick on using just a type of them? Is there a formula for $(1+i)^n+(1-i)^n$? I'm wondering if there is a formula for the value of $(1+i)^n+(1-i)^n$?  I calculated the first terms starting with $n=1$ to be, in order, $2$, $0$, $-4$, $-8$, $-8$, $0$, $16$, $\dots$  So it seems to be some sequence of positive and negative powers of $2$ with $0$s thrown in. Is there a more explicit formulation of what $(1+i)^n+(1-i)^n$ is, based on $n$?   With the binomial theorem, I get it equal to $$ \sum_{k=0}^n\binom{n}{k}i^{n-k}(1+(-1)^{n-k}). $$ Can this be made nicer? Thanks. I read this book series in middle school. I believe that it would be classified as young adult fiction/fantasy. A girl has magical powers, and with her growing powers comes runes/tattoos in her arms. This is shown on every book cover. I know that one cover is blue. This one shows the girl in a black tank top and black pants. One is a yellow cover, with her in a dress (I think).  The girl has a friend/mentor, who she develops feelings for. The girl is the key to stopping a war between multiple factions/people. Each side is trying to use her to their advantage. I think the series was written in the early 2000s. Parsing an Int from a string in javascript In javascript, what is the best way to parse an INT from a string which starts with a letter (such as "test[123]")?  I need something that will work for the example below.  My JS:  $(document).ready(function() {      $(':input').change( function() {         id = parseInt($(this).attr("id"));  //fails for the data below         alert(id);     }); }   My generated HTML:  &lt;select id="attribute[123]"&gt; &lt;!-- various options --&gt; &lt;/select&gt; &lt;select id="attribute[456]"&gt; &lt;!-- various options --&gt; &lt;/select&gt;   Thank you! How to prove that $\lim_{n\rightarrow \infty}\frac {n^{2}}{2^{n}}=0$ & $\lim_{n\rightarrow \infty}\frac {n^{2}}{n!}=0$? How can we connect a PHP script to MS Access (.mdb) file?  I tried by including following PHP code:  $db_path = $_SERVER['DOCUMENT_ROOT'] . '\WebUpdate\\' . $file_name . '.mdb'; $cfg_dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" . $db_path; $odbcconnect = odbc_connect($cfg_dsn, '', '');   But it failed and I received following error message:   Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\web\WebUpdate\index.php on line 41 Warn new users when they ask a question after a previous question is closed, downvoted, or deleted Another &quot;miséricorde&quot;:  Consider  (emphasis added):  I think its okay, please dont take any efforts for me. I personally do not feel the system helps ask good questions. I dont know why asking for a software in this case is bad. Basically I needed a command that would give me this data. There is no other way I could have asked the question. I could have changed the question just for the sake of changing. I feel I am better off elsewhere. Thanks for your very very prompt responses. Regards. Bye. – user1744649  We just lost another user due to inadequate guidance on what questions are allowed.  The  by the time they are banned has been proven incorrect. Given that , we need a better way to make sure that users can understand how to ask good questions and what types of questions are allowed. I suggest that we warn newcomers, in a clear but positive tone, when one of their questions has been closed, downvoted (to a score of -2 or lower), or deleted, so that they don't repeat the same mistake.  This is probably best done the next time the user asks a question, and should appear as an &quot;interstitial&quot; page prior to reaching the actual Ask Question form.  The page should not appear to users:  with at least 50 (or perhaps 75 or 100) reputation that have asked a good question since the last downvoted/closed/deleted question that have fixed a bad question and had it reopened/undeleted/upvoted.  The content of the page should be adapted based on the specific problem with the previous question.  I would imagine something similar to the following (example for a question closed as off topic on Super User):  Before you ask another question... One or more of your previous questions have been closed as off topic. The scope of on-topic questions is defined in the , as follows:  What kind of questions can I ask here? Super User is for computer enthusiasts and power users. If you have a question about …  computer hardware, computer software, or personal and home computer networking  and it is not about …  programming and software development, video games or consoles, websites or web services like Facebook, Twitter, and WordPress, electronic devices, media players, cell phones or smart phones, except insofar as they interface with your computer, issues specific to corporate IT support and networks, asking for a shopping or product recommendation,  … then you’re in the right place to ask your question!  Please make sure that the question you are about to ask is on topic as described above. If you need help determining whether your question can be asked on this site, you can ask for advice on  or . You may also want to edit your previous question to address any problems associated with it. To ensure a high standard of content quality and prevent disruption to the community, users who repeatedly post low-quality questions  Continue  The  doesn't address this issue as it is shown only to users with 10 reputation or less (rather than up to 50 and possibly higher) and does not address the specific problem with previous low-quality questions.  The point of this feature request is to provide a easily understood targeted message that actually teaches the user about what happened with the previous question he or she asked.  The EULA is generic and may not have conveyed the intended message clearly if the user still asked a low-quality or off-topic question. For reference,  currently has 143 reputation and the proposed message would probably have been shown after the first closed or deleted question. I know this can be a complex feature to implement, since it needs to be adaptive, but this should help eliminate confusion on what the rules are and minimize the incidence of good-faith users getting post-banned. Site name gets cropped while looking at user profiles on international Stack Overflow sites Why are some genes dominant over others? What is the mechanism behind it? If I have a brown eye gene which encodes the protein that is responsible for the brown color and have a blue eye gene as well, what is the reason that my eye color is brown? How does one gene maintain dominance over the other? Automatic left and right commands Accessing my Windows 7 files from my Ubuntu account I have just installed Ubuntu on my computer and I have windows 7 as my other operating system. is there a way that I can access my windows 7 files from my Ubuntu installation? Gradient Boosting for Linear Regression - why does it not work? I've sectioned of this area in the sea near my base, and I need to get rid of all the water from it.  From what I've tried the only way I can see to clear it is fully cover one layer, delete the blocks, then go down to the next layer. Is that the only way I can clear the area or is there a better approach?  Ideally I'd like a survival method (if there is a better one), but any commands what could be used I'd like to hear just so I can learn more commands :) Resources for Blender Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the .  Just write in the appropriate answer/section. If you have concerns, questions, post a  question, so we don't clutter the comments, but you can link your meta question from the comments.  Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on  if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc.  Learning             Assets    (also see: )   Reference Images/Blueprints (also see: )    Tools    (also see: )      Other   Special Interest ()     Also see the . Can a ultracentrifuge be used to test general relativity? With today's ultracentrifuge technology, they can spin so fast that the sample can be subjected to  accelerations of up to 2 millions Gs. That is equivalent to two solar masses. Has someone tried to measure the time dilation in a radioactive sample? How calculate that time dilation respect to the time outside the ultracentrifuge, for example one week. I think that that time dilation will be significant enough to be measured. Get the index of the nth occurrence of a string? I moved postgresql's data directory by following the following steps:   Stop postgres cp -a source_data_directory destination_data_directory export PGDATA=destination_data_directory Changing data directory to destination_data_directory within postgresql.conf pg_ctl start   But when I run: "pg_ctl start" I get the following error. Can someone please help me figure out the error.   server starting postgres@Server:/usr/lib/postgresql/9.1/bin$ postgres cannot access the server configuration file "/home/destination_data_directory/postgresql.conf": No such file or directory How can I set cron to run certain commands every one and a half hours? I have an Samsung Galaxy S3 Neo.  Bus 002 Device 042: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]   The keyboard &amp; language setting is português.  I today installed Android Device Manager and to test it's functionality I locked the phone with the password: "abcd" (4 letters were required).  After entering the password and confirming with the "OK" button of my keyboard, the phone showed me that the password is wrong. "Senha incorreta".  I reset the password after some tries to "123456" and the phone reloaded the lock screen. Again the password showed up to be wrong. I also tried the alphabetic password: "abcdefg" - same error.  I changed the language of my Google account from German to Portuguese and reset the password to "123456" again and I tried to really reboot my phone and unlock the SIM card again. But anyways I can not get through my lock of the Android Device Manager.  I tried to enter the password 35 times wrong with hope to get a chance to authenticate with my Google Account login.  I also tried to connect the phone with adb but it does not show up in this state with:  adb devices   So what can I do to get access to my phone again?