Archive for Featured

ExtJS Treepanel with MySQL data

// December 29th, 2011 // 3 Comments » // Code, Featured

In this tutorial I’ll show you how to build an ExtJS treepanel using data coming from MySQL, while using PHP to create the json array sent to the treepanel. Here’s how:

(more…)

How to connect to Microsoft SQL server from Linux via command line

// September 23rd, 2011 // 2 Comments » // Code, Featured

Although 95% of my work is done in Linux and MySQL, there are those unfortunate times I need to manipulate some data on a Microsoft SQL server. I didn’t want to install any apps on my computer that weren’t open source and I didn’t want to use a Micro$uck app through wine either. So after a few searches I came across an open source project called Sqsh. In this tutorial I’ll show you how to install sqsh and access a Microsoft SQL server from the Linux command line.

(more…)

Setup Guest OS on a virtual disc image (virtual machine) on Linux

// June 9th, 2011 // No Comments » // Code, Featured

(This tutorial assumes you own a legal copy of the OS you’ll be using to install as the “guest” OS, be it Unix, Winblows or any other Operating System not mentioned here)

In this tutorial I’ll walk you through setting up a virtual machine in Linux using QEMU. According to QEMU site, QEMU is a generic and open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

(more…)

Change ExtJs EditorGridPanel row color after edit

// May 19th, 2011 // 2 Comments » // Code, Featured

By adding an afteredit listener to your editor grid you’ll be able to change the row color on the fly, right after
the cell has been changed so users will be able to tell which records have been changed. I’ve added this instead of the little red tickbox since it is easier for the user to see and it just looks better.
Just in case this would conflict with the little red icon, I also went ahead and removed it with my custom.css file (shown below).

(more…)

Open iReport jrxml from ExtJs as pdf

// May 17th, 2011 // 1 Comment » // Code, Featured

In this post I’ll show you how to create a report using iReport, uploading to your jasperserver running on tomcat and accessing the report from an ExtJS grid. In addition to Apache, MySql and ExtJS libraries (I’m assuming you already have those installed) you will need to get the following installed:

1. iReport (on your laptop/workstation)
2. tomcat (on your server)
3. jasperserver (on your server)

(more…)

Extjs Cascading (Dependent) Combo Boxes

// April 11th, 2011 // 7 Comments » // Code, Featured

This tutorial was written after one of my readers requested help with creating a dependent dropdown menu for continents, countries and states. I hope this helps everyone out there, who like myself, have struggled with this in the past.

First you’ll need to create the connect.php file, explained here.

Next create the 3 mysql/php/json files used for:
1. gathering data from mysql,
2. storing the data into a json array for each of the combo boxes you’ll be using (Continent, Country and State).

(Please adjust the paths to connect.php (mentioned above) and all other files used in this example
accordingly and create the required tables in mysql as needed)

Start by creating the continentQ.php file, to gather the continent data:
(more…)

Create Extjs PDF Report

// February 12th, 2011 // 12 Comments » // Code, Featured

I have been looking for ways to export MySQL data to pdf using ExtJS, and up to this day I haven’t been able to
find a simple solution. I finally came across a project called “PHPJasperXML”, which allows me to access MySQL data, export it to pdf from my ExtJS application, using php and without having to use any javascript.
Albeit, the report isn’t necessarily created by ExtJS, it is extremely easy to create the report and implement this on your ExtJS application.

**** Update May 17th 2011 ****
This is an alternate solution to PHPJasperXML, it uses jasperserver to store the report which can be accessed via its url and you can also use subreports and multiple parameters.

*****************************

(more…)

Array as ExtJS baseParams

// August 21st, 2010 // 3 Comments » // Code, Featured

In this tutorial I’ll walk you through using the results of an array as an ExtJS baseParams, with the help of php implode and php explode. ExtJS baseParams are parameters that can be passed with all requests, parameters are encoded as standard HTTP parameter using Ext.urlEncode. A typical basepaParams usage may look like e.g. baseParams: {id: ‘123′, foo: ‘bar’}, however, we’ll be using the results of an array as our baseParams instead of a single value. (more…)

How to Change Permissions Recursively on Linux

// August 14th, 2010 // No Comments » // Code, Featured

This is a quick one, how to change permissions recursively on directories or files. Say you want to change the permission on all directories under /home/username to 775 and all files to 664. All you need to do is issue the following commands: (more…)

How to Install Handbrake on Ubuntu 10.04 Lucid Lynx

// August 12th, 2010 // 8 Comments » // Code, Featured, Video

HandBrake is an open-source, GPL-licensed, multi-platform, multi-threaded video trans-coder, available for MacOS X, Linux and Windows. In this tutorial I’ll walk you through setting up the latest version of HandBrake on Ubuntu 10.04 Lucid Lynx, it is rather easy.
Unfortunately, however, as of Ubuntu 9.10 they no longer have their latest version of the installer available for Ubuntu on their website — “HandBrake 0.9.4 is no longer available due to compatibility issues with the newer version of gnome”. (more…)