The Tory Party
Feminism, film, computers and cookies
“In His Image”
Posted by Tory, January 31, 2009 on 10:30 pm | In Amusements | No CommentsLet’s play a game.
*sings*
One of things is not like the others…
One of these things just isn’t the same…

I saw this…

…on the road the other day and I thought, this can’t be right. There has to be another meaning.
NOPE.
At the risk of sounding preachy and sanctimonious… WHAT THE FRICK? WHAT THE FRIIIIIIIICK?
Thirty
Posted by Tory, January 30, 2009 on 5:55 pm | In Amusements | 3 CommentsI just gave money to public radio.
This is yet another indicator of adultitude that is settling around me like feathers after a vigorous pillow fight with youth.
- Choosing as my new car a delicious ‘88 Honda Civic, for reasons such as sentiment, fuel economy, and the previous owner kept meticulous records
- Listening to public radio… podcasts
- Starting to use cloth bags at the supermarket (when I remember ‘em)
Furthermore, things I am likely to do in the next three months:
- Digitize previous owner’s Honda records so I can easily search them.
- Buy my own health insurance.
- Take Jake to a doggie day care entrance exam.
- Make a quiz for determining oldness.
Huh. Then again, I can’t decide if each of these mean I’m old or just a HUGE NERD.
A HUGE OLD NERD.
*Googles “huge old nerd”*
*finds results insufficiently funny*
*Googles “huge nerd”*
*finds this:*

HA HA HA HA. This reminds me of how this past summer I got a whole bottle of Duplin wine in me and the Twin Peaks theme came on a friend’s iPod and I COULD NOT SHUT UP ABOUT IT for the next twenty minutes. “OH MAH GAW ANGELO BADALAMENTI I WANT TO LICK YOUR FACE!” This is because I have deep-seated nostalgic associations with the show ALTHOUGH I HAVE NEVER SEEN IT.
MY BAD.
Lightning Bolt!
Posted by Tory, January 30, 2009 on 1:04 pm | In Amusements | No CommentsRandom_Tangent showed this to me last night. I… I don’t know where to begin… So I won’t.
Busyness
Posted by Tory, January 28, 2009 on 4:07 pm | In News | 4 CommentsI’m a bit ocupado with work and acquiring a new car and baking the world’s finest batch of chocolate-chip banana muffins, and I regret this is taking a toll on the awesomeness of my posts.
But.
By way of consolation, some amusing links:
Silent Printing from Java
Posted by Tory, January 27, 2009 on 9:45 pm | In Amusements, News | No CommentsHey.
Are you having trouble printing from Java?
Do you have a perfect PDF — maybe one you made with iText — but when you print it the edge is cut off?
And you have checked and double-checked your Java, and nothing seems to be wrong?
Hmmm?
Here is a helpful hint — make sure your page size is LETTER, and not, say ISO A4. I know you are too smart to confuse the two, but if you are presumptive and did not check Wikipedia and just remember that one time you were in Office Depot and they seemed like the same, mebs you might make this mistake and struggle with it for two days. Mebs.
Point is, A4 is a little longer and a little skinnier than LETTER — enough to cut off some of your beautiful letter document.
.
If you use iText, make your document size like this:
Document document = new Document(PageSize.LETTER);
Or if you are feeling sassy and landscape-y, like this:
Document document = new Document(PageSize.LETTER.rotate());
.
And when you print, do like this (super simple and dangerous, assuming printer can handle everything, using default and printing silently, etc.):
DocFlavor flavor = DocFlavor.INPUT_STREAM.PDF;
DocAttributeSet printAttributes = new HashDocAttributeSet();
printAttributes.add(MediaSizeName.NA_LETTER);
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = defaultService.createPrintJob();
System.out.println(”Printing ” + outputFilePath + ” to ” + defaultService.getName());
InputStream inputStream;
try {
inputStream = new FileInputStream(outputFilePath);
Doc doc = new SimpleDoc(inputStream, flavor, printAttributes);
try {
job.print(doc, null);
} catch (PrintException e) { e.printStackTrace(); }
} catch (FileNotFoundException e1) { e1.printStackTrace(); }
Or… you know what? If you’re on a Mac, and you want to live even MORE dangerously? (Or maybe just eliminate the possibility of problems with your document, rather than your printing?) SHA-POW:
try {
Runtime.getRuntime().exec(”lp ” + outputFilePath);
System.out.println(”Successfully printed ” + outputFilePath);
} catch (IOException e) {
System.out.println(”Document ‘” + outputFilePath + “‘ failed to print.”);
}
HA HA HA HA. I AM A MAD HAXOR.
(Also, incidentally, iText has an Executable.java class with a silent printing method, but I couldn’t get it to work. Not that that sez anything.)
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^



