This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
### JHW 2018 | |
import numpy as np | |
import umap | |
# This code from the excellent module at: | |
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module | |
import random |
var gulp = require('gulp'); | |
var browserify = require('gulp-browserify'); | |
var concat = require('gulp-concat'); | |
var styl = require('gulp-styl'); | |
var refresh = require('gulp-livereload'); | |
var lr = require('tiny-lr'); | |
var server = lr(); | |
var paths = { | |
js: 'src/**/*.js', |
base_events = ['click', 'dblclick', 'mousedown', 'mouseup', | |
'mouseover', 'mousemove', 'mouseout', 'dragstart', 'drag', | |
'dragenter', 'dragleave', 'dragover', 'drop', 'dragend', 'keydown', | |
'keypress', 'keyup', 'load', 'unload', 'abort', 'error', 'resize', | |
'scroll', 'select', 'change', 'submit', 'reset', 'focus', 'blur', | |
'focusin', 'focusout', 'DOMActivate', 'DOMSubtreeModified', | |
'DOMNodeInserted', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument', | |
'DOMNodeInsertedIntoDocument', 'DOMAttrModified', | |
'DOMCharacterDataModified', 'mousewheel', 'wheel'] |
This is a small collection of scripts showing how to use require.js. It's only one of several ways of setting up a require.js project, but it's enough to get started.
At its core, require.js is about three things:
The following files show how these are achieved.
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
$("#element").droppable({ | |
tolerance: 'pointer', | |
activeClass: 'ui-state-active', | |
hoverClass: 'ui-state-hover', | |
drop: function(evt, ui) { | |
console.log('dropped',evt,ui) | |
} | |
}); | |
$('.ui-droppable').live('dropover dropout',function(evt,ui){ |