Thursday, December 29, 2011

JSON

When I'm looking for a tutorial that will explain JSON concepts, i found this use-full site which will explain JSON, JSON+Twitter API and JSON + PHP


Shell Intro for Bigginners

Started reading with ubuntu 11.10 tutorials using shell and this is the start reading the basic command in the shell linux environment. :)
Here the PDF File below.
Shell Intro for biginners

Ajax + Php, Pagination/Paginator

I was bored last night, so i decided to create a pagination simple program using sajax here's a simple example i created.
below is the function.
You can also check live demo here.

Download pagination

HowTo? .htaccess SEO-friendly URL

I've research about htaccess on how to create a friendly URL like http://www.emisyl.com/blog instead of http://www.emisyl.com?page=blog.

All you need to do is to change some part of httpd.conf, please see below

Options FollowSymLinks      
AllowOverride None

to

Options FollowSymLinks  
AllowOverride All 

And can try creating file name .htaccess and place it inside the your website folder or test folder.

How To Become Root Linux Command Line

Site source: http://wiki.centos.org/TipsAndTricks/BecomingRoot

Many commands can only be run as the root user so to run these commands we need to become "root". To do this, we can use the su command (substitute user). The su command takes the following format:

su -
or

su
but most commonly we will use su to become the root user:

su - root
or

su root
If no username is specified, then the root user is assumed, so the above is often shortened to:

su -
or

su
but the two commands above behave differently. 'su ' gives the current user the identity of whereas 'su - ' gives the current user the identity of together with 's environment that would be obtained by logging in as .

Often a user will become root using just 'su', try to run a command (eg, ifconfig), and get a 'command not found' error. For example:

su
Password:
ifconfig
bash: ifconfig: command not found

The reason is that regular system users and the root user have different PATH environment variables (you can view a users PATH with 'echo $PATH'). When you type a Linux command, the shell will search the users PATH to try to locate the command to run. It starts searching each directory on the PATH until a match is found.

Commands for regular users are mostly located in /usr/local/bin, /usr/bin, and /bin. However, root commands are mostly located in /usr/local/sbin, /usr/sbin, and /sbinand root's PATH reflects this.When you become root by using 'su -', you also adopt root's PATH whereas using just 'su' retains the original users PATH, hence why becoming root using just 'su' and trying to run a command located in /usr/local/sbin, /usr/sbin, or /sbin results in a 'command not found' error. For a more detailed explanation, see the bash manual page (man bash), particularly the section on INVOCATION and login shells.

So you either need to specify the full PATH to the command if you just used 'su' (eg, /sbin/ifconfig) or use 'su -' when becoming root.

Disabled and Unabled Control Using CSharp

I'm converting one of my function in Vb6.0 to C#.net this function will allow the user to disabled and enabled Controls in the form, you can also add a if statement for other Controls in the form. :)

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
test t = new test();

private void button1_Click(object sender, EventArgs e)
{

t.tagControl(Form.ActiveForm);
}

private void button2_Click(object sender, EventArgs e)
{
t.tagControl(Form.ActiveForm);
}
}
}



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
test t = new test();

private void button1_Click(object sender, EventArgs e)
{

t.tagControl(Form.ActiveForm);
}

private void button2_Click(object sender, EventArgs e)
{
t.tagControl(Form.ActiveForm);
}
}
}

PHP Shortcuts of If-Else statement

One day i was assigned to update a website which created by my mentor in php, while updating the some parts of the function I've found a 1 line of which I've never encountered before in my PHP life, so i asked him if what is the purpose of this line of code then he said it is a shortcut If statement in php, i placed the sample line of codes below, please check.

$authenticated = true; 
// 1 standard if-else statement 
if ($authenticated) 
{ 
 echo 'YES'; 
} 
else 
{       
 echo 'NO'; 
} 
// same with 1 
if ($authenticated) { echo 'YES'; } else { echo 'NO'; } 
// [2] lil bit shortcut 
if ($authenticated) 
 echo 'YES'; 
else  
 echo 'NO'; 
// 3 the shortcut 
echo $result = ($authenticated) ? 'YES' : 'NO';



Monday, February 14, 2011

Student Information program using vb6.0

Student Information program using vb6.0 which compose of the following functions.

1. Add or Append
2. Update
3. Delete
4. Seacrch
5. Displaying Data
6. Reports
7. Displaying record to MSFlexGrid.
8. Displaying record to Listview.

Sunday, February 6, 2011

Basic Data Manipulation using VB 6.0

Hello everyone! :D

This is a very simple program which i created for my students in DBMS (Database Management System), this application allows the user to add, search and display data using MS Access if you noticed that there's no delete and edit, well i never put a function yet, because i want that to be finished by my pretty and handsome students in DBMS. hehehehehe Enjoyed to download this application maybe later i'll just update this one if they are done working the edit and delete.

Oppsss i forgot, i mean including the report too.... :D

Heres the link below.

 

blogger templates | Make Money Online