I recently wrote a couple of extensions to the JS array prototype  Array.prototype.diff = function (a) {     return this.filter(function (i) {         return !(a.indexOf(i) &gt; -1);     }); };  Array.prototype.udiff = function (a, b) {     var rslt = this.concat(b);     return rslt.filter(function (i) {         return !(a.indexOf(i) &gt; -1);     }); };   Nothing terribly exciting there.  But then I ran into something quite unusual.  Here is an example  var arr = []; for (prop in arr) {     arr[prop].attrib = arr[prop].attrib.replaceAll('_', ' ', true); }   Quite an innocent looking piece of code but it came back to me with an error along the lines of "undefined does not have method replaceAll - where replaceAll is my own String.prototype extension.  The solution is simple - before manipulating arr[prop] just issue   if ('string' == typeof(prop)) continue;   The reason being that prop can also be diff or udiff.  So, problem solved but this behavior did take me off my guard and having to do the additional typeof test does sound clumsy.  Perhaps someone here has deeper insights into what happens with prototype extensions?  I should mention that all of these issues occured in Chrome on Windows.
I've been told not to use for...in with arrays in JavaScript. Why not?
Changing default width of blocks in beamer I use a custom Beamer theme for my presentations. In my presentations I'd like to use blocks (\begin{block}…\end{block}). These blocks are rendered slightly too wide to fit into my theme. Is there a way how I can set the default width of blocks, e.g. to .9\textwidth? Why are only certain shutter speeds or apertures available? For the exposure control function DSLRs there are specific shutter speeds available. For example there are 1/4, 1/100, 1/500. Why, even in high end DSLRs, is there no option to use a custom shutter speed (such as 1/19)?   If the camera can do 1/4000, why can't it do 1/33?  Similarly, why are the aperture choices limited?  Why is it a technical challenge to add extra shutter speeds or aperture settings? How to Make This Block Diagram with LaTeX I understand that there are some questions here regarding the block diagrams. However, I am strongly interested in one particular style shown as below:    This is a picture from a paper. As can be seen, the text can be selected there. So it is not an attached picture. I suppose it is done by LaTeX.  Could anyone point me to the right direction to achieve this?  (I specially LOVE the colored "thin grid"! It is much more beautiful than the fully filled color!) How do the comment replies (aka &quot;pinging users&quot;) work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about &quot;pinging&quot; another user?  Related: Identify the ring $\mathbb{Z}[x]/(2x)$ Consider the quotient ring $R:=\mathbb{Z}[x]/(2x)$. Could somebody help me to identify $R$ with some well-known ring?    Thank You. The Complete Rate-Limiting Guide I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features.  Where else is rate limiting applied on Stack Exchange sites, and what are the limits? Why is "No new release found" when upgrading from a LTS to the next? How are classical optics phenomena explained in QED (Snell's law)? How is the following classical optics phenomenon explained in quantum electrodynamics?   Reflection and Refraction   Are they simply due to photons being absorbed and re-emitted? How do we get to Snell's law, for example, in that case?  Split by request: See the other part of this question . What is the safest, quick way to defrost chicken? Microwave? Running water over it? This is a canonical question   How do I jailbreak an iPhone or iPad (to install a package manager like Cydia or Sileo for tweaks) on:   iOS/iPadOS 13 iOS 12 iOS 11 iOS 10 iOS 9 iOS 8 \RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Arter95,     Author = {David Arter},     Date-Added = {2013-08-11 17:38:06 +0000},     Date-Modified = {2013-09-01 15:13:22 +0000},     Journal = {Journal of Common Market Studies},     Number = {3},     Pages = {361-287},     Title = {The {EU} {Referendum} in {Finland} on 16 October 1994:              {A} Vote for the {West}, not for {Maastricht}},     Volume = {33},     Year = {1995}}  @article{Detlef95,     Author = {Jahn, Detlef; Storsved,Ann-sofie},     Date-Added = {2013-08-11 17:14:34 +0000},     Date-Modified = {2013-08-11 17:16:45 +0000},     Journal = {West European Politics},     Number = {4},     Pages = {18-37},     Title = {Legitimacy through referendum? The nearly successful domino‚Äêstrategy of the Eu‚Äêreferendums in Austria, Finland, Sweden and Norway},     Volume = {18},     Year = {1995}} \end{filecontents} \documentclass{article} \usepackage[ngerman]{babel} \usepackage{natbib} \bibpunct{(}{)}{;}{a}{}{,} \makeatletter \renewcommand\@biblabel[1]{} \makeatother  \begin{document}  \cite{Arter95}  \bibliography{\jobname} \bibliographystyle{plainnat}  \end{document}   Please help. I want the author's name displayed like this "Arter, D." instead of David Arter How to separate iMessages with shared Apple ID? My son and wife both have iPod Touches and I have an iPhone. We all used the same Apple ID and turned on iMessage. Both my son and wife were getting texts from my friends and my work on their iPods, I think because my cell phone number was linked to the Apple ID.  If I just turn off iMessage on my iPhone, will that solve the issue? 1.I will study hard until I get a high score on this exam. 2.I will study hard until I've gotten a high score on this exam.  I think these sentences are grammatically correct. but if I add a specific time, I think these sentences have to be only this one:  3.I will study hard until I get a high score on this exam on July 25th.  And how about these?  a. I'd like to watch all of the holocaust movies present in the world until I've become an expert on it. b. I'd like to watch all of the holocaust movies present in the world until I become an expert on it.  Since there's no a word representing a specific time, both of them are okay, right? And what I'd like to know is the difference between &quot;have gotten&quot; and &quot;get&quot;. What I know about them is we can use &quot;future perfect&quot; to refer to unspecific future event that might happen before some accident. but &quot;get&quot; refers to future event that could be either a specific scheduled event or unspecific future event. that's why if I add a specific time mentioning, I have to use &quot;get&quot;. Arrive steering behavior How to find out where an error occurs? Penguin Brainteaser : 321-avoiding permutations There are $k$ penguins, $k\ge 3$. They are all different heights. How many ways are there to order the penguins in a line, left to right, so that we cannot find any three that are arranged tallest to shortest (in left to right order)? The penguin triples do not have have to be adjacent.  This problem is courtesy of someone I know only as "DaMancha." I am pretty sure that most of us here, or at least those do graphic design for living, have found themselves in following situation:   You agree with a client to do the design, agree on price, schedules, formats etc… You work hard, make adjustments, collaborate with client; everything goes well in the beginning. At some point you realise that the client does not listen your professional advice regarding design and prefers his/her own ideas that might not look so professional (choice of fonts, colors, odd choices of elements, shapes etc…). No matter how hard you try, the client is persistent and will not accept the designer’s advice. You get back to work, try to make the best out of it, and the final result is not so good, mainly because you had to stick to the client’s wishes. Work is shipped, payment done, and you don’t want to include this work in your portfolio because it is not good. After all, it is not your work, it is something that was physically created by you as a designer, but the ideas, concept, story, and message came out as a result of nonprofessional person, your client.   Ok, they pay for it, and as long as they are happy this is fine. But, the more compromises you make, the more time you spend working on bad design. If you are a young designer on a quest to get recognition, you don’t want to work just for the sake of money and then face the lack of good design in your portfolio.   Maybe at the beginning of your career you don’t care that much, but later if life this might be a big issue. At some point you will be approached by a big client that might offer you long-term contract, but first they will want to see your work. No point explaining to them what you did and why you made so many compromises.   They will not be interested in that.  Every project is precious as your time and you want to do use it wisely and produce great work.   How would you deal with such a situation? Objects with transparent texture not always show transparency in 3dview For some reason objects don't show their transparency all the time.  In this image the circles in red are suposed to be transparent like the ones in green.    When I select the object in the back, all objects in front of it become opaque.    When I select the two objects that are opaque, then they become transparent as they sould be.    The display is in GLSL mode  These are the material and texture properties      I'm not worried about the final render, just the editing view. I would like to see the actual transparency at editing time only, because the scene is to be imported in a third party game engine.  Blender is v2.68   is the blend file I am about to sell my old desktop PC and I am cautious about some of my sensitive information being available to the purchaser, even after reformatting the hard-drive, using data recovery software.  How can I securely wipe the hard drive so that the data on it cannot be recovered?  Although I specifically want help with my Windows PC, it wouldn't hurt if there were suggestions for Macs as well. I'm a web designer and I'd like to make a custom wordpress theme for my upcoming blog. The template is already made in photoshop but I need a good starting point. I don't have too much experience with Wordpress but I want something that is SEO friendly which I can edit without risking getting poor search results.  I Know about Starkers and that there are other blank themes out there, but are they good for SEO?