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
$ python | |
Python 2.7.5 (default, Oct 21 2013, 17:28:33) | |
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
[>>> [1, 3, 5] + [345, 6] | |
[1, 3, 5, 345, 6] | |
>>> | |
$ php -a | |
Interactive shell |
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
Traceback (most recent call last): | |
File "facebook_cover.py", line 44, in <module> | |
photo = graph.put_photo(image_resource, album_id=payload['page_id']) | |
File "/task/__pips__/facebook.py", line 219, in put_photo | |
data = urllib2.urlopen(req).read() | |
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen | |
return _opener.open(url, data, timeout) | |
File "/usr/lib/python2.7/urllib2.py", line 400, in open | |
response = self._open(req, data) | |
File "/usr/lib/python2.7/urllib2.py", line 418, in _open |
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 main | |
import ( | |
"testing" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"net/http/httptest" | |
) |
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 | |
$foo = "global"; | |
include "namespaced.php"; | |
echo $foo; // Outputs: "something" |
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 | |
require(APPPATH.'/libraries/REST_Controller.php'); | |
class Example_api extends REST_Controller { | |
function user_get() | |
{ | |
//$user = $this->some_model->getSomething( $this->get('id') ); | |
$user = array('id' => $this->get('id'), 'name' => 'Some Guy', 'email' => 'example@example.com'); |
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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* @author Philip Sturgeon | |
* @created 04/06/2009 | |
*/ | |
class REST { | |
private $CI; // CodeIgniter instance |
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 Rest_test extends Controller { | |
function __construct() { | |
parent::Controller(); | |
$this->load->library('rest', array('server' => 'http://localhost/codeigniter/index.php/example_api/')); | |
} | |
function user_list() |
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
/* | |
* jQuery Cycle plugin v0.2 | |
* Philip Sturgeon [http://philsturgeon.co.uk] | |
* | |
* Licensed under the WTFPL License | |
* http://sam.zoy.org/wtfpl/ | |
*/ | |
(function($) | |
{ |
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 | |
/** | |
* Matchbox Loader class | |
* | |
* This file is part of Matchbox | |
* | |
* Matchbox is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU Lesser General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or |
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 (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 4.3.2 or newer | |
* | |
* @package CodeIgniter | |
* @author Rick Ellis | |
* @copyright Copyright (c) 2006, EllisLab, Inc. | |
* @license http://www.codeignitor.com/user_guide/license.html |
OlderNewer