I am slightly put off by:
I am slightly put off by:
I haven't written here in 8 months. Part of the reason for that is that I've swapped jobs. At the old place, I spent about 90% of my time writing C++, and about 10% of the time using other languages, including Python, Perl, web languages, and last, and oldest, Fortran.
Aside: Did anyone see that movie, Hidden Figures? I loved it. But it made me a little uneasy when I realized people have been writing Fortran for about 60 years. I felt like a part of history? Not sure if good or bad.
This is part 2 of a 3 part series. The first part covers spatial hashing in general, and some of the fundamental implementation details. The second part will cover a few algorithms, and the third part will describe some test cases.
The code is available here, but please note, it is still a work in progress / experiment.
This is part 1 of a 3 part series. The first part covers spatial hashing in general, and some of the fundamental implementation details. The second part will cover a few algorithms, and the third part will describe some test cases.
The code is available here, but please note, it is still a work in progress
This article primarily deals with syncing a local git repo with a remote, for beginners, or for people who can't get interested in the details of source control, or for people who want to be interested in the details of source control, at a later date, and are looking for an entry point.
I'll go over a little personal history here with respect to git; skip it if you feel like it.
Recently at my place of work, I suggested that we move to git.
For reasons beyond my control, I often work with a codebase that makes use of Microsoft MFC's string class, CString. CString has its detractors and proponents. I don't have a whole lot to add to the debate that hasn't been said already. Instead, I'm going to focus on using C++ variadic templates to get around one of my least favorite CString "anti-idioms". Since I'm not overly familiar with variadic templates, I plan to go over them in slow-mo.
std::thread is a big step forward for multi-threaded applications written in C++. I suppose people have written their own cross-platform thread wrappers before, but for the rest of us, there's no more dealing with POSIX threads vs. Windows threads etc. std::thread is also far more 'natural' to C++ than openMP is out of the box, which is what I used pretty often in the past. By natural, I mean that one can write:
In this article, we're going to create a C++ application with cURLcpp that reads a webpage and prints the HTML source to stdout.
I wanted to try cURLcpp as opposed to the tried and usually true cURLpp, mostly for fun.
The bulk of the article is really a "for-dummies" guide to setting up your environment to do so. I won't really go into detail about how to use cURL or cURLcpp. In fact, we're just going to compile the first example from the cURLcpp readme. Once you've got a good cURLpp development 'environment' setup, it shouldn't be too hard to cut and try different cURLpp features and code.
In this tutorial, I'm going to introduce an extremely useful feature in LT Spice -- how to create a custom, parameterized part. I don't actually know what to call the resulting 'object' Maybe a block, a model, custom subcircuit, custom part -- I'm not sure.
The point is, you're going to have a custom circuit that you can create a simple symbol for, and then import and use with other circuits. Furthermore, instances of your custom model can have per-instance parameters!
For our example, we're going to create a simple model for a low pass circuit. We'll be able to import this block into other circuits, but each can have its own 3 dB roll-off frequency.
To start, we have to draw the model...
Hexadecimal clocks are pretty cool. They just take the hours, minutes and seconds of the current time, and concantenate them to form a hexadecimal color. We can do whatever we want with the color, I suppose. For example, if the time were 11:14:45, we would display the color #111445.
This is the 'classic' hexadecimal clock, which was described above. I have reproduced it here:
Original Hex. Clock
Here's a slightly different mapping. In this mapping, we use a 12-hour/am/pm clock, and use the hexadecimal equiavlent of the hours for the red digts in the hex color. For example, 11:14:45 am maps to #0B1445. Here it is:
Hex. Clock - Hex Hours Representation.