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 http = require('http'); | |
// Criando o servidor para o proxy | |
http.Server(function(req, res){ | |
res.writeHead(200, { | |
'Content-Type' : 'application/json; charset=utf-8', | |
'Transfer-Encoding' : 'chunked' | |
}); | |
setInterval(function(){ |
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
module.exports = function(app) { | |
var Schema = require('mongoose').Schema; | |
var People = Schema({ | |
Name: String, | |
Address: { | |
type: Schema.Types.ObjectId, | |
ref: 'Address' | |
}, |
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
db.timeline.findOne() | |
{ | |
_id: "username_month_day_hour", | |
time: [ | |
'59': [ { _idEvent: ObjectId(....), text:'some description text', media:['url'], embedded: "..." } ], | |
'58': [ { _idEvent: ObjectId(....), text:'some description text', media:['url'], embedded: "..." } ], | |
'57': [ { _idEvent: ObjectId(....), text:'some description text', media:['url'], embedded: "..." } ], | |
'56': [ ], | |
'55': [ { _idEvent: ObjectId(....), text:'some description text', media:['url'], embedded: "..." } ], | |
'54': [ ], |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
func is_happy_number(number int) bool { | |
str := strconv.Itoa(number) |
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
describe("class system", function(){ | |
it("should be possible to create classes", function(){ | |
Class({name:'MyClass'}); | |
expect(window.MyClass === undefined).toBeFalsy(); | |
}); | |
it("should be possible to create properties within classes", function(){ | |
Class({ | |
name:'MyClass', | |
attrs:{ |
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
/** | |
* Removes all previously-attached event handlers from the elements. | |
*/ | |
$.fn.unbindAll = function() { | |
var events = $(this).data('events'); | |
return this.each( function() { | |
var $this = $(this); | |
for ( var evt in events ) { |
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
/** | |
* Implementação do algorítimo SoundEx em Javascript. | |
* @author João Batista Neto | |
* | |
* SoundEX é um algorítimo fonético para indexação de nomes pelo som segundo | |
* sua pronúncia. O algorítimo foi desenvolvido por Robert C. Russell e | |
* Margaret K. Odell e patenteado em 1918 e 1922. | |
* {@link http://en.wikipedia.org/wiki/Soundex} | |
* | |
* @return {String} |
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
/** | |
* Um objeto de origem qualquer | |
*/ | |
var o = { x: 10, y: 10 }; | |
/** | |
* Criação do Proxy (API antiga). | |
* Cada uma dessas propriedades do proxy representa uma operação no objeto de origem; O proxy | |
* receberá a operação e delegará (ou não) para o objeto de origem. | |
*/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>AnythingSlider Video Demo</title> | |
<link rel="shortcut icon" href="demos/images/favicon.ico"> | |
<link rel="apple-touch-icon" href="demos/images/apple-touch-icon.png"> |
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
<?php | |
/** | |
* | |
* Paypal Request Class. | |
* | |
* Classe que adiciona os produtos e cria a requisição para a API Paypal utilizando o Express Checkout. | |
* | |
* @author R'Santiago. | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License |
OlderNewer