Archives

You are currently viewing archive for March 2007
Category: Z. links
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
HOWTO: set up ssh keys

# ssh-keygen -t dsa
パスフレーズを入れるとパスワード無しの接続はできない。(パスフレーズを聞かれる)
# scp ~/.ssh/id_dsa.pub ssh server:~

ssh serverにログイン後
cat id_dsa.pub >> ~/.ssh/authorized_keys; chmod 600 .ssh/*

Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
1. Download the following softwares
  JAVA J2SE5 (JDK-1.5.x) [double click to install]
  Apache-tomcat-5.5.x [double click to install. middle of the installation select J2SE directory which you just installed]
  Eclipse lomboz-eclipse-emf-gef-jem-3.1 [archive and place it anywhere]
  Eclipse Tomcat plug-in [archive and put it into Eclipse folder]
  JDBC driver (JTDS or Microsoft) [Copy jtds driver (jtds-1.2.jar or newer) into Tomcat home\common\lib]
2. Setup Eclipse
  Window -> Preferences -> Tomcat
    Select version 5.x
    Type or select Tomcat installed dir
  Window -> Preferences -> Java -> Installed JREs
    Select JDK (not JRE)
3. Modify Tomcat home\conf\server.xml (in Host tag)
  <Context path="/my_project" reloadable="true"
     docBase="%your project absolute path%"
     workDir="%your project absolute path%\work">
    <Resource name="jdbc/my_project_db" auth="Container" type="javax.sql.DataSource"
       username="%db user%" password="%db pwd%"
       driverClassName="net.sourceforge.jtds.jdbc.Driver"
       url="jdbc:jtds:sqlserver://%database server address%:1433/%db name%" />
  </Context>

Note: Tomcatプロジェクトをインポートするときは、先にプロジェクトを作っておく

» Read More

Category: MS tips
Posted by: hajime osako
C:\WINDOWS\system32\drivers\etc
Category: MS tips
Posted by: hajime osako

03/14: SugarCRM

Category: Web dev
Posted by: hajime osako
テーマを作成するには:
1.近いテーマをコピーする
2.コピーしたテーマのconfig.phpを変更する
  $theme_name と $theme_description
3.あとはスタイルシートなどを変更する

インストールディレクトリ内のconfig.phpのdefault_moduleを変更するとデフォルトのページが変更できる。

» Read More

Category: MS tips
Posted by: hajime osako
Category: MS tips
Posted by: hajime osako
Windows Media Player - MozillaZine Knowledge Base

1. If some or all of the files are missing, you can download the individual files from dlldump.com and place them in the Windows Media Player directory (usually C:\Program Files\Windows Media Player):
* npdsplay.dll: http://www.dlldump.com/download-dll-files_new.php/dllfiles/N/npdsplay.dll/3.0.2.629/
* npwmsdrm.dll: http://www.dlldump.com/download-dll-files_new.php/dllfiles/N/npwmsdrm.dll/9.00.00.3250/
* npdrmv2.dll: http://www.dlldump.com/download-dll-files_new.php/dllfiles/N/npdrmv2.dll/9.00.00.32508/

2. Reopen your browser and see if the WMP plugin is now working. If it isn't, follow these additional steps (Windows Vista users, go to the last step):

3. A Windows Media Player Plug-in for Netscape Navigator installer (not supported on Windows Vista) can be downloaded here and should resolve the issue [3] but the included files are older versions. After running the installer, copy the more recent versions of npdsplay.dll, npdrmv2.dll and npwmsdrm.dll from dlldump.com to the Windows Media Player directory, if they were replaced by older versions.

4. If the Windows Media Player plugin still does not work, copy the npdsplay.dll, npdrmv2.dll and npwmsdrm.dll files to the installation directory plugins folder; for example, to the C:\Program Files\Mozilla Firefox\plugins folder in Firefox.
Category: MS tips
Posted by: hajime osako
Category: MS tips
Posted by: hajime osako
Starbase01.com | IT (PC related) | IPX/SPX in Vista

おそらくWindows XPのファイルをコピーすれば設定できるはず。
Category: MS tips
Posted by: hajime osako
Windows Vista におけるファイルとプリンタの共有

1. WORKGROUP を同じにする
2. Location type(ネットワークの場所の種類)をプライベートにする

03/09: MS SQL tips

Category: Web dev
Posted by: hajime osako
NULL
NULLを含んだ計算はNULLをかえす。eg. Null + 2 = NULL
WHERE some_column = NULL はうまくいかない。
NULLを含むカラムをLEFT JOINするとNULLのレコードは表示されない
NOT IN() はNULLを考慮しない。
Functions
User Defined Typeは一度作成したら変更できない(2005ではできる模様)
日付はCASTでは変換できない。Convertを使用する
Integerの割り算は小数点が切り捨てられる。 eg. int 26 / int 7 = 3 (not 3.7.....)
DATEPART(mm, datetime_obj) は 2桁の数字を返さない。1月は01とならない。
RIGHT('00' + CAST(CAST(@rtn_week_no AS DECIMAL(2)) AS VARCHAR(2)), 2)
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
Category: Z. etc
Posted by: hajime osako
SELECT DISTINCT
	C_TBL.TABLE_CATALOG,
	C_TBL.TABLE_SCHEMA,
	C_TBL.TABLE_NAME,
	C_TBL.COLUMN_NAME,
	C_TBL.IS_NULLABLE,
	C_TBL.DATA_TYPE,
	C_TBL.COLUMN_DEFAULT,
	C_TBL.CHARACTER_MAXIMUM_LENGTH,
	C_TBL.NUMERIC_PRECISION,
	C_TBL.NUMERIC_PRECISION_RADIX,
	C_TBL.NUMERIC_SCALE,
	PK_TBL.CONSTRAINT_TYPE,
	C_TBL.ORDINAL_POSITION
FROM INFORMATION_SCHEMA.COLUMNS C_TBL
LEFT OUTER JOIN (SELECT DISTINCT k.TABLE_CATALOG,
			k.TABLE_SCHEMA,
			k.TABLE_NAME,
			k.COLUMN_NAME,
			tc.constraint_type
		FROM information_schema.key_column_usage k
		INNER JOIN information_schema.table_constraints tc
			ON tc.constraint_name = k.constraint_name
		WHERE tc.constraint_type = 'PRIMARY KEY') PK_TBL
	ON C_TBL.TABLE_CATALOG = PK_TBL.TABLE_CATALOG 
	AND C_TBL.TABLE_SCHEMA = PK_TBL.TABLE_SCHEMA 
	AND C_TBL.TABLE_NAME = PK_TBL.TABLE_NAME 
	AND C_TBL.COLUMN_NAME = PK_TBL.COLUMN_NAME
ORDER BY
	C_TBL.TABLE_CATALOG,
	C_TBL.TABLE_SCHEMA,
	C_TBL.TABLE_NAME,
	C_TBL.ORDINAL_POSITION
Category: Web dev
Posted by: hajime osako
location.replace("http://australia.osakos.com/");
Category: Web dev
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
insert into table_a (column_a, column_b) SELECT * FROM (SELECT '1234567' A, 'anz' B UNION SELECT '2234567', 'anz' UNION ....) tmp