Skip to content

Instantly share code, notes, and snippets.

View jayadevn's full-sized avatar

Jayadev N jayadevn

View GitHub Profile
<?php
function get_country_state_list($c = '',$only_country = FALSE) {
$countries = array(
'select_one' => __('Select one...', 'rtPanel'),
'AF' => __('Afghanistan', 'rtPanel'),
'AX' => __('&#197;land Islands', 'rtPanel'),
'AL' => __('Albania', 'rtPanel'),
'DZ' => __('Algeria', 'rtPanel'),
'AS' => __('American Samoa', 'rtPanel'),
'AD' => __('Andorra', 'rtPanel'),
<?php
// Figure out timezones.
$timezones = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, 'US');
$_timezones = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL_WITH_BC);
$_p_timezones = $_n_timezones = array();
foreach($_timezones as $timezone)
{
if($timezone == 'Etc/GMT-0' || $timezone == 'Etc/GMT-13' || $timezone == 'Etc/GMT-14')
{
continue;
@jayadevn
jayadevn / timezone.csv
Last active August 29, 2015 14:07 — forked from x2q/timezone.csv
country region timezone
AD Europe/Andorra
AE Asia/Dubai
AF Asia/Kabul
AG America/Antigua
AI America/Anguilla
AL Europe/Tirane
AM Asia/Yerevan
AN America/Curacao
AO Africa/Luanda
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE HTML>
<html>
<head>
<title>Image Zoom With jQuery</title>
<style type="text/css">
#view {
border: 1px solid #333333 ;
overflow: hidden ;
position: relative ;
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE html>
<html lang="en">
<head>
<title>Invoking Javascript Methods With Named Arguments</title>
</head>
<body>
<h1>
Invoking Javascript Methods With Named Arguments
</h1>
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE html>
<html>
<head>
<title>jQuery Template Markup Language (JTML) vs. jQuery Templates</title>
<!-- Include core jQuery, jQuery Templates, and JTML. -->
<script type="text/javascript" src="./jquery-1.4.2.js"></script>
<script type="text/javascript" src="./jquery.tmpl.js"></script>
<script type="text/javascript" src="./jquery.jtml.js"></script>
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE html>
<html>
<head>
<title>Exploring parseInt() and parseFloat()</title>
<script type="text/javascript">
// ParseInt() will start parsing string characters, in order
// to make a valid numeric data type. If you do not provide
// an incoming number system, it will be assumed to be
// base-10.... most of the time.
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE html>
<html>
<head>
<title>Named Callback Functions In Javascript</title>
<script type="text/javascript">
// Create a character string to test with.
var data = "hello world";
// Now, replace the vowels in the string with stars.
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE HTML>
<html>
<head>
<title>Safari SQLite Hello World Example</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
// The first thing we want to do is create the local
// database (if it doesn't exist) or open the connection
// if it does exist. Let's define some options for our
@jayadevn
jayadevn / code-1.htm
Last active August 29, 2015 14:06 — forked from bennadel/code-1.htm
<!DOCTYPE HTML>
<html>
<head>
<title>Safari SQLite - Factory And Service Objects</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="girl_service.js"></script>
<script type="text/javascript" src="factory.js"></script>
<script type="text/javascript">
// Create the application namespace and whatever cached