This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var geoURL = "https://ipv6.ip.nf/me.json"; | |
//get Geo information of the user | |
if(navigator.onLine){ | |
$.getJSON(geoURL).done(function(geoData){ | |
var lat =geoData.ip.latitude; | |
var lon =geoData.ip.longitude; | |
//Get the user geo weather information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="scripts/jquery.min.js"></script> | |
<script src="scripts/popup.js"></script> | |
<style type="text/css"> | |
#weather-report{ width:180px; font-size: 14px; min-height:180px; } | |
#weather-report th, td{ text-align: left; } | |
td.place { height: 22px; border-bottom: 2px solid #000; margin-bottom: 12px; } | |
.loading_text{margin-left:58px;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Postnidea weather now", | |
"version": "1.0", | |
"description": "Postnidea weather now provide you runtime weather report like temprature, humidity etc according to geographical region", | |
"icons": {"128": "images/icon-128.png"}, | |
"permissions": ["storage"], | |
"homepage_url": "http://postnidea.com", | |
"browser_action": { | |
"default_popup": "popup.html", | |
"default_icon": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable, EventEmitter, Output } from '@angular/core'; | |
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | |
import { Response } from "@angular/http"; | |
import { Observable } from 'rxjs'; | |
import 'rxjs/add/operator/map'; | |
@Injectable() | |
export class AppService{ | |
isLoggedin:boolean; | |
@Output() getLoggedInName = new EventEmitter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Plugin Name: BuddyPress add new tab | |
Description: Test case for a bug. When using the Admin subnav, select "Test" and "Test 2" will disappear | |
Version: 0.6 | |
Author: Rakesh Kumar | |
**/ | |
function bptt_init() { | |
class Groups_Test_Tab extends BP_Group_Extension { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addPackageLineItem($input) | |
{ | |
$packageLineItem = array | |
( | |
'SequenceNumber' => 1, | |
'GroupPackageCount' => 1, | |
'Weight' => array | |
( | |
'Value' => $input['Weight'], | |
'Units' => 'LB' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (PHP_SAPI === 'cli') { | |
require("cronLockHelperClass.php"); | |
if (($pid = cronHelper::lock()) !== FALSE) { | |
// here need to apply the logic | |
cronHelper::unlock(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$config = array(); | |
$config['array_to_validate'] = $_POST or array_need_to_validate; | |
$config['email'] = "email,forgot_email"; | |
$config['required'] = "date_birth,phone,mobile"; | |
$config['numeric'] = "mobile"; | |
$config['positive_numeric'] = "positive_number"; | |
$config['positive_integer'] = "positive_integer"; | |
$config['url'] = "url"; | |
$config['alpha'] = "name"; | |
$config['alphanumeric'] = "user_password"; |
NewerOlder