- Install GNU IMP
- Install GNU IMP PAL Filters http://registry.gimp.org/node/19058
- Open image in GNU IMP
- Make sure image is in RGB (Image > Mode > RGB is checked)
- Color->Components->Decompose->YCbCr R470 (this decomposes the layers into Y, Cb, Cr, and opens a new three-layer image. Y = brightness, Cb = blueness, Cr = magentaness, roughly)
- increase the brightness on the Cr layer a bit
- decrease the brightness on the Cb layer a bit (played with both of these til it looked right)
- Color->Components-> Recompose
- Color > Hue-Saturation: select magenta and red, increase the saturation a little on both of these to make it more neon
- Filters > Artistic > PAL: press okay to select defaults
function lineTowards(g:Graphics, x:int, y:int, length:int):void | |
{ | |
var c:Number = Math.sqrt(Math.sqr(x) + Math.sqr(y)); | |
var ratio:Number = length / c; | |
g.lineTo(x*ratio, y*ratio); | |
} |
package asx.string | |
{ | |
public class ColorizeTest | |
{ | |
var colors:Object = { red: red, green: green, yellow: yellow, blue: blue, purple: purple, cyan: cyan, gray: gray }; | |
[Test] | |
public function colorize_shouldReturnColorizedString():void | |
{ | |
for (var color:String in colors) |
<?php | |
/** | |
* Simple two-phase commit for PHP couchbase. | |
* | |
* Michael Nitschinger (@daschl, 2012) | |
* | |
* Additional Remarks | |
* ------------------ | |
* - The Couchbase extension makes it currently pretty hard to write easy readable code when dealing with | |
* CAS (compared to the ruby adapter). This could certainly be improved with closures. I also found that |
(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.
The following instructions are for creating your own animations using the style transfer technique described by Gatys, Ecker, and Bethge, and implemented by Justin Johnson. To see an example of such an animation, see this video of Alice in Wonderland re-styled by 17 paintings.
The easiest way to set up the environment is to simply load Samim's a pre-built Terminal.com snap or use another cloud service like Amazon EC2. Unfortunately the g2.2xlarge GPU instances cost $0.99 per hour, and depending on parameters selected, it may take 10-15 minutes to produce a 512px-wide image, so it can cost $2-3 to generate 1 sec of video at 12fps.
If you do load the
<?php | |
/** | |
* A php implementation of the Hungarian algorithm for solving the assignment | |
* problem. An instance of the assignment problem consists of a number of | |
* workers along with a number of jobs and a cost matrix which gives the cost of | |
* assigning the i'th worker to the j'th job at position (i, j). The goal is to | |
* find an assignment of workers to jobs so that no job is assigned more than | |
* one worker and so that no worker is assigned to more than one job in such a | |
* manner so as to minimize the total cost of completing the jobs. |
<body style=margin:0> | |
<canvas id=a> | |
<script> | |
// initialize 2D canvas (c) | |
// initialize game state (s) | |
// initialize keys states (u,r,d,l for directions, k for all the keyboard) | |
c=a.getContext`2d`,k=[u=r=d=l=s=0] | |
// (initialize your global variables here) |