Sunday, January 18, 2009

Linguistics

Anaphora / ellipsis resolution

  - anaphora resolution
  The music stopped, and that upset everyone

  - ellipsis resolution

Toponymy
Studies place names

.

Friday, January 16, 2009

About BTree

Hash clusters were introduced in Oracle 7 as an alternative way of indexing
a table. Instead of randomly storing rows in arbitrary table blocks and
using indexes to locate them (using a B-tree search), hash cluster rows are
stored according to the key values. Each row's location is derived by its
key value.
.

Wednesday, January 14, 2009

OO survival kit

If one has:
class MyImplement : public MyInterface

If the destructor of MyInterface is not virtual, then the destructor of MyImplement is not called in this case:

MyInterface * myInterface = new MyImplement();
delete myInterface;
.

Tuesday, January 13, 2009

GAC / .NET SDK

gacutil to manipulate the Global Assembly Cache can be found in
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

At first I tried to install the .NET SDK, but it was telling me that it was installed already. It is actually installed with Visual Studio. When you start the VisualStudio Command Prompt, the path to it is set already.

Sunday, November 30, 2008

Java logger

import java.util.logging.Logger;
import java.util.logging.FileHandler;
import java.util.logging.SimpleFormatter;
import java.util.logging.Level;

logger = Logger.getLogger("com.mycompany.conversion"); // logger internal name
FileHandler fileHandler = new FileHandler("basic.conversion.txt", 1000, 1);
fileHandler.setFormatter(new SimpleFormatter());
logger.addHandler(fileHandler);
logger.log(Level.INFO, " Initializing GgWebService");

See also:
C:\Program Files\Java\jdk1.6.0_10\jre\lib\logging.properties
.

Friday, November 21, 2008

Strings

  • C#
    string is an alias for String
    String: UTF16
  • Java
    UTF16
  • C++
    wchar_t: UTF16 on Windows, UTF32 on Unix
    wchar_t is not portable, better to use ICU instead.
  • stl::string
    typedef basic_string < char > string;
    typedef basic_string < wchar_t > wstring;
    wstring string1 = L"obecnÄ›";
  • CString
  • ICU
    UnicodeString: UTF16 internally. Note that the endianess of UTF-16 is platform dependent.
    ICU does not use UCS-2. UCS-2 is a subset of UTF-16. UCS-2 does not support surrogates, and UTF-16 does support surrogates.
  • Note: most commonly, "Unicode" means UCS-2, but the difference between UCS-2 and UTF16 is not visible from the Java and C# standpoint
  • Windows TCHAR
    #ifdef UNICODE
    typedef wchar_t TCHAR;
    #else
    typedef char TCHAR;
    #endif
    TCHAR * toto = _T("obecnÄ›");
  • Note: in Java and C#, strings are immutable. String content cannot be changed after the object is created. See StringBuffer (Java) and StringBuilder (C#)
  • Sunday, October 26, 2008