Category: Software

  • Ubuntu – How to fix update errors for a server behind of a proxy

    If you’re behind of a proxy server and the IP address has changed (or proxy it’s a new node in your network topology) then probably when you’re trying to update your binaries then you’ll get a list of errors. [bash] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/multiverse/i18n/Translation-en_US Unable to connect to 192.168.120.240:3128: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/multiverse/i18n/Translation-en Unable to connect to 192.168.120.240:3128: [/bash] This happens because you’re unable to connect to Ubuntu mirrors. In order to fix this issue you have to edit apt.conf file settings. [bash] root@my-server:~# vi /etc/apt/apt.conf Acquire::http::Proxy “http://192.168.230.99:3128”; [/bash]

  • Simple Pictures Unifier 1.1 application is up!

    At the beginning of this year I launched an application that helps you to organize the pictures of your important moments. The application helps you specially if you have photos from different sources (different cameras of friends) and you want to have a fluent images story. From the moment I have launched the first release until now I made up to 12GB pictures (3200+ pictures of 10 MB) and honestly I never found time in order to organize the pictures. Always I rescheduled the application improvements and finally I found time to implement export by date time folders and so on. Simple Pictures Unifier 1.1 allows merging and exporting pictures in one folder or in date time folders. Simple Pictures Unifier 1.1 comes with a better user friendly experience and few internal improvements.

  • 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…

  • Flexible changes for product version properties – Visual C++ binaries

    Manually editing of binaries version in the resource editor of Visual Studio IDE is not a viable solution. If we have dozens of projects in our solution, then for each kit building we should need manual resources file edit. Otherwise, we can use a special tool that does this thing for us. Unfortunately this approach is not the most flexible and could fail. For our flexible binaries properties changes and in order to avoid manual edit for each rebuild we can create and include a header file (version.h) that contains some constants of product version and file version of our project (.rc files). We have to include only these constants into this file (version.h): #define PRODUCT_VERSION 4.3.2.198 #define PRODUCT_VERSION_STR “4.3.2.198” Then, for each .rc file wherever we have FileVersion and ProductVersion we have to use this constants. When we will build a new kit, we have to change only these constants and then to start the kit building process. Everything is fine until we add new controls in our projects resource files. Then, because of Visual Studio IDE automation we can get an unlikely surprise: the FileVersion and the ProductVersion properties could be reset to 1.0.0.0. In order to avoid this issue and edit the version only in a single place I propose the following workaround.

  • Simple Pictures Unifier – first version

    Have you just returned from vacation and you have a lot of pictures? You just downloaded your taken pictures and you got your friends pictures, too? Then, probably, the pictures are scattered, with a random order in your computer. Would you like seeing pictures from all sources in order of events happening? If so, try to sort your photos using Simple Pictures Unifier tool! 🙂 Simple Pictures Unifier application Please, feel free to add comments, suggestions or bugs reports to this application. Any constructive feedback is sincerely appreciated. Thanks you!

  • 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…

  • Hungry boy – Google Chrome 5

    My currently default bowser is Google Chrome. I use it more then 90% browsing time. I like it because is launching so fast, is a secure broswer, respects major W3C standards and has an interesting application architecture. Each tab is an independent process and if appears some troubles in one tab, you can stop that process only, without loosing other Chrome’s tabs data. Unfortunately, two weeks ago, watching few slides presentations over slideshare.net I was shocked by a Windows message on my laptop: “Your computer is low on memory. Save your files and close these programs: Google Chrome.continue…

  • Release space on a Windows partition – SpaceMonger

    Few time ago I observed that my laptop’s first partition (48 GB size) free space reduced to 4 GB. There are a lot of file managers application (Windows Explorer, Total Commander, Far Manager, etc). All of them provide folder and file lists, but not intuitive display of most important detail: the size. Of course, there are some known paths that store not useful data (see bottom folders list) and with each file manager you can delete major not useful data. But, you can miss some old huge file (some forgotten video files, etc). Fortunately there is a tool witch display folders and files size graphically called SpaceMonger. I used it and now my laptop free space is approximately 20 GB. 🙂 At the end of this process I applied the same story on my old workstation, too. Using this visual tool is easy to observer big files, folders and is easy to clean Windows temporary files, Windows updates install files, easy to observe hibernate and virtual memory files (if you have enough RAM memory you can disable this feature), etc. []

  • 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. []

  • Versionable Object’s Serialization in MDI applications

    This article represents a follow-up of the last article, “Versionable Object’s Serialization using MFC in non Document View applications”. In that article I presented to you a way to solve incompatibility issues between different file versions of the same application, based on MFC serialization into a dialog base application. But, the dialog base applications are not the best way to use and apply MFC serialization. Applications base on document view architecture (MDI or SDI) are the best solution when we want to develop MFC application with serialization support. Document View MFC architecture offers support for automatic save and load document to/from a file on a storage area, using a serialization mechanism. MDI (Multiple Document Interface) and SDI (Single Document Interface) application offers default serialization basic mechanism. SerAddressBookMDI Main Window - continue to article []