Tuesday, March 31, 2009

Uncommon Sense

I would like to see use of any touchscreen device while driving banned.  Not being able to press a button without looking at the screen is stupid and I read about more and more radios and nav systems that don't have real buttons.  Give the passenger their own controls if you want, but don't force the driver to press a flat screen that has no tactile feedback to change radio stations or turn on the A/C.

Wednesday, March 25, 2009

Aspose Slides Pro-Tip

Replace all your endline, newlines, and carriage return characters ('\n' and '\r') with the vertical tab character ('\v' or if you're in java '\013').  Otherwise you'll get exceptions if you try to put text in a paragraph that contains a newline.  This way you don't have to do anything stupid and ugly like this.

Monday, March 23, 2009

Electronic Library

I have this idea for an extra display next to my computer using electronic paper instead of a monitor.  It would take a flash memory card (SD, microSD, or whatever), have ethernet built in, and basically be a library.  You would install a virtual printer that would send documents to this device over the network or use a simple web interface.  Documents would be classified by dewey decimal or some variant.  They would be stored on the device as TeX or LaTeX, with a sqllite DB to store the categorization/classification info (much like jsr-170 document libraries, but without java). 

It would be a decent replacement for printing stuff out with the exception that I don't think color e-Ink has really arrived yet. 
I'm thinking it could be implemented on an ardunio and it probably wouldn't use a whole heckuva lot of power.

Tuesday, March 17, 2009

Doc Watson!

My favorite living guitarist and a great singer too.  I'm really excited to see him tonight.

Thursday, March 12, 2009

Finding Excel Chart Value Axis Maximum Before You Render the Chart

Say you, for some crazy reason, needed to know what the maximum value of your chart's value axis (y-axis, usually) was so you could use it to calculate random things related to the chart (for example, the coordinates of data points so you could draw lines ending at those data points using Aspose.Cells).

You might do this, if you had already found out what your maximum value on the whole chart was:
int magnitude = (int)java.lang.Math.pow(10,java.lang.Math.round(java.lang.Math.log10(maximum / 8)));
int increments = (int)( java.lang.Math.round((maximum / 8)/magnitude)*magnitude);
int axismaximum = java.lang.Math.round((increments * 8)/magnitude)*magnitude + increments;
Assuming your axis has a linear scale, and your minimum is zero, it should work. 8 is the number of horizontal lines on your chart.  Adjust accordingly.

Tuesday, March 03, 2009

OLE Object Class Names

Here's a list that is extremely helpful if you're trying to embed OLE objects in MS Office files using Aspose (eg pastnig Excel charts into Powerpoint files).  It's the kind of thing that should have been linked from the Aspose documentation.