some useful vi commands
i - insert text
I - insert line before cursor
dd - remove entire line
x - remove single character
Esc (key) - To return to command mode after in edit mode.
:x - exit and save
:q - exit and don't save
some useful vi commands
i - insert text
I - insert line before cursor
dd - remove entire line
x - remove single character
Esc (key) - To return to command mode after in edit mode.
:x - exit and save
:q - exit and don't save
If you had a file structure like
dir1 dir2 dir3 folder
And you wanted to copy all the three directories (and their contents) dir1, dir2 and dir3 into the directory called folder, you use the command
cp -rv dir* folder
Note: I like to use the "v" switch here, meaning verbose, so I know how the copy is progressing
If you then wanted to remove the directories from their original location, you could use the command
rm -r dir*
Use the command
rm -r <directory name>
Question Variables
x1= [1,1,1]
x2=[1,1,-1]
result1=x1.transpose(x2)
result2=transpose(x1).x2
Question Stem
<p> Result1= @result1@ </p>
<p> Result2= @result2@ </p>
Output
Result1= 1
Result2=
For more information about the STACK system see stack.bham.ac.uk
on linux, use the command
sftp (or ftp) SERVER_NAME
to view the local directory list use lls
to view the remote directory list use ls
to move a file from local to remote use put filename
to move a file from remote to local use get filename
Note: local is the system you ran sftp (or ftp) from, and remote corresponds to SERVER_NAME
run sudo apt-get install mencoder
then use the command mencoder infile.wmv -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -o outfile.avi
fixed quality can range from 1(high) to 31(low). I found 4 was good enough without making the file size too large.
You can then play it using mplayer with the command mplayer outfile.avi
But I found that this cropped the video during playback. Upon inspection in Windows Medai Player I found that the file had been created fine and there was no cropping. I'm sure there is a command line option for mplayer to avoid this but I can't be bothered to look at the moment.
Exit steam
Insert the disk into the cd drive
Run "C:\Program Files\Steam\Steam.exe" -install E:
Edit this command line as necessary.
Use the command
quota
Use the command
uname -a
Note: uname -m gives a simplified output
To overlay two plots we use the Show command. In this example I will overlay a plot of a function, f(x), and a list of datapoints.
p1 = Plot[f[x], {x, 0, 5}, PlotRange -> {-1, 1}, PlotStyle -> {Blue, Thick}];
p2 = ListPlot[plotlist, PlotMarkers -> {"image"}];
Show[p1, p2]
Where f(x) is the function and plotlist is the list of x,y coordinates of the datapoints. The placeholder "image" is for the image shown in the plot below. The result is