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
#include <stdio.h> | |
void main(int argc,char **argv) | |
{ | |
int s=186986851,t,p,i,j,k; | |
char *fb="FizzBuzz",*fo,*fl,c; | |
for(i=k=0,t=s>>2,p=s&3;i<100;) { | |
if(i==p) { | |
fo=fb+((t&1)<<2); | |
fl=fo+(((t&2)|(!(t&2)))<<2); | |
c=*fl; |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;; COPYRIGHT 1977, TINY-C ASSOCIATES ;;;;;;;;;;;;;;;;;; | |
;;;;;; ALL RIGHTS RESERVED ;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
ORG ($+100H)/100H*100H ;go to round address | |
LCFIX EQU 20H ;maps literals to lower case | |
;error codes | |
STATERR EQU 1 | |
CURSERR EQU 2 | |
SYMERR EQU 3 |
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
<?php | |
function account_delete($userid) | |
{ | |
$references=array( | |
"id" => array("users"), // Do Not move this line | |
"userid" => array( | |
"blackjack","blocks","bookmarks" | |
), | |
"friendid" => array( | |
"friends" |
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
<?php | |
/* | |
* Bitman.php | |
* | |
* Copyright 2014 Luis "Laffin" Espinoza <laffintoo@gmail.com> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. |
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
<?php | |
/* Wrote this for a pagination routine awhile back | |
the variables needed | |
$range = Amount of numbers to display | |
$curpage = Current number | |
$pages = Highest Page count | |
*/ | |
$midrange=intval(floor($range/2)); | |
$range_s=(($curpage-$midrange)<1?1:(($curpage+$midrange)>$pages?($pages-$range+1):$curpage-$midrange)); |
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
<?php | |
// Weight percentage system | |
// By: Laffin | |
// Gives weights to items, and randomly chooses items based on weight | |
$items = array( | |
array('lint',40), | |
array('copper coin',35), | |
array('silver coin',15), | |
array('gold coin',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
<?php | |
// Parse Twitter nicks/lists to urls | |
// Internal routine | |
// This has a couple of functions | |
// TwittifyLinks() - returns True if template is set, otherwise false | |
// TwittifyLinks($arr,true) - $arr is a 2 element array, each holding a template for usernames/groups | |
// TwittifyLinks($twit) - $twit is the user/group to convert to a link | |
function TwittifyLinks($var=null,$set=false) | |
{ |
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
<?php | |
$teams=array('Alpha','Beta','Gamma','Delta','Epsilon','Zeta','Eta'); | |
define('MY_EOL','<br .>'.PHP_EOL); | |
$round=0; | |
$participants=$teams; | |
while(count($participants)>1) | |
{ | |
$round++; // Increment our round |
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
<?php | |
function setbit($flags,$position) | |
{ | |
return $flags|(1<<$position); | |
} | |
function resetbit($flags,$position) | |
{ | |
return $flags&(~(1<<$position)); | |
} | |
function togglebit($flags,$position) |
NewerOlder