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
-- 1 - Criar/copiar tabela problemática: | |
CREATE TABLE TABELA_NOVA SELECT * FROM TABELA_PRODUCAO; | |
-- 2 - Obter último valor da PK, nosso caso 65535 | |
SELECT PK_ABUDEGA FROM TABELA_PRODUCAO ORDER BY PK_ABUDEGA DESC; | |
-- 3 - Adicionar constraints necessárias e obviamente da PK também | |
ALTER TABLE TABELA_NOVA ADD PRIMARY KEY (PK_ABUDEGA); | |
ALTER TABLE TABELA_NOVA CHANGE PK_ABUDEGA PK_AJUSTADA INT(11) UNSIGNED NOT NULL AUTO_INCREMENT; | |
ALTER TABLE TABELA_NOVA ADD FOREIGN KEY (TABELA_RELACIONADA_ID) REFERENCES TABELA_RELACIONADA(ID); | |
-- 4 - O valor do passo 3 mais 1 | |
ALTER TABLE TABELA_NOVA AUTO_INCREMENT = 65536; |
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
package br.com.willianantunes.playground; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import org.apache.camel.ProducerTemplate; | |
import org.apache.camel.PropertyInject; | |
import org.apache.camel.builder.RouteBuilder; | |
import org.apache.camel.component.twitter.search.TwitterSearchComponent; | |
import org.apache.camel.model.ModelCamelContext; |
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 java.io.IOException; | |
import java.util.Collection; | |
import org.hibernate.Hibernate; | |
import org.hibernate.proxy.HibernateProxy; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.TypeAdapterFactory; |
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 br.com.willianantunes.serenata.JarbasAPI; | |
import br.com.willianantunes.support.ScenarioBuilder; | |
import org.apache.camel.Exchange; | |
import org.apache.camel.ExchangePattern; | |
import org.apache.camel.Producer; | |
import org.apache.camel.ProducerTemplate; | |
import org.apache.camel.builder.ExchangeBuilder; | |
import org.apache.camel.builder.RouteBuilder; | |
import org.apache.camel.component.cxf.common.message.CxfConstants; | |
import org.apache.camel.component.cxf.jaxrs.CxfRsBinding; |
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
class HttpService { | |
get(url) { | |
return new Promise((resolve, reject) => { | |
let xhr = new XMLHttpRequest(); | |
xhr.open('GET', url); | |
xhr.onreadystatechange = () => { |
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
class SampleJasmineService { | |
constructor(serviceUrl) { | |
this._http = new HttpService(); | |
this._servicoUrl = serviceUrl; | |
} | |
consult(message) { |
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
class SampleJasmineController { | |
constructor(serviceUrl) { | |
let $ = document.querySelector.bind(document); | |
this._service = new SampleJasmineService(serviceUrl); | |
this._message = $('p.message'); | |
this._btnSubmit = $('form input[type=submit]'); |
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
<!DOCTYPE html> | |
<html xmlns:th="http://www.thymeleaf.org"> | |
<head> | |
<title>Jasmine Honesto</title> | |
<meta charset="utf-8"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
</head> | |
<body> |
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
describe("Regras para atender demandas específicas de testes honestos", () => { | |
var sampleJasmineController; | |
beforeEach(() => { | |
ScenarioBuilder.prepareView(); | |
sampleJasmineController = new SampleJasmineController(); | |
}); |
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
@Controller | |
public class SampleController { | |
private static final Logger LOGGER = LoggerFactory.getLogger(SampleController.class); | |
@Autowired | |
private SampleService sampleService; | |
@GetMapping(REQUEST_PATH_SAMPLE) | |
public ModelAndView sample(@RequestHeader(HONEST_SAMPLE_HEADER) String honestSampleHeader) { |