Showing posts with label Web Development. Show all posts
Showing posts with label Web Development. Show all posts

Wednesday, May 18, 2011

HTML5 Snippets: Collection of useful code HTML5 & CSS3

HTML5 Snippets is a collection of fragments of code HTML5 + CSS3 there are always just a click away, useful for those who are beginning to study and use these new languages.

We can navigate through the different codes to the categories on the side, where we can find, animations, transitions, and experiments using HTML5 and CSS3 .

Each example is followed by a side code documentation + demo working and studying to be displayed in real time.

We also have the ability to report our codes and demos to be added to the collection.
If you need some basic information about these new languages, I suggest you read two articles I wrote about HTML5 and CSS3 .

HTML5 Snippets is a great collection to identify the most interesting codes and test them directly through the availability of demo.

Sunday, April 17, 2011

How to : Free php development environment for windows pcs

Before we can start working right, we should set ourselves a suitable development environment (IDE). Although this is not mandatory, but the work much easier. The development of PHP scripts and web pages can also be done using simple text editors, but we do not give up convenient functions and features of development environments.

As an IDE for PHP, HTML, JavaScript and CSS we will use Eclipse. Eclipse is free, is updated regularly and has many features with it. For our project must be equipped with the Eclipse PDT extension. PDT stands for PHP Development Tool ". The PDT does so in a proper Eclipse PHP development environment.

INSTALL

To install Eclipse, the latest version of Java is required. Java is now installed on almost all systems. If on your PC, this is not the case, you'll Java here and install it.

We come straight to the point, we will have a version pre-installed with Eclipse PDT began. These can be directly from the Zend Web site download. When you download the all-in-one package (Eclipse + PDT) mode.

After downloading, unzip the archive and start eclipse.exe. When you first start Eclipse asks for the path of the workspace. I choose the best "htdocs" directory of XAMPP. XAMPP was installed in the second part of the tutorial and set up. This has the advantage that the projects can be created directly debugged without having to continually specify in the Apache configuration, the path of the PHP scripts must have.

Eclipse set

Before we build the first project, we should make a few settings in Eclipse. We click on Window -> Preferences. In the category of PHP -> PHP Executables we must add the path to our php.exe. With the click on "Add" to open the input screen. Enter any name, select the path and as a PHP Debugger XDebug "option. The completed entry form should look like this:
The drive letter must correspond to your course, depending on where XAMPP is installed. The settings with OK. Then must be our entry under the PHP executables be shown:

In the second step, we give Eclipse yet known to the local Web server. Simply click on PHP server, also in the category and add PHP to New new server. When we enter http://localhost URL and enter a name:

 So that we can debug with Eclipse, we need to set the debugger. The settings can also be found under PHP. If we choose PHP debugger XDebug, with server and PHP executables we choose you what we have just set.


If selected "Break at the First Line", Eclipse automatically sets the first breakpoint on the first line in the PHP script.

Have all your settings, we can create a new project and test the debugger.

Debugging Projects

When debugging with Eclipse, we must distinguish between two types of projects. This is a stand-alone are PHP scripts. These scripts can be executed directly. On the other hand, there are scripts that are not only running. They need to run such as a Content Management System (CMS) to be able to. These include WordPress Plugins and Themes, Joomla modules and components, etc. This distinction is important because you have to make debugging different settings.

First we will create a new project. We click on File -> New -> Project, select PHP Project and click Next. Then enter the name and click Finish.


If Eclipse asks if you want to go to the PHP perspective, simply press Yes.


The new project is created, then we should add a PHP file. Click the right mouse button on the project folder and New -> PHP File menu. Enter name (index.php) and click Finish.

For testing we take a very simple script which only one variable is incremented and dumps the contents.

For the script now needs a debug configuration can be created by clicking on the arrow next to the Beetle, and then click "Debug Configurations .." button.


It opens a new window, which manages all the debug configurations. Since we now want to debug a stand-alone script, we click the right mouse button on "PHP Script" and select New to create new configuration.

Set Eclipse "In the chapter we have already made global settings that are used as the basis for each project.

The settings should actually be on, if not, we provide the following:

When we use XDebug debugger and PHP executables we select XAMPP. In PHP file we need to select the file, we want to debug. Then click Apply to save the configuration. If you also want to start debugging immediately, click on Debug.

Now the script is ready to be debugged. Just click on the beetle. Eclipse will now go into the debug perspective, and the execution of the script we started. The execution is stopped in the first line if it has been selected in the configuration "Break at First Line."

The script can now be easily debugged.

The difference for debugging stand-alone script is only in the Debug configuration. Here I create a configuration for PHP script, but for PHP Web Page.

When debugging of WordPress plugins do you choose among the index.php file of WordPress, breakpoint in the plugin PHP file and starts the debugging process.

Well, everyone should be able to debug PHP script, website, etc. with Eclipse on Windows.

Thursday, April 14, 2011

How to Difference Equal, Equal Double and Triple Equal

function equal (=) in a pendeklarasial variable or statement if else, is a common method used for a variety of process logic .. Just an example for the login (username and password match with the data in the database).search persaan a string, integer, and so forth. 
Apparently there are differences of usage utility function equal, double and triple equel equel.
Equal. 
commonly used to declare a value / variable. 
ex ..
1"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">
2"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">$param = 12; $ Param = 12;
3"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">echo $param; echo $ param;
4"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">?> ?>
then the output of this equation is 12. 
$ param can be concluded that the same value with 12.
Double Equal. 
used to find the equality statement that is true or false .. 
ex ..
1"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">
2"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">$number = 12; $ Number = 12;
3"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">if ($number==14) { if ($ number == 14) {
4     "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "Nomer 14"; echo "Number 14";
5"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} else { } Else {
6     "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "Bukan No 14"; echo "No No 14";
7"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} }
8"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">?> ?>
the statement above. $ Number has a value of 12, and $ number == 12 would return the value false, then the output is not No. 14.
Triple Equal. 
that is used to find equations that statement is true and also compares the data type variables 
ex ..
1"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">
2"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">$number = 10;   //integer $ Number = 10; / / integer
3"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">$number2 = "10";   //string $ Number2 = "10"; / / string
4"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">//statement 1 / / Statement 1
5"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">if ($number==$number2)  { if ($ number == $ number2) {
6 "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "variable bernilai sama";echo "variable equal value";
7"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} else { } Else {
8 "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "variable bernilai tidak sama"; echo "variable value does not equal";
9"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} }
10 
11"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">//statement 2 / / Statement 2
12"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">if ($number===$number2)  { if ($ number === $ number2) {
13 "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "variable bernilai sama";echo "variable equal value";
14"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} else { } Else {
15 "_tipon(this)" onmouseout="_tipoff()"> class="google-src-text" style="direction: ltr; text-align: left">echo "variable bernilai tidak sama"; echo "variable value does not equal";
16"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">} }
17"_tipon(this)" onmouseout="_tipoff()"> class="google-src-text"style="direction: ltr; text-align: left">?> ?>
to statement 1. output is true. because it only validates the value. 
then the output variables equal.
for statement 2. the output is false. because in addition to examining the value but also check the type of value. 
then the output value is not the same variable.
hopefully useful

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Sweet Tomatoes Printable Coupons