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
//=============================================================================// | |
// | |
// Purpose: Implementation of IMaterialSystem interface which "passes tru" all | |
// function calls to the real interface. Can be used to override | |
// IMaterialSystem function calls (combined with engine->Mat_Stub). | |
// | |
//=============================================================================// | |
#ifndef MATERIALSYSTEM_PASSTHRU_H | |
#define MATERIALSYSTEM_PASSTHRU_H |
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
char* GetTimestamp() | |
{ | |
time_t rawtime; | |
struct tm* timeinfo; | |
time(&rawtime); | |
timeinfo = localtime(&rawtime); | |
char* time = asctime(timeinfo); | |
char* newLine = strstr(time, "\n"); |
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
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======== | |
// | |
// Purpose: Simple entity to log and send gameplay statistics | |
// | |
//============================================================================= | |
#include "cbase.h" | |
#include "vstdlib/jobthread.h" | |
#include "curl/curl.h" | |
#include "steam\steam_api.h" |
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
///////////////// | |
// HTML EXAMPLES | |
///////////////// | |
// Encoder.html_entities("常用國字標準字體表"); "常用國字標準字體表" | |
// Encoder.html_entities("%"); "%" | |
// Encoder.html_entities("Pig: €3.99 (£6.77)"); "Pig: €3.99 (£6.77)" | |
///////////////// | |
// URL EXAMPLES | |
///////////////// | |
// Encoder.url_encode("常用國字標準字體表"); "%u5E38%u7528%u570B%u5B57%u6A19%u6E96%u5B57%u9AD4%u8868" |
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 | |
function iTunesGenreMap($code) | |
{ | |
// iTunes Genre ID to string map | |
// Compiled from this page: http://code.google.com/p/php-reader/wiki/ISO14496 | |
$code = ltrim($code, 0); | |
switch($code) | |
{ | |
case 1: | |
return 'Blues'; |
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
length = Math.max(canvas.width, canvas.height); | |
// Make sure the rays are bigger than the canvas | |
midx = canvas.width / 2, midy = canvas.height / 2; | |
// Get the mid point of our canvas | |
var d = 12; | |
// how many rays (or divisions) | |
for(i = 0;i < d;i++){ | |
angle = (Math.PI * 2 / d) * i; |
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
function getXY(x, y, d, a){ | |
return { | |
x: x + d * Math.cos(a), | |
y: y + d * Math.sin(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 rays = new Object({ | |
canvas: false, | |
context: false, | |
interval: false, | |
offset: 0, | |
init: function(id, colour1, colour2){ | |
this.canvas = document.getElementById(id); | |
this.context = this.canvas.getContext('2d'); | |
this.canvas.style.background = colour1; | |
this.context.fillStyle = colour2; |
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
function hexToRGB(hex){ | |
hex = hex.replace('#', ''); | |
return { | |
'r': parseInt(hex.substring(0, 2), 16), | |
'g': parseInt(hex.substring(2, 4), 16), | |
'b': parseInt(hex.substring(4, 6), 16) | |
} | |
} |
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
<form action="/posts/xyz/#comment-form" method="post"> | |
<input type="text" name="email" value="" id="email_field" style="display:none" /> | |
<div> | |
<label for="cname">Name <small>(If it's not real, it better be cool)</small></label> | |
<input name="name" type="text" id="cname" class="text" value=""/> | |
</div> | |
<div> | |
<label for="jerry_the_spider">Email <small>(optional, used for <a target="_blank" href="http://www.gravatar.com/">your avatar</a>)</small></label> | |
<input name="jerry_the_spider" type="text" id="jerry_the_spider" class="text" value=""/> | |
</div> |