var test = [“test1”, “test2”, “test3”];
Now create a hidden variable in HTML. This variable will Read more…
Most of the times when we get memory exhausted error, we normally think that the memory allocated for php program execution in php.ini file is not sufficient and raise this limit to try to fix the error.
However, code inefficiency could be the reason behind the error. Some examples Read more…
Selenium Webdriver lets us locate elements in a web page in many different ways. Some of them are:
By id: If the HTML element to be located has a unique id one can use this id to locate the element in the code. Java statement for this will Read more…
Following is the code to add Combobox in editable data grid:
<table id=”dg” title=” Combobox in editable datagrid ” style=”width:100%;height:700px”
toolbar=”#toolbar” pagination=”true” rownumbers=”true” fitColumns=”false” singleSelect=”true” autoSave=”true” data-options=”pageSize:50″>
< Read more…
Suppose on an HTML page we have a list of menu items as shown in the image on the left below (Customers, Projects, Invoices etc) and on hover over these menu items we need to change the background color to green, like shown in 2nd image:
This is the sample Read more…
1. Fetching coordinates of current location of the mouse:
Below is the code to retrieve the coordinates of the mouse at any position on the webpage and display inside a div with id getCoords:
$(‘#getCoords Read more…
The Read more…
In order to add text over an image, following PHP code can be used. Read the comments to understand purpose of code statements:
header (“Content-type: image/jpeg”); //setting the content type
//variable containing the string to be written on the image
$txt = “Here goes the text to Read more…
Have a look at this folder structure:
Now in Abc.php file, try to include Qwerty.php using the following code:
It will give this error:
Fatal error: Failed opening required Read more…
These are the steps to install CakePHP 3.0 on Ubuntu machine:
Make sure you have PHP 5.5.9 (CLI) or higher installed. Check php version on your system using this command:
Run the following commands:
1. Download the composer installer in your Read more…
With recent evolution in CSS, we can try animations. Below is a sample code where in which have used latest CSS features and will give the illusion of animation. Just copy paste the code below in an HTM file and and view it in browser.
< Read more…
In one of our projects we are working on, we faced a problem where we wanted to change the HREF attribute value of anchor tag using jQuery. When we inspected the HTML code no unique id, name or class was given to < a href > element.
So how to Read more…
Heroku is an all-in-one cloud based platform which allows software developers to develop and host applications over Heroku cloud. The company was setup in June 2007 which initially supported Ruby programming language. Later on, support for other programming languages such as Node.js, Java, PHP, Python, Scala, Go Read more…
What is Transition Delay?
Transition delay specifies the amount of time for the change to take place in css properties of DOM elements. Transition Delay value is defined in seconds (s) or milliseconds(ms).
How to implement Transition Delay in CSS Read more…
In one of the WordPress projects we are working on, whenever we tried to install a new plugin in locally installed WordPress, it asked for FTP credentials:
When we tried to install a new theme then also it asked for the same:
Actually, the problem was Apache web server was Read more…
Bootstrap has lots of other things apart from grid system such as:
1. Glyphicons: Bootstrap has inbuilt icons which we can use by icon’s class name.
For Example: “glyphicon-search” will create search icon without using any external image. So Read more…
Suppose you want to retrieve values from row from 5 to 10 from a table in SQL server. Since LIMIT keyword does not work in it so we can use any of these 2 alternative methods:
Solution 1 :
SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY name) as row FROM TableName Read more…
While running cake bake command for cakephp 3.0 we got the following error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘tablename .columnname’ doesn’t exist
The culprit was a column with name test_id in one of the tables. As per bake command’s conventions about foreign Read more…
In Heroku, there is no way to change HTTP session timeout (or some other php.ini settings) from user interface. For this create a file with name .user.ini and specify the properties in it. This file is to be created in root folder of project.
In our case we Read more…
In one of our web development projects, we used font family named Calibri for breadcrumbs. This font worked fine on Ubuntu and Windows but on each browser of Mac fonts appeared bold.
We wrote the following code for making the text font normal and consistent for all operating systems:
.breadcrumb Read more…