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
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
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 ){ | |
NewerOlder