This file contains hidden or 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
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm | |
yum update | |
yum install nginx -y | |
vi /etc/nginx/nginx.conf | |
error_log /dev/null crit; | |
access_log /dev/null main; |
This file contains hidden or 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
/* TRX1409240002 */ | |
SELECT | |
CONCAT( | |
'TRX', | |
DATE_FORMAT(CURDATE(), '%y%m%d'), | |
IF( | |
SUBSTR(MAX(id),8,2) = DATE_FORMAT(CURDATE(), '%d'), | |
LPAD( | |
SUBSTR(MAX(id),10,4) + 1, |
This file contains hidden or 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
If you're like me, and use Nginx instead of Apache, you could eventually face this problem: Create an htpasswd file (for htaccess "authentication"). | |
To create your file, without installing Apache, just run: | |
$ printf "USER:$(openssl passwd -crypt PASSWORD)\n" >> .htpasswd | |
Replace USER and PASSWORD for your user and password :) | |
source : https://coderwall.com/p/zvvgna |
This file contains hidden or 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
// WITH PARAMETER | |
JdbcProperties.connectDb(); | |
Connection c = JdbcProperties.conn; | |
try { | |
String reportName = "Report/r_detail_payroll.jasper"; | |
String imgPath = "Report/PST02.jpg"; | |
InputStream fis = this.getClass().getClassLoader().getResourceAsStream(reportName); | |
InputStream is = this.getClass().getClassLoader().getResourceAsStream(imgPath); | |
Map params = new HashMap(); | |
params.put("start", dateFormat.format(start.getDate())); |
NewerOlder