Skip to content

Instantly share code, notes, and snippets.

View giangcoi198x's full-sized avatar

Johnathan Nguyen(Nguyen Quoc Giang) giangcoi198x

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Windows - Change Java version per batch command
Put these batch files in one of the PATH folders.
I usually put the %userprofile% in the path and place the BAT files there.
To change the JAVA version, type e.g."jdk1.6".
@giangcoi198x
giangcoi198x / GenerateSimplePdfReportWithJasperReports.java
Created February 22, 2018 07:44 — forked from rponte/GenerateSimplePdfReportWithJasperReports.java
Example on how to generate a simple pdf report with JasperReports
package rponte.report;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.JRException;
@giangcoi198x
giangcoi198x / script.js
Created March 17, 2017 15:41 — forked from tuanxuong/script.js
Hello Bro type Ctrl + U | F12 | Ctrl+Shift+I | Ctrl+Shift+C | Ctrl+S |
<script type='text/javascript'>
//<![CDATA[
shortcut={all_shortcuts:{},add:function(a,b,c){var d={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(c)for(var e in d)"undefined"==typeof c[e]&&(c[e]=d[e]);else c=d;d=c.target,"string"==typeof c.target&&(d=document.getElementById(c.target)),a=a.toLowerCase(),e=function(d){d=d||window.event;if(c.disable_in_input){var e;d.target?e=d.target:d.srcElement&&(e=d.srcElement),3==e.nodeType&&(e=e.parentNode);if("INPUT"==e.tagName||"TEXTAREA"==e.tagName)return}d.keyCode?code=d.keyCode:d.which&&(code=d.which),e=String.fromCharCode(code).toLowerCase(),188==code&&(e=","),190==code&&(e=".");var f=a.split("+"),g=0,h={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},i={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:4