Skip to content

Instantly share code, notes, and snippets.

<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>
# 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 ->
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
}
/**
* 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>.
#!/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"
#!/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
#!/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
function unNestArray (nestedArray) {
var unnestedArray = [];
unnestedArray.push(nestedArray);
nestedArray.forEach(function (node) {
if (node instanceof Array) {
unNestArray(node, nestedArray);
}
});
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
@lucasviola
lucasviola / gist:27386405475c17db7433
Created October 22, 2015 05:22 — forked from JosephPecoraro/shell-execution.rb
Shell Execution in Ruby
# 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