Roy Tang

Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart.

Blog Notes Photos Links Archives About Now

Notes: Microblog-like status updates. You can subscribe to an RSS feed of this list.

Nov 2008

Clearly Chris Woltereck was one of the best players in the room, and probably could have won the tournament with a ham sandwich.
--Gerry Thompson on Cruel Control winning the 25-Oct SCG 5k Standard Tournament
Posted by under notes at / Tags: #quotes / Imported from tumblr / Syndicated: tumblr / 0

Oct 2008

In my program, I have been receiving an error when I use a command-line compile command for mxmlc. The error is related to an embedded font name not being correctly identified by flex in the system fonts list.

However, on a whim, I decided to copy the code to Flex Builder and compile it there. To my surprise, it worked, and it found the proper font using the same system name I had given (PMingLiU).

I suspected my problem may be a locale one, and that my system cannot correctly identify the font name because of locale considerations.

I’ve tried setting the locale of the compile code to en_US, to no avail. So I would like to ask if anyone here knows how exactly Flex Builder invokes the MXML compiler and what differences there are compared to running mxmlc directly? We know it’s not using the mxmlc.exe directly, since we tried replacing mxmlc with our own executable to capture the command line parameters.

If it matters, the OS used is Windows XP.

I need to parse a large amount of text that uses HTML font tags for formatting,

For example:

<font face="fontname" ...>Some text</font>

Specifically, I need to determine which characters would be rendered using each font used in the text. I need to be able to handle stuff like font tags inside another font tag.

I need to use C# for this. Is there some sort of C# parser class to make this easier? Or would I have to write it myself?


Sep 2008

You’ll need a master record in a master table that contains the information common among all versions.

Then each child table uses master record id + version no as part of the primary key.

It can be done without the master table, but in my experience it will tend to make the SQL statements a lot messier.

Posted by under notes at / Tags: #database #database-design #versioning / Imported from stackexchange / Syndicated: stackexchange / 0

I’m writing a C# program that acts as a PowerPoint 2007 plugin. On some machines, some calls to the PowerPoint object model throw a COMException with the message RPC_E_SYS_CALL_FAILED. I couldn’t find any specific advice on what to do regarding this error, or how to avoid it. From Googling it looks like something to do with the message queue or Single-Threaded Apartments. Or am I way off?

Example of the error message is:

System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED))
at Microsoft.Office.Interop.PowerPoint._Presentation.get_FullName()

Unfortunately, the problem is occurring on a client’s machine, so I have no easy way to debug it! Should I just retry the calls whenever I get this error?

Any advice to help me resolve this problem would be greatly appreciated!

Aug 2008

Jul 2008

Jan 2008

Dec 2007