How to delete everything after the 5th line with awk?
What's the best way to take a segment out of a text file?
How to use mirror ball to light a scene? Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to  In [53]: namestr(choice) Out[53]: 'choice'   for use in making a dictionary. There's a good way to do this and I'm just missing it.  EDIT:  The reason to do this is thus. I am running some data analysis stuff where I call the program with multiple parameters that I would like to tweak, or not tweak, at runtime. I read in the parameters I used in the last run from a .config file formated as  filename no_sig_resonance.dat  mass_peak 700  choice 1,2,3   When prompted for values, the previously used is displayed and an empty string input will use the previously used value.  My question comes about because when it comes to writing the dictionary that these values have been scanned into. If a parameter is needed I run get_param which accesses the file and finds the parameter.   I think I will avoid the problem all together by reading the .config file once and producing a dictionary from that. I avoided that originally for... reasons I no longer remember. Perfect situation to update my code! What are point releases in LTS versions? There are so called "point releases" for LTS versions of Ubuntu. 10.04.3 for instance.  What are those "point releases" releases? "The volume boot has only 0 bytes disk space remaining" After a recent update, I'm getting an alert saying:  The volume boot has only 0 bytes disk space remaining   But my computer has plenty of HD space free. Does anyone know how I resolve this. (If it's relevant, I'm using the whole disk encryption feature of the alternate install image for Ubuntu 12.04). Improper integral $\sin(x)/x $ converges absolutely, conditionaly or diverges?  We have that $$\int_1^{\infty}\frac{\sin x}{x}dx$$ $$u=\frac{1}{x}$$ $$du=-\frac{1}{x^2}dx$$ $$dv=\sin xdx$$ $$v=-\cos x$$ $$\int_1^{\infty}\frac{\sin x}{x}dx=-\cos(1)-\int_1^{\infty}\frac{\cos x}{x^2}dx$$ $$\int_1^{\infty}\frac{\cos x}{x^2}dx&lt;\int_1^{\infty}\frac{1}{x^2}dx$$ So it converges. Now I need to find out if $\int_1^{\infty}|\frac{\sin x}{x}|dx$ converges or diverges. Problem requiring/including plugin files with plugin_dir_path( __FILE__ ) I am trying to write a WordPress plug-in. In my project I have three PHP files.   My plug-in file Widget for the plug-in Data installation   I need to install data table on plug-in activation. For that sake I wrote code to create table for my plug-in in data installation file. But I am not able to create data table using this file.  My code for include data installation file and widget file in my plug-in file is  define ( 'OTHER_FILES_PATH', plugin_dir_path( __FILE__ ) ); require_once( OTHER_FILES_PATH . '/data_installation.php' ); require_once( OTHER_FILES_PATH . '/plugin_widget.php' );   My problem is when I put my data installation code in my plug-in file it's working fine but when I put it in separate file (data installation) I am unable to create tables for my plug-in.  Please let me know if I am making any mistake. I got a stomach flu or I got the stomach flu or I got stomach flu? When I googled stomach flu, there were many questions and statements like      How do you get the stomach flu?    Or     Difference between a stomach flu and food poisoning    Or      Six facts about stomach flu   When do you use the, a or nothing? And which should I use for a sentence like "I got a stomach flu from someone" ? Join matrix based on conditions How do you sort du output by size? How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong.  [~]# du -sh /var/* | sort -n 0       /var/mail 1.2M    /var/www 1.8M    /var/tmp 1.9G    /var/named 2.9M    /var/run 4.1G    /var/log 8.0K    /var/account 8.0K    /var/crash 8.0K    /var/cvs 8.0K    /var/games 8.0K    /var/local 8.0K    /var/nis 8.0K    /var/opt 8.0K    /var/preserve 8.0K    /var/racoon 12K     /var/aquota.user 12K     /var/portsentry 16K     /var/ftp 16K     /var/quota.user 20K     /var/yp 24K     /var/db 28K     /var/empty 32K     /var/lock 84K     /var/profiles 224M    /var/netenberg 235M    /var/cpanel 245M    /var/cache 620M    /var/lib 748K    /var/spool Picklist dependent on 2 controlling picklist Much less than, what does that mean? What exactly does $\ll$ mean?  I am familiar that this symbol means much less than.   ...but what exactly does "much less than" mean? (Or the corollary, $\gg$)  On , the example they use is that $1\ll 9999999999$ But my thought on that is that $10^{10^{10^{11}}}\ll 10^{10^{10^{11}}}+9999999999$, based on the same logic. But I am confused because the numbers are comparitively.   Logically, I am really kinda spent dealing with this issue of mine. Thanks for any input. Object renders black Installing PHP 5.3 in Ubuntu 14.04 I've just installed Ubuntu 14.04 and am trying to install php 5.3. But when I run   apt-get install php5    it's installing php 5.5.9-1ubuntu4. I need to use php 5.3 in the system because the application I'm working on is built with php 5.3.   How can I achieve this? Generate all combinations from multiple lists Joining attributes of polygons and points by location in QGIS I have two shapefiles....   points containing a number field 'response_time' a polygon grid of square polygons containing fields including 'PNTCNT' with the number of points per polygon, calculated already using the tool 'points in polygon'   There are between 0 and 600 points within the bounds of each polygon in the grid.  I want to add fields to the polygon grid for the mean, min and max response times within each polygon, in addition to the PNTCNT field already there.  I have tried the 'Join attributes by location' tool, making the polygon layer the target and the points the join layer, and vice versa. I've selected 'take summary of interesting features'.  But I can't get the result I want. All I end up with is the polygon grid again but with an extra field 'COUNT' which replicates (or duplicates) the 'PNTCNT' field. No min, max and mean of values from the points layer.  What am I doing wrong? Is there a better way to do this? I have tried this using QGIS 1.7 and 1.8. Translating cooking terms between US / UK / AU / CA / NZ No connection could be made because the target machine actively refused it (PHP / WAMP) If no spell can reawaken the dead, how did the resurrection stone work? Dumbledore himself said that no spell can reawaken the dead. Isn't that the main objective of the resurrection stone? If one can't reawaken the dead then what is the use of the stone? Surely then one of the Hallows is flawed? If $e^{itx_n}$ converges for every $t\in\mathbb R$, then does $x_n$ converge? Sci-fi book, blue critters than only some people can see, kids fight the critters as they feed off energy and are a threat I can't really remember how long ago it was, but I think the book was marketed towards children/teens.  All I remember is the basic premise of the story.  Some story about these unusual little blue electric critters that only certain people could see, and these kids took it upon themselves to go about destroying them since they fed off energy or something like that.  Not sure whether they fed off people or off electricity... or both maybe?  I think the dominant method of destroying them was an electric baton that was taken from law enforcement.  I wanna call them buzz batons, but that's probably thanks to Artemis Fowl.