1. remove some text on file name of all files: e.g. “TVBOXNOW ” ls | Rename-Item -NewName { $_.name -replace “TVBOXNOW “, “” } 2. move up one level of files in each directory, e.g. c:\folder1\folder2\file3 to c:\folder1\file3 $files = Get-ChildItem -Recurse “c:\folder1” | where {$_.PSIScontainer -eq $false} foreach ($file in $files) { $destinationFolder = …
For some business reasons, company provides FortiGate SSL VPN to connect office network, but some subnet cannot be accessed due to route did not add automatically. here is a PowerShell script to find the gateway and interface of VPN connection then add route. It will be great if I can find out how to run …
Discovered logstash last year, finally I have played around logstash and elasticsearch during weekend, pretty easy to walk through Getting Started. However when I try to customize pattern for work-related log, its documentation does not come with good example and its API changed between 1.2 and 1.3… some search result from google using deprecated version. …
There is insufficient information for AsyncWeb (subproject of Mina) on internet, what I need is simulating a web services that reply in various seconds for load testing. the following code may not be correct, some wiered debug message… and I just depressed it by log4j.properties Mostly follow the lightweight example of AsyncWeb, the eclipse project …
因為唔同platfrom… 係linux/max 上可以行既shell script, 係windows 係可以用cygwin 去行 可惜, 如果用 eclipse > ant build , 個ant call *.sh 就出事 寫(translate)左一個好無聊既 batch script (被)玩左一個下午,就係因為唔識寫script, 同埋個help 係 %~dpnI 唔係 %%~dpnI …. 記錄一下 ::———————————————————–:: :: CONFIGURATION SCRIPT :: :: Script copies file.type.{DEPLOY} to file.type :: Where {DEPLOY} is one of PRODUCTION|STAGING|QA|INTERNAL|DEV :: :: modify from config.sh to windows environment …
http://forum.java.sun.com/thread.jspa?threadID=359395&start=30&tstart=0 Here is a quick test sample that I ran with for PDF to JPG conversion. I only had to convert the 1st page, so if you wanted multi-pages you will have to adapt the above example. I use the ImageIO and jpedal jars. Quick overview. give the decoder the filename of the pdf to …
在 Web 應用程式中使用 Jakarta Commons Logging 與 Log4j 蔡煥麟 Mar-25-2005 http://140.138.148.144/~s882515/blog/log4j.htm 摘要 簡單介紹 Jakarta Commons Logging 與 log4j 的用法,以範例說明如何在 Web 應用程式中使用 logging。 1. 簡介 在開發 Java 或 JSP 應用程式時,最簡單的除錯技巧就是呼叫 System.out.println() 將訊息印出來,或者將訊息顯示在網頁上,這類方式很簡單,但卻有以下缺點: 若將除錯資訊顯示在網頁上,會破壞應用程式的輸出畫面。 除錯時埋了一堆 println() 呼叫,除錯完畢或者產品交付之前必須一一找出來刪除。 有些問題不易在開發時期發現,或者臭蟲出現的時機不是固定的,這類問題如果用單純的 println() 方法來找,由於輸出的訊息可能非常多,又沒有分類,要花比較多時間去過濾跟尋找。 比較好的 logging 技術便可以解決以上的問題,而且讓我們在程式的任何地方都能輸出除錯訊息,輸出的裝置可以是螢幕、檔案、甚至是電子郵件。如果把除錯訊息記錄到檔案中,經由檢視客戶執行時的記錄檔,就可以了解使用者在執行程式時所發生的內部細節,以便找出不容易在開發時期發現的臭蟲。 本文先簡單介紹 Jakarta Commons Logging 與 log4j 這兩個 logging 套件,並以 Web 應用程式的範例來說明如何利用這兩個套件輸出 log 訊息,包括安裝、設定、以及如何撰寫輸出 …
var is_ie/*@cc_on = { // quirksmode : (document.compatMode==”BackCompat”), version : parseFloat(navigator.appVersion.match(/MSIE (.+?);/)[1]) }@*/; (Uncomment the second line if you also wish to check whether IE is running in “compatibility” (quirks) mode or in standards-mode.) All other browsers cheerfully ignore the Javascript comment block (/* … */) so what they end up with is essentially …
http://www-1.ibm.com/support/docview.wss?rs=463&context=SSKTMJ&context=SSKTWP&dc=D400&uid=swg24014829&loc=en_US&cs=utf-8&lang=en This document contains instructions for obtaining a fix to address Daylight Saving Time 2007 changes and IE7 issues with Domino Web Access (DWA) 6.5.5. DJAG6TZMNT: IE7 closes with reuse child windows and ‘open pop-ups in new tab’ setting VSEN6MH3YD: IE7…resizing columns in DWA views yield JavaScript error LLGO6UW3E3: IE7 only: DWA warning pops up …
jQuery.fn.rotate = function(angle,whence) { var p = this.get(0); // we store the angle inside the image tag for persistence if (!whence) { p.angle = ((p.angle==undefined?0:p.angle) + angle) % 360; } else { p.angle = angle; } if (p.angle >= 0) { var rotation = Math.PI * p.angle / 180; } else { var rotation = …

