(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.
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork git@github...my-fork.git |
This tutorial explains how Unison handles 'effectful' computations, like storing state or performing I/O, using abilities. It assumes you haven't come across abilities before, and covers everything from the ground up.
This is an unofficial tutorial, written before the one on unisonweb.org/docs. The approach taken here is slow and methodical. Your first stop should be the official tutorial, if you haven't seen it already.
This doc is a Unison transcript - the source is here.
Terminology note: other languages with ability systems typically call them 'effect handlers' or 'algebraic effects', but many of the ideas are the same.
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.
I like to follow working example code so this is how the boilerplate will look like:
import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))
import Http
;; Keybonds | |
(global-set-key [(hyper a)] 'mark-whole-buffer) | |
(global-set-key [(hyper v)] 'yank) | |
(global-set-key [(hyper c)] 'kill-ring-save) | |
(global-set-key [(hyper s)] 'save-buffer) | |
(global-set-key [(hyper l)] 'goto-line) | |
(global-set-key [(hyper w)] | |
(lambda () (interactive) (delete-window))) | |
(global-set-key [(hyper z)] 'undo) |
fun hashAndSavePasswordHash(context: Context, clearPassword: String) { | |
val digest = MessageDigest.getInstance("SHA-1") | |
val result = digest.digest(clearPassword.toByteArray(Charsets.UTF_8)) | |
val sb = StringBuilder() | |
for (b in result) { | |
sb.append(String.format("%02X", b)) | |
} | |
val hashedPassword = sb.toString() | |
val sharedPref = PreferenceManager.getDefaultSharedPreferences(context) | |
val editor = sharedPref.edit() |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
Here are my attempts to script an IntelliJ-based IDE using javax.script.*
API (ex-JSR-223).
The list of available scripting languages and engines:
<app>/lib/groovy-jsr223-xxx.jar
<app>/jbr/...
(deprecated and will be removed soon)