Archive for April, 2006

Twin Sisters

Sunday, April 30th, 2006

Is it just me or is Haley Berry stealing Gigi Edgley’s Chiana look in X3? I swear, X3 storm and Chiana look like they were separated at birth:

Storm and Chiana - twin sisters?

If they painted Haley the same grayish paint, she could play Chiana’s sister P

Can’t wait for X3. So far the X-men movies have been getting better. X1 was ok, X2 was better, so if that trend continues X3 should be actually a good movie. But then again, who knows.

Tags: , , , , , ,

Monster Mega Breackfast

Saturday, April 29th, 2006
Monster Mega Breackfast
Monster Mega Breackfast,
originally uploaded by maciakl.

Ark and me went to the Red Hawk Diner today. We made the mistake of ordering their Mega Meals. He ordered the Gut Buster and I got the 12″ Pankakes.

To my dismay, these pankakes were called 12″ because they have a 12″ diameter. Duh! I did not expect them to be that big. I don’t know what the hell was I thinking. They are fucking huge ass, mastodonic, garganduan pankakes!

The manager told me that if I eat them both, my meal is free P I tried, but couldn’t do it. I didn’t even finish one of them. I think I need to bring Nick, our local eathing champion, with me next time )

Needless to say, I think I’m done with pankakes for a while P

Best Fan Film Ever!

Friday, April 28th, 2006

Rayan vs Dorkman must be one of the most awesome Star Wars fan films I have ever seen. Check it out!

For more info go to rayanvsdorkman.com

Tags: , , , , ,

LaTex Annoyances

Friday, April 28th, 2006

I really like LaTex. I much prefer to typset my papers, rather than manufacture them in word. But every once in a while, I find little things that make using LaTex a PITA.

For example, in my document, I have text that often needs to be repeated. For example, I need the title on the titlepage (duh), the copyright page, the signature page and etc… Same goes for actor. I spent countless hours searching how to extract data from the built in variables initialized via the standard \author and \title calls. I even emailed my old mentor in all things LaTex and he also had no clue.

So I decided to fake it:

\newcommand{\printtitle}{Title of My Paper}

Now wherever I need to put title, I just use \printtitle and I’m done. This is not a perfect solution, but it works. At least as long as you don’t start nesting functions. For example if you do:

\uppercase{\printtitle}

You get lowercase letters. Why? Latex does not have a proper stack, and so nesting functions may or may not work depending on circumstances. At least that’s what I have been told.

This is annoying as shit. Anyone knows the proper way to do this? I know that the answer must be locked up somewhere deap within article.cls which includes the implementation of the \maketitle call. But for the life of me, I can’t decipher how to extract title and author from there.

Tags: , , ,

What is a pirate?

Friday, April 28th, 2006

Abso-fucking-lutely priceless!

Every time you say “piracy” when reffering to copyright infringement, you are helping to spread the RIAA’s and MPAA’s evil propaganda. Think about this.
Tags: , , , ,

Makes you think…

Thursday, April 27th, 2006

Note, this video is over an hour long, but it is worth it:

Think about this stuff when you watch United 93. Is United 93 an inspirational story, or a governmental propaganda?

Everything you know about 9/11 might be a lie. Including the story of United 93. Watch the clip I posted. It really asks allot of good questions.

Tags: , , , ,

Tape Drives for $2k?

Wednesday, April 26th, 2006

My hardware people recomend switching to a HP LTO2 tape drive for backups. I looked at their qoute, and I nearly fell off my chair. They were asking almost $2,000 just for the drive! Holy poop on a stick!

I was so shocked I actually went to HP website to verify the pricing. And yeah, it is within the ballpark. This is crazy! Absolutely in-fucking-sane. I can get a semi-decent, brand new desktop for that price! WTF! I can’t understand why would these things be so damn expensive!

Why don’t I just buy 5 250GB firewire drives for half the price of that drive, and use them to image my disk every day of the week?

I just don’t see my boss signing off on a $2k tape drive order…

Tags: , , , , , , ,

Latex Conditionals

Tuesday, April 25th, 2006

If you are a graduate student, and have some sort of assistantship position I have one advice for you. Do not tell your professors that you know/enjoy/use latex. Do not talk to them about latex. If they figure out that you do use it from the superb visual quality of your written assignments they may corner you and ask you about it directly. In that case shrug, make a dumb expression and quickly change the subject/run away.

The truth is that today, most graduate students are brain-dead MS word zombies. In fact most faculty members hate non-wysiwyg stuff with a passion. So once the they spot a latex user they are going to pounce upon him, and ride him till he drops dead, or graduates (whichever comes first).

This is, ladies and gentlemen, how I got stuck making thesis templates for Dr. Antoniou who is about ready to strange me these days. I’m officially working on the templates since… Er… Sometime last semester P

Yes, I am the undisputed king of procrastination. I could teach you all a thing or two about procrastinating to the fullest. But not today. Come back tomorrow… Or next week maybe.

What I really wanted to talk about today are the conditional statements in Latex. I just typed all this back-story to give you some background on the problem I was facing. You see, at MSU it is only possible to submit a Masters Thesis in May, August or January. Thus, I wanted to make my template automatically select the correct month.

I decided to use ifthen package to do the conditionals. The ifthenelse statement seemed to be perfect here:

\newcommand{\shorttoday}{
    \ifthenelse{\number\month<5}
    {May, }
    {
       \ifthenelse{\number\month <8}
       {August, }
       {January, }
    }
\number\year}

Now, whenever you do \shorttoday you should get an appropriate month. For example, right now it displays May. But if I change month to say December using \month 12 I will get January )

Now my only issue is that for January I should increment the year somehow. Any tips on how to do that? So far I haven’t figured out how that could be done.

Update Thu, April 27 2006, 09:57 PM

I finally figured it out:

\newcounter{theyear}
\setcounter{theyear}{\number\year}
\newcommand{\shorttoday}{
    \ifthenelse{\number\month<5}
    {May, }
   {
       \ifthenelse{\number\month <8}
       {August, }
       {\addtocounter{theyear}{1} January, }
   }
   \value{theyear}}

It works )

Tags: , , ,

Text Dumping PDF files

Saturday, April 22nd, 2006

The other day I got a request to convert a PDF file into a text file or something that could be imported to Excel. The was essentially some big accounting mumbo-jumbo full of numbers arranged in columns with fancy headings. There were over 200 pages of it.

Now the easiest thing to do was to use the Windows version of Adobe Acrobat and simply save the file as .txt. But of course, that knocked out all the white space. All the colums run into eachother and the file looked like crap. There is no way you could do anything useful with it.

Of course my linux PDF reader (acroread) did not have the “Save as Text” option, so the first place I turned to was the nifty linux app pdftotext.

pdftotext bigstupidfile.pdf

This gives you a quick text dump which is roughly equivalent to the buit in Acrobat save behavior. But fortunately pdftotext has all kindso of nifty features. If you want to preserve the whitespace and layout details you should do:

pdftotext -layout -eol dos bigstupidfile.pdf

The -eol dos bit is there to specify the end of line style. Remember, I’m on a unix box converting this file for a windows dude who will want to import this stuff to excel.

Needles to say, the trick worked perfectly. The columns were preserved and the file looked great. So whenever you need to convert some pdf data into text I highly recommend using -layout option.

Tags: , , ,

Save the Internet

Saturday, April 22nd, 2006

Come on people, this is serious!

Let me show you how the internet works. Right now it is set up like this:
  • You pay for your own bandwidth (up and down) to an ISP
  • Google pays for it’s own bandwidth
  • NSP’s like AT&T and Verizon route the traffic regardless of where it is coming from

This setup works. But if AT&T, Verizon and palls have their way it will be set up this way:

  • You pay for your bandwidth
  • Google pays for its’ bandwidth
  • Google pays AT&T for it’s traffic to have higher priority than yours
  • Google pays Verizon for it’s traffic to have higher priority than yours
  • Google pays [insert NSP name here] for it’s traffic to have higher priority than yours
  • Google pays etc..
  • If google does not pay the required price, it page will transferred so slowly most surfers will think the site is down

We need network neutrality. Tiered internet is bullshit!

Tags: , , ,


Bad Behavior has blocked access attempts in the last 7 days.