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
$.ajax({ | |
type: 'POST', | |
url: 'Path to the file', | |
async: false, | |
data: | |
{ | |
dataName1: value1, | |
dataName2: value2, | |
dataName3: value3 | |
}, |
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
UIDevice *device = [[UIDevice alloc] init]; | |
if ([device.model isEqualToString:@"iPhone"] || [device.model isEqualToString:@"iPhone Simulator"]) { | |
if ([[UIScreen mainScreen] bounds].size.height == 480) { | |
// Do something with the iPhone | |
} | |
if ([[UIScreen mainScreen] bounds].size.height == 568) { | |
// Do something with the iPhone5 |
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
/* Javascript jQuery AJAX functions file */ | |
function functionName(functionName, functionParameters) | |
{ | |
$.ajax({ | |
type: 'POST', | |
url: 'ourFunctionsFile.php', | |
async: false, | |
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
var http = require('http'); | |
var port = 8080; | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, {'Content-Type': 'text/html'}); | |
response.write('<h1>Hello World!</h1>'); | |
response.end(); | |
}); | |
server.listen(port, function() { |
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"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Hello World! Site Title</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
</body> |
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 express = require('express'); | |
var app = express(); | |
app.get('/', function(request, response) { | |
response.send('<h1>Hello World!</h1>'); | |
}); | |
var port = process.env.PORT || 1337; | |
app.listen(port, function() { |
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 ng-app> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"></script> | |
</head> | |
<body> | |
<div> | |
<label>Name:</label> | |
<input type="text" ng-model="yourName" placeholder="Enter a name here"> | |
<hr> |
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 express = require("express"); | |
var app = express(); | |
app.use(express.logger()); | |
app.get('/', function(request, response) | |
{ | |
response.send('Hello World!'); | |
}); | |
var port = process.env.PORT || 5000; |
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 getQueryVariable(variable) | |
{ | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
if(pair[0] == variable){return pair[1];} | |
} | |
return(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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json') | |
}); | |
grunt.registerTask('default', []); | |
}; |
OlderNewer