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 DefaultView = Backbone.View.extend({ | |
btn: $("<div>"), | |
constructor: function () { | |
var self = this; | |
this.btn.click(function () { self.toggle(); }); | |
Backbone.View.apply(this, arguments); | |
this.$el.on('click', '[data-action=exit]', function () { self.hide(); }) | |
}, | |
show: function () { | |
this.$el.fadeIn(); |
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 implementEvents() { | |
this._callbacks = {}; | |
this.on = function (eventName, func, t) { | |
if (typeof func !== 'function') | |
throw "Invalid argument to .on() "+func | |
if (this._callbacks[eventName]) | |
this._callbacks[eventName].push(t?func.bind(t):func); | |
else | |
this._callbacks[eventName] = [t?func.bind(t):func]; |
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
{ | |
"presidente": { | |
"280000000067": { | |
"propostas": [ | |
{ | |
"endereco": "http://divulgacand2014.tse.jus.br/divulga-cand-2014/proposta/eleicao/2014/idEleicao/143/UE/BR/candidato/280000000067/idarquivo/152?x=1404936456000280000000067", | |
"documento": "1 - proposta_governo1404422153496.pdf" | |
} | |
], | |
"genero": "MASCULINO", |
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
passport = require 'passport' | |
express = require 'express' | |
app = express() | |
app.use(require('express-session')({ | |
secret: 'mysecret', | |
resave: true, | |
saveUninitialized: true, | |
})) |
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
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import urllib.request | |
base_url = 'http://carrinho.ingresso.com.br/br/compra/ingresso/codbarra/cinema/codbarra_novo.asp?id=00000000000000003620158410000' | |
base_url = 'http://carrinho.ingresso.com.br/br/compra/ingresso/codbarra/cinema/codbarra_novo.asp?id=0000000000000000 36201%04d 0000' | |
base_url = 'http://carrinho.ingresso.com.br/br/compra/ingresso/codbarra/cinema/codbarra_novo.asp?id=0000000000000000 361%05d 00000' |
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
''' | |
Created on 18/06/2010 | |
@author: Felipe | |
''' | |
#REMENBER TO COMMENT THE CODE!!! | |
def separate(eq,G,icox,icoy): | |
'''Separates the coeficients and sums of both equations and returns''' | |
#removes the spaces and *s of the equation | |
eq = eq.replace(' ','').replace('*','') |
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
$.fn.sshare = function (options) { | |
// Prevent binding multiple times. | |
if (this.find('.sn-share-btns').length) | |
return; | |
var defOptions = { | |
trigger: 'hover', | |
duration: 'fast', | |
text: 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
function cmpSemver(v1, v2) { | |
if (v1 === "") { | |
return v2 === "" ? 0 : -1; | |
} else if (v2 === "") { | |
return 1; | |
} | |
var e1 = v1.match(/^(\d+)\.?(.*)/), e2 = v2.match(/^(\d+)\.?(.*)/); | |
if (parseInt(e1[1]) === parseInt(e2[1])) | |
return cmpVersions(e1[2], e2[2]); | |
return parseInt(e1[1]) > parseInt(e2[1]) ? 1 : -1; |
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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |