Syndicate content

time

log4cplus bug in handling %q in older versions

In the last few days I've been trying to find the reason for a slowness in one very specific case in a software. It looks like it crashes and since it includes many try/catch with (...) it certainly captures the fact, but contrary to what it is expected to do, this one does not get logged! In any event, I wanted to prove that the area where we first were looking was not affected, and sure enough it was not. The problem is somewhere else. However, to prove that I needed to have a way to log milli-seconds because things happen very fast and a 1 second decimation is definitively not enough.

Upgrading Ubuntu to use NVidia

IMPORTANT NOTE

These are instructions for Ubuntu 10.10 and these worked in Ubuntu 12.10 (which I have now). It may break in the future though.

I generally install my Ubuntu systems using the Server version of Ubuntu because it tends to works a lot better. The result is that I don't get all the Desktop features installed by the installer. That prevents me from installing the NVidia driver automatically.

The newest drives for X.org make use of some source for the client-side driver and that requires you to install the linux source code and headers. I'm wondering if each time we ...

WNetAddConnection2 function, how to

Introduction

I just faught for a few hours trying to get the WNetAddConnection2() to work in my program and found out two things that I did not see explained anywhere in the documentation...

Folder that Works

I'm not too sure whether that's a new thing at the company I worked in to implement this function or whether that's every time, although I've seen other posts on the Internet with the same sort of path so I would imagine that this is a "normal" Microsoft network feature.

The fact is that to connect you have to use the name of the server followed by some ...

Changing the Time format in your Thunderbird on Unity (Ubuntu 12.04)

That took me forever because I could not find the place where my Unity icons where to edit them in order to add the necessary LC_TIME definition. This being said, it's relatively easy except that you have no real control over the exact formt, only the locale.

So...

I created a file named starter under my thunderbird folder, if you don't have such (because you're using the stock version of thunderbird) then you may want to create a bin folder as in:

mkdir ~/bin

The starter file is just a text file with a shell script like this:

#!/bin/sh
LC_TIME=en_DK.utf8
export ...

Using QDateTime to output a date string and UTC

As I'm working on a server I need dates in UTC. By default, the QDateTime object generates dates in local time.

How do you change that? There is a toUTC() but my input data is already UTC so using toUTC() would mess up the date and I'd get the same result anyway.

The idea is actually pretty simple. The toUTC() creates a QDateTime object in UTC mode. This is done like this:

QDateTime utc(QDateTime().toUTC());

Now the utc object is in UTC mode and can be used with your Unix dates as in:

utc.setTime_t(time(NULL));

and the string output can be generated with toString() as in:

 ...

not enough actual parameters for macro min() or max()

As I was porting wpkg to Windows so it would compile under Microsoft IDE version 10, I ran in a problem with variables named min and max. Windows wanted to see them as the min(a,b) and max(a,b) macros.

That started happening when I included Windows.h which I needed for handling files (CreateFileA, CloseHandle, etc.).

Since these are macros, i.e. defined with #define ..., they take priority over anything in your C++ code (since that's handled with your preprocessor.)

One way to get rid of them is to undefine those macros after the #include, something like this:

#include ...

Text import wizard in Excel 2010 not coming up with .csv file

As I was working on a table extracted from a PDF file, I wanted to load that table in Excel. By default it would put all the fields in column A. Not good. So I put that in a text file, added a pipe at the end of each time and then join lines really quick (with vim, it's J to join lines.)

Now I had a nice .csv file, with fields separated by a pipe (|) character.

123|Something|More info|This "worked" before?!

Now, time to load that file in Excel. I tried that and it gave me everything cut in "strange" places but especially, no way to select the column separator. Why ...

1 New MS-Windows Installation Update for a whole week?

For a week now I have had a warning when shutting down saying that there was yet another update to install on shutdown...

I did not really check on it for that long, but today I decided to check the auto-update as I was running the computer. There was the installation ready to be run. So I clicked on the button to start the installation.

After a moment, the installation process stopped with a really weird error:

Error message: Code 13EC, it's an unknown error.

It's funny that any programmer would create an error that the computer cannot figure out... Way beyond me.

This being ...

Multi-level lists in MS-Word... The new way!?

Okay, it has been a little while now, but each time I just have to search forever to find out how to create a multi-level numbering list.

By default, a list will appear as this:

1. Chapter

    1. Section

        1. Sub-Section

Which may work for you, but in many cases you want to have all the list numbers appearing in your section and sub-sections as in:

1. Chapter

    1.1 Section

        1.1.1 Sub-Section

Okay, so that in itself it actually very easy, but it used to be that you could ...

VTune "New Analysis" button disabled

Yesterday I installed VTune on a system at one of the companies I'm working with. It worked like a charm and I could run a few analysis and see problem areas in the system.

Later I worked on another C++ project in Linux, this morning I woke up on MS-Access, and did a little Drupal after that (PHP). I came back on Visual Studio C++ and... the VTune button is disabled! Not available at all somehow and no error message or anything!?

Turns out, like yesterday I had to start the VTune version of Visual Studio! Without that special version, it simply doesn't work, but it still appears and ...

Syndicate content Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.