CJK characters identify sample


///
/// Ref:
/// http://en.wikipedia.org/wiki/CJK_Unified_Ideographs
/// http://blog.oasisfeng.com/2006/10/19/full-cjk-unicode-range/
/// http://www.unicode.org/ucd/filemoved.html
///

///
///
static public string CommontCJKIdentify(string text)
{
if (text.Any(c => c >= 0x3040 && c <= 0x309F))
{ return "J"; }
else if (text.Any(c => c >= 0X30A0 && c <= 0x30FF))
{ return "J"; }
else if (text.Any(c => c >= 0X31F0 && c <= 0x31FF))
{ return "J"; }
else if (text.Any(c => c >= 0XAC00 && c <= 0xD7AF))
{ return "K"; }
else if (text.Any(c => c >= 0X1100 && c <= 0x11FF))
{ return "K"; }
else if (text.Any(c => c >= 0X3130 && c <= 0x318F))
{ return "K"; }
else if (text.Any(c => c >= 20000 && c <= 0xFA2D))
{
return "C";
}
else
{ return "Others"; }
}

IE11(Preview) User-Agent causes ASP.Net do not send back Set-Cookie

Solution

  1. Waiting for MS hotfix. (http://support.microsoft.com/kb/2600088 for IE10)
  2. Add cookieless=”UserCookies”
e.g.
<authentication mode="Forms">
  <forms name="yourAuthCookie" cookieless="UseCookies" loginUrl="login.aspx" protection="All" path="/" />
</authentication>

Generate SHA-1 by BinaryString or ArrayBuffer

Used readAsBinaryString() {Deprecated} , Work on Chrome,Firefox
Used readAsArrayBuffer() , Work on IE10,Chrome,Firefox,

Windows 8 Task Manager slow performance to open at first time

Solution : Disable Windows Defender Real-Time protection

Overlay Icons disappear– (TortoiseSVN,Dropbox,SkyDrive,Google Drive…)

  1. Regedit > KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ShellIconOverlayIdentifiers)
  2. Rename the entries under ShellIconOverlayIdentifiers to reorder the Icons.
  3. End task explorer.exe and restart it. (As same as restart computer.)

Reference: http://stackoverflow.com/questions/1057734/tortoisesvn-icons-not-showing-up-under-windows-7

SSIS package using SQL Authentication on SQL Server Agent

 
  1. SQL Server Business Intelligence Development Studio > SSIS tab > Package Configurations Organizer > Enable Package Configurations > Click Add > Type : XML configuration file >  Set up file path and name > Next > Select Connection manager >  Select Connection and pick Password.
  2. Open configuration feil from you store path. > Add Password in <ConfiguredValue> element :
      <ConfiguredValue>PasswordSample</ConfiguredValue>
  3. Add configuration file in you SQL Server agent.

Reference : SSIS package using SQL Authentication and DontSaveSensitive as ProtectionLevel

Run sqlcmd.exe without having SQL Server installed on Windows Server 2008

  1. Go to www.microsoft.com/en-us/download/details.aspx?id=26728
  2. Install Microsoft® SQL Server® 2008 R2 Native Client
    (1033\x86\sqlncli.msi  or 1033\x64\sqlncli.msi)
  3. Install Microsoft® SQL Server® 2008 R2 Command Line Utilities
    (1033\x64\SqlCmdLnUtils.msi or 1033\x86\SqlCmdLnUtils.msi)
  4. sqlcmd in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\