Posts

Showing posts from January, 2015

Java / JDBC DATABASE CLASS

As all we know java is such a difficult language  , esspecialy to begginer programmers , So in this  java sample  code  we find a basc java database class using JDBC driver : demo class

Google reCAPTCHA tutorial

Image
Rcently Google has announced new service to prevent spams to your website. They name it  “NO CAPTCHA reCAPTCHA”  .  In this tutorial i am going to show you how to use it in your website. this is  simple script. . 1.Register your website and get Secret Key. Very first thing you need to do is register your website on  Google recaptcha  to do that click  here . You have To Login to your Google account and submit the form. ps : in my case i add the localhost.dev domain by modifing the host file in C:\Windows\System32\Drivers\etc add the line  127.0.0.1     localhost.dev <VirtualHost *:80> DocumentRoot /path/to/document/root/site/ ServerName site.dev ServerAlias localhost.dev # Other directives here </VirtualHost> <VirtualHost *:80> DocumentRoot /path/to/document/root/ ServerName localhost # Other directives here </VirtualHost> Once submit, Google will provide you following two information. Site key Secret key

Great Slider Wordpress Plugin

As any web devloper i like cms such wordpress and joomla ,  but the thing that always have to think  about is is  :  THE PLUGINS    So i started develop my own plugins , my First plugin was a slider plugin using Wordpress Slider Built With carouFredSel & Foundation 5   The plugin just add the folder into your wp-content/plugin directory , activate it from the dashoard , also you have to add this line of code in your theme great_slide_slides () or : great_partners_slide_show() demo

PHP DATABASE CLASS using PDO

Couple of mounths ago i relased a sample PHP5 database connecting class using the PDO object How i can use it ? just include or require this  PHP file  Here The Php File  in your project and  and use the magic class :) /** $database = new Db(); /** /** $database->query('SELECT FName, LName, Age, Gender FROM mytable WHERE LName = :lname'); /** $database->bind(':lname', 'Smith'); /** $rows = $database->resultset(); /** /** echo $database->rowCount();

Create a Virtual Machine easily with Vagrant - tutorial

Image
In this post we will install vagrant , a tool to set up a development and testing environment very quickly!! Tools  :  To manage VM   VirtualBox  Vagrant First Install Vagrant & Virtual Box in your machine then , go to your command line CMD (Widows) create a folder called vagrant for ex : mkdir vagrant cd vagrant vagrant init edit the vagrantfile in your favorate text editor, delete all the previous content fill it with this sample code : ps : set the syntax to Ruby Vagrant.configure("2") do  |o| o.vm.box = "newbox" o.vm.box_url = "http://tag1consulting.com/files/centos-5.9-x86-64-minimal.box" o.vm.synced_folder "./app","/var/www/", create:true o.vm.network :private_network ,ip: "192.168.55.55" o.vm.provision :shell,:path => "setup.sh" end save the file and go and make a vagrant up in your folder - cmd - it's gone take a time when it finished g