2016年9月26日 星期一

db2 更換 hostname

要改 /home/ladapdb2/sqllib/db2nodes.cfg

2016年9月19日 星期一

JDK 1.4 吃 2048 RSA

根據

http://www.shine8.pro/home/ji-shu-fen-xiang-yu-tao-lun/java-eclipse/rang-jdk-zhi-yuan-4096-bit-ssl-jia-mi-lian-xian

https://www.bouncycastle.org/java.html

https://confluence.slac.stanford.edu/display/JAVA/Upgrading+jdk+1.4+for+4096+bit+ssl


JAVA JDK 只吃 < 2048 的憑證


http://silicondetector.org/display/JAVA/Upgrading+jdk+1.4+for+4096+bit+ssl


A bug in JDK 1.4.2_06 (and presumably other 1.4.*) prevents Sun's JDK from accessing SSL sites with &gt;1024 bit SSL certificates. The following prescription can be used to work around this. You will write access to the Java installation directory () to apply these fixes.

Download the sun unlimited strength encryption files from Sun from the bottom of http://java.sun.com/j2se/1.4.2/download.html (If you are not in the US check on the legality of doing this!)
From the downloaded archive copy local_policy.jar and US_export_policy.jar into your /jre/lib/security directory replacing the files that are there (you may want to save the old files first, just in case).
Download the bouncy castle crytography provider for JDK 1.4 from here: http://www.bouncycastle.org/download/bcprov-jdk14-125.jar
Copy the downloaded jar file to /jre/lib/ext
Edit the file /jre/lib /security/java.security. Add a new line to put the bouncycastle cryptography provider at postion 2.
security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.1=sun.security.provider.Sun
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.rsajca.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
That should be it

This bug does not affect jdk 1.5, so a perhaps easier solution is simply to upgrade. You will still need to download the unlimited strength encryption files from: http://java.sun.com/j2se/1.5.0/download.jsp




換完 security 檔之後 到
https://www.bouncycastle.org/latest_releases.html
抓  1.4 的 bcprov-jdk14-XXX.jar 替代品 然後重開 jvm
然後 console java app 就可以吃到新KEY了....

2016年9月2日 星期五

sublime 3 insert datetime

%APPDATA%/Sublime Text 3/Packages/User/insert_datetime.py
import sublime, sublime_plugin, time
dt_format  = "%Y/%m/%d-%H:%M:%S\n"  # v2013.10.02.10.23.52
dt_pattern = "[0-9]{4}/[0-9]{2}/[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}\n"
class insert_datetime(sublime_plugin.TextCommand):
    def run(self, edit):
        sels = self.view.sel()
        for sel in sels:
            if sel.empty():
                self.view.insert(edit, sel.a, time.strftime(dt_format))
            else:
                self.view.replace(edit, sel, time.strftime(dt_format))       
Preferences \ Key Bindings - User \ [ { "keys": ["ctrl+f1"], "command": "insert_datetime"} ]

2016年8月26日 星期五

Kendo UI



Grid
http://docs.telerik.com/kendo-ui/controls/data-management/grid/editing

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid



Multi Select Grid
http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/use-multiselect-as-custom-editor

inline edit
http://demos.telerik.com/kendo-ui/grid/editing-inline

line charts
http://docs.telerik.com/kendo-ui/controls/charts/chart-types/line-charts

doc
http://docs.telerik.com/

intro
http://docs.telerik.com/kendo-ui/introduction

Oracle Query Alert Log fvia SQL

http://www.dba-oracle.com/t_11g_dbgalertext_alert_log_sql.htm

http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm


11可以查 X$DBGALERTEXT

11以前要用外部文件的方式

create directory BDUMP as '/u01/app/oracle/admin/mysid/bdump';

create table 
   alert_log ( msg varchar2(80) )
organization external (
   type oracle_loader
   default directory BDUMP
   access parameters (
      records delimited by newline
   )
   location('alrt_mysid.log')
)
reject limit 1000;