Posted on March 29, 2010 by ergut
Some text
\uncover<2->{
\includegraphics[]{img}
}
does not work. Graphic is included even in the first frame. Instead use:
\onslide<1-2>{
Some text
}
\invisible<1>{
\includegraphics[]{img}
}
Reference:
Filed under: lyx | Tagged: presentation | Leave a comment »
Posted on March 20, 2010 by ergut
These are the steps I followed to use IEEE formatting in Lyx:
- Create IEEEtran directory
- Download the latex file IEEEtran2.tar.gz from IEEE site and extract
- Create a subdirectory named “bibtex”
- Download the bibtex file IEEEtranBST1.tar.gz from the same IEEE site to this directory and extract
- For Ubuntu, move IEEEtran directory to /usr/share/texmf-texlive/tex/latex/ and run texhash (requires sudo)
- Run Lyx->Tools->Reconfigure and restart Lyx.
- You should be able to select IEEEtran from Document Settings.
References
Filed under: lyx, ubuntu | Leave a comment »
Posted on March 17, 2010 by ergut
From Lyx Wiki Tips:
Steering the mouse pointer to the paragraph environment drop-down menu in order to get out of an enumerate or itemize environment was starting to annoy me, especially on the road without a mouse. Fortunately, there is a solution (which apparently is undocumented, at least I couldn’t find it):
Quoting Paul from the mailing list: “M-p (alt-p) followed by a space opens the environment list. From there, repeatedly typing the same letter cycles through all environment names starting with that letter.”
Filed under: lyx | Tagged: shortcuts, tips | Leave a comment »
Posted on September 27, 2009 by ergut
All of a sudden I started to get the following error:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
whenever I tried to access to mysql database through phpmyadmin. I have been using it flawless for very long time.
I modified the following file:
/var/lib/phpmyadmin/config.inc.php
by changing
$cfg['Servers'][$i]['auth_type'] = 'config';
to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
and everything is working fine now.
Filed under: mysql, php | Tagged: mysql, phpmyadmin | Leave a comment »
Posted on January 26, 2009 by ergut
Return a reference to column names
$name = $sth->{NAME};
Number of affected rows
$sth->rows();
New auto-incremented id
$latestId = $dbh->{‘mysql_insertid’}
Uploading large data. ‘INSERT INTO’ command takes long amount of time. Use ‘LOAD DATA’ command to upload bulk data from a text file.
- Be careful. If the file to be uploaded resides on the server, it still needs to be accessible by the mysql server. E.g. you can place them under /tmp
- You can specify NULL characters by ‘\N’, e.g. “9,\N,276,John…”
Filed under: computer, mysql, Perl | Leave a comment »
Posted on January 26, 2009 by ergut
Some handy Perl commands that is not used as much.
Use ‘-‘ to refer to STDOUT & STDIN.
open(INP, ‘-‘) —> STDIN
open(OUT, ‘>-) —> STDOUT
$fh = IO::File->new(‘-‘,’w’) —> STDOUT
Following the filehandle with ‘-|’ opens the output of a shell command as a file.
open($fh, ‘-|’, ‘ls -l’);
open($fh, ‘-|’, ‘cat tmp.txt | sort’);
Similarly IO::Pipe can be used to get the same affect:
$fh = new IO::Pipe;
$fh->reader(qw(ls -l));
Then you can print the output
while (<$fh>) { print; }
Open a zipped file
open(INP, ‘-|’, ‘gunzip < tmp.txt.gz’);
Print the output of a subroutine inside a string
print “3+4 is @{ [addTwoNumbers(3,4)] }\n”;
Use IO::File to store filehandles into a hash array.
$fh{‘infile’} = IO:File->new(“tmp.txt”, “r”);
while (my $line = $fh{‘infile’}->getline) {
print $line;
}
$fh{‘infile’}->close;
Filed under: Perl | Tagged: programming, scripting, tips | Leave a comment »
Posted on May 2, 2008 by ergut
This is how I switched my desktop from Xubuntu to Ubuntu. Different combinations are done with a similar approach. See the reference below for a detailed explanation.
sudo apt-get update
sudo apt-get install ubuntu
sudo update-alternatives --config usplash-artwork.so
- Select artwork for the boot and shutdown screens, enter the following two commands in a Terminal window:
sudo update-initramfs -u
sudo dpkg-reconfigure gdm
- However both Ubuntu & Xubuntu uses gdm, following step will resolve this problem
sudo gdmsetup
- If this fails to launch a GUI window, first run
sudo su
and then type gdmsetup
- Go to “Local” tab and select the Ubuntu theme
When you logon next time do not forget to select the “gnome” as the current session.
In my case compiz caused Ubuntu to consume a lot of CPU power so I uninstalled it:
sudo apt-get –purge remove compiz* libcompizconfig*
Reference
Filed under: linux | Tagged: desktop | Leave a comment »
Posted on April 1, 2008 by ergut
A detailed explanation of how to make VNC work over SSL can be found here. Reading that and the e-mail discussions here, I’d like to summarize the procedure:
SERVER
CLIENT
From a web browser you can access to the following address:
http://YOUR-HOSTNAME/vnc
Even better, if you setup the directory under SSL domain:
https://YOUR-HOSTNAME/vnc
Filed under: linux, remote access, vnc | Leave a comment »
Posted on April 1, 2008 by ergut
You can’t always be there for your parents when they need your help desperately for their computer problems. I resolved this issue with some basic software that I’d like to share. I’d like to give the basics first and I will provide more details when I have more time.
What is the problem?
- Remote computer (Possibly Windows PC) do not have a public address.
- You have a Linux server with a public IP address.
- You want to be able to securely access the remote computer.
What software?
How?
- Install TightVNC and launch TightVNC server
- Set a password
- Optional: Only allow connections from localhost for security
- Install Putty
- Create a session to connect to your Linux server
- In the SSH options click on the tunnel and create a remote port forwarding. (Source: 5900, Destination: localhost:5911, Remote option selected)
- Save and connect to your server
- Optional: You can create keys to login to your server without a password. One less password to remember for them.
- At the Linux server, launch vncviewer to port 5911, i.e. vncviewer localhost:11
Some security tips
- We are using putty because tunneling VNC over SSH makes it secure. You can also setup VNC over SSL and access their computer from any browser. Check out this post.
- Allowing only local access makes it more secure against external attacks. TightVNC server only responds if the Putty is running.
Filed under: remote access, vnc | Tagged: putty, security, tunneling, vnc | Leave a comment »
Posted on March 16, 2008 by ergut
After using Blogger for awhile I decided to switch to WordPress for the following reasons:
- WordPress provides free source code and you can easily migrate your blog to your own web server at anytime.
- WordPress supports hierarchical categories as well as tags.
- “…wordpress.com” is cooler than “…blogspot.com”.. :)
I will report my experiences..
Filed under: online services | Tagged: comparison, google, wordpress | Leave a comment »