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,310 other followers

Archive for the ‘Algorithms’ Category

A 4-bit Calculator made in cardboard and marble

Posted by jpluimers on 2017/11/14

Cool device: [WayBackA 4-bit Calculator made in cardboard and marble

I really love this. Not just that it exists, but how it was made and how it’s explained.

Definitely worth reading.

via: [WayBack] Funny modern abacus https://lapinozz.github.io/learning/2016/11/19/calculator-with-caordboard-and-marbles.html – David Berneda – Google+

–jeroen

Posted in Algorithms, Development, Hardware Development, Software Development | Leave a Comment »

GitHub – sinbad/spriterecolour: Sprite processor to allow dynamic recolouring

Posted by jpluimers on 2017/10/18

One day this will be extremely useful to me: [WayBackGitHub – sinbad/spriterecolour: Sprite processor to allow dynamic recolouring

Via: [WayBackSpriteRecolour, an open source sprite recolouring tool · SteveStreeting.com

TL;DR:

Read the rest of this entry »

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

Which hashing algorithm is best for uniqueness and speed? – Software Engineering Stack Exchange

Posted by jpluimers on 2017/10/04

Tested algorithms:

Source: [WayBackWhich hashing algorithm is best for uniqueness and speed? – Software Engineering Stack Exchange

via: [WayBackToday’s topic of study: HashtablesMy view of hash tables is heavily influenced by an oral doctoral exam question my boyfriend in college had: “why or … – Lars Fosdal – Google+:

My view of hash tables is heavily influenced by an oral doctoral exam question my boyfriend in college had: “why or why not would you use a random number generator to dither an image?

–jeroen

I archived the non-wikipedia references:

Murmur2 graph:

Read the rest of this entry »

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

Mikrotik date and time calculations

Posted by jpluimers on 2017/08/29

Some ideas for date and time calculation:

It should get better (and verifyable) implementations in stead of these Julian (not Gregorian!) date conversions:

Notes:

–jeroen

Posted in Algorithms, Development, Internet, MikroTik, Power User, RouterOS, Routers, Scripting, Software Development | 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 »

 
%d bloggers like this: