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
@Service | |
class SalesOrderServiceImpl @Autowired constructor ( | |
val em: EntityManager | |
) : SalesOrderService { | |
override fun getDailySalesData(reportFilter: ReportFilter) | |
: List<SalesData> { | |
val q = em.createNativeQuery(""" | |
SELECT | |
s.date, |
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
https://gitlab.com/aovs/projetos-cursos/fj27-alura-forum-api/tree/master/src/main/java/br/com/alura/forum/security |
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 void toXml(UpdateRequest request) { | |
try { | |
JAXBContext jaxbContext = JAXBContext.newInstance(CreateResponse.class); | |
Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); | |
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); | |
StringWriter sw = new StringWriter(); | |
jaxbMarshaller.marshal(request, sw); | |
String xmlContent = sw.toString(); | |
System.out.println( xmlContent ); | |
System.out.println( ); |
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
void selection_sort(){ | |
for (int i = 0; i < 5; i++){ | |
int menor = i; | |
for (int j = i; j < 5; j++){ | |
if (notas[j] < notas[menor]){ | |
menor = j; | |
} | |
} | |
swap(notas[menor], notas[i]); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<rich:modalPanel minwidth="300" minheight="100" id="mensagemURLModal" | |
modal="true" resizeable="false" autosized="true"> | |
<table width="250" border="0" cellpadding="4" cellspacing="0" align="center"> | |
<tr> | |
<td align="center"> | |
<div id="mensagemURL"></div> | |
</td> | |
</tr> | |
<tr> |
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
private static void adicionarCss(final String id, final String css) { | |
final UIComponent component = getComponenteById(id); | |
if(component!=null){ | |
if(component instanceof HtmlInputText){ | |
final HtmlInputText input = ((HtmlInputText)component); | |
if(input.getStyleClass()==null){ | |
input.setStyleClass(css); | |
}else{ | |
input.setStyleClass(input.getStyleClass()+" "+css); |
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
Table 2.2. Supported keywords inside method names | |
Keyword Sample JPQL snippet | |
And findByLastnameAndFirstname … where x.lastname = ?1 and x.firstname = ?2 | |
Or findByLastnameOrFirstname … where x.lastname = ?1 or x.firstname = ?2 | |
Between findByStartDateBetween … where x.startDate between 1? and ?2 | |
LessThan findByAgeLessThan … where x.age < ?1 | |
GreaterThan findByAgeGreaterThan … where x.age > ?1 | |
After findByStartDateAfter … where x.startDate > ?1 | |
Before findByStartDateBefore … where x.startDate < ?1 |
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
# =================================================================== | |
# COMMON SPRING BOOT PROPERTIES | |
# | |
# This sample file is provided as a guideline. Do NOT copy it in its | |
# entirety to your own application. ^^^ | |
# =================================================================== | |
# ---------------------------------------- | |
# CORE PROPERTIES | |
# ---------------------------------------- |
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
var output = ''; | |
for (var property in obj) { | |
output += property + ': ' + obj[property]+'; '; | |
} | |
alert(output); |
NewerOlder