Recently I had a project that needed to create and format a word document, based on data from a MySQL database. While the solution was on an MS platform that had Word available, I could only use PHP for the scripting language as it was a language that was used by the rest of the team. The system would call the Word com object, create a new word document and formatted a report, using the “word.application” COM object.
One issue I ran across was that that coloring a font object in any VBA Macro script often times used a simple built-in function called “RGB”. I translated a PERL version below that seems to work quite well in PHP. Hope this helps someone else. This can also be used in formated RGB values in Excel document manipulations.
function phpRGB ($r,$g,$b){
return $r + (256*$g) + (65536*$b);
}
//example usage:
$wobj->Selection->Font->Italic = 1;
$wobj->Selection->Font->Color = phpRGB(153,204,255);
I had small issue recently in that the Netbeans 6.7 database explorer was timing out just trying to connect to my production database. Apparently the Mysql server needs to respond back within a few mili-seconds and there are no configuration settings in Netbeans to increase this timeout. Our production database has an initial lag time when you first connect, but it is pretty zippy thereafter (I suspect my cheap home based switches or my Windows computer).
Read more…
Great article from a great blog today:
Oracle’s purchase of Sun went on hold while the DoJ continues its review. Last Friday, Daniel Wall, a lawyer at Latham & Watkin representing Oracle, said that “we were almost able to resolve everything before the Second Request deadline. All that’s left is one narrow issue about the way rights to Java are licensed that is never going to get in the way of the deal.” So, what does Oracle owning Java mean to technology companies? The answer depends on if your perspective.theCTO, The CTO’s blog, Jul 2009
There are a lot of questions that I’m sure developers world-wide are asking:
What happens to MySQL?
What happens to GlassFish?
What happens to Netbeans?
A sophisticated automated data intelligence framework that can discretely crawl, analyze, process and integrate target data with any customer system. The system was built using sophisticated algorithms to gather data and appear like any other traditional web data on the Internet. The flexibility of the framework allows it to be customized to suit any particular need including: data submission, mining, data aggregation, change detection alerts (fax/e-mail/text message/phone). The framework can also be used in a “stealth” mode, to mask the framework’s originating ip and geo-location.
The system’s “personal action response” framework allows the system to be trained to respond to different events. For instance, it has been used to monitor a search database and automatically “submit” a form when certain results are detected. It was trained to recover on failure of the remote system database, so that it would always return the correct results for the client.
The system’s flexibility allows it to be trained for any type of trigger points, including submitting data/documents securely through forms or other forms of electronic gateways (fax, ssh, ftp, text,sms,ssl,etc). In essence the framework can be used for whatever the client’s business requirements.
The system has been refined over several years with project ranging from personalized action response monitoring to full Department of Transportation safety monitoring system for DOT Truck companies.
The framework can be hosted on any Linux/Windows platform and can be easily be hosted within any virtualized environment (VMWare Server/ESXi/Virtualbox/etc).