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

Search In

Math.log Function

Math.log() function compute a natural logarithm. The method returns the natural logarithm (base E) of a number if the value of number is negative, the return value is always NaN or If the number is 0, the function returns -Infinity. Syntax Math.lo

Find duratin between two times of same date

If we have to find duration or difference between two times of same date then Let we have $dtime and $atime as two times of same date then $dep=EXPLODE(':',$dtime); $arr=EXPLODE(':',$atime); $diff=ABS(MKTIME($dep[0],$dep[1],0,DATE('n'),DATE('j'),

Programatically Creating Custom csv files in Magento

It's simple to create custom csv in magento . follow the steps to create custom csv. Create a controller to access data that you want to export in csv file like as below: public function createcsvAction(){ $param = $this->getRe

Date difference between two timezones in PHP

Here is a short function to get the difference between two timezones in PHP:- function diff(){ $date1 = "2014-02-27T20:00:00+04:00"; $date2 = "2014-02-28T07:20:00+08:00"; $diff = abs(strtotime($date2) - strtotime($date1)); $year

Custom checkbox using jquery

Hello Reader ! Here is an example how to make a custom check box using simple script and css. Script $(document).ready(function(){ $('label').click(function(){ $(this).toggleClass('checkedN'); }); }); css .checkedN {background-position:0

Understanding Lambda Expressions

What is Lambda Expression ? Lambda expression is an inline delegate introduced with C # 3.0 language. It is an easy way to represent an anonymous method. Lambda is used to write anonymous functions which does not take parameter and which does not re

Encoding issues while parsing CSV file using Roo gem in rails

This is the most common and frustrating issue while parsing a csv file in rails i.e. the encoding issue. So in ruby on rails i found a library which basically detects the Character encoding using ICU (dependency package) and the name of the library i

Rails model Serialization

Rails model Serialization Hi Friends, Earlier we have discussed about Association in Rails Model. Today we will be covering one more topic related to rails active records, that is Serialization. In summary we can define serialized objects as, So seri

Save MySQL query results into a text or CSV file

Hello Readers! MySQL provides an easy mechanism for writing the results of a select statement into a text file on the server. Given a query such as SELECT order_id,product_name,qty FROM orders which returns three columns of data, the results ca

How to convert Unix time stamp into date time using PHP

Hello Reader's! If you have the time stamp in unix time and you need to convert them into Date time format Then you can use the diffrent ways of doing this in PHP Let's say the example below:- $timestamp=1455070324; echo gmdate("Y-m-d\TH:i:s\Z", $

1 28 156
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: