Wednesday, January 20, 2010

MikTeX, TeXnicCenter, US Letter sized paper and IEEETran.cls

IEEETran.cls for the Computer Society Conferences requires a 1 inch
margin on all sides.

The default configurations for TeXnicCenter do not provide the proper
margins. You will probably get a top margin that is too wide (1.7 inches)

TeXnicCenter along with MikTeX, has the default paper size set to A4. To
get letter size, you must fix two sections in the build profiles.

This is for the default LaTeX > PS > PDF build profile. Modify as required.

Inside TeXnicCenter:
Menu Build > Define Output Profiles
Select the profile LaTeX>PS>PDF

On the right side, under Postprocessor tab,
1. Select DviPs by clicking on it.
2. Under the Arguments section, add the argument "-t letter" (w/o the
quotes)

3. Now select Ghostscript from the above list
4. Inside the arguments, change the argument "-sPAPERSIZE=a4" to
"-sPAPERSIZE=letter"

Click OK and close out the menu.
Now rebuild your latex document, your margins shouls be accurate.

To test your Latex setup, you could use the testflow from Michael Shell
here: http://www.michaelshell.org/tex/testflow/

References:
http://amath.colorado.edu/documentation/LaTeX/reference/faq/a4.html
http://www.michaelshell.org/tex/ieeetran
http://www.linuxquestions.org/questions/linux-software-2/ps2pdf-bounding-box-and-page-size-problem-454441/

Saturday, October 31, 2009

Daylight Savings Time

Spring "Spring Forward" > Move clocks forward - lose one hour of time
Fall "Fall Back" > Move clocks backward - gain an hour of time.

Thursday, October 22, 2009

Forward references in Verilog

Verilog supports forward references in an odd/different manner.

If you instantiate a module with port connected to a signal line that
you have not declared, Verilog will instantiate a one-bit wire for you.
(and not complain during compile time). This is also true for wrongly
spelled wire names.

If you later attempt to declare the same wire, verilog will complain of
double-declarations.

You can get around this by declaring at the top line of every file
`default_nettype none . This will force verilog to flag all undeclared
wires.

see this thread for more information on this:
http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.verilog/2009-01/msg00023.html

Part select in Verilog

Verilog allows you to declare the ranges of wires of components in
either increasing or decreasing order (0:n] or [n:0].

However, all references in a given system have to follow that same order
- regardless of whether it is a part-select, non-indexed assignment(s) etc.

Sunday, October 18, 2009

New homepage template

I have changed the template of my homepage on the university site. My
old template had too much wasted white space down the center for most
content. This template looks more efficient in use of space.

Sunday, September 20, 2009

View PDF contents in Vim

From http://vim.wikia.com/wiki/Open_PDF_files

To open a PDF file (in readonly mode) add the following lines to your .vimrc

autocmd BufReadPre *.pdf set ro nowrap
autocmd BufReadPost *.pdf silent %!pdftotext "%" -nopgbrk -layout -q
-eol unix -

(remove any line breaks, the second autocmd entry is one continuous line
all the way to the "unix -" statement)

Sunday, August 30, 2009

Fourteen billion years ago expansion started..Wait...

Our whole universe was in a hot dense state,
Then nearly fourteen billion years ago expansion started. Wait...
[pause momentarily, then quickly]

The Earth began to cool,
The autotrophs began to drool,
Neanderthals developed tools,
We built a wall (we built the pyramids),
Math, science, history, unraveling the mysteries,
That all started with the big bang! (bang!)

The above is the first set of lyrics for the theme song of the TV show
"The Big Bang Theory"
http://www.lyricstime.com/barenaked-ladies-the-big-bang-theory-lyrics.html

Two theme songs

Theme song for "How I met your Mother"
Group : "The Solids"
Song : "Hey Beautiful"

For the full album, the theme song clip starts at 3:08.
Details here: http://www.howimetyourblog.com/theme-song/

Youtube link : http://www.youtube.com/watch?v=SowWTahdb8Y
---
Theme song for "Big Bang Theory"
Group : "Barenaked ladies"
Song : "Big Bang Theory Theme"

Show Page from Wikipedia :
http://en.wikipedia.org/wiki/The_Big_Bang_Theory_(TV_series)

Youtube link: http://www.youtube.com/watch?v=Aym8_S3BXKw

Tuesday, August 25, 2009

Breakfast?

2 Waffles + Maple Syrup
2 Small Chicken Nuggets
1/2 Glass of Unsweetened Orange Juice
1 Medium sized Banana
1 Tall glass of Water at room temperature

Tuesday, August 18, 2009

The search for zero

On Google, the search for '0' produced 9,170,000,000 results in 0.10
seconds.

Sunday, August 09, 2009

Ascii Cats

Cats and other felines drawn in Ascii Art format:
http://www.xmission.com/~emailbox/ascii_cats.htm

Saturday, July 11, 2009

Ceiling function-

Ceiling functions symbols are present in Unicode under the font 'Symbol' .
Font: Symbol
Character Code: 233 (Open) ⎡ Unicode: U+23A1, 250(Close) ⎤ Unicode: U+23A4

Friday, July 03, 2009

Tweet from the Windows Command Line

I cobbled together two tiny scripts in about ~30 minutes - that allows me to post tweets to Twitter from the Windows XP command line.

My requirements for the setup were:
a) I should not have to install yet-another-piece of software just to post to twitter. (There are tons of them for download on almost every possible platform)
b) I'd like to be able to tweet from the command line.
c) I want to know what's happening in the code.
d) Since I have perl installed, if I could use it, even better.

So I went to CPAN and looked for Twitter related stuff. Found a lot of packages. I ended up using the Net::Twitter::Lite package in a perl script.

This caused one small issue, running the perl script required that I type in perl scriptname "message" to post to twitter. If I could compress it to just AppName "Message" that would be perfect.

To fix this, I used a Windows Batch file (.bat) to encapsulate the script and pass it the message.

If you want use it, you need two files, (twitterpost.pl and tweet.bat), let me know if you want to look at the source.

Friday, June 26, 2009

Fixing a Yahoo Widget

I managed to fix a bug in a certain Yahoo Widget.
I am a fan of Yahoo Widgets for their clean look and generally good performance.

One particular widget has been a favorite of mine for sometime, because it does one task extremely well. However, it had one flaw. To display the text color correctly, it seem to rely on a set of deprecated Unix system calls. The bug/error was manifested when you tried to change the text color. The only text color it supported was Black _IF_ you did NOT have the Yahoo Unix Utilities installed.

Today, I downloaded the widget and then spent some time reading around the Yahoo Widget developers' section. The reference manual allowed me to find the valid replacement code. It was a two line fix. Remove one line of an old system call then add two lines of code to implement the new API call.

Since Yahoo widgets are just a repackaged compressed/zip file, extracting the code, changing the command repackaging it was simple. :) I was done in <20 minutes. I now have a working widget, that does NOT depend on the Yahoo Unix Utilities. Yay!

Thursday, June 25, 2009

Cosmos decommissioning announcement

COSMOS, the ALTIX 3700 128-cpu symmetric multiprocessor and at one time
our computational flagship, will be retired in mid-June this year. We
urge current users to port their codes to HYDRA as soon as practicable
and to back up all valuable files not residing in their home
directories. Because COSMOS has not been under hardware or software
maintenance for the last three years, a repair from a hardware failure
may just be too costly to afford. Supercomputing Facility analysts are
always available to help with with the transition to HYDRA.

By its retirement, COSMOS will have capped five and a half years of
extremely reliable (99.9% uptime) operation. It remains the favorite of
many users and the only system on campus with large enough RAM (128GB)
to accommodate serial jobs that require large amounts of it . Chemistry
has expressed interest in assuming control and administration of COSMOS
and plans to welcome users from other areas. We will keep our users
posted on any relevant developments.

---
Dear COSMOS users:

The system will be powered off at 9 AM of June 29, 2009. Thereafter, the
Chemistry department will take over its operation. This will be the
LAST notice about the decommissioning of COSMOS.

The Facility will delete all user data from the system right before
power off. Since COSMOS is not under maintenance, the resumption of its
operation, much less a prompt one, is not a certainty. Although we have
every expectation that the transfer will be smooth and uneventful, we
cannot exclude misadventures. The latter may even include junking it
because of high repair costs.
----

Yahoo and Pidgin

Sometime in June 2009, Yahoo modified their IM authentication protocols.
If you are running Pidgin 2.5.6 (www.pidgin.im/) or older, and having
issues connecting, updating to 2.5.7 will fix the issue.

[This is for WinXP-SP3]

Tuesday, June 23, 2009

SCSI is not magic

"SCSI is *not* magic. There are *fundamental* *technical* reasons why you
have to sacrifice a young goat to your SCSI chain every now and then."
-- John F. Woods

Saturday, June 20, 2009

Learn with BOOK

LEARN WITH BOOK



- R. J. Heathorn

A new aid to rapid - almost magical - learning has made its appearance.Indications are that if it catches on all the electronic gadgets will be so much junk.

The new device is known as Built-in Orderly Organized Knowledge. Themakers generally call it by its initials, BOOK.


Many advantages are claimed over the old-style learning and teaching aids on which most people are brought up nowadays. It has no wires, no electric circuit to break down, No connection is needed to an electricity power point. It is made entirely without mechanical parts to go wrong or need replacement.

Anyone can use BOOK, even children, and it fits comfortably into the hands. It can be conveniently used sitting in an armchair by the fire.

How does this revolutionary, unbelievably easy invention work? Basically BOOK consists only of a large number of paper sheets. These may run to hundreds where BOOK covers a lengthy programme of information. Each
sheet bears a number in sequence so that the sheets cannot be used in the wrong order.

To make it even easier for the user to keep the sheets in the proper
order they are held firmly in place by a special locking device called a 'binding'.

Each sheet of paper presents the user with an information sequence in the form of symbols, which he absorbs optically for automatic registration on the brain. When one sheet has been assimilated a flick of the finger turns it over and further information is found on the other side.

By using both sides of each sheet in this way a great economy is effected, thus reducing both the size and cost of BOOK. No buttons needto be pressed to move from one sheet to another, to open or close BOOK, or to start it working.

BOOK may be taken up at any time and used by merely opening it. Instantly it it ready for use. Nothing has to be connected or switched on. The user may turn at will to any sheet, going backwards or forwards as he pleases. A sheet is provided near the beginning as a location finder for any required information sequence.

A small accessory, available at trifling extra cost, is the BOOKmark. This enables the user to pick up his programme where he left off on the previous learning session. BOOKmark is versatile and may be used in any BOOK.

The initial cost varies with the size and subject matter. Already a vast range of BOOKs is available, covering every conceivable subject and adjusted to different levels of aptitude. One BOOK, small enough to be held in the hands, may contain an entire learning schedule.

Once purchased, BOOK requires no further upkeep cost; no batteries or wires are needed, since the motive power, thanks to an ingenious device patented by the makers, is supplied by the brain of the user.

BOOKs may be stored on handy shelves and for ease of reference the
programme schedule is normally indicated on the back of the binding.

Altogether the Built-in Orderly Organized Knowledge seems to have great advantages with no drawbacks. We predict a big future for it.



-------------
Found on slashdot :http://slashdot.org/comments.pl?sid=1276127&cid=28404637

Monday, June 15, 2009

Twitter

So I signed up for the Twitter bandwagon this morning. In classic
fashion, I went for the one username that has been mine for so long, my
full name :P Nothing else I tried was available! (honest!)

If you want to follow me on twitter, here's the relevant link ->
http://m.twitter.com/suneilmohan