I hereby claim:
- I am jadeallenx on github.
- I am jadeallenx (https://keybase.io/jadeallenx) on keybase.
- I have a public key ASCzYgteA70jTBW7BkqBoqpn-Le6zVZCKrCki8nSsaL9MAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This is what the [official documentation][1] says about the terminate/2
callback for a gen_server:
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Reason is a term denoting the stop reason and State is the internal state of the gen_server.
Reason depends on why the gen_server is terminating. If it is because another callback function has returned a stop tuple {stop,..}, Reason will have the value specified in that tuple. If it is due to a failure, Reason is the error reason.
I hereby claim:
To claim this, I am signing this object:
I recently made the switch back to Windows 10 after spending 15 years using a Mac as my personal laptop. I won't go into all of the rationale behind that decision but the most succinct answer is that I have felt like Apple's doing me a favor by buying their products, not the other way around for the past three releases of macOS. As a rather committed vi partisan, removing the ESC key from the high end Mac Book Pros was kind of the final straw.
In any case, I bought my Surface Book 2 about two weeks ago. This past weekend, I took part in [Spawnfest][1], a 48 hour programming contest aimed at Erlang/Elixir. I wrote all of the code on the Surface Book 2 and I know some people are interested in my experience.
So keeping with the usual trite cliches, I'll use the "Good", "Bad" and "Ugly."
WSL is a driver shim for Windows 10 that enables you to run native Linux code on Windows without recompiling or running a Docker/VM. It currently supports Ubuntu 16.04 LTS - but more distribution support has been announced.
From a "clean" install of Ubuntu such as the kind you would get from a fresh install of WSL, you need to preinstall these debs to enable kerl to compile a working Erlang:
%% @doc | |
%% This Erlang module implements the ideas illustrated in Edsger Dijkstra's | |
%% famous paper "Self Stabilizing Systems in Spite of Distributed Control" | |
%% http://courses.csail.mit.edu/6.852/05/papers/p643-Dijkstra.pdf | |
%% @end | |
-module(ss). | |
-export([stop/1, show/1, start/1]). | |
-define(DELAY, 1000). | |
-define(THRESHOLD, 0.90). |
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use v5.14; | |
use utf8; | |
my $number = "௪"; | |
my $letter = "த்"; |
I'm a Scala noob.
I am deploying some Spark jobs which need to talk to various services in our production environment. These services are managed by a ZooKeeper installation that registers their host and ports for service discovery. Hence, our Scala code needs to interact with ZooKeeper to discover the host and ports to use when making HTTPS calls to these internal services.
There is some ScalaDoc for util-zk that describes the classes, objects and function signatures but those don't help me very much since I'm a newb and none of it really makes a ton of sense right now.
So I am writing this document with my discoveries about how the util-zk
library behaves empirically.
% Post/Query string parameter validation. | |
% | |
% Mark Allen, mrallen1@yahoo.com | |
% | |
% Specs [{{name, "param_name"}, {required, true}, {type, function}}, ... ] | |
% Input [{"name", "value}, ...] just you'd get from post or query string parameters | |
-module(t). | |
-export([test/0, test1/0, test2/0]). |