This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct elementT { | |
unsigned value; | |
struct elementT *next; | |
} elementT; | |
elementT *removeElement(elementT *, unsigned); | |
elementT *addElement(elementT *, unsigned); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!! Instructions for adding assembly code for leon3mp to setup stack pointers for each available CPU. | |
!! Running sparc-elf-gcc includes some system files in the final elf file, but editing these it is possible to set the stack pointer for each CPU before main is entered. | |
!! Edit the file sparc-elf-*.*.*/src/libgloss/sparc_leon/crt0.s | |
!! Add in the following assembly beneath the _start: label | |
! added code for setting stack pointer for each cpu | |
rd %asr17, %g5 ! load in configuration reg into g5 | |
srl %g5, 28, %g5 ! shift so only cpuid is seen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% This BibTeX bibliography file was created using BibDesk. | |
%% http://bibdesk.sourceforge.net/ | |
%% Created for dave stevens at 2012-03-21 13:28:29 +0000 | |
%% Saved with string encoding Unicode (UTF-8) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use Data::Dumper; | |
my @b = (['a','b'],['c','d'],['e','f']); | |
my @all; | |
my @single; | |
&rec(0, \@all, \@single, @b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <libxml/parser.h> | |
/* compile: | |
gcc -m32 libxml_error.c `xml2-config --libs` `xml2-config --cflags` -Wall -Wextra -pedantic | |
*/ | |
/* example xml input file | |
<?xml version="1.0"?> | |
<A> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Crop images */ | |
/* Find whitespace around image and remove */ | |
$border = 5; | |
/* Get image */ | |
$orig = getImage($argv[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
# Kind of useless script to convert numbers to their word equivalent and back | |
# Call dec_to_str() with a decimal value, returns a string containing the word equivalent | |
# eg. dec_to_str(123456) := one hundred and twenty three thousand four hundred and fifty six | |
# Call str_to_dec() with a number in words, returns decimal value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This seems to run quicker than the jshint-mode example (https://github.com/daleharvey/jshint-mode) as it doesn't set up a node server each time. | |
1. Install node and get jshint | |
$ brew install node | |
$ npm install -g jshint | |
2. Update PATH to point to Node Packagem Manager bin directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe clCreateContext do | |
let(:params) { nil } | |
subject { clCreateContext(params) } | |
context "when calling with nil mooses" do | |
let(:params) { mooses: nil } | |
its(:errcode_ret) { should == CL_INVALID_MOOSE } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
penup | |
lt 180 | |
fd 50 | |
lt 180 | |
lt 90 | |
fd 50 | |
rt 90 | |
pendown | |
repeat 360(sequence[lt 1, fd 1]) | |
fd 150 |