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
| anaoRenderer: function() { | |
| var h = this.containerHeight; | |
| var w = this.containerWidth; | |
| var workWidth = Math.trunc(w*0.95); | |
| var workHeight = h - 128; // botton height of button actions + margin-left. | |
| var faceBoxWidth = Math.trunc(workWidth / 4); | |
| var classCenter = this.querySelector('.center'); | |
| var imgList = this.querySelectorAll('.face-box img'); | |
| var faceboxList = document.querySelectorAll('.face-box'); | |
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 lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> |
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 lang="en"> | |
| <head> | |
| <!-- basics needs --> | |
| <meta charset="utf-8"> | |
| <title>Link: </title> | |
| <meta name="description" content="Engajamento entre nós da rede. Tudo são nós!"> | |
| <meta name="author" content="horacio ibrahim <horacoibrahim_at_gmail.com"> | |
| <!-- Mobile specs --> |
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
| <html> | |
| <head> | |
| <style> | |
| * { | |
| margin:0; | |
| padding:0; | |
| font-family:"Helvetica Neue", Helvetica, Sans-serif; | |
| word-spacing:-2px; | |
| } | |
| h1 { |
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 pairs = []; | |
| var iterate = function(data){ | |
| var userKey = data.key; // delete this after loop | |
| var values = data.val(); | |
| var listTIDByUser = Object.keys(values); | |
| // fazer loop aqui | |
| for (var t = 0; t < listTIDByUser.length; t++){ | |
| var tid = listTIDByUser[t]; | |
| console.log("TID: " + tid); | |
| console.log(values[tid]); |
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
| lista = []; | |
| ref = firebase.database().ref('users/'); | |
| ref.on('child_added', function(res){lista.push(res.val())}); | |
| ACCOUNTS = { | |
| "-KS1cW3msDwUbv0d58vJ": "888Poker", | |
| "-KS1c-I3_T_PN6fQIUic": "Bet365", | |
| "-KS1chNYO-1PEPL-XBeS": "PartyPoker", | |
| "-KS1dtmyU8gMlEBW7svL": "Neteller", | |
| "-KSESOkKPIUgx8YaBw2y": "PokerStars" | |
| }; |
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
| #!/bin/python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Converts JSON to CSV. | |
| """ | |
| import json | |
| import csv |
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
| firebase.database().ref('transactions/').push(data).then(function(res){ // PUSH 1 | |
| firebase.database().ref('users/' + user.uid + '/transactions/' + res.key).set({dtCreated: data.dtCreated}).then( | |
| function(res2){ // AFTER PUSH 2 | |
| console.log("Gravou nos 2"); | |
| window.location.href = "#/dashboard/history"; | |
| }, function(err2) { | |
| var error = { | |
| canceled: true, | |
| log: "transaction not registered in owner attributes." | |
| }; |
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
| // get current points | |
| var pointsRef = firebase.database().ref("lives/" + liveid + '/data/' + page); | |
| pointsRef.on("child_added", function(res){ | |
| var model = res.val(); | |
| if (model === null) { | |
| console.log("model is: " + ms); | |
| } else { | |
| console.log("**************"); | |
| var keys = Object.keys(model); | |
| for (var k = 0; k < keys.length; k++) { |
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 CubicBezier = function(canvas, opts){ | |
| if(!opts) opts = {}; | |
| this.start = opts.start || new Vec2(100,100); | |
| this.end = opts.end || new Vec2(400, 400); | |
| this.c1 = opts.c1 || new Vec2(100, 300); | |
| this.c2 = opts.c2 || new Vec2(300, 100); | |
| this.curve = new fabric.Path( this.toSVGPath() ); |