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
2222222120222222022222222222201222222220202122220212022202002222022212220022222212220222022202220202222222222222220222222222222122222222222222012222222222222122222222222222222222212222222221222122221212122222202022122212222122222212220222222202220212222222222222222222222222222122222222222222012222222222222221222222222222222222201222222221222122220222122202222222022202222222222222221222122222220212222222222222220222222222222022212222222222002222222222222120222222222222222222212022222221212222220222022212002222022202221122222222222222122222220212222222222222220222222222222222222222222222122222222222222121221222122222222222222122222220222122221202122222022022222202220222222202222222222202222222222222222222220222222222222222212222222222212222222222222122222222122222222222221222222222222122221202122212112122022212222222222222222222122222220222222222222222220222222222202022202222222222202222222222222222222222222222222222221122222221212222221212222212202122222212220122222222222212222222222202222222222222222222222222 |
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 com.example.oncompletiontest; | |
import org.apache.camel.spring.boot.CamelSpringBootApplicationController; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.context.ConfigurableApplicationContext; | |
@SpringBootApplication | |
public class OncompletionTestApplication { |
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
/** | |
* A {@link JTextField} that skips all non-digit keys. The user is only able to enter numbers. | |
* | |
* @author Michi Gysel <michi@scythe.ch> | |
* | |
*/ | |
public class JNumberTextField extends JTextField { | |
private static final long serialVersionUID = 1L; | |
@Override |
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
dbname="mydb" | |
user="user" | |
pass="pass" | |
scriptpath="/home/sqlbackup" | |
logfile="$scriptpath/backup.log" | |
timestamp=`/bin/date +%Y%m%d-%H%M` | |
# number of days to keep the backups | |
keepfordays=14 | |
mysqldump -u $user -h localhost -p$pass $dbname | gzip -9 > $scriptpath/backups/$dbname-$timestamp.sql.gz |
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
require 'bigdecimal' | |
def integrate (a, b, n) | |
a = a.to_f; b = b.to_f; n = n.to_i | |
result = 0.0 | |
dx = (b - a) / n | |
dx_half = dx / 2 | |
for i in 0 ... n | |
result += yield a + (i * dx) |