Monthly Archives: July 2011

Is our life easier than before?

html -> xml -> json TCP/IP -> RPC ->DCOM/Corba -> Soap -> RESTful language specific mechanisms: Java RMI, Jini, .NET remoting When a technology is mature, it is also out of interest of experts/pioneers.

Posted in Uncategorized | Leave a comment

Java and .NET

Java annotation vs .NET metadata

Posted in .NET, Java | Leave a comment

qt-vs-addin-1.1.9.exe and VC++ 2010

The plugin incorrectly creates myproject.vcxproj file, but the project file seems to be for VC++ 7.0. <VisualStudioProject ProjectType=”Visual C++” Version=”7.00″ …> A VC++ 2010 project file has the following inside: <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> Solution: rename QT plugin created project file to myproject.vcproj, and open … Continue reading

Posted in CPP, IDE, QT | 1 Comment

get xml string with encoding from MSXML

// First step is add encoding to processing instruction MSXML::IXMLDOMProcessingInstructionPtr pXMLProcessingNode = pXMLDoc->createProcessingInstruction(“xml”, ” version=’1.0′ encoding=’UTF-8′”); _variant_t vtObject; vtObject.vt = VT_DISPATCH; vtObject.pdispVal = pXMLRootElem; vtObject.pdispVal->AddRef(); pXMLDoc->insertBefore(pXMLProcessingNode,vtObject); // second step is writing the document to IStream CComPtr<IStream> spStream; hr = ::CreateStreamOnHGlobal(NULL,TRUE,&spStream); … Continue reading

Posted in CPP, XML | Leave a comment

build boost_1_47_0

call “%VS100COMNTOOLS%/../../vc/bin/vcvars32.bat” cd /d D:\src\boost_1_47_0 echo Update D:\src\boost_1_47_0/tools/build/v2/user-config.jam call bootstrap.bat set ICU_PATH=D:\src\icu4c-4_6-src\icu echo “build boost_1_47_0 start” >> buildtime.txt time /t  >> buildtime.txt bjam.exe –toolset=msvc stage –build-type=complete -sBZIP2_SOURCE=D:\src\bzip2-1.0.6 -sZLIB_SOURCE=D:\src\zlib-1.2.5 -sICU_PATH=”D:\src\icu4c-4_6-src\icu” >> msvc10.log time /t  >> buildtime.txt echo “build finished” >> buildtime.txt … Continue reading

Posted in CPP, IDE, Open Source | Leave a comment

C++ call java.util.HashMap

//============================================================================ // Name        : usejavahashmap.cpp // Author      : Onega // Description : C++ call java.util.HashMap // JNI Doc: http://download.oracle.com/javase/6/docs/technotes/guides/jni/index.html // g++ -I/usr/lib/jvm/java-6-openjdk/include -I/usr/lib/jvm/java-6-openjdk/include/linux -O0 -g3 -Wall -c -fmessage-length=0 -v -MMD -MP -MF”src/usejavahashmap.d” -MT”src/usejavahashmap.d” -o “src/usejavahashmap.o” “../src/usejavahashmap.cpp” // g++ -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/server/ -v … Continue reading

Posted in CPP, Java, JNI | Leave a comment

call stack of unhandled std::bad_alloc thrown by operator new

0:000> k ChildEBP RetAddr 0012d2c0 7c90df4a ntdll!KiFastSystemCallRet 0012d2c4 7c809590 ntdll!ZwWaitForMultipleObjects+0xc 0012d360 7c80a115 kernel32!WaitForMultipleObjectsEx+0x12c 0012d37c 6945763c kernel32!WaitForMultipleObjects+0x18 0012dd10 694582b1 faultrep!StartDWException+0x5df 0012ed84 7c864526 faultrep!ReportFault+0x533 0012eff8 785922fa kernel32!UnhandledExceptionFilter+0x55b WARNING: Stack unwind information not available. Following frames may be wrong. 0012f330 7857bb47 MSVCR90!abort+0x10f 0012f360 … Continue reading

Posted in CPP, debug | Leave a comment

build wxWidgets-2.9.2 on ubuntu 11.04 Natty Narwhal

../../configure –help onega@ub-laptop:/d4/ux/cpplib/wxWidgets-2.9.2/release/shared$ ../../configure –enable-shared –enable-xrc –enable-monolithic –enable-debug_gdb –without-subdirs onega@ub-laptop:/d4/ux/cpplib/wxWidgets-2.9.2/release/shared$ make

Posted in Uncategorized | Tagged | Leave a comment