Skip to content

Instantly share code, notes, and snippets.

@intval
intval / restorePMAdump.php
Created August 10, 2012 08:10
Restore phpMyAdmin dump
<?PHP
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
header('Content-Type: text/html; charset=utf-8');
@intval
intval / gist:2181946
Created March 24, 2012 12:21
random math question generator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MathWeb
{
public partial class WebForm1 : System.Web.UI.Page
@intval
intval / gist:1947590
Created March 1, 2012 05:41
3 sorting algorithm imlementations
<?php
class sortings
{
public static function bubbleSort(array $integers)
{
for($runTo = sizeof($integers)-1; $runTo >0; $runTo-- )
{
for($i = 0; $i < $runTo; $i++)
{