I am a fan of the previous incarnation of the PlugComputer so I was excited to see that Marvell have unveiled a new PlugComputer dubbed imaginatively "PlugComputer 3.0."
PlugComputer 3.0 Features:
Smaller sleeker design,
More powerful CPU - 2gz Armanda 300 CPU,
120GB 1.8-inch SATA hard drive,
Wifi,
Bluetooth,
10/100/1000 wired Ethernet,
USB 2.0.
512MB of RAM
512MB of Flash memory
I for one would like to see an additional Ethernet port added to increase application flexibility, for some applications where you are using clustered plugs or even for routing, having multiple Ethernet ports is a must.
Even without multiple ethernet ports, these low power consumption devices really could have a place in SME environments, replacing large cumbersome legacy hardware with compact Linux plug servers.
More information about the PlugComputer can be found here
Here's how to set up field validation based on dynamic values from another table.
Using the products.dbf table from the southwind sample database, validation can be added to the categoryid field to ensure it matches an existing categoryid from the categories.dbf table.
open database southwindThe rlookup() function checks whether an expression exists in the index (master or specified) of the specified table . An attempt to update categoryid with a value not in the list will give an error: Validation on field 'CATEGORYID' failed.
alter table products add constraint;
(categoryid set check rlookup(products.categoryid,categories))
If you have access to the Recital Workbench, you can use the modify structure worksurface to add and alter your dictionary entries, including a customized error message if required.
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.
// declare an empty dynamic array a = array() // declare a simple dynamic array a = array("barry", "recital", "boston") foreach a as value echo value endfor // declare an associative array a = array("name" => "barry", "company" => "recital", "location" => "boston") echo "length of a is " + len(a) foreach a as key => value echo "key=" + key + ", value=" + value endfor
The Recital Oracle Gateway requires the Oracle libclntsh.so shared library. If this file is unknown to ld.so.conf, add it using the ldconfig command.
Recital implements SQL-92 and most of the SQL-99 standard for SQL, but also provides lower level navigational data access for performing high transaction throughput. It is the choice of the application developer whether to use SQL, navigational data access, or a combination of both depending upon the type of application being developed.
lslk lists information about locks held on files with local inodes on systems running linux.
Install it with:
yum install lslk
The 64bit port of Recital requires these libraries to allow access to 32bit Xbase and C-ISAM data files which are 32bit.
If you do not have these libraries installed you will either get a "can't find db.exe" or an "error loading shared libraries" when trying to run or license Recital.
Installing the ia32 shared libraries
Redhat EL 5 / Centos 5 / Fedora 10
-
Insert the Red Hat Enterprise Linux 5 Supplementary CD, which contains the ia32el package.
-
After the system has mounted the CD, change to the directory containing the Supplementary packages. For example:
cd /media/cdrom/Supplementary/
-
Install the ia32el package:
rpm -Uvh ia32el-<version>.ia64.rpm
yum install ia32el
Ubuntu / Debian
sudo apt-get install ia32-libs
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); ?>
DirectoryIndex default.rsp index.html