Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to set the time for session cache expire in php

Here we will learn with the help of an example that how we can set the time for session cache expire in php. We use a function session_cache_expire() which returns the current setting of session.cache_expire. Example <?php /*Here ...

How to use MIN() function in MySQL?

In MySQL, MIN() function is used to return the smallest value of the specified column in a table. MIN() Syntax SELECT MIN(column_name) FROM table_name; We have a table "employee" as below: employee id first_name ...

Swap keys with their associated values in an array using PHP

This article demonstrates a PHP function which can be used for swapping of keys with values in an array. array_flip() is the function which accepts an array as parameter and exchange the keys with their associated values in an array. This functio...

How to use AVG() function in MySQL?

What is the use of AVG() function in MySQL? The AVG() function is used to return the average of the numeric column in a table. AVG() Syntax SELECT AVG(column_name) FROM table_name; We have a table "employee" as below: employe...

How to use MAX() function in MySQL?

In MySQL, the MAX() function used to return the largest value of the specified column in a table. MAX() Syntax SELECT MAX(column_name) FROM table_name; We have a table "employee" as below: employee id first_name l...

How to use array_reverse() in PHP

array_reverse() function reset the order of elements in an array in reverse order. The function takes an array as argument and return an array containing all values in reverse order. The function also reset the index of elements. To keep the inde...

ThetimeModule in python

There is a popular time module available in Python which provides functions for working with times and for converting between representations. Here is the list of all available methods 1-time.altzone The offset of the local DST ti...

How to create class in python

In python class statement creates a new class definition and The class has a documentation string which can be accessed via ClassName.__doc__. The class_suite consists of all the component statements defining class members, data attributes and fu...

How to Getting calendar for a month in python ?

If you want to getting calendar for a month then we can set calendar module as it gives a wide range of methods to play with yearly and monthly calendars. Here, we print a calendar for a given month ( Jan 2008 ) and for example you can see below...

How to Getting formatted time in python ?

If you want to getting formatted time then we can format any time as per your requirement, but simple method to get time in readable format is asctime() and for example you can see below code #!/shiva/bin/python import time; localtime = time...

How to Register the given presence of the current user in openerp

In openerp register the given presence of the current user, and trigger a im_status change if necessary. The status will not be written or sent if not necessary and param user_presence : True, if the user (self._uid) is still detected using its b...

How to Disconnect the users having a too old last_poll in openerp

In openerp to disconnect user and show the massage that user is disconnected and users having to old last_pool and search the limit date and write the status presences when presences is offline. use this function .py file show in given below, ...

How to getting current time in python ?

If you want to getting current time instant from a seconds since the epoch floating-point value into a time-tuple, pass the floating-point value to a function .For example you can see below code. #!/siva/bin/python import time; loc...

What is TimeTuple in python ?

In Python time functions handle time as a tuple of 9 numbers, given below example 0 4-digit year 2008 1 Month 1 to 12 2 Day 1 to 31 3 Hour 0 to 23 4 Minute 0 to 59 5 Second 0 to 61 (60 or 61 are leap-seconds) 6 Day of Week ...

What is Tick in python ?

The floating-point numbers in units of seconds for time interval are indicated by Tick in python. Particular instants in time are expressed in seconds since 12:00am, January 1, 1970(epoch). And there is a popular time module available...

How to show javascript timer on web page

Hello Reader's if you are developing the portal where you want to show user the coundown time. Then this blog is usefull to your. Let's see how to make an auto counter in Javascript:- first create a html file and name it count.html and code will...

How to save data on local system using Javascript

Hello Reader's if you want to store some data on user local system so that even he turn off or refresh the webpage the data will still remains the same then you can use the Javascript for that. Let's consider an example where you have an coun...

What is the use of COUNT() function in MySQL?

In MySQL, COUNT() function used to return the number of rows that matches with a specified criteria. Syntax: COUNT(column_name) When we use COUNT(column_name) function in select query it returns the number of rows for the specified colum...

How to show user's Lat and Long using google script

Hello User if want to show user's lat and long to screen then you can use the code as below:- First you have to create a html page and named it file.html and paste the following code in it. <!DOCTYPE html> <html> <body> ...

How to make drag an drop in website

Hello Reader's if you want to use drag and drop feature in website then you can use the code as below:- First create file drag.html and paste the following code in it. <img id="source" src="../files/images/yourimage.jpg...

How to integrate music player in your webpage

Hello Reader's if you want to integrate the audio player which play mp3 music from your server, Then this blog is helpful to you. Now html5 offers you very convenient way to use multimedia in web page. You just have to use the <audio co...

How to draw shapes using HTML5 tag

Hello Reader's! in this blog you will learn how to draw the shapes and figure using just html5 tags. In html 5 you can draw some basic shape like square and rectangle and circles. Let's see some of them no <svg width="300" height="100">...

Use of array_intersect() in PHP

The array_intersect() is a built-in function in PHP used for computing the intersection of two or more arrays. The function takes two or more arrays as arguments, after comparing values of arrays the function returns an array containing all valu...

How to write using custom font in HTML

Hello Reader's if you want to write special heading in the custom way in web page then you can use the custom html function as below:- This function will take the font face and size from user and generate the given text into a picture. &l...

How to play a vedio from your own server to your web page

Hello Reader's if you want to integrate vedio from your own server to your webpage then you can use HTML5. Now HTML5 offers you to use <vedio> tag. Lets see the example as below to show vedio <!DOCTYPE html> <html> <...

How to insert special symbols in HTML

Hello Reader! If you are new to web desingning and you need to insert some special symbols in your web page then this blog is very helpful for you. You might have seen copyright symbol , This type of symbol will only generate if you insert their...

How to update record in Codelgniter

Hello Friends If you are looking to update records in Codelgniter. Please follow the code for the same: // Define the array with your db attribute as key and your updated data as value $data = array( 'country_name' => $country...

How to Crop image in codelgniter

Hello Friends, If you are looking to create crop functionality in Codelgniter. This very simple in this framework, please follow the below code for the same: $cropConfig['image_library'] = 'imagemagick'; $cropConfig['library_path'] = '/def...

How to use Aggregate functions in codelgniter

Hello Friends, If you are looking to add aggregate functions(MAX, MIN, AVG, SUM) in Codelgniter. Please use the below code for the same: // Use Max function to get maximum salary in employee table $this->db->select_max('salary'); $q...

How to create Handler in Android?

If you want to create handler , here is the code snippet that can help you out. Step :-1 Create the object for Handler. private Handler myHandler = new Handler(); Step :-2 Create the Runnable Thread. private Runnable myRunnableThr...

Format numbers using number_format() in PHP

number_format() is one of the most popular PHP function which is used to format numbers with grouped thousands. Syntax : number_format(number, decimal_values, decimal_point, thousand_separator) number : The number which has to be formatted. de...

How to create SEO friendly responsive web page in HTML5

Hi Guy, In this Blog, We will discuss about how to make a SEO friendly web page with the help of HTML5 and CSS. Note that for making this tutorial simple, we only consider the aspect of making a web page not whole website.   ...

HTML5 Download Attribute

Hi All, Recently I came across new features in HTML5 that was quite impressive and one such is the new download attribute. This new feature allows you to set a separate download file name than the actual file name available in the link itself....

Create users without email address in liferay

Hello Guys Liferay provide functionality to create user without email address. Here, we need to set user email rquired property to false in portal-ext.properties file. users.email.address.required=false You need to set the suffix of...

Good Postures for the Development of Fine Personality

A good posture is always considered as the basic requirement for the development of Fine Personality. People who work in a professional environment usually forget to maintain their posture, ...

What is toArray() method in jquery ?

Hello Readers, toArray() is the jquery method which is used to convert the elements to array. This method returns the jquery elements matched by the jquery selector as an array. Syntax : $(selector).toArray() Code Example : <...

What is slice() method in jquery ?

Hello Readers, slice() is the jquery method which is used to select the subset part of all the part of the element or it is used to select the element from start to end position having indexing zero. Both start and end are integer value and st...

What is scrollLeft() method in jquery ?

Hello Readers, scrollLeft() is the jquery method which is used to return the scrollbar position to horizontally for the selected or matched elements in jquery. If the scrollbar is at the end of Left side it returns the position zero. It is als...

What is .not() method in jquery ?

Hello Readers, .not() is the jquery method and it is the opposite of filter() method and this method used for return elements that do not match or do not select the certain criteria and those not matched the certain criteria they will be remov...

How to add watermark in Codelgniter

Hello Friends, If you are looking to add watermark in the images under Codelgniter framework. Please follow the below code for the same: // Set your source image path $watermark_config['source_image'] = '/define/path/of/your/image'; // ...

What is nextUntil() method in jquery ?

Hello Readers, nextUntil() is the jquery method which is used to return all the siblings of the next siblings elements of the same parent between the selector and stop and returns the new jquery object as a result. Syntax : $(selector)....

How to extract today's date & time in Rails

If you want to extract only the date, we can use the strftime method of Time/Date class, as 2.1.5 :055 > DateTime.now.strftime('%d/%m/%Y') => "12/30/2015" (Here d is used to display date, m displays month and Y display the ye...

How to get last insert id in Wordpress

Hello Friends, Programmer generally need last insert id for their coding requirement. If you are new in Wordpress and you need to fetch last insert id after insertion. Please follow the code below: // Define the DB object global $wpdb; ...

How to ordinalize current date in rails

Rails provide us many features which are native to Rails and not ruby. We can ordinalize a date in rails with a method provided by active_support known as ordinalize. If we want to ordinalize today's date we can write :- 2.1.5 :01 > ...

How to create database in MySQL using PHP?

In PHP, to create database in MySQL functions mysql_create_db() or mysql_query() is used. To create database using mysql mysql_create_db() syntax is as follows: mysql_create_db($dbname); For example: Suppose we want to create a database...

Dos and Don't's for an Effective Communication

In my recent blog about How to Improve Your Listening Skills,I have explained clearly what are the parameter by following which you can become a good listeners and will transform into a ...

Multithreaded Priority Queue in Python

With the help of Queue module we can create a new queue object that can hold a specific number of items and threads. Queue module have following method which is given below. get(): The get() removes and returns an item from the queue. put(): Th...

How to get all month names in the current locale in Rails

There are number of ways to get the names of the all the months in the current locale. I am using the Ruby I18n gem which comes along with Rails. This gem provides number of methods to perform these localisation tasks. To get the month ...

Get screenname of current user in liferay

Hello Guys ScreenName is nik name or unique identification of the user and we need to use screenname for user tagging and identify the user in liferay. There are two ways to get screenname of current user : Step 1: Get screenname ...

Synchronizing Threads in Python

With the help of threading module we can implement locking mechanism that allows you to synchronize threads. And a new lock is created by calling the Lock() method, which returns the new lock and thread in threads module. For example you can see...
1 137 269
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: