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
#define TAMANHO_MAXIMO_DO_SEGREDO 4 | |
#define REPETICOES_ESTADO_FINAL 3 | |
#define TEMPO_LUZ 1000 | |
#define TEMPO_PAUSA 500 | |
#define ledVerde 2 | |
#define ledAmarelo 3 | |
#define ledVermelho 4 | |
#define ledBranco 5 |
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 soma(a,b) { | |
return a + b; | |
} | |
function maior(a,b) { | |
if(a > b) return a; | |
return b; | |
} | |
function somaPositivos(a) { |
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
- double | |
- em horas | |
newInterval = 48 | |
initialStepSmall = 1minute | |
initialStepBig = 10minutes | |
easyBonus = 1.3 |
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
class ClientCss { | |
public static String client_portfolio = "portfolio"; | |
public static String client_card = "card"; | |
public static String client_photo = "photo"; | |
} |
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 br.com.caelum.mvc; | |
public class ClientsController { | |
// reflection based conversion is NOT safe | |
public void save1(Client client) { | |
} | |
// primitives are safe |
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
wget http://dl.bintray.com/caelum/VRaptor4/vraptor-blank-project--4.1.0-RC2.zip | |
unzip vraptor-blank-project--4.1.0-RC2.zip | |
cd vraptor-blank-project | |
mvn tomcat:run | |
Tomcat 6 escolhido: | |
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29 | |
curl -v http://localhost:8080 | |
* Adding handle: conn: 0x7fdef4003000 |
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
public class MyWeld { | |
private static WeldContainer weldContainer = new Weld().initialize(); | |
public static void main(String[] args) { | |
System.out.println(get(Router.class).allRoutes().size()); | |
get(Router.class).allRoutes().stream().map(Route::getOriginalUri).forEach(System.out::println); | |
} | |
private static <T> T get(Class<T> type) { |
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
Process: Plex Media Server [2724] | |
Path: /Applications/Plex Media Server.app/Contents/MacOS/Plex Media Server | |
Identifier: com.plexapp.plexmediaserver | |
Version: 0.9.8.18 (0.9.8.18.290-11b7fdd) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [175] | |
Responsible: Plex Media Server [2724] | |
User ID: 501 | |
Date/Time: 2014-01-18 19:19:07.842 -0200 |
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 <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
pid_t pid, pid2; | |
if( (pid = fork()) < 0 ) { | |
perror("fork failed"); |
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
public class Controller { | |
public void x() { | |
// custom whatever | |
result.from(object).with(new RafaelRuleOfNonArrayReplicationInJson()); | |
// music include | |
result.from(object).with(include("musica")); | |