
Search In
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
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'),
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
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
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
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
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
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
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
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", $