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 Societ = function(inboundConfig){ | |
this.population = undefined; | |
this.owner_id = undefined; | |
this.owner_name = undefined; | |
this.config = inboundConfig; | |
this.aspects = { | |
education:{ | |
facilities: undefined, | |
rating: undefined |
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
/* | |
Societ.prototype.aspects = { | |
education: { | |
}, | |
health: { | |
} | |
} | |
Societ.prototype.tick = function(){ |
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
body{ | |
margin: 0; | |
padding: 0; | |
} | |
label, input{ | |
float: left; |
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 fnFilterColumn ( i ) | |
{ | |
$('#example').dataTable().fnFilter( | |
$('#ml_searchInput').val(), | |
0, | |
false, false | |
/*$("#col"+(i+1)+"_regex")[0].checked, | |
$("#col"+(i+1)+"_smart")[0].checked*/ | |
); | |
} //$("#tableExample").dataTable(); |
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
$('div').css('border','solid 1px red'); |
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
//Source: http://stackoverflow.com/a/476681 | |
function preload(arrayOfImages) { | |
$(arrayOfImages).each(function(){ | |
$('<img/>')[0].src = this; | |
// Alternatively you could use: | |
// (new Image()).src = this; | |
}); | |
} |
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 cssTransitions() { | |
m = document.createElement('z'); | |
s = m.style; | |
function test_props( p ) { | |
for ( var i in p ) { | |
if ( s[ p[i] ] ) { | |
return true; | |
} | |
} | |
return false; |
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
/* | |
* Theme name: SpressoSP Mobile | |
* Theme URI: http://www.spressosp.com.br | |
* Description: Tema versão mobile do SPressoSP | |
* Author: Publisher Brasil | |
* Author URI: http://publisherbrasil.com.br | |
*/ | |
img{ | |
max-width: 440px; |
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
import urllib | |
from xml.dom import minidom | |
''' | |
Opens an xml and parse it | |
Could fetch the xml from Picasa instead of fetching from the disk. | |
''' | |
print 'Fetching xml...' | |
sock = open('xml.xml') |
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
//Substituir por valores reais. | |
var data1 = new Date('YYYY', 'MM','DD'); | |
var data2 = new Date('YYYY', 'MM','DD'); | |
var diferenca = parseInt((data1-data2)/(24*3600*1000)); |