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="cadastroConsultas"> | |
<form> | |
<label for="pacientes">Escolha o paciente</label> | |
<select onclick="desenharOpcoesDropDown()" name="pacienteNome" id="dropDownPacientes"> | |
</select> | |
<br><br> | |
<input type="submit" value="Submit"> | |
</form> | |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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 MeuDoubleton { | |
private static MeuDoubleton instancia = new MeuDoubleton(); | |
// aqui está a chave do sucesso!!! | |
private static MeuDoubleton instancia2 = new MeuDoubleton(); | |
private MeuDoubleton(){ | |
// algum código aqui | |
} |
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
/** | |
* Método para somar o valor de A com o valor de B.<br> | |
* Exemplo de uso deste método:<br> | |
* <pre> | |
* int a = 5; | |
* int b = 3; | |
* int soma = somaAB(a, b); | |
* </pre> | |
* No exemplo supracitado, a variável <code>soma</code> conterá | |
* o valor da soma das variáveis <code>a</code> e <code>b</code>. |
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
#!/usr/bin/env ruby | |
# utf:8 | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
$regex = /(#\d+):/ | |
if !$regex.match(message) | |
puts "\n" | |
puts "\n" |
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/bash | |
RED=$(tput setaf 1) # Just so the error message is red | |
regex="Generate a regex that matches the criteria" #regex for validation goes here | |
MESSAGE=$(echo "You need to find a way to get the message. I think pre-message or commit-message") | |
if ! [[ $MESSAGE =~ $regex ]]; then |
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/bash | |
RED=$(tput setaf 1) # Just so the error message is red | |
regex="Generate a regex that matches the criteria" #regex for validation goes here | |
MESSAGE=$(echo "You need to find a way to get the message. I think pre-message or commit-message") | |
if ! [[ $MESSAGE =~ $regex ]]; then |
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 unNestArray (nestedArray) { | |
var unnestedArray = []; | |
unnestedArray.push(nestedArray); | |
nestedArray.forEach(function (node) { | |
if (node instanceof Array) { | |
unNestArray(node, nestedArray); | |
} | |
}); |
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 processData(input) { | |
var lines = input.split('\n'); | |
lines.forEach(function(line, i){ | |
if(i > 0 && i % 2 == 0){ //pra que isso? | |
var list = line.split(' ').map(function(x){ return parseInt(x)}); | |
if(list.length > 1){ | |
var fuckYeah = false; | |
var slicedSumLeft = 0; | |
var slicedSumRight = list.reduce(function(a,b){ return a+b }) - list[0]; // Que que faz esse reduce? Soma a parte da direita, tá bem óbvio, mas não consegui implementar em sintaxe de java 7 |
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
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
NewerOlder