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> | |
<meta charset=utf-8 /> | |
<title>Simple Encoder Decoder Javascript</title> | |
<style id="jsbin-css"> | |
</style> |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Google CDN Example</title> | |
<link rel="stylesheet" href="https://googledrive.com/host/0B9tQ5z-2ysgYenY1Rk5BQlA4TkE/style.css"> | |
</head> | |
<body> | |
<p>Google CDN Example</p> |
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
<div style="text-align: center"> | |
<span id="block1" style="font-size: 200px;color:#FF0000">ਵਾਹਿ</span> | |
<span id="block2" style="font-size: 200px; margin-left: 125px; color:#FF0000">ਗੁਰੂ</span> | |
</div> | |
<script> | |
jQuery(document).ready(function($) { | |
var shortIntervalTime = 1 * 200; | |
var longIntervalTime = 1 * 500; |
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
git init | |
git status | |
git add | |
git commit | |
git log | |
.gitignore files | |
git branch | |
git checkout | |
gitk | |
git remote add origin {url} |
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
var app = angular.module('angularPostPHP', []); | |
app.controller('loginCtrl', function ($scope, $http) { | |
$scope.login = function () { | |
var request = $http({ | |
method: "post", | |
url: "login.php", | |
data: { |
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
// A dummy function that callback after 1 second (simulating some processing work) | |
function dummy(i, callback) { | |
setTimeout(function() { | |
// After 1 second, we callback with a result | |
callback('slow result') | |
}, 1000); | |
} | |
// Incorrect version |
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
<script type="text/javascript"> | |
$( document ).ready(function() { | |
if(window.location.href=="http://181.224.139.66/~enligh07/nams/#home" || window.location.href=="http://181.224.139.66/~enligh07/nams/#services" || window.location.href=="http://181.224.139.66/~enligh07/nams/#journal" || window.location.href=="http://181.224.139.66/~enligh07/nams/#contact"){ | |
setTimeout(function(){ | |
window.location.href = window.location.href; | |
}, 200); | |
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
//Watching screen resolution changes to render different divs. | |
$scope.$watch(function(){ | |
return window.innerWidth; | |
}, function(newValue) { | |
if(newValue < 767){ | |
$rootScope.renderMobileView = true; | |
} | |
else{ | |
$rootScope.renderMobileView = false; |
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(function($stateProvider, $urlRouterProvider) { | |
// | |
// For any unmatched url, redirect to /state1 | |
$urlRouterProvider.otherwise("/state1"); | |
// | |
// Now set up the states | |
$stateProvider | |
.state('state1', { | |
url: "/state1", | |
templateUrl: "partials/state1.html" |
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
data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;"> |
OlderNewer