Script para provisionar um ambiente de desenvolvimento ember em uma vm.
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
-- adicionar query GetDataByPartida(@status, @idpartida); | |
select * from bilhete where | |
idbilhete in ( select bilhete_idbilhete from aposta where apostasjogos_idapostasjogos = @idpartida ) and | |
statusBilhete = @status |
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
[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 |
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
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; |
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
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); |
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
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, |
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
//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 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
//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'); | |
} |
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
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.*; |
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 IntegrationTest extends WithApplication { | |
// ... | |
@Test | |
public void testRequest() { | |
Promise<WSResponse> promise = WS.url("http://www.google.com").get(); | |
assertThat( | |
promise.get(1000).getStatus(), equalTo(OK)); | |
} |