Object insert issue in JavaScript array
How to insert an item into an array at a specific index (JavaScript)?
I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); } Getting inverse of a transposition key Updated WiFi fix for Yoga 13 and Ubuntu 16.04? I have a Lenovo Yoga 13 and I was running 14.04 on it and I've since upgraded to 16.04. I applied the fix descibed here () with 14.04 and it worked but no longer seems to with 16.04. I know that the way Realtek drivers work was reorganized in Linux kernel 4.4 () however I don't know enough about what was changed to know if that was the problem. Has anyone else experienced this issue or know how to fix it? For a physics major, what are the best books/references on Greens functions for self-studying?  My mathematical background is on the level of Mathematical Methods in the physical sciences by Mary Boas. How to write uncertainties with the \pm symbol "10 ± 1 K" by using siunitx? Using the siunitx package, if I specify an error with the \pm symbol then it automatically converts it to a form using parenthesis. I would like it to not do this and keep the \pm symbol, but still space the elements of the quantity and symbol in a good way.  e.g. \SI{10 \pm 2}{\kelvin} would produce 10(1) K  I would like it to produce: 10\pm1 K or something similar with spacing taken care of. As part of an early quest, my PCs are likely to face off against a wizard.  The problem here is that the stat block for Mage NPCs listed in the Basic Rules has a Challenge Rating of 6, while the PCs are going to be five Level 1s. So, instead of messing with the stat block and risk weakening it too much/too little, I'm choosing to create a Level 1 Wizard PC and use it as an NPC for this quest.  The problem with that is that, as far as I can tell, there aren't any designated rules for assigning either Challenge Ratings or XP values to a PC. So, should I just give the wizard a Challenge Rating equal to his level (and thus have him give 200 xp when killed), or is there a better way to do this?  (This is different from , because he's asking for a way to assign a level to an NPC, while I'm asking for a way to assign an XP value/Challenge Rating to a PC (for use as an NPC). Similar questions, but different.) How can I disable animation when switching desktops in Lion? I would very much like to disable the sliding animation that occurs when switching desktops via ctrl+&#x2192;/&#x2190; or ctrl+[number] in Lion.   This was previously accomplished in previous versions with this command:  defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES &amp;&amp; killall Dock   This new animation is even more slow than in Snow Leopard - nearly 1 second to switch - a real productivity killer.  Any help greatly appreciated! Do you have any useful awk and grep scripts for parsing apache logs? I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment.   I sometimes do things like to figure out top 10 ips that request a certain file  cat foo.log | grep request_to_file_foo | awk '{print $1}' |  sort -n | uniq -c | sort -rn | head   What do you have in your toolbox? Propane gas fireplace pilot won't light Recovering Outlook .pst password? I am trying to recover an Outlook .pst file password.  Is there some way to do this?  I am using Outlook 2007 and Windows 7. Can you catch a native exception in C# code? In C# code can you catch a native exception thrown from deep in some unmanaged library? If so do you need to do anything differently to catch it or does a standard try...catch get it? A charged particle undergoing an acceleration radiates photons.  Let's consider a charge in a freely falling frame of reference.  In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate? Need a MP3 ID3 tagger, and cover fetcher I need to tag my MP3 library, and have tried kid3 (which was manual tagging), when I used Kubuntu 9.10 (I now use Ubuntu Meerkat) Here are the features I am hoping for:   A good and clean UI. Tagging should be automatic, like Winamp's autotag feature, which rocks, btw! It should also embed the cover-art in the mp3, not copy a jpeg file in the folder, because now-a-days all players support displaying cover art. But acceptable if not possible. Rename the files as per some regular expression like %TrackNo - %Artist - %Title.  Should be accurate, and more importantly smart. I want to start tagging at night, and hopefully my collection should be done by the morning, w/o it being stuck at a user prompt at 1%.   If one app cant do all, I am willing to use 3, wouldn't mind exposure to a few more apps ;)  I have used picard or someting, and I didnt like it quite a lot. But wouldn't mind using it, if there is no other alternative.   Thanks for your time! I'm currently working on building a predictive model for a binary outcome on a dataset with ~300 variables and 800 observations. I've read much on this site about the problems associated with stepwise regression and why not to use it.  I've been reading into LASSO regression and its ability for feature selection and have been successful in implementing it with the use of the "caret" package and "glmnet".   I am able to extract the coefficient of the model with the optimal lambda and alpha from "caret"; however, I'm unfamiliar with how to interpret the coefficients.    Are the LASSO coefficients interpreted in the same method as logistic regression? Would it be appropriate to use the features selected from LASSO in logistic regression?   EDIT  Interpretation of the coefficients, as in the exponentiated coefficients from the LASSO regression as the log odds for a 1 unit change in the coefficient while holding all other coefficients constant. Difference between "git add -A" and "git add ." The command git add [--all|-A] appears to be identical to git add .. Is this correct? If not, how do they differ? Need advice on flavoring/sweetening my homebrew cider I've just finished my primary fermentation and have produced a cider that is coming in at 5.2%. I am about to bottle my cider and add some priming sugar to give it a bit of a fizz. I would like to try and flavor some of the ciders with a fruit coulis. am I correct in thinking that the natural sugar in the fruit should give the cider a natural fizz and I don't need to add any sugar? Also, I am a fan of a sweeter cider, I have been advise not to add more than a teaspoon of priming sugar, and to use a sugar substitute at the same stage if i wish to sweeten it. I have purchased Xylitol, I plan on trying a few combinations with the priming sugar/Xylitol &amp; no additive fruit coulis. Does this all sound like it makes sense or am I just going to ruin my cider. What is an efficient way to implement a singleton pattern in Java? I'm Swedish, but living in Switzerland at the moment. Can I open a US bank account? Either when in the US on vacation or through the internet/phone?  There are lots of situations when I find myself in need of an american credit card or just a bank account. When ordering things online (most retailers refuse to accept my orders if I try to pay with my Swedish or Swiss credit card, even if I ship it to an US address... ) etc etc. Sending and Parsing JSON Objects in Android Grid search vs. random search for hyperparameter tuning I am interested in comparing the computational cost of grid search vs. random search algorithm for hyperparameter tuning. Is random search computationally less expensive then grid search? Is there an article/paper that talks about this topic? Thank you,