Friday, September 25, 2009

身份證字號說明

身份證字號 共有十碼, 以下是位置說明,僅供各位參考

N1 N2 N3 N4 N5 N6 N7 N8 N9 N10
戶籍 性別 ~流~~~~~~~~水~~~~~~~~~~~碼~

代表說明

戶籍代表字母
A台北市 B台中市 C基隆市 D台南市 E高雄市 F台北縣
G宜蘭縣 H桃園縣 I嘉義市 J新竹縣 K苗栗縣 L台中縣
M南投縣 N彰化縣 O新竹市 P雲林縣 Q嘉義縣 R台南縣
S高雄縣 T屏東縣 U花蓮縣 V台東縣 W金門縣 X澎湖縣
Y陽明山 Z連江縣

英文字母代表的數字
A=10 B=11 C=12 D=13 E=14 F=15 G=16 H=17 I=34 J=18 K=19 L=20
M=21 N=22 O=35 P=23 Q=24 R=25 S=26 T=27 U=28 V=29 W=32 X=30
Y=31 Z=33

性別代表數字
1:男性
2:女性

步驟

1. 查出英文字所代表的數字

再將所查出的數字 "十位數+個位數x9"
例: 台北市=10
1 + 0x9 =1
台中市=11
1 + 1x9 =10

2. N2x8+N3x7+N4x6+N5x5+N6x4+N7x3+N8x2+N9+N10

將流水碼依序乘8765432
一個個乘.乘完要加起來. (別忘了先乘除後加減)
例: 123456789
1x8+2x7+3x6+4x5+5x4+6x3+7x2+8+9


3.將步驟1 和步驟2 的兩個數加起來除以10.

例:步驟1 台北計算結果 =1
步驟2 1x8+2x7+3x6+4x5+5x4+6x3+7x2+8+9 =129 (1+129)/10

除10後看看是否可以整除.如可以整除即為正確的
身份證字號. 如無法整除即是錯誤的身份證字號

(1+129)/10 = 13 => 可以整除.正確

Wednesday, September 16, 2009

Clear Drop Down List of Recent Connection From SQL Server Management Studio


SQL Server Management Studio 2017 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\14.0\SqlStudio.bin
SQL Server Management Studio 2016 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\13.0\SqlStudio.bin
SQL Server Management Studio 2014 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin
SQL Server Management Studio 2012 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin
SQL Server Management Studio 2008 delete the fileC:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
SQL Server Management Studio 2005 delete the file – same as above answer but the Vista path. C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat


In fact there's a way to delete all the history info in the dialog fields.
For SQL Server 2005:
C:\Documents and Settings\<user>\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
If you can not find mru.dat at above location look for mru.dat in following folder.
C:\Documents and Settings\[user]\Application Data\Microsoft\Microsoft SQL Server\90\Tools\ShellSEM\mru.dat
For SQL Server 2008:
C:\Documents and Settings\<user>\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
If you can not find mru.dat at above location look for mru.dat in following folder.
C:\Documents and Settings\[user]\Application Data\Microsoft\Microsoft SQL Server\100\Tools\ShellSEM\mru.dat
If you are using VISTA OS instead of XP OS. Replace C:\Documents and Settings\[user]\Application Data\Microsoft\ with
C:\Users\\AppData\Roaming\Microsoft\ and it should work.
Make sure to take note down any IP address of SQL Server you may need in future.
Reference : Pinal Dave (http://www.SQLAuthority.com)

Saturday, September 5, 2009

How to reset MS SQL Server IDENTITY

If the table is new create you can use this to reset the identity
DBCC CHECKIDENT (yourtable, reseed, seed_value)

If you delete that data in the table u can use
DBCC CHECKIDENT (yourtable, reseed, 0)