Globals, schmobals.
<?php function header($navigation) { ?>
<header id="header">
Some amazing title
</header>
<?php $navigation(); ?>| // A failed attempt | |
| function animate() { | |
| g.clearRect(0, 0, 32, 32); | |
| var t = (new Date().getTime() - start) / 1000; | |
| var circlePosition = Math.min(1, Math.abs(Math.tan(t * Math.PI) / Math.PI)); | |
| g.beginPath(); | |
| g.arc(16 + Math.cos(circlePosition * Math.PI) * 8, 16 + Math.sin(circlePosition * Math.PI) * 8, 2.5, 0, Math.PI * 2); |
Globals, schmobals.
<?php function header($navigation) { ?>
<header id="header">
Some amazing title
</header>
<?php $navigation(); ?>| // In regards to | |
| // http://stackoverflow.com/questions/11679116/creating-a-dynamic-binding-in-javascript | |
| for(var i = 0; i < info.length; i++){ | |
| var temp = [ | |
| parseInt(info[i].site_id), | |
| info[i].site, | |
| info[i].site_code, | |
| processArray(info[i].tc10), | |
| processArray(info[i].tc9x_test), |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <strings.h> | |
| #include <signal.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> |
| #include "xeric-utils.h" | |
| /* The main method. */ | |
| int main(int argc, char * argv[]) { | |
| int i; | |
| int port = 80; | |
| struct in_addr address = {0}; | |
| /* Parse the arguments: */ | |
| for(i = 1; i < argc; i++) { |
| /** | |
| * A functional door. | |
| */ | |
| #wall { | |
| background-color: #eee; | |
| bottom: 0; | |
| left: 0; | |
| position: absolute; | |
| right: 0; |
| /** | |
| * A functional door. | |
| */ | |
| #wall { | |
| background-color: #eee; | |
| bottom: 0; | |
| left: 0; | |
| position: absolute; | |
| right: 0; |
| def else (Block b) (Block k = Block.empty) { | |
| (Condition c) { | |
| Condition r = if not c b | |
| k r | |
| } | |
| } |
| // Alternative looping. | |
| // I wouldn't do this using a foreach loop, but it is much nicer than | |
| // the original here: http://stackoverflow.com/a/11367974/707111 | |
| public int getNthIndex(string str, char c, int n) | |
| { | |
| int index = 0; | |
| int count = 0; | |
| if(n == 0) |
| function calculateTotal(boxes, total) { | |
| boxes.find('option:selected').each(function() { | |
| var m = /\[\+ \$(\d+\.\d+)\]/.exec(this.value); | |
| if(m !== null) { | |
| total += +m[1]; | |
| } | |
| }); | |
| var decimalPart = (total - Math.floor(total)) * 100; |