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())); |
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
/* 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
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
rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-3.0.el6.rpm | |
yum update | |
yum install varnish | |
chkconfig --levels 235 varnish on | |
service varnish restart |
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://kartolo.sby.datautama.net.id/EPEL/6/i386/epel-release-6-8.noarch.rpm | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
yum update | |
yum install mysql mysql-server | |
service mysqld start | |
/usr/bin/mysql_secure_installation |
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://kartolo.sby.datautama.net.id/EPEL/6/i386/epel-release-6-8.noarch.rpm | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
yum update | |
yum install php-fpm php-mysql php-pecl-apc php-mcrypt --enablerepo=remi,epel | |
vi /etc/php.ini | |
cgi.fix_pathinfo=0 |
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
<?php | |
$now = date('j F Y'); | |
echo 'now = ' . $now . '<br />'; | |
$mod = strtotime($now . " + 10 weekdays"); | |
echo 'next 10 weekdays = ' . date('j F Y', $mod); | |
?> |
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
ANDROID_HOME C:\Program Files\Android\android-sdk | |
ANT_HOME D:\Apps\apache-ant-1.9.4 | |
JAVA_HOME C:\Program Files\Java\jdk1.7.0_71 | |
PATH C:\Users\Dody\AppData\Roaming\npm; | |
%ANT_HOME%\bin; | |
%ANDROID_HOME%/tools; | |
%ANDROID_HOME%/platform-tools |
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
---- Copied from https://www.cyberciti.biz/faq/how-do-i-start-oracle-service-in-unix/ ---- | |
How To Startup Oracle Database on a Unix/Linux | |
Use the su - username command to login as oracle user. Open the Terminal or login using ssh and type the following command to login | |
$ su - oracle | |
Start Oracle server in UNIX/Linux | |
Now, use the lsnrctl command to start service (usually located at /home/oracle/oracle/product/10.2.0/db_1/bin directory): | |
$ lsnrctl start |
OlderNewer