Skip to content

Instantly share code, notes, and snippets.

View heat's full-sized avatar
🌚
Working from home

Onezino Moreira heat

🌚
Working from home
View GitHub Profile
-- adicionar query GetDataByPartida(@status, @idpartida);
select * from bilhete where
idbilhete in ( select bilhete_idbilhete from aposta where apostasjogos_idapostasjogos = @idpartida ) and
statusBilhete = @status
[mysql]
no_auto_rehash
max_allowed_packet = 16M
default_character_set = utf8 # Possibly this setting is correct for most recent Linux systems
[mysqldump]
max_allowed_packet = 16M
CREATE TABLE IF NOT EXISTS `Parametros` (
`idParametros` INT NOT NULL AUTO_INCREMENT,
`nome` VARCHAR(45) NOT NULL,
`valorTexto` VARCHAR(45) NULL,
`valorInteiro` INT NULL,
`valorDecimal` DECIMAL(10,2) NULL,
`valorBoolean` TINYINT(1) NULL,
PRIMARY KEY (`idParametros`),
UNIQUE INDEX `nome_UNIQUE` (`nome` ASC))
ENGINE = InnoDB;
using (TransactionScope tc = new TransactionScope())
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DACL.Properties.Settings.CatalogueConnectionString"].ConnectionString))
{
conn.Open();
attributesTA.Connection = assetTA.Connection = attributeValueTA.Connection = tag2AssetTA.Connection = conn;
assetTA.Update(mainDataSet1.Asset);
attributesTA.Update(mainDataSet1.Attributes);
attributeValueTA.Update(mainDataSet1.AttributeValue);
tag2AssetTA.Update(mainDataSet1.Tag2Asset);
@heat
heat / termometro.sql
Last active June 11, 2016 16:24
preparação do termometro
SELECT
p.idapostasjogos, p.idtime1, c.nomeTime, f.nomeTime, p.campeonatos_idcampeonatos, o.nomeCampeonato,
COUNT(p.idbilhete) totalApostas,
SUM(b.valorAposta * percentual_taxa) valorAposta,
SUM(b.valorPremio * percentual_taxa) valorPremio
FROM
(SELECT
j.idapostasjogos,
j.dataJogo,
j.idtime1,
@heat
heat / application.js
Last active June 10, 2016 17:26 — forked from handebc/application.js
imageapp
//this .js is supposed be adapters/application.js but I couldn't create an adapter here
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import Ember from 'ember';
export default JSONAPIAdapter.extend({
findAll: function(){
return Ember.$.getJSON('http://api.donanimhaber.com/api/v1/site/NewsSite?pageIndex=0&pageSize=15');
}
//this is in the adapters folder I couldn'tcreate it here
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import Ember from 'ember';
export default JSONAPIAdapter.extend({
findAll: function(){
return Ember.$.getJSON('http://api.donanimhaber.com/api/v1/site/NewsSite?pageIndex=0&pageSize=15');
}
@heat
heat / README.md
Last active December 20, 2015 17:19 — forked from DamonOehlman/README.md
Provisioning of node + nginx designed for use with vagrant shell provisioner. No need for chef, puppet.

Script para provisionar um ambiente de desenvolvimento ember em uma vm.

import org.junit.*;
import play.libs.ws.WS;
import play.libs.ws.WSResponse;
import play.mvc.*;
import play.test.*;
import play.libs.F.*;
import static play.test.Helpers.*;
import static org.junit.Assert.*;
@heat
heat / Test.java
Created August 9, 2015 20:35
calling a web
public class IntegrationTest extends WithApplication {
// ...
@Test
public void testRequest() {
Promise<WSResponse> promise = WS.url("http://www.google.com").get();
assertThat(
promise.get(1000).getStatus(), equalTo(OK));
}