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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> | |
<mx:Script> | |
<![CDATA[ | |
private function inverseCumulativeNormalDistribution(v:Number):Number{ | |
//refer http://home.online.no/~pjacklam/notes/invnorm/ for how this works | |
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 | |
// full path to text file | |
define("TEXT_FILE", "/home/www/default-error.log"); | |
// number of lines to read from the end of file | |
define("LINES_COUNT", 10); | |
function read_file($file, $lines) { | |
//global $fsize; |
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
String.prototype.replace = function(searchStr, replaceStr):String { | |
return this.split(searchStr).join(replaceStr); | |
}; |
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 { | |
import flash.display.Sprite; | |
import flash.display.Graphics; | |
import flash.geom.Rectangle; | |
import flash.geom.PerspectiveProjection; | |
import flash.display.BitmapData; | |
public class PPPlane extends Sprite { | |
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 | |
/** | |
* phpMyAdmin configuration | |
* | |
* For local development sandbox on Mac OS X | |
* with Mac-bundled PHP and Apache instances | |
* | |
* phpMyAdmin 3.5.2 | |
*/ |
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 | |
abstract class SafeDoctrineMigrationBase extends Doctrine_Migration_Base | |
{ | |
public function hasField($table, $field) | |
{ | |
$conn = Doctrine_Manager::connection(); | |
$result = $conn->execute("SHOW COLUMNS FROM $table LIKE '$field'"); | |
$fields = $result->fetchAll(); | |
return !empty($fields); |
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 | |
class sfWidgetFormSelectRadioSingleable extends sfWidgetFormSelectRadio | |
{ | |
public function formatChoices($name, $value, $choices, $attributes) | |
{ | |
$onlyChoice = !empty($attributes['only_choice']) ? $attributes['only_choice'] : false; | |
unset($attributes['only_choice']); | |
if ($onlyChoice) |
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 | |
class MyBaseForm extends sfFormSymfony | |
{ | |
public function getErrors() | |
{ | |
$errors = array(); | |
foreach ($this as $form_field) | |
{ |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel | |
# http://vigodome.com | http://ugur.ozyilmazel.com | http://github.com/vigo | |
def get_paged_memory_usage(match_string, paging=4096) | |
mvar = 3 | |
if match_string.split(/[^\w]/).length > 1 | |
mvar = 4 |
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 | |
/** | |
* Displays the current migration version of the database | |
* | |
* @version 1.0 | |
* @author Ain Tohvri <at@interactive-pioneers.de> | |
* @see sfBaseTask | |
*/ | |
class currentMigrationVersionTask extends sfBaseTask |
OlderNewer