Skip to content

Instantly share code, notes, and snippets.

View thiagopnts's full-sized avatar
phew

Thiago Pontes thiagopnts

phew
View GitHub Profile
@thiagopnts
thiagopnts / gist:2156278
Created March 22, 2012 05:15
Estrutura de dados
//A primeira:
public int size() {
for(int i = 0; i < vet.length; i++) {
if(vet[i] == null)
return i;
}
}
public boolean push(Livro l) {
if(this.size < MAX) {
$scope.hide = false;
$rootScope.$on('$afterRouteChange', function(scope, a, b) {
$scope.hide = true;
});
Public class Aluno {
private int mat;
private String nome;
private float CRE;
// constructores e métodos gets e sets
}
Public class TabelaHash {
private Aluno[] tabela;
public static final N = 100;
public class Cliente {
private int codigo;
private String nome;
private float saldo;
//construtores e metodos gets e sets
}
public class TabelaHash {
private Cliente[] tabela;
public static final int N = 100;
2012/05/30 17:21:45 - - INFO - Pixily::Log::CustomLogger - New RightAws::S3Interface using shared connections mode
2012/05/30 17:21:45 - - INFO - Pixily::Log::CustomLogger - Opening new HTTPS connection to s3.amazonaws.com:443
SQL (1.0ms) COMMIT
Feature Load (0.5ms) SELECT * FROM "features" WHERE ("features"."identifier" = 'on_demand_images') LIMIT 1
Cache read: Pixily::Brand::OfficeDrop
Cache hit: Pixily::Brand::OfficeDrop ({})
Cache read: officedrop_features
Cache hit: officedrop_features ({})
SQL (0.6ms) SELECT server_path FROM list_folders(5) WHERE folder_id = 109
CACHE (0.0ms) SELECT server_path FROM list_folders(5) WHERE folder_id = 109
package models
import dispatch._
import dispatch.mime.Mime._
import play.api.libs.json._
import play.api.Logger
import play.api.Play.current
import play.api.libs.concurrent._
#/etc/network/interfaces
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254
[Test]
public void TestSharingViolation ()
{
while (true) {
File.WriteAllText("/tmp/teste.txt", "C#");
Thread.Sleep (TimeSpan.FromSeconds (1));
}
}
package models
import org.apache._
import org.apache.http.HttpResponse
import org.apache.http.impl.auth._
import org.apache.http.impl.client._
import org.apache.http.client.methods._
import org.apache.http.entity.mime._
import org.apache.http.entity.mime.content._
import org.apache.http.client._
@thiagopnts
thiagopnts / Foca no código
Created August 29, 2012 00:57 — forked from pedrocss/Foca no código
Foca no código
/* Véi, foca no código
.---.
/o o\
__(= " =)__
//\'-=-'/\\
) (_
/ `"=-._
/ \ ``"=.