The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,842 other followers

Archive for the ‘C++’ Category

Building OpenSSL on Windows

Posted by jpluimers on 2017/10/03

Some very interesting links:

–jeroen

Posted in C, C++, Development, Software Development, Visual Studio C++ | Leave a Comment »

What is the right way to convert into UNIX timestamp from the date and time in C/C++? – Stack Overflow

Posted by jpluimers on 2017/08/16

Thanks R.. for answering this:

POSIX has a formula for exactly what you want:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_15 [WayBack]

tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
    (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
    ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400

This works whenever you have a broken-down time in GMT, even if the underlying system’s mktime, etc. functions do not use the same format time_t as “Unix timestamps”.

If your original time is in local time, you can use mktime and gmtime to convert it to GMT using the system’s notion of timezone rules. If you want to apply your own timezone offset rules, just do that manually before using the above formula.

Source: What is the right way to convert into UNIX timestamp from the date and time in C/C++? – Stack Overflow [WayBack]

For testing and more examples: Epoch Converter – Unix Timestamp Converter [WayBack]

Hopefully this will help me getting better implementations for these:

–jeroen

Posted in Algorithms, C, C++, Development, Software Development | Leave a Comment »

https://www.youtube.com/watch?v=INzECItF6ew Delphi, where are you? 

Posted by jpluimers on 2017/07/12

Edit: in the mean time, the author took his video off-line. The G+ thread however is still interesting.

From a while ago:

[WayBack] https://www.youtube.com/watch?v=INzECItF6ew
Delphi, where are you? – Jacek Laskowski – Google+

 

YouTube video C++ Cool Debugging Tips and Tricks

–jeroen

Posted in C++, Delphi, Development, Software Development | 4 Comments »

instead of x86, msbuild is creating an x64 solution configuration via sln.metaproj – Stack Overflow

Posted by jpluimers on 2017/05/02

Sometimes msbuild will throw an error like this  for an x86 project:

"C:\Users\Developer\Versioned\libssh2\build\libssh2.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
C:\Users\Developer\Versioned\libssh2\build\libssh2.sln.metaproj : error MSB4126: The specified solution configuration "Debug|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties
form="Any CPU") or leave those properties blank to use the default solution configuration. [C:\Users\Developer\Versioned\libssh2\build\libssh2.sln]

Cause:

vsvars64.bat will set the environment variable Platform=x64 but vsvars32.bat will not empty this environment variable.

Easiest is to run set Platform= then run vsvars32.bat.

Adopted from MSBuild creating an x64 solution configuration via sln.metaproj – Stack Overflow [WayBack]:

If you are running this in the Visual Studio x64 command window it will set an environment variable Platform=x64 that will be used by msbuild. You can verify this by running echo in the command prompt you are using.

echo %platform%

So you will need to override the default when using x64 cmd, or run from the x86 cmd.

malexander

–jeroen

Posted in .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio and tools, Visual Studio C++ | Leave a Comment »

Maybe Probably Dance wrote the fastest hashtable implementation ever

Posted by jpluimers on 2017/02/27

Long read: well worth it. [WayBackI Wrote The Fastest Hashtable | Probably Dance

github repository: skarupke/flat_hash_map: A very fast hashtable

source download: https://github.com/skarupke/flat_hash_map/blob/master/flat_hash_map.hpp

–jeroen

Posted in C++, Development, Software Development | Leave a Comment »

 
%d bloggers like this: