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
Running: Demo test Google | |
INFO Request: POST /wd/hub/session | |
- data: {"desiredCapabilities":{"browserName":"phantomjs","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY"},"sessionId":null} | |
- headers: {"Content-Type":"application/json","Content-Length":132} | |
INFO Response 200 POST /wd/hub/session{ status: 0, | |
sessionId: 'a1bd37ef-253c-4f4e-9fc6-545a212110ee', | |
value: | |
{ platform: 'MAC', | |
acceptSslCerts: false, | |
javascriptEnabled: true, |
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
[Element, Window, Document].invoke('implement', { | |
// Call as element.addNsEvent('event.namespace', function() {}); | |
addNsEvent: function(name, fn) { | |
// Get event type and namespace | |
var split = name.split('.'), | |
eventName = split[0], | |
namespace = split[1]; | |
// Store the event by its full name including namespace | |
this.bindCache = this.bindCache || {}; |
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
#mapping | |
curl -X DELETE http://localhost:9200/test/?pretty=true -d '' | |
curl -X PUT http://localhost:9200/test/?pretty=true -d '' | |
curl -X PUT http://localhost:9200/test/test/_mapping?pretty=true -d ' | |
{ | |
"test":{ | |
"properties":{ | |
"cid":{ | |
"type":"string", |
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('APPLICATION')) exit(); | |
// Define the plugin: | |
$PluginInfo['RssFeed'] = array( | |
'Description' => 'This simple plugin for new discussions and discussions updates', | |
'Version' => '1.0', | |
'RequiredApplications' => FALSE, | |
'RequiredTheme' => FALSE, | |
'RequiredPlugins' => FALSE, | |
'HasLocale' => TRUE, |
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 defined('SYSPATH') or die('No direct script access.'); | |
class Date extends Kohana_Date { | |
public static function format($date,$format='U',$offset=NULL) | |
{ | |
if (empty($date) || $date == '0000-00-00 00:00:00' || $date == '0000-00-00') return NULL; | |
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
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* MsSQL database connection. | |
* | |
* @package Kohana/Database | |
* @category Drivers | |
* @author Kohana Team, xrado | |
* @copyright (c) 2008-2009 Kohana Team | |
* @license http://kohanaphp.com/license | |
*/ |
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 Kohana_Database_MsSQL extends Database_PDO { | |
public function query($type, $sql, $as_object) | |
{ | |
// Make sure the database is connected | |
$this->_connection or $this->connect(); | |
if ( ! empty($this->_config['profiling'])) | |
{ |
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
CmdUtils.CreateCommand({ | |
name: "moo", | |
description: "test moo", | |
preview: function(pblock, statusText) { | |
CmdUtils.injectJavascript("http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js";, | |
Utils.safeWrapper(function() { | |
pblock.innerHTML = MooTools; | |
}) | |
); | |
}, |
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 defined('SYSPATH') OR die('No direct access allowed.'); | |
/** | |
* Paypal Payment Driver. Express Checkout transactions consist of 3 stages with | |
* a separate API call for each: SetExpressCheckout, GetExpressCheckout (optional) | |
* and DoExpressCheckout. This class has a corresponding array of fields for each | |
* call these are used to construct the required name value pairs for the request | |
* to each API call. | |
* | |
* $Id: Paypal.php 1978 2008-03-25 12:05:32GMT by atomless - | |
* |