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 | |
echo "foo"; | |
?> |
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
#import "SLServiceCaller.h" | |
#import "SLServiceRequest.h" | |
int main (int argc, const char * argv[]) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
[[NSGarbageCollector defaultCollector] collectIfNeeded]; | |
@try | |
{ |
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:NSWindow xmlns:mx="http://www.adobe.com/2006/mxml"> | |
<mx:stylesheet src="css/main.css" /> | |
<mx:script language="python"> | |
@bind foo = [1,2,3] | |
@class sourceListItem = [classLoader loadClass: "LeftPaneItemRenderer"] | |
def sourceListItemClick(item, index): | |
if(index == len(foo) - 1): | |
return [NSAlert alertWithMessageText: "Last item"] |
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
create or replace function to_char2(v_timestamp interval, v_format varchar) returns text as $$ | |
declare | |
tmp_date varchar; | |
begin | |
select to_char(v_timestamp, v_format) into tmp_date; | |
if found then | |
select | |
cast(cast(extract(epoch from v_timestamp) / 3600 as int) as varchar) || | |
substring(tmp_date from 3) into tmp_date; | |
return tmp_date; |
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
CREATE TABLE IF NOT EXISTS `integers` ( | |
`val` int(11) NOT NULL AUTO_INCREMENT, | |
PRIMARY KEY (`val`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5001 ; | |
-- | |
-- Dumping data for table `integers` | |
-- |
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
import sys, os | |
import time | |
import pytz | |
import math | |
import traceback | |
import oursql | |
import re | |
import eventlet | |
from eventlet import GreenPool | |
import pycurl |
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 Ajax_Event extends Ajax | |
{ | |
public function poll() | |
{ | |
$q = $this->db->prepare("SELECT event_id, event_key, event_data FROM event_log ORDER BY event_date DESC"); | |
$q->execute(); | |
return json_encode($q->fetchAll(PDO::FETCH_ASSOC)); |
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 | |
if(strlen($page_id)>5) | |
{ | |
$len=strlen($page_id)-10; | |
$page_id=substr($page_id,0,$len); | |
} | |
if($page_id == "") | |
{ | |
echo "NO page Found"; | |
die(); |
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
(function() | |
{ | |
HexMap = function(rows, columns, hexsize) | |
{ | |
this.rows = rows; | |
this.columns = columns; | |
this.$_hexsize = hexsize; | |
this.$_half_hexsize= hexsize / 2; | |
this.$_x_offset = 30; | |
this.$_y_offset = 30; |
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
(function() | |
{ | |
var NEIGHBORS_DI = [0, 1, 1, 0, -1,-1]; | |
var NEIGHBORS_DJ = [ | |
[-1, -1, 0, 1, 0, -1], | |
[-1, 0, 1, 1, 1, 0] | |
]; | |
var NUM_NEIGHBORS = 6; |
OlderNewer