Skip to content

Instantly share code, notes, and snippets.

View washingtonsoares's full-sized avatar
🎯
Focusing

Washington Soares washingtonsoares

🎯
Focusing
View GitHub Profile
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
double C1diametro;
double C1circunferencia;
double C1area;
$("#btn-ajuda").on("click",function() {
//starta a função aqui
}
<meta charset="UTF-8">
<input type="text" id="numero"/>
<input type="submit" value="adicione e verifique no bingo!" id="adivinhar"/>
<script>
var sorteados = new Array();
var nrosUsuario = new Array();
var numerosSorteados= function(){
var n1= Math.floor(Math.random() * 60);
https://www.youtube.com/watch?v=CAcyG2v6X2w
aplicar aqui a expressão regular
salvar na variavel resultante o que vier depois de "v="
nesse exemplo a variavel iria conter "CAcyG2v6X2w"
<iframe width="200" height="300" src="//www.youtube.com/embed/$variavel" frameborder="0" allowfullscreen></iframe>
<?php
$url = "https://www.youtube.com/watch?v=4Sc6lSMnp0c";
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
$teste = $my_array_of_vars['v'];
$width = 400;
$height = 300;
?>
<iframe width="<?php echo $width ?>" height="<?php echo $height ?>" src="//www.youtube.com/embed/<?php echo $teste?>" frameborder="0" allowfullscreen>
# PATCH/PUT /users/:id.:format
def update
# authorize! :update, @user
respond_to do |format|
if @user.update(user_params)
sign_in(@user == current_user ? @user : current_user, :bypass => true)
format.html { redirect_to @user, notice: 'Your profile was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: 'edit' }
<%= will_paginate @posts, :class => 'page-por-page pagination pagination-sm', renderer: BootstrapPagination::Rails %>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct info{
int valor;
}inf;
typedef struct vetor{
<%= f.select(:sector, [['Pessoal','Contábil','Fiscal','Administrativo/Financeiro']], {:prompt => "SETOR:", :required => true, :class => 'meio' }) %>