This file contains hidden or 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
void outchar(char ch) { | |
volatile int* JTAG_UART = (int*) 0x00008840; | |
*JTAG_UART = ch; // Write char to display. | |
} | |
char bin2hex(char hex) { | |
hex &= 0x0F; // Mask last 4 bits. | |
return hex <= 9 ? hex + '0' : hex - 10 + 'A'; | |
} |
This file contains hidden or 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 express = require('express'); | |
var http = require('http'); | |
var app = express(); | |
// Simple user controller implementation. | |
var users = [ | |
{ username: 'jamsesso', age: 20, gender: 'M' }, | |
{ username: 'bettycrocker', age: 20, gender: 'F' } | |
]; |
This file contains hidden or 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 | |
/** | |
* | |
*/ | |
App::uses('UserEDM', 'Entity'); | |
use Facebook\GraphObject; | |
class UserAssembler implements EntityAssembler { | |
const FB_FIRST_NAME = 'first_name'; |
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"strconv" | |
"net/http" | |
"io/ioutil" | |
) | |
const ( |
This file contains hidden or 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
/** | |
* jQuery validatePassword plugin. Fire a callback function if the password passes the test or if it fails the tests. | |
* @param expressions Object with a key => value pair of label => regex expression. | |
* @param success_callback Function the callback to fire when the user passes all of the tests. | |
* @param error_callback Function the callback to fire when the user fails any of the tests. | |
* @return Object | |
* | |
* Example: http://jsfiddle.net/WXqUZ/5/ | |
* $('input[type=password]').validatePassword({ | |
* 'Uppercase': /([A-Z]+)/, |
This file contains hidden or 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
/** | |
* jQuery typingFinished plugin. Fire a callback function when the user is finished typing. | |
* @param timeout The timeout in milliseconds per interval. | |
* @param callback The callback function to fire when the user finishes typing. | |
* @return Object | |
* | |
* Example: | |
* $('input').typingFinished(500, function(e) { | |
* console.log('Done typing. Last key pressed: '+ e.keyCode); | |
* }); |
This file contains hidden or 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 | |
namespace Scarf\Views; | |
class Introduction | |
{ | |
public function main() | |
{ | |
write("Scarf is a modern, fast, maintainable, | |
easy-to-use rapid development PHP framework."); | |
} | |
} |
This file contains hidden or 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 | |
namespace Scarf\Views; | |
use Scarf\Models\Contacts; | |
use Scarf\Library\Layout\Templates; | |
/* Creates a URL at http://.../contacts */ | |
class Contacts | |
{ | |
/* The main page when /contacts is visited. */ |
This file contains hidden or 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 | |
class mysql extends mysqli | |
{ | |
public static $servers = array(); | |
public static function ignite_server($name, $host, $username, $password, $db, $port = null, $socket = null) | |
{ | |
if(is_null($port)) | |
$port = ini_get('mysqli.default_port'); | |
This file contains hidden or 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 | |
require '../engine.php'; | |
system::import('blog'); | |
if(http::get('article')) | |
{ | |
$article = blog::get_article(http::get('article')); | |
$article or page_not_found(); | |