At my place of work we were doing translations with json files and key value pairs.
eg. en-US.json
{
"this_key": "Translates to this"
}
At my place of work we were doing translations with json files and key value pairs.
eg. en-US.json
{
"this_key": "Translates to this"
}
// copy/paste into chrome console (alt+cmd+J) after the video starts playing. | |
setInterval(function() { | |
var possibleButtons = document.getElementsByClassName('continue-playing'); | |
if (possibleButtons.length) { | |
for (var i = 0; i < possibleButtons.length; i++) { | |
if (/Continue Playing/.test(possibleButtons[i].textContent)) { | |
var event = document.createEvent('HTMLEvents'); | |
event.initEvent('click', true, false); | |
possibleButtons[i].dispatchEvent(event); | |
} |
(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.
Ruby news and discussion, interviews
--Mute Spotify when ads are playing. Use if in a country where you can't | |
--purchase a pro account. Open AppleScript editor (Applications > Utilities) | |
--paste this script in and then go File -> Save As, change 'File Format' to | |
--'Application' and save somewhere. Run Spotify using that application. | |
set currentTrack to "" | |
do shell script "open -a \"Spotify\"" | |
delay 5 |
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
Class Main { | |
public void bfs() | |
{ | |
// BFS uses Queue data structure | |
Queue queue = new LinkedList(); | |
queue.add(this.rootNode); | |
printNode(this.rootNode); | |
rootNode.visited = true; | |
while(!queue.isEmpty()) { | |
Node node = (Node)queue.remove(); |
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |