JavaScript Code
var str = "hi";
Memory allocation:
Address | Value | Description |
---|---|---|
...... |
... |
JavaScript Code
var str = "hi";
Memory allocation:
Address | Value | Description |
---|---|---|
...... |
... |
The difference between XYZ and TMS tiles and how to convert between them
Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles
ending in /0/0/0.png
or something. Sometimes if it's a script, it'll look like
&z=0&y=0&x=0
instead. Anyway, these are usually maps in Spherical Mercator.
Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.
Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.
# setup fd 3 as udp connection to drone | |
exec 3<>/dev/udp/192.168.1.1/5556 | |
# takeoff | |
echo -e "AT*REF=1,512\r" >&3 | |
# landing | |
echo -e "AT*REF=2,0\r" >&3 | |
... | |
# profit? |
#!/bin/sh | |
# this assumes you are using mingw-w64 platform. | |
# if not, add --linker=x86_64-w64-mingw32-g++.exe option | |
TARGET=x86_64-w64-mingw32 | |
RUST_ROOT=/c/home/stone/rust | |
# copy mingw runtime dlls to the dir to prevent dll hell. |
// total number of samples at each fragment | |
#define NUM_SAMPLES {{ numSamples }} | |
#define NUM_SPIRAL_TURNS {{ numSpiralTurns }} | |
#define USE_ACTUAL_NORMALS {{ useActualNormals }} | |
#define VARIATION {{ variation }} | |
uniform sampler2D sGBuffer; |
Here I'm trying to understand what happens when I run
./hello
#include
I built this service rendered over HTTPS.
We're using the Hawk protocol to authenticate message producers, but since the service will use HTTPS, Hawk is an overkill in my opinion.
Some of the drawbacks of using Hawk in my opinion:
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
# This is well-known behavior, it's just interesting. | |
$ mkdir a | |
$ echo "hello!" > a/file.txt | |
$ cat a/file.txt | |
hello! | |
$ chmod 000 a/file.txt | |
# Now I don't expect to be able to change a/file.txt... | |
$ echo "GOODBYE" > a/file.txt | |
bash: a/file.txt: Permission denied | |
# Okay, good, I can't modify the file directly. |