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
method :+ (Left: Object): self take by MAXINT - 1; | |
begin | |
# do add | |
end | |
method :??? (Left: Object): self; take by 10; | |
begin | |
# do realy? method... (dummy) | |
end |
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
# Exemplo de interação com API externa | |
var tweets := async # Execução assíncrona | |
from tweet in twitter.timeline # tweet = registro; twitter.timeline = array | |
where tweet.fromUser("one_user") | |
select tweet; | |
# Percorre o vetor de tweets | |
foreach tweet in tweets do # Equivalente a "foreach tweet in tweets do"... Atualizado | |
tweet.replyTo(tweet.from_user, "Message"); | |
WriteLn(tweet); | |
end |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <typeinfo> | |
#include <sstream> | |
using namespace std; | |
namespace Validation |
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
# Git visual log displays commit tree view with who did what when and in which branch | |
git config alias.vlog 'log --graph --date-order --date=relative --pretty=format:"%C(cyan)%h: %Cblue - %an - %Cgreen %C(cyan)%ar:%Creset%n%s%n" --color' |
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
/* | |
* Created on: 21/07/2012 | |
* Author: geovani | |
*/ | |
#include "stdlib.h" | |
#include "stdio.h" | |
typedef struct PessoaBO Pessoa; // Definido antes para facilitar declaração | |
struct PessoaBO |
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
#! /bin/sh | |
CHRONOS_DIR=chronos_dir | |
rm -rf $CHRONOS_DIR | |
mkdir $CHRONOS_DIR | |
if [ -e $CHRONOS_DIR ]; then | |
for file in $(git ls-files); do | |
echo Chronos for $file | |
filename=$(basename $file) |
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 Get-FileHash { | |
param ( | |
[string] $File = $(throw 'a filename is required'), | |
[string] $Algorithm = 'sha256' | |
) | |
$fileStream = [System.IO.File]::OpenRead((Resolve-Path $File)) | |
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create($Algorithm) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
* MCrypt API available online: | |
* http://linux.die.net/man/3/mcrypt | |
*/ | |
#include <mcrypt.h> |
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
def lazy_init(init): | |
import inspect | |
arg_names = inspect.getargspec(init)[0] | |
def new_init(self, *args): | |
for name, value in zip(arg_names[1:], args): | |
setattr(self, name, value) | |
init(self, *args) |
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 ...; | |
import org.androidannotations.annotations.rest.Accept; | |
@Rest(converters = { TastypieGsonHttpMessageConverter.class }) | |
public interface RestServiceApi { | |
// Optional | |
void setRootUrl(String rootUrl); |
OlderNewer