Today I start my perl journey, and now I'm exploring the data type.  My code looks like:  @list=(1,2,3,4,5); %dict=(1,2,3,4,5);  print "$list[0]\n";         # using [ ] to wrap index print "$dict{1}\n";         # using { } to wrap key  print "@list[2]\n"; print "%dict{2}\n";   it seems $ + var_name works for both array and hash, but @ + var_name can be used to call an array, meanwhile % + var_name can't be used to call a hash.  Why?
Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assuming you have an array @myarray and a hash %myhash, why do you need to do:  $x = $myarray[1]; $y = $myhash{'foo'};   instead of just doing :  $x = myarray[1]; $y = myhash{'foo'};   Why are the above ambiguous?   Wouldn't it be illegal Perl code if it was anything but a $ in that place? For example, aren't all of the following illegal in Perl?  @var[0]; @var{'key'}; %var[0]; %var{'key'};
About embryonic and genetic evidence of evolution? My question here is about evidence for evolution from Embryology and from Genetics.  Mammals do have similar Embryos, but is it the case that for each species there is an embryonic development that occurs in earlier species, has such relationship been observed? What I mean for example if we generally conceive of having species$Sp_1,Sp_2,...,Sp_n$ where each $ Sp_{i+1}$ being evolved from $Sp_i,$ then is it the case that the embryonic development stages of $ Sp_{i+1}$ contains some of the embryonic development stages of all of its ancestor species.  Similar question to 1 but regarding Genetics, is it the case that every species has a genetic thumbprint of its ancestors that lie there in the non-functional sections of its DNA, i.e. is it the case that all the genetic history of our evolution is recorded in the non-functional section of our DNA. So do human DNA have some portions of the DNA of some dinosaurs for example? In my family we have a DNA contradiction – two cousins (at about the 4th cousin level) took a Y-DNA test, but did not match and had two completely different haplogroups.   Since then, I have traced living cousins with the same surname – the only ones left living that I am aware of – and I would love to pay to have them tested to see if we can figure out where the non-paternity event (NPE) or other event happened (i.e. this new cousin could help us determine which line the NPE occurred in depending on which cousin he matches).   Does anyone have a sample letter, or know the best way to go about asking a distant cousin for DNA?   I have their address and am planning to write a letter, but I can't imagine receiving such a letter, so I am not quite sure how to ask without scaring them off. Are there gotchas using varargs with reference parameters I have this piece of code (summarized)...  AnsiString working(AnsiString format,...) {     va_list argptr;     AnsiString buff;      va_start(argptr, format);     buff.vprintf(format.c_str(), argptr);      va_end(argptr);     return buff; }   And, on the basis that pass by reference is preferred where possible, I changed it thusly.  AnsiString broken(const AnsiString &amp;format,...) { ... the rest, totally identical ... }   My calling code is like this:-  AnsiString s1, s2;     s1 = working("Hello %s", "World");     s2 = broken("Hello %s", "World");   But, s1 contains "Hello World", while s2 has "Hello (null)". I think this is due to the way va_start works, but I'm not exactly sure what's going on. I have an Asus R500VD laptop which came with the preinstalled Windows 8. As actually this computer will be used by my grandmother (and she's only using win 7) I'd like to downgrade it.  Thanks to other thread here, I was able to successfully boot computer from Windows 7 USB stick, but unfortunately during install I got a message:  A required CD/DVD drive device driver is missing. (...)   and I can't get pass it... This is what I've done:   I've downloaded all drivers from Asus Website (), unzip and copied to visible location for windows 7 installation - I've picked each one of them, none has helped. As I belive it's some kind of problem with SATA/RAID/AHCI drivers I went to Intel site and downloaded various "Intel Rapid Storage Technology" drivers - a lot of them were recognized by win7, but none of them helped.   Does anyone have an idea what can I do next? Any help would be really appreciated. Is there a way to capture the viewport in Blender the same way as it is on 3DS Max? I know that by default I can render the viewport and everithing that is in the viewport to be the same as in the render. But, when comparing 3DS Max to Blender, I have certain limitations. In Blender I can render the view-port with vertices/edges/faces to be shown, to be selected, but not the reflections, shadows and such.  Is there a way to render the viewport in Blender as it is in 3DS Max?  Here's how I can do it in 3DS Max:  Viewport look    Render result of the viewport    Here is how I can do it in Blender:  Viewport look:      Render result of the viewport Is there any lower or upper limit on the energy of a photon? i.e. does the mathematical framework we currently use to study photons blow up when a photon surpasses a certain upper limit of energy? (or the same on the opposite side?)  My thoughts: If I let the energy of a photon tend to infinity, its wavelength would be tending to zero, and since it is thought that we cannot really distinguish things when they are on the scale of a Planck Length, would the photon have its maximum energy when its wavelength is equal to the Planck length? (Feel free to correct me, I feel I might not be.) and for the opposite end of the spectrum a photon with the least energy would have zero wavelength, implying no photon, which is a trivial case. As discussed here:  offering actual money as a bounty sets the wrong incentives. However I would suggest giving users the ability to pay with money for offering a bounty regardless of their reputation. The bounty would still count as reputation for the receiving user but would not be discounted from the paying user's reputation. How do Minecraft biomes work? I've never seen any information about the distribution of biomes in a generated world.   First, are all types of biomes, guaranteed to exist in a world? Will I always find snow somewhere, and desert somewhere? I've got one world that doesn't seem to have cactus (so I guess the sand is beaches, no actual desert).  Second, is there any kind of pattern or relation to biomes? Is snow to the North, and desert South, for example?  Third, how about density of biomes? If all types do exist, would I find them all within distance X of my spawnpoint, or have to travel for weeks to find a given type? Core Data - Storing Images (iPhone) How to truncate all logfiles? I see an equation like this:  $$y\frac{\textrm{d}y}{\textrm{d}x} = e^x$$  and solve it by "separating variables" like this:  $$y\textrm{d}y = e^x\textrm{d}x$$ $$\int y\textrm{d}y = \int e^x\textrm{d}x$$ $$y^2/2  = e^x + c$$  What am I doing when I solve an equation this way?  Because $\textrm{d}y/\textrm{d}x$ actually means  $$\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$  they are not really separate entities I can multiply around algebraically.    I can check the solution when I'm done this procedure, and I've never run into problems with it.  Nonetheless, what is the justification behind it?  What I thought of to do in this particular case is write  $$\int y \frac{\textrm{d}y}{\textrm{d}x}\textrm{d}x = \int e^x\textrm{d}x$$ $$\int \frac{\textrm{d}}{\textrm{d}x}(y^2/2)\textrm{d}x = e^x + c$$  then by the fundamental theorem of calculus  $$y^2/2 = e^x + c$$  Is this correct?  Will such a procedure work every time I can find a way to separate variables? When I log in on a Windows 8 machine for the first time with my Microsoft Account (by providing an e-mail address), a new user folder is created:  C:\Users\dzinx_000   In previous versions of Windows, I could choose the name of this folder (it was equal to my username). As I use the commandline often, it is quite annoying to me.    Can I somehow rename it to dzinx?  Does simply renaming the folder break everything? Proof that the real numbers are countable: Help with why this is wrong I have been trying to make a short clip of a bullet hitting a wine glass with wine in it, but I keep running into the same problem with the add-on. Every time I have used it the result has left me with at least a partial box being generated as several of the fractured pieces.  I have tried subdividing and/or adding a sub-surf modifier but the result only changes where the large distorted fragments end up. I have been having trouble with this for quite some time and I would greatly appreciate any help. How to split a very long equation (using AMSMATH package)? 1st example:  \starttypescript [\s!serif] [paratype]   \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Italic] [\s!name:PTSerif-Italic] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Bold] [\s!name:PTSerif-Bold] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-BoldItalic] [\s!name:PTSerif-BoldItalic] [\s!features=\s!default] \stoptypescript   2nd example:  \definefont[SerifS][\s!file:GenBkBasR at \smallfontsize]   Is \s! only related to fonts? Should I use it in my typescript files? How many solutions are there to $x_1 + x_2 + ... + x_5 = 21$? How many solutions are there to the equation      $x_1 + x_2 + x_3 + x_4 + x_5 = 21$    where $x_1, i = 1,2,3,4,5$ is a nonnegative integer such that $0 ≤ x_1 ≤ 3, 1 ≤ x_2 &lt; 4$, and $x_3 ≥ 15$?  I have correctly completed the previous parts of the question but am having trouble with this particular restriction.  The total number of solutions to the equation is $C(25,21) = 12650$.  I have tried to do each restriction individually:  For $0 ≤ x_1 ≤ 3$, I solved this by subtracting the number of solutions when $x_1 ≥ 4$ from the total number of solutions. This is $C(25,21) - C(21,17) = 5985$.  For $1 ≤ x_2 &lt; 4$, I have $C(24,20) - C(21,17) = 5985$.  For $x_3 ≥ 15$, I have $C(10,6) = 210$.  However, the restriction is when these are all together. I am not sure how to proceed. The answer is $106$. App Store is stuck in a loop trying to download a free app -- how do I make it stop? My App Store keeps saying this item is free in the store, that this item will be added to your purchases and it then says cancel or download.   I click download and it won't download and keeps popping up the same message over and over again.  How do I make it stop? I can't download any apps. How do the sets $\emptyset\times B,\ A\ \times \emptyset, \ \emptyset \times \emptyset $ look like? If we have a function $f:A \rightarrow B$, then one way to give meaning, I think, to this function, in terms of set theory, is to say, that $f$ is actually a binary relation $f=(A,B,G_f)$, where $G_f \subseteq A \times B$ is the graph of the function. Now my question is: what is $f$ if   $\bullet \ A=\emptyset, \ B\neq\emptyset$,?  $ \bullet \ B=\emptyset, \ A\neq\emptyset$ ?  $ \bullet \ B=\emptyset, \ A=\emptyset$ ?  (Another way to formulate this, I think, would be: How do the sets $\emptyset\times B,\ A\ \times \emptyset, \ \emptyset \times \emptyset $ look like? Are they all $\emptyset$ ?) Why isn't there a continuously differentiable surjection from $I \to I \times I$? I was asked this question recently in an interview. Why can't there be a a continuously differentiable map $f \colon I \to I \times I$, which is also surjective? In contrast to just continuous, where we have examples of space filling curves.  I have one proof which is direct via Sard's theorem. But the statement seems simple enough to have a proof using at most implicit (and inverse) function theorem.