Category: C++

  • openSSL vs. vcpkg – some strange experiences

    openSSL vs. vcpkg – some strange experiences

    Some unexpected experiences caused by the fact the vcpkg C++ package manager is still based on OpenSSL 1.0.2.

  • Process Status Analysis – the first steps

    Process Status Analysis – the first steps

    I am pleased to announce my first cross-platform and open source project, the Process Status Analysis tool, available on GitHub. The Process Status Analysis (psa) is a command line tool that offer some Operating System processes analysis features: – Get all processes loaded in memory information – Get process only used memory – Print processes tree – Top most “expensive” processes – Redirect output to a file

  • The First Hackathon Experience #HackTM2016

    The First Hackathon Experience #HackTM2016

    Some inside from my first hackathon experience, the #HackTM2016 from Timisoara.

  • Getting Table’s indexes experiences – workaround

    Trying to get table indexes information in SQL Server 2012 I identified a strange situation within a specific method that I was using so long but it was not acting as expected in one situation. Usually, I got the right information about indexes but in one situation I encounter a strange behavior. It’s about having a clustered index into a scenario. I have a table that contains two indexes referenced to some fields: IndexField_1 and IndexField_3 mapped over int, NULL fields. When IndexField_1 is Non-Unique, Non-Clustered and IndexField_3 is Clustered index I get the right information. But if the index IndexField_1 is Clustered and the IndexField_3 is Non-Unique, Non-Clustered I get no information about IndexField_1 index (eg. szIdxName and szIdxColName are “” and their length is -1 that means SQL_NULL_DATA). Within while loop, with the next iteration I get correct information about the second index IndexField_3.

  • HTML files generation using XML and XSLT with Microsoft XML DOM API

    This short tutorial shows how easy it’s to generate reports in HTML pages using Microsoft XML DOM API together XML and XSLT. XML (Extensible Markup Language) became a universal standard of encoding data in a format that is both human-readable and machine-readable. It’s widely used in business applications and even Microsoft Office uses it into […]

  • SubclassWindow() method issues in projects base on MFC Feature Pack

    The Problem Trying to paint a background image into client area of a MDI application build in VC++ 6.0 to VC++ 2005 IDE it’s not a difficult task. In case you need, you can find easily good references. For instance, there are two references from Microsoft (KB129471 and KB103786) and one I prefer: a FAQ […]

  • Several C++ singleton implementations

    This article offers some insight into singleton design-pattern. The singleton pattern is a design pattern used to implement the mathematical concept of a singleton, by restricting the instantiation of a class to one object. The GoF book describes the singleton as: “Ensure a class only has one instance, and provide a global point of access […]

  • Adventures with _chkstk

    Called by the compiler when you have more than one page of local variables in your function. _chkstk Routine is a helper routine for the C compiler. For x86 compilers, _chkstk Routine is called when the local variables exceed 4K bytes; for x64 compilers it is 8K. That’s all that you get from _chkstk()’s msdn web page. Nothing more…

  • pre vs. post increment operator – benchmark

    A recent Visual C++ team’s comment on twitter.com reminded me a hot topic that exists in C++ programming world: there is a long discussion of using pre versus post increment operators, specially, for iterators. Even me I was witness to a discussion like this. The discussion started from a FAQ written by me on www.codexpert.ro. Base on that VC++ team’s tweet related to viva64.com’s research I decided to create my own benchmark base on single and multicore architectures. For those that don’t know Viva64 is a company specialized on Static Code Analysis. Starting from their project I extended the tested for other STL containers: std::vector, std::list, std::map, and std::unordered_map (VC++ 2010 hash table implementation). For parallel core tests I used Microsoft’s new technology called Parallel Pattern Library. continue…

  • Numeric type conversion to std::string and vice versa

    In our real applications we have to convert from strings to integer or to real variables and vice versa (double/float/int variable to std::string). We can realize these conversions using C style CRT function or we can try C++ approach via STL. continue…

  • File size fast detection

    Many times in our job, we need to work with files and need to know file properties. One of the most important properties is file size. Of course, there are a lot of API that allows finding this property, but most of them needs additional file operations: open file, find file size and close file. continue…

  • Dynamic popup and drop down menus for custom representations

    Many applications allow dynamic customization for visual objects or data views. For instance, well known Internet Explorer application provides toolbars customization using a popup menu that appears when the user execute right click mouse action in toolbar zone area. Internet Explorer sample menu Other sample where this kind of menu is very useful is when it’s used in order to customize database data representation in Windows controls like List control or grid control. These kind of applications allow data filtering and show/hide columns using this kind of menu. The user just right click on control header and gets what he need. []