Archive for October, 2009

Create a dmp file from the application

October 25th, 2009 No comments
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter = NULL;

                                         CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
                                         CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
                                         CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);

static LONG WINAPI MyUnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo)
    HMODULE hDll = ::LoadLibrary(_T("DBGHELP.DLL"));
    MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)::GetProcAddress(hDll, "MiniDumpWriteDump");

    ExInfo.ThreadId = ::GetCurrentThreadId();
    ExInfo.ExceptionPointers = pExceptionInfo;
    ExInfo.ClientPointers = NULL;


    // HANDLE hFile - minidamp file name(for example, "test.dmp")

    BOOL bOK = pDump(::GetCurrentProcess(), ::GetCurrentProcessId(),
                     hFile, 1, &ExInfo, NULL, &mci);

void main()
    // setup our own ExceptionHandler
    m_previousFilter = SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);

    // actial work

    // befoe exit
    if (m_previousFilter)

Parallel Programming

October 22nd, 2009 No comments

count valuable bits in unsigned int

October 14th, 2009 No comments
uint8_t num_of_bits32(uint32_t _arg)
    _arg = (_arg & 0x55555555L) + ((_arg >> 1) & 0x55555555L);
    _arg = (_arg & 0x33333333L) + ((_arg >> 2) & 0x33333333L);
    _arg = (_arg + (_arg >> 4)) & 0x0F0F0F0FL;
    _arg = _arg + (_arg >> 8);

    return (uint8_t)(_arg + (_arg >> 16)) & 0x3F;


int count1(int t)
        mov edx,t
        mov eax, 0
  cycle : bsf ecx, edx
        jz finish
        inc eax
        inc ecx
        shr edx, cl
        jmp cycle

Windows Sysinternals: Disk2vhd v1.0

October 10th, 2009 No comments

Disk2vhd is a utility that creates VHD (Virtual Hard Disk – Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).

77 Windows 7 Tips

October 9th, 2009 No comments

Windows 7 may be Microsoft’s most anticipated product ever. It builds on Windows Vista’s positives, and eliminates many of that OS’s negatives. It adds new functionality, too—all in a package that is less resource-hungry than its predecessor.

And whether or not you’re upgrading from Vista or skipping it altogether and moving up from Windows XP, you’ll need to know how to make the most of it in your environment. Here are 77 tips and tricks to get you there.

Intel Threading Building Blocks (TBB)

October 6th, 2009 No comments

Intel® Threading Building Blocks (Intel® TBB) is an award-winning C++ template library that abstracts threads to tasks to create reliable, portable, and scalable parallel applications. Just as the C++ Standard Template Library (STL) extends the core language, Intel TBB offers C++ users a higher level abstraction for parallelism. To implement Intel TBB, developers use familiar C++ templates and coding style, leaving low-level threading details to the library. It is also portable between architectures and operating systems. With Intel TBB, developers get the benefits of faster programming, scalable performance, and easier to maintain code.

Intel homepage

Intel® Threading Building Blocks 2.2 for Open Source

Parallel Pattern Library

October 5th, 2009 No comments

The new Parallel Pattern Library (PPL) enables you to express parallelism in your code and how the asynchronous messaging APIs can be used to separate shared state and increase your application’s resilience and robustness.

1. Four Ways to Use the Concurrency Runtime in Your C++ Projects

2. Concurrency Runtime

The Concurrency Runtime is a concurrent programming framework for C++. The Concurrency Runtime simplifies parallel programming and helps you write robust, scalable, and responsive parallel applications.

The features that the Concurrency Runtime provides are unified by a common work scheduler. This work scheduler implements a work-stealing algorithm that enables your application to scale as the number of available processors increases.

3. Parallel Programming in Native Code blog

Microsoft Web Platform Installer 2.0

October 4th, 2009 No comments

The Microsoft Web Platform Installer 2.0 (Web PI) is a free tool that makes getting the latest components of the Microsoft Web Platform.


How to Install WordPress on your own Computer In 5 Minutes

Computer Science for Everyone

October 4th, 2009 No comments

Adaptive Learning Online is a website for everyone who is interested in learning Computer Science related topics. We provide information and interactions for learning.

We created this website because we felt that the Internet has vast amounts of information required to learn computer science. But this information is scattered all around the net making it intimidating to a new learner. We also realize that just information is not enough for a proper learning experience. There needs to be a place to ask questions, discuss various topics, do some exercises, get them reviewed, work on projects, and many other things.

We plan to curate existing multimedia content from the Internet and present it to learners in a structured manner. We will also provide tools for interaction and collaboration which people can use to enhance their learning process. A long time back I wrote a blog post on networked reciprocal learning. We are hoping to realize that vision of an ecosystem where people have access to information and interactions, and can learn in a space without any barriers.

The website is free for use. Registration is not required to view material on this website, however several parts of the website such as forums do need registration. Registration is free, so please register and use the full potential of this website.

18 способов сосредоточиться на работе

October 4th, 2009 No comments

Множество факторов регулярно прерывают вашу работу, мешая сосредоточиться. Как избавиться от них и действовать эффективнее?

Read more…