Skip to content

Instantly share code, notes, and snippets.

View mjburgess's full-sized avatar

Michael mjburgess

View GitHub Profile
mjburgess@mjb:guess$ cargo build
Compiling guess v0.1.0 (file:/home/mjburgess/src/rust/guess)
src/guess.rs:24:64: 24:73 error: cannot move out of dereference of `&`-pointer
src/guess.rs:24 Vec::from_fn(weights.len(), |i| update(rate, *weights.get(i), xy.get(i).val0(), xy.get(i).val1() as int, *p.get(i)))
^~~~~~~~~
src/guess.rs:24:82: 24:91 error: cannot move out of dereference of `&`-pointer
src/guess.rs:24 Vec::from_fn(weights.len(), |i| update(rate, *weights.get(i), xy.get(i).val0(), xy.get(i).val1() as int, *p.get(i)))
^~~~~~~~~
error: aborting due to 2 previous errors
Could not execute process `rustc src/guess.rs --crate-name guess --crate-type bin --out-dir /home/mjburgess/src/rust/guess/target -L /home/mjburgess/src/rust/guess/target -L /home/mjburgess/src/rust/guess/target/deps` (status=101)
<?php
/**
* Basic dispatch function, uses array structured as [$verb => [$path => $route_fn, ...]]
* calling $route_fn if $path/$verb match the arguments passed
*
* @param $path_condition regex for matching paths (must use suitable deliminator, eg. @)
*
* @throws Exception when path/route function missing (programmer error)
* @return bool true for successful route, false for no route/404
*/
struct X { mut x: ~[int] }
fn main() {
let x = X { x: ~[1] };
x.x.append_one(2);
io::println(fmt!("%d", x.x[1]));
}
struct DEIteration {
opts: DEOptions,
population: @mut [@[float]],
fitnesses: @mut [@[float]],
crossovers: @mut [@[float]]
}
impl DEIteration {
<?php
class Message {
private $text;
private $timestamp;
private $formatter;
public function __construct( $text, $timestamp, $formatter ) {
$this->text = $text;
$this->timestamp = $timestamp;
}
@mjburgess
mjburgess / BreakingIntoWebDev.markdown
Created July 14, 2012 19:25
Breaking into Web Dev

Breaking into Web Development

I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).

To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential). To learn these technologies you should use several in combination on on

@mjburgess
mjburgess / BreakingIntoWebDev
Created July 14, 2012 19:23
Breaking into Web Dev
I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).
To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential).
When you have completed projects, you can upload them to github (or another public repo) and get help & fe