(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
NSZombieEnabled
is an environment variable which controls whether the Foundation runtime will use zombies. When zombies are enabled, a deallocated object's class is dynamically changed to be _NSZombie, and by default, the memory region is never marked as free, although this can be controlled separately(so, remember to disable NSZombieEnabled for Archived Release Build).
The end result is that, with zombies enabled, messages to deallocated objects will no longer behave strangely or crash in difficult-to-understand ways, but will instead log a message and die in a predictable and debugger-breakpointable way. This is the tool to use when trying to track down over-releases and premature releases.
Zombies will take effect for all Objective-C objects that are deallocated through normal means, including most Cocoa classes as well as user-created classes. On 10.4 and earlier, a rather important exception to this is most/all TollFreeBridged classes, as they are deallocated using CoreFoundation which NSZombieEnab
#!/bin/bash | |
### Save as "/usr/local/bin/progress" and chmod +x, then: | |
# | |
# $ progress ~/huge-file.tar.bz2 | |
# $ progress -p $(pidof bzcat) | |
# $ progress # progress of all open files, shows e.g. how far mpd is through your song :P | |
# | |
# source: http://stackoverflow.com/a/238140/69663 |
Summary of and excerpts from chapter 9 and 10 of On Lisp. Examples are mainly in Common Lisp.
For the time being, espanso does not come with a graphical user interface, in the meanwhile you can use this workaround to prompt for text or select result in a list, on macOS.
Create a folder scripts
in the espanso preferences folder and copy these files: /Users/<username>/Preferences/espanso/scripts/
.
You can also copy Pashua app app into this folder.
I've observed that there is a little bit of a disconnect in understanding what it is that needs to be done to properly implement the lock_pairs function for cs50 Tideman. The goal of this little write-up is simply an attempt at explaining what the problem actually is, and why a cycle imposes a problem.
First:
If you are unfamiliar with the actual problem, or have not read through the entire cs50 Tideman problem description. Then I think you should start there.
cs50 Tideman
Second:
This little write-up is only narrowing in on the idea of cycles, and a way to think about what a cycle is and determine if locking a pair in the pairs
array would create that cycle. This does not talk about any other part of the Tideman problem.
#include <cs50.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// Max number of candidates | |
#define MAX 9 | |
// preferences[i][j] is number of voters who prefer i over j | |
int preferences[MAX][MAX]; |
local utils = require('telescope.utils') | |
local defaulter = utils.make_default_callable | |
local actions = require('telescope.actions') | |
local finders = require('telescope.finders') | |
local make_entry = require('telescope.make_entry') | |
local pickers = require('telescope.pickers') | |
local previewers = require('telescope.previewers') | |
local builtin = require('telescope.builtin') | |
local conf = require('telescope.config').values | |
local flatten = vim.tbl_flatten |
set -x | |
cat karabiner.yaml | ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json' \ | |
| jq --sort-keys 'del(.definitions)' > karabiner.json |