Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (51)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (2)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (80)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (30)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (8)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (37)
- FFMpeg (5)
Category Archives: Java
[Jersey] disable decode the URL path
use annotation “@Encoded” Ex: @Path(“{first}/get”) public Response getYouWant(@Context HttpHeaders httpHeaders, @PathParam(“first”) String first, @QueryParam(“second”) @Encoded String second);
Posted in Java
Leave a comment
open external program from java for mac os x
String[] cmds = {“open”, tempFile.getAbsolutePath(), “-a”, “/Applications/Microsoft Office 2011/Microsoft Excel.app”}; Runtime.getRuntime().exec(cmds);
Posted in Java, Mac, Office
Leave a comment
Gson usage : formJson
avoid to face the exception ‘java.lang.ClassCastException With com.google.gson.internal.LinkedTreeMap cannot be cast to…’, we use the TypeToken to convert json to List public class Object { @SerializedName(“n”) private String name; @SerializedName(“i”) private String id; public String getName() { return name; } … Continue reading
Posted in Java
Leave a comment
[Java] unicode to string
public static void main(String[] args) { try { String abc = “0043006F0077006D0061002E002E002E90808ACB”; System.out.print(getString(abc)); } catch (Exception e) { System.out.println(“err”); } } public static String getString(String strValue) { StringBuilder str = new StringBuilder(); String temp; for (int i = 0; i … Continue reading
Posted in Java
Leave a comment
[Java, HBase] Hostname is very important!
If the connection is failed, try to check the hdfs uri setting, it might be used hostname.
Posted in HBase, Java
Leave a comment
[Java] Connect LDAP (subdomain).
Ref. referrals & global catalog, AD Child Domain Referral Searches by Rajnish Bhatia If you want to search all subdomain, the port of ‘PROVIDER_URL’ might be use in 3268.
[Java] Check apache poi version
Ref: The Apache POI project – Frequently Asked Questions: My code uses some new feature, compiles fine but fails when live with a “MethodNotFoundException” or “IncompatibleClassChangeError” ClassLoader classloader = org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader(); URL res = classloader.getResource(“org/apache/poi/poifs/filesystem/POIFSFileSystem.class”); String path = res.getPath(); System.out.println(“Core POI … Continue reading
Posted in Java
Leave a comment
[Java] Write xls files
public String createFile(Object object) { try { Excel excel = (Excel) object; HSSFWorkbook hssfWorkbook = new HSSFWorkbook(); for (SheetContent sheetContent:excel.getSheets()) { HSSFSheet sheet = hssfWorkbook.createSheet(sheetContent.getName()); List<HSSFCellStyle> formats = new ArrayList<>(); /** format */ for (String format:sheetContent.getFormats()) { HSSFCellStyle cs = … Continue reading
Posted in Excel, Java
Leave a comment
[Java] Binary numbers in enum type.
public enum Type { /** none */ NONE(0), /** ONE */ ONE(1), /** TWO */ TWO(2), /** FOUR */ FOUR(4), /** EIGHT */ EIGHT(8), /** SIXTEEN */ SIXTEEN(16); private int key; private static int[] binaryArray = { 0, 1, 2, … Continue reading
Posted in Java
Leave a comment
[Java] String.format
private String GroupMessageAuto = “已完成自動同步動作,共計新增 %s 筆、刪除 %s 筆、同步 %s 筆”; groupMsg = String.format(GroupMessageAuto, syncCount.getAdd(), syncCount.getDel(), syncCount.getSync());
Posted in Java
Leave a comment