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
ldr r0,=#0x4000006 @ VBlank memory address | |
waitVBlank: | |
ldrh r1, [r0] @ Loads the memory address to the r1 register | |
cmp r1, #161 @ Compare if the memory address have completed the VBlank | |
bne waitVBlank @ Loopback until r1 != 161 |
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
; How to call it from the program | |
main: | |
call getinput | |
mov si, buffer | |
cmp byte[si], 0 ; Blank line | |
je main ; Ignore it | |
mov si, buffer |
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
package contacts; | |
import java.io.*; | |
import java.util.Vector; | |
import javax.microedition.midlet.MIDlet; | |
import javax.microedition.midlet.MIDletStateChangeException; | |
import javax.microedition.rms.*; | |
import javax.microedition.lcdui.*; | |
public class simplecontacts extends MIDlet implements CommandListener { | |
private Display display; |
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
function initAjax() { | |
var objXml = false; | |
if(window.XMLHttpRequest) { | |
objXml = new XMLHttpRequest(); // All modern browsers | |
} else if(window.ActiveXObject) { | |
try { | |
objXml = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer 6 | |
} catch(e) { | |
try { | |
objXml = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer 5 |
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
// Maneira nerd de apresentar letras das músicas derivadas de "Oração - A Banda Mais Bonita da Cidade" | |
var letra = "Meus aluuuuunos,<br />Não existe oração<br />Pra salvar o seu notão<br />Programação não é tão simples quanto pensa<br />Ela sabe, ou não se sabe, se convença<br />Pare com o clamor!<br />Pare com a brincadeira<br />E suporte a canseira<br />Ou a nota é dois<br />Pare com o clamor,<br />Não existe oração, pra salvar o seu notão….<br /><br />"; | |
var i = 1; | |
while(i=1) { | |
$("#musica").append("<center>" + letra + "</center>"); | |
} |
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
function textCounter(field, cntField, maxLimit) { | |
cntField.innerHTML = maxLimit - field.value.length; | |
if (field.value.length > 120) { | |
$("#label").css("color", "#ff0034"); | |
} else if (field.value.length > 100) { | |
$("#label").css("color", "#ff6025"); | |
} else { | |
$("#label").css("color", "#3e3e3e"); | |
} |
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
function arrowInTheKnee(reason) { | |
return "I used to " + reason + ", but then I took an arrow in the knee"; | |
} |
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
var basketx = 0; | |
var basket = 4; | |
var t; | |
function loaded() { | |
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); | |
var s = (window.innerWidth / 2) - (128 / 2); | |
t = self.setInterval("moveBasket('" + s + "')", 10); | |
} |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Martin Kleppe <http://twitter.com/aemkei> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
#define _LEGACY_HEADERS | |
#include <pic.h> | |
#include <pic12f629.h> | |
__CONFIG(UNPROTECT & BORDIS & MCLRDIS & PWRTEN & WDTDIS & INTIO); | |
void delay(char value); | |
void d1(); |