This file contains hidden or 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 appendFb( data, userID ){ | |
var frag = document.createDocumentFragment(); | |
var times = 0; | |
for (var i = 0, max = 40; i < max ; i++) { | |
var friend = data[i]; | |
$.ajax({ | |
url: 'https://graph.facebook.com/fql?q=SELECT friend_count FROM user WHERE uid='+ friend.id, | |
error: function( error ){ | |
This file contains hidden or 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 data = "exports = module.exports = { | |
room1: 'public', | |
room2: 'public', | |
room3: 'public' | |
};" | |
var f = new Function('var module={},exports=null;\n'+data+'\nif(typeof module.exports !== "undefined") {\nreturn module.exports;\n}\nif(null != exports) {\n return exports;\n}'); | |
var exports = f(); |
This file contains hidden or 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 | |
$v = array('a', 'b', | |
array('c', 'd' ) | |
,array('e', 'f')); | |
foreach ($v as $values) | |
{ | |
if(is_array($values)){ | |
foreach ($values as $value) | |
{ |
This file contains hidden or 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
//A0 = green, A1 = yellow, A2 = orange, A3 = red | |
#define downPin 14 | |
#define upPin 15 | |
#define rightPin 16 | |
#define leftPin 17 | |
void setup() { | |
Serial.begin(9600); | |
This file contains hidden or 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 $list = $('ul'); | |
// make an <li> element | |
var makeItem = function(text){ | |
var $li = $('<li><input type="text"><span></span></li>'); | |
if(text){ | |
$li.find('input').val(text); | |
$li.find('span').text(text); | |
} | |
return $li; |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class ThirdPersonController : MonoBehaviour { | |
public GameObject player; | |
public GameObject mainCamera; | |
public GameObject cameraCollisionBox; | |
public CollisionCounter cameraProbe; |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class ThirdPersonController : MonoBehaviour { | |
public GameObject player; | |
public GameObject mainCamera; | |
public GameObject cameraCollisionBox; | |
public CollisionCounter cameraProbe; | |
public CollisionCounter probe; |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class ThirdPersonController : MonoBehaviour { | |
public GameObject player; | |
public GameObject mainCamera; | |
public GameObject cameraCollisionBox; | |
public CollisionCounter probe; | |
public CollisionCounter cameraProbe; |
This file contains hidden or 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
// Open Script Editor and Export this as an Application | |
// | |
// Then drop a keynote file on it in the Finder and it will properly resize | |
// and rotate everything so the Keynote file becomes usable as a prototype | |
// in the iPhone keynote app | |
// rotateDocument exported function | |
// | |
// Accepts a Keynote document and will rotate | |
// all the slides and elements in the slide 90 degrees |
This file contains hidden or 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 JsonParser() {} | |
JsonParser.prototype.parse = function(inputStr) { | |
let trimmed = inputStr.replace(/ /g, '') | |
if (isArray(trimmed)) { | |
return parseArray(trimmed) | |
} else if (isObject(trimmed)) { | |
return parseObj(trimmed) | |
} | |
} |
OlderNewer