Search This Blog

Wednesday, September 14, 2011

V8Compatible , What is going on with DATE and TIMESTAMP

Suddenly, i could not see the time part in  date column , in my screen.
the time part arrive such 00:00:00

i realized that i am using Data Source Name (ORACLE connection pooling) who used different jdbc driver , and i forget to set the V8Compatible flag.
i suggest you to read the next article that will explain to you what is all about.
What is going on with DATE and TIMESTAMP:

another good explanation with samples could be found here:
Summary of features afftected by oracle.jdbc.V8Compatible 

enjoy
Yaniv Tzanany

Wednesday, August 24, 2011

C++ High Resolution Timer

i used to get timing via GetTickCount API , but the smallest measurement i managed to get was about ~15 ms.
so if you need to measure elapsed time in micro seconds , the next article is for you
High Resolution Timer:


LARGE_INTEGER frequency;        // ticks per second
    LARGE_INTEGER t1, t2;           // ticks
    double elapsedTime;

    // get ticks per second
    QueryPerformanceFrequency(&frequency);

    // start timer
    QueryPerformanceCounter(&t1);

    // do something
    ...

    // stop timer
    QueryPerformanceCounter(&t2);

    // compute and print the elapsed time in millisec
    elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart;
    cout << elapsedTime << " ms.\n";

Visual Leak Detector - Memory Leak Detection for Visual C++

Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++ - CodeProject

newer version for this tool could be found here Visual Leak Detector for Visual C++ 2008/2010

I didn't play with it yet, but good to know especially for Visual c++ 6 (its old and no more tools left).

Yaniv T


Monday, August 22, 2011

Visual C++ 6.0 - Developing Optimized Code

what a good article , its alwyes good to remember what you already forgot , the next link describe
how the Visual C++ compiler can optimize source code for speed and size and examines the reasons why code size matters. We have gone over the code generation and optimization switches and pragmas supported by Visual C++, how to choose the best switches for your project, and why and how to override them at the function level.

Developing Optimized Code with Microsoft Visual C++ 6.0
Profiling Your Application
C++ Optimization Strategies and Techniques



must for Visual c++ 6 developers ( yes i know its old .... )

Yaniv Tzanany

Sunday, August 21, 2011

memcached - distributed memory db

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its APIis available for most popular languages.

Memcached is in used with the largest sites on earth , so its definitely worth a try , i really hope to test it ASAP.

YanivTzanany