- rails 4.2.5
- ruby 2.3.0
- sqlite
rails _4.2.5_ new agenda -> para criar agenda| git branch gh-pages | |
| git push origin gh-pages | |
| criar novo arquivo | |
| add na master | |
| git add . | |
| git commit -m "teste" | |
| git checkout gh-pages | |
| git branch | |
| *gh-pages | |
| master |
| { | |
| "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme", | |
| "font_face": "Fira Code", | |
| "font_size": 13, | |
| "ignored_packages": | |
| [ | |
| "Emmet", | |
| "Vintage" | |
| ], | |
| "line_padding_bottom": 3, |
| I use the first | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 |
| ## Dados | |
| ict | |
| sexo (1-masculino 2-feminino) | |
| idade | |
| 1-administrativo 2-operacional | |
| alcool | |
| 1-não fuma 2-fuma | |
| 22 1 33 1 3 1 | |
| 36 1 21 2 2 1 | |
| 25 1 29 1 1 1 |
| function msg(msg, tipo) { | |
| var retorno = $('.retorno'); | |
| var tipo = (tipo === 'sucesso') ? 'success' : (tipo === 'alerta') ? 'warning' : (tipo === 'erro') ? 'danger' : (tipo === 'info') ? 'info' : alert('Informe a mensagem'); | |
| retorno.empty().fadeOut('fast', function () { | |
| return $(this).html('<div class="alert alert-'+tipo+'">'+msg+'</div>').fadeIn('slow'); | |
| }); | |
| setTimeout(function () { | |
| retorno.fadeOut('slow').empty(); | |
| }, 9000); |
| UPDATE wp_options SET option_value = replace(option_value, 'http://url-antiga.com.br', 'http://url-nova.com.br') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://url-antiga.com.br','http://url-nova.com.br'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://url-antiga.com.br', 'http://url-nova.com.br'); |
| -Calculo da media usamos a função AVG | |
| SELECT AVG(punicao) FROM campeonato | |
| -COUNT | |
| A função COUNT(*) retorna o número de registros em uma tabela: | |
| SELECT COUNT(*) FROM nome_tabela | |
| Sintaxe do SQL COUNT (DISTINCT nome_coluna) | |
| SELECT COUNT(DISTINCT nome_coluna) FROM nome_tabela | |
| Nota: COUNT (DISTINCT) trabalha com Oracle e Microsoft SQL Server. |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>handerlerbars</title> | |
| </head> | |
| <body> | |
| <h1> | |
| <%=title%> in EJS | |
| </h1> |