Wednesday, July 28, 2010

Lucid desktop

Lucid desktop, A web operating system (WebOS) software that allow you setup own web desktop OS online. This open source WebOS is built with PHP and uses a SQL database for storing data. Plus more, Lucid Desktop WebOS is a multi-user application, which is very modular with the support for installable applications.


With Lucid desktop WebOS, you can access your media, office documents, and other files anywhere. Meanwhile, user can stay up to date with Twitter, RSS feeds, and what’s happening on the web. Plus more, Lucid Desktop already comes with lots of applications like text editor, calculator, image viewer, simple games, web browser, feed reader, music player and more.
With the help of a file manager, you can add-edit-delete files and folders (a context menu makes these steps easier), change the appearance of the desktop with theme support and auto-update the OS to the latest version.

Lucid Desktop Main Features:

  • Extremely customizable: Lucid allows you to pick your own theme, panel layout, and more! Themes and wallpaper can be customized, and additional themes can be installed. You can customize your desktop even more by creating/moving panels, and adding applets to panels. The intensity of effects can also be customized, which can be used to disable animations for slower browsers.
  • Multiple language support: Your locale is automatically detected, and text will appear in your native language. Lucid will even format dates, time, and currency according to your locale. If Lucid does not support your language yet, it will default to English.
  • Easy-to-use file management: Lucid’s file manager acts like any other file manager. It supports drag-and-drop, and copy/paste. You can upload files, and create folders. You can also double-click a file to open it in an application.
  • Take your files with you on the go: You can access any files on Lucid from your mobile phone, using the mobile file browser. Just navigate to your installation, and add /mobile/ to the end.
  • Powerful user management: With Lucid, you can get down to the nitty-gritty when it comes to user management. It has powerful permissions system that allow administrators to limit features such as administration, cross-site requests, and the ability to login. It also has filesystem quotas, to limit how much disk space a user can use. You can also organize users with groups. Permissions and quotas can be set on a per-user, per-group, or global level, which makes user management simple.
  • Easy to create applications: Lucid has everything you need to write powerful applications with ease. You can use the built-in IDE to rapidly develop applications from within the desktop itself. The best part is, you don’t have to write a single line of server-side code! Applications can be written completely in javascript using the Dojo Toolkit, and can even have their own custom widgets.
Building Lucid Desktop WebOS is simple, all you need is follow the installation instruction (pretty straight forward) and prepare  a web server that supports PHP5 and some sort of database support in PHP such as  (mySQL, pgSQL, etc.), as well as SQLite.

sqldf: SQL select on R data frames

sqldf is an R package for runing SQL statements on R data frames, optimized for convenience. The user simply specifies an SQL statement in R using data frame names in place of table names and a database with appropriate table layouts/schema is automatically created, the data frames are automatically loaded into the database, the specified SQL statement is performed, the result is read back into R and the database is deleted all automatically behind the scenes making the database's existence transparent to the user who only specifies the SQL statement. Surprisingly this can at times be faster than the corresponding pure R calculation (although the purpose of the project is convenience and not speed). sqldf is free software published under the GNU General Public License that can be downloaded from CRAN.

Friday, July 23, 2010

JDBC Tutorial

JDBC Tutorial
The JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database.
JDBC stands for Java Database Connectivity.
JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
This tutorial gives a complete understanding on JDBC.

Tuesday, July 13, 2010

Export CSV directly from MySQL

How ofter were you asked by a client for a CSV (or excel) file with data from their app? I get asked that question quite often, so I wanted make the process as easy as possible. And guess what? You can create CSV files directly from MySQL with just one query!

Let’s say you want to export the id, name and email fields from your users table to a CSV file. Here is your code:
SELECT id, name, email INTO OUTFILE '/tmp/result.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY ‘\\’
LINES TERMINATED BY '\n'
FROM users WHERE 1
 
Well, if you know MySQL, you’ll know how to customize this query to spit out the the right data. Your csv file can be found in /tmp/result.csv
Make sure your MySQL server has write permissions to the location where you want to store your results file.

Friday, July 9, 2010

Wednesday, July 7, 2010

Load CSV file into Mysql table

LOAD DATA INFILE can be used to read files obtained from external sources. For example, many programs can export data in comma-separated values (CSV) format, such that lines have fields separated by commas and enclosed within double quotation marks, with an initial line of column names. If the lines in such a file are terminated by carriage return/newline pairs, the statement shown here illustrates the field- and line-handling options you would use to load the file:
LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\r\n'
  IGNORE 1 LINES;

Manage Vtiger Menu

How Manage and customize Vtiger Menu You need to modify the function getAppMenuList in the f...