Where can I find javascript native functions source code?
How can I see the source of built-in JavaScript functions?
I already know how to do it on Mac OS X (plenty of instructions online).  But is it possible to do it on Ubuntu? If yes, how? Replace all occurrence of character except first one I am wondering how to show that $\mathbb{Z}[\sqrt {10}]$ is not a UFD.    My only idea is to show that there are two factorizations of $10$, say, $ab, uv$ such that $a$ is not a unit times $u$ or $v$. In this ring $10=2\cdot5=\sqrt {10}\cdot \sqrt {10}$, so it suffices to show $2$ is not a unit times $\sqrt {10}$. Suppose $2=\sqrt {10}(a+b\sqrt{10})=a\sqrt{10}+10b$. Then $a=0$ since $\sqrt{10}$ is not rational. So $10b=2$, which has no integer solutions. So $\mathbb{Z}[\sqrt {10}]$ is not a UFD.  Is my reasoning correct? What are the flaws? Got a new iPhone - where am I supposed to receive the verification code? I am trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field GDP_TOP10 = 1.   I am using this at the moment:  #Grab rows using Search Cursor with WHERE clause rows = arcpy.SearchCursor("C:/CGDP.shp", "GDP_TOP10 = 1") for row in rows:     arcpy.CopyFeatures_management("CGDP.shp", "New.shp") del row del rows   However, this just copies the entire shapefile, not the rows I want to select with the cursor. If I execute a print statement under my for loop instead, it works and prints only the relevant fields, but the copy to new shapefile command does not seem to copy specifically.   Is there a different ArcPy command to only copy rows that match a query? My passport was detached from the front cover but all the pages are intact. what shall i do? What happens when anti-matter falls into a black hole? Let's say a black hole of mass $M$ and a very compact lump of anti-matter () also of mass $M$ are traveling toward each other. What does an outside observer see when they meet?  Will they blow themselves apart in a  matter/anti-matter reaction? Or will their masses combine, never quite meeting in the infinite time dilation at the event horizon? Python Split String Lets Say we have Zaptoit:685158:zaptoit@hotmail.com   How do you split so it only be left 685158:zaptoit@hotmail.com What do you call a person who is utterly independent and a loner? Where will my bus be at the Port Authority Bus Terminal in New York? What is the best way to add options to a select from a JavaScript object with jQuery? Very large log files, what should I do? ( deals with a similar issue, but it talks about a rotated log file.)  Today I got a system message regarding very low /var space.   As usual I executed the commands in the line of sudo apt-get clean which improved the scenario only slightly. Then I deleted the rotated log files which again provided very little improvement.  Upon examination I find that some log files in the /var/log has grown up to be very huge ones. To be specific, ls -lSh /var/log gives,   total 28G -rw-r----- 1 syslog            adm      14G Aug 23 21:56 kern.log -rw-r----- 1 syslog            adm      14G Aug 23 21:56 syslog -rw-rw-r-- 1 root              utmp    390K Aug 23 21:47 wtmp -rw-r--r-- 1 root              root    287K Aug 23 21:42 dpkg.log -rw-rw-r-- 1 root              utmp    287K Aug 23 20:43 lastlog    As we can see, the first two are the offending ones. I am mildly surprised why such large files have not been rotated.  So, what should I do? Simply delete these files and then reboot? Or go for some more prudent steps?  I am using Ubuntu 14.04.  UPDATE 1  To begin with, the system is only several months old. I had to install the system from scratch couple of months back after a hard disk crash.  Now, as advised in ,  I first checked the offending log files using tail, no surprise there. Then, for deeper inspection, I executed this script from the .  for log in /var/log/{syslog,kern.log}; do    echo "${log} :"   sed -e 's/\[[^]]\+\]//' -e 's/.*[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//' ${log} \   | sort | uniq -c | sort -hr | head -10 done   The process took several hours.  The output was in the line of,   /var/log/syslog : 71209229  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688 53929977  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 17280298  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 54763121030042024)        &lt;snipped&gt;  /var/log/kern.log.1 : 71210257  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 71209212  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 954763121030042024)    (/dev/sda3 is  my home directory. As we can find,   lsblk /dev/sda NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 931.5G  0 disk  ├─sda1   8:1    0 122.1G  0 part / ├─sda2   8:2    0   7.6G  0 part [SWAP] └─sda3   8:3    0 801.8G  0 part /home    Why a process will want to write beyond the limit is actually outside the scope of my comprehension. Perhaps I will want to ask a different question in this forum if this continues even after a system update.)  Then, from  (you may want to check  for a deeper understanding), I executed,   sudo su - &gt; kern.log &gt; syslog   Now, these files have zero sizes. The system is running fine before and after a reboot.   I will watch these files (along with others) in the next few days and report back should they behave out-of-line.  As a final note, both  the offending files (kern.log and syslog), are set to be rotated, as inspection of the files (grep helped) inside  /etc/logrotate.d/ shows.  UPDATE 2  The log files are actually rotated. Looks like the large sizes were attained on a single day. Vertical component of moving weight at a 45 degree angle Here's an easier one. I use the leg press machine at the gym so I don't have to worrying about hurting myself while lifting heavier weight.  The weight glides on a track that looks to be 45 degrees.  What's the equation to figure out how much weight I would be able to squat normally.  IE the vertical component of moving 400lbs at a 45 degree angle. Why does Ridders' method work as well as it does? I've just read section 9.2.1 in Numerical Recipes Ed. 3 (Press et al. 2007), which describes Ridders' method of root finding. I understand that allowing for some curvature of the function by linearizing three points with an exponential will probably get you a better approximation and more rapid convergence, but I have no idea how they get that it converges quadratically, and the motivation behind choosing an exponential (rather than e.g. a polynomial) is not clear to me.  So, specifically, I'm wondering (1) why linearize with an exponential, and (2) why the method converges quadratically.  I tried looking for Ridders' original paper "A new algorithm for computing a single root of a real continuous function", but the only copy I could find was in a journal that my school's library does not give me free access to.  UPDATE:  I've realized that the fact that an exponential is strictly positive means that weighting the three points with an exponential won't change their signs. Hence, the root of the linearization will have to land inside the original bracket.  Polynomials, rationals, sinusoids, and logarithms all have positive and negative bits, so using them probably runs the risk of getting bad interpolated roots. One of these squared might be usable, but maybe non-monoticity gives some sort of undesirable effect. Since this is a complete list of all simple functions that I am aware of, exponentials seem to be the only easily available weighting function with this property.  A constant function is also technically single-signed and monotone, but it can't be used to linearize stuff. Calculating Image boundary / footprint of satellite images using open source tools? How to implement Bitcount using only Bitwise operators? What's the use of a decoupling capacitor near a reservoir capacitor? I've seen some circuits where a decoupling capacitor is used as well as a reservoir capacitor, like this (C4 and C5):    I've read about  and for me it looks as if they are meant to remove small fluctuations in the supply voltage. Then I thought - wasn't that the purpose of a  as well? Why wouldn't the reservoir capacitor be able to filter out the small fluctuations, if it is able to filter out the large fluctuations?  So I feel like I have a basic misunderstanding here. What is the purpose of a decoupling capacitor next to a reservoir capacitor, when we assume we place both equally near to the power consuming part? Or is the only advantage of the decoupling capacitor that it is smaller and can therefore be easily placed more near to the power consuming part? The search parameter isanswered ignores acceptances sum numbers in different lines in shell i have 8000 lines similar to this   &lt;Flow flowId="1" timeFirstTxPacket="+0.0ns" timeFirstRxPacket="+924100.0ns" timeLastTxPacket="+199984927558.0ns" timeLastRxPacket="+199675473275.0ns" delaySum="+2287566662167.0ns" jitterSum="+65280162191.0ns" lastDelay="+3511349483.0ns" txBytes="161956" rxBytes="116536" txPackets="3125" rxPackets="2251" lostPackets="640" timesForwarded="0"&gt;   and what i need to do is summing rxPackets in each line together and txPackets too   i mean total sum of them in 8000 lines  thanks in advance  &lt;Flow flowId="1" timeFirstTxPacket="+0.0ns" timeFirstRxPacket="+924100.0ns" timeLastTxPacket="+199984927558.0ns" timeLastRxPacket="+199675473275.0ns" delaySum="+2287566662167.0ns" jitterSum="+65280162191.0ns" lastDelay="+3511349483.0ns" txBytes="161956" rxBytes="116536" txPackets="3125" rxPackets="2251" lostPackets="640" timesForwarded="0"&gt;  &lt;Flow flowId="2" timeFirstTxPacket="+3000000.0ns" timeFirstRxPacket="+3254190.0ns" timeLastTxPacket="+199988489445.0ns" timeLastRxPacket="+199631899307.0ns" delaySum="+12081144328484.0ns" jitterSum="+105606015634.0ns" lastDelay="+9407845452.0ns" txBytes="251896" rxBytes="124840" txPackets="4867" rxPackets="2413" lostPackets="1757" timesForwarded="0"&gt;  &lt;Flow flowId="3" timeFirstTxPacket="+4000000.0ns" timeFirstRxPacket="+4254098.0ns" timeLastTxPacket="+199971756470.0ns" timeLastRxPacket="+198959480315.0ns" delaySum="+5150205600987.0ns" jitterSum="+74009967633.0ns" lastDelay="+9862217799.0ns" txBytes="163044" rxBytes="90532" txPackets="3150" rxPackets="1751" lostPackets="1013" timesForwarded="0"&gt; Reprojected MODIS NDVI has range from -32768 to 32767, expected -1 to 1