Skip to content

Instantly share code, notes, and snippets.

View henrikh's full-sized avatar

Henrik Enggaard henrikh

View GitHub Profile
function average(){
numbers=average.arguments;
sum=0;
for(var i=0; i<numbers.length; i++){
sum+=numbers[i]
};
return sum/numbers.length;
}
def average(*numbers):
return float(sum(numbers))/len(numbers)
(defun average (&rest numbers)
(/ (apply #'+ numbers)(length numbers)))
function average(){
numbers=average.arguments;
sum=0;
for(var i=0; i<numbers.length; i++){
sum+=numbers[i]
};
return sum/numbers.length;
}
int Average(int i)
{
static int sum = 0, count = 0;
sum = sum + i;
count++;
return sum / count;
}
0100110101000001010001010100101100100000010001100101010101001110010000110101010001001001010011110100111000001101000010100010000000100000001000000010000001000111010100100100000101001110010101000010000001000001010000100100100101001100010010010101010001011001001000000011111000111110001000000101000001000001010100100100000101001101010001010101010001000101010100100101001100001101000010100010000000100000001000000010000001000111010100100100000101001110010101000010000001000001010000100100100101001100010010010101010001011001001000000011111000111110001000000101001101010101010011010100111101000110010100000100000101010010010000010100110101000101010101000100010101010010010100110000110100001010001000000010000000100000001000000100011101010010010000010100111001010100001000000100000101000010010010010100110001001001010101000101100100100000001111100011111000100000010011100101010101001101010011110100011001010000010000010101001001000001010011010100010101010100010001010101001001010011000011010000101000001101000010100010000000100000
(do ((n 0 (1+ n))
(cur 0 next)
(next 1 (+ cur next)))
((= 10 n) cur))
element = new Element('div', {
id: 'id',
//Various other properties
children: [
new Element('a', {
//Properties
}),
new Element('img', {
//Guess what
})
<html>
<body>
... Blah blah. My HTML code...
<?php include "file.txt"?>
</body>
</html>
User = new Model({
name: 'User',
adaptor: 'best',
scheme: {
username: '',
pw: ''
}
});
Note = new Model({