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
#!/bin/bash | |
if pgrep mjpg_streamer > /dev/null | |
then | |
echo "mjpg_streamer already running" | |
else | |
LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1& | |
echo "mjpg_streamer started" | |
fi |
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 Main { | |
static class Node { | |
final Object car; | |
final Node cdr = this; | |
Node(Object content) { | |
this.car = content; | |
} |
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
""" | |
$ pip install numba | |
$ python jit.py | |
resultados: | |
$ python test_cc.py | |
Tempos com JIT | |
cc_0_jit - Min: 0.15884569298941642, Max: 0.1812134649953805, Mean: 0.16276181136781814 | |
cc_1_jit - Min: 0.15603229100815952, Max: 0.18515240401029587, Mean: 0.16477074182126672 | |
cc_2_jit - Min: 0.1618276800145395, Max: 0.25311970300390385, Mean: 0.17394073442847002 |
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
def jobs = hudson.model.Hudson.instance.items | |
jobs.each { job -> | |
def scm = job.scm | |
if (scm.class.name == 'hudson.plugins.perforce.PerforceSCM') { | |
println "Job '${job.name}' uses the following perforce configuration" | |
println '-' * 80 | |
println "P4Port: ${scm.getP4Port()}" | |
println "P4Client: ${scm.getP4Client()}" | |
println "P4User: ${scm.getP4User()}" |
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 migrate task --> | |
<macrodef name="migrate"> | |
<attribute name="command" /> | |
<attribute name="environment" /> | |
<element name="extraarguments" optional="true" /> | |
<sequential> | |
<echo>** Executing "migrate @{command}" on "@{environment}" environment **</echo> | |
<java classname="org.apache.ibatis.migration.Migrator" | |
failonerror="true" fork="true" classpathref="classpath"> | |
<sysproperty key="file.encoding" value="UTF-8"/> |
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
{ | |
"language": { | |
"javascript": { | |
"linting.prefer": "JSHint", | |
"linting.usePreferredOnly": true | |
} | |
} | |
} |
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
@Repository | |
public class JdbcTarefaDao | |
private Connection connection; | |
@Autowired | |
@Qualifier("postgreDataSource") | |
private DataSource dataSource; | |
@PostConstruct |
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.caelum.tarefas.controller; | |
import javax.validation.Valid; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.Model; | |
import org.springframework.validation.BindingResult; | |
import org.springframework.web.bind.annotation.RequestMapping; |
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 or get the Holidays | |
final Set<LocalDate> holidays = new HashSet<LocalDate>(); | |
holidays.add(LocalDate.parse("2006-08-28")); | |
//... keep adding all holidays for 2006 | |
// create the HolidayCalendar ASSUMING that the set covers 2006! | |
final HolidayCalendar<LocalDate> calendar = new DefaultHolidayCalendar<LocalDate> | |
(holidays, LocalDate.parse("2006-01-01"), LocalDate.parse("2006-12-31")); | |
// register the holidays, any calculator with name "UK" |