The PHP ODBC functions can be used to access Recital data via the Recital Universal ODBC Driver.
The following example connects to a Recital ODBC datasource, executes a query then outputs all the results from the resultset.
<?php
$sql = "select country from customers limit 10";
$conn = odbc_connect('Recital ODBC test', '?', '?');
$rs = odbc_exec($conn, $sql);
odbc_result_all($rs);
odbc_close($conn);
?>
Output:
<table><tr><th>Country</th></tr>
<tr><td>Germany </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>UK </td></tr>
<tr><td>Sweden </td></tr>
<tr><td>Germany </td></tr>
<tr><td>France </td></tr>
<tr><td>Spain </td></tr>
<tr><td>France </td></tr>
<tr><td>Canada </td></tr>
</table>
For information on installing and configuring the Recital Universal ODBC Driver and creating and modifying datasources, please see the Documentation section of this web site.
Note: Use of ? for the username and password on the local server is dependent on DB_LOCAL_LOGIN being enabled.
The following example connects to a Recital ODBC datasource, executes a query then outputs all the results from the resultset.
<?php
$sql = "select country from customers limit 10";
$conn = odbc_connect('Recital ODBC test', '?', '?');
$rs = odbc_exec($conn, $sql);
odbc_result_all($rs);
odbc_close($conn);
?>
Output:
<table><tr><th>Country</th></tr>
<tr><td>Germany </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>Mexico </td></tr>
<tr><td>UK </td></tr>
<tr><td>Sweden </td></tr>
<tr><td>Germany </td></tr>
<tr><td>France </td></tr>
<tr><td>Spain </td></tr>
<tr><td>France </td></tr>
<tr><td>Canada </td></tr>
</table>
For information on installing and configuring the Recital Universal ODBC Driver and creating and modifying datasources, please see the Documentation section of this web site.
Note: Use of ? for the username and password on the local server is dependent on DB_LOCAL_LOGIN being enabled.
The getUIComponentBitmapData method can create bitmapdata for a given IUIComponent. Pass any UIcomponent to get its respective bitmapdata.
public static function getUIComponentBitmapData(target:IUIComponent):BitmapData {
var resultBitmapData:BitmapData = new BitmapData(target.width, target.height);
var m:Matrix = new Matrix();
resultBitmapData.draw(target, m);
return resultBitmapData;
}
Now convert the bitmapdata to a jpeg bytearray.
private static function encodeToJPEG(data:BitmapData, quality:Number = 75):ByteArray {
var encoder:JPGEncoder = new JPGEncoder(quality);
return encoder.encode(data);
}
Now encode the ByteArray into Base64.
public static function base64Encode(data:ByteArray):String {
var encoder:Base64Encoder = new Base64Encoder();
encoder.encodeBytes(data);
return encoder.flush();
}
Upload the base64 encoded ByteArray to the server.
public static uploadData():void {
var url:String = "saveFile.php";
var urlRequest:URLRequest = new URLRequest(url);
urlRequest.method = URLRequestMethod.POST;
var urlLoader:URLLoader = new URLLoader();
var urlVariables:URLVariables = new URLVariables();
urlVariables.file = jpgEncodedFile; // as returned from base64Encode()
urlLoader.data = urlVariables;
urlLoader.load(urlRequest);
}
The saveFile.php file on the server.
$input = $_POST['file']; $fp = fopen('filename.jpg', 'w'); fwrite($fp, base64_decode($input)); fclose($fp); ?>
Latest Development News
The Lianja Application Platform is a cost-effective cloud database computing platform for SMEs (Small and Medium-sized Enterprises) that lets them focus on developing and deploying business Apps without the need to invest in lengthy application development times and an expensive IT infrastructure.The three pillars of Lianja are:
- The Lianja App Builder
- The Lianja Cloud Database
- Lianja.com Apps
There is a good article on the gluster website here which gives some good information regarding file system optimization suitable for a HA Recital cluster solution.
In Linux you can run lsof and pipe it though grep for the files you are interested in, for example;
$ lsof | grep db.exe | grep accounts db.exe 16897 john 6uw REG 253,0 20012 3413872 /usr/recital100/qa/accounts.dbf db.exe 16897 john 7u REG 253,0 4176 3413885 /usr/recital100/qa/accounts.dbxIf you want to check for locks you can use lslk, for example;
$ lslk | grep db.exe | grep accounts db.exe 16897 253,0 3413872 20012 w 0 0 0 12319 0 /usr/recital100/qa/accounts.dbfIf you don't have lslk installed you can install it with one of the updaters, for example on redhat linux:
$ yum update lslk
The first step is to create an Apple Disk Image File (DMG) distribution in a GUI tool, I used DMG Packager.
Then create a directory that will contain all the files that you want included in the DMG file. The best way to do this is to mount the DMG file you created and copy the files into this directory. Then move the .app file created by BitRock into this directory.
Then run the hdiutil utility to create a DMG file
$hdiutil create /tmp/tmp.dmg -ov -volname "RecitalInstall" -fs HFS+ -srcfolder "/tmp/macosxdist/"
Finally call hdutil to convert the writable, to a compressed (and such not writable) DMG
$hdiutil convert /tmp/tmp.dmg -format UDZO -o RecitalInstall.dmg
So now each time before you build a new distribution with the above commands, just move the new .app file into the directory containing the files to be added to the DMG file.
I've already added this to the makefile so after BitRock creates the .app file the hdiutil command is called to automatically generate the new DMG file.
Add this directive to your /etc/httpd/httpd.conf file and restart apache.
DirectoryIndex default.rsp index.html
Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE. This plugin is required in order to use the recital eclipse workspace.
After installing nomachine, if you get an error connecting whereby nomachine errors out after "Negotiating link parameters"
When installing nomachine on redhat 5.3 64-bit be sure to:
- Make sure you have installed the 64-bit packages as the 32-bit ones will not work.
- add the hostname to /etc/hosts
- Check "Disable encryption of all traffic" (in configuration / advanced tab)
On Centos 32-bit:
- add the hostname to /etc/hosts
- make sure the host IP is not specified as 127.0.0.1 line
- Uncheck "Disable encryption of all traffic" (in configuration / advanced tab)
By default Recital uses PAM to authenticate users. It is also possible to tell PAM to use Kerberos. Simply replace the existing entries in the /etc/pam.d/recital file with the ones below:
auth sufficient pam_krb5.so try_first_pass
auth sufficient pam_unix.so shadow nullok try_first_pass
account required pam_unix.so broken_shadow
account [default=bad success=ok user_unknown=ignore] pam_krb5.so
auth sufficient pam_krb5.so try_first_pass
auth sufficient pam_unix.so shadow nullok try_first_pass
account required pam_unix.so broken_shadow
account [default=bad success=ok user_unknown=ignore] pam_krb5.so