This file contains 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 () { | |
function giphy(word, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'https://api.giphy.com/v1/gifs/translate?api_key=dc6zaTOxFJmzC&s=' + encodeURIComponent(word)); | |
xhr.onreadystatechange = function(e) { | |
if(xhr.readyState === 4) { | |
var url = JSON.parse(e.target.responseText).data.images.fixed_height.url; | |
callback(url); | |
} | |
}; |
This file contains 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
// | |
// ViewController.swift | |
// sss | |
// | |
// Created by Rafael Martins on 2/9/16. | |
// Copyright © 2016 Yahoo Inc. All rights reserved. | |
// | |
import UIKit |
This file contains 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 fetch = require('node-fetch'); | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'me', | |
password : 'secret', | |
database : 'my_db' | |
}); | |
connection.connect(); |
This file contains 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 possibilities(numbers, remaining, expression) { | |
if (remaining < 0) { | |
return 0; | |
} else if (remaining === 0) { | |
console.log(expression.join(' + ')); | |
return 1; | |
} | |
var result = 0; |
This file contains 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
from timeslice import TimeSlice, TimeSet | |
from datetime import datetime | |
import calendar | |
def monta_grade(): | |
grade = TimeSet() | |
dias_mes = calendar.monthrange(2013, 2)[1] | |
for dia in range(1, dias_mes + 1): | |
grade.append( |
This file contains 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
from timeslice import * | |
from datetime import datetime, date | |
""" | |
TimeSlice Creation | |
""" | |
slice1 = TimeSlice(start=datetime(2009, 1, 1, 0, 0, 0), | |
end=datetime(2009, 1, 2, 0, 0, 0)) | |
slice2 = TimeSlice(start=datetime(2009, 1, 1, 22, 33, 44), |
This file contains 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 id="dialog"> | |
<div id="navegacao"></div> | |
<div id="cabecalho"></div> | |
<div id="conteudo"></div> | |
<div id="rodape"></div> | |
</div> |
This file contains 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, body{ | |
margin: 0; | |
padding: 0; | |
} | |
#dialog { | |
width: auto; | |
top: 50px; | |
left: 50px; | |
right: 50px; |
This file contains 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
// For an introduction to the Blank template, see the following documentation: | |
// http://go.microsoft.com/fwlink/?LinkId=232509 | |
(function () { | |
"use strict"; | |
WinJS.Binding.optimizeBindingReferences = true; | |
var app = WinJS.Application; | |
var activation = Windows.ApplicationModel.Activation; |
This file contains 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
/* | |
* Copyright (c) 2011 Yahoo! Inc. All rights reserved. | |
*/ | |
/*jslint nomen: true */ | |
(function () { | |
'use strict'; | |
function mix(target, source){ |
NewerOlder