This file contains hidden or 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
// | |
//// models/Procedures file | |
// | |
'use strict'; | |
//var ioc = require('electrolyte'); | |
var db; | |
//var database = ioc.create('config/database'); |
This file contains hidden or 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
var cheerio = require('cheerio'); | |
var Promise = require("bluebird"); | |
var request = Promise.promisifyAll(require('request')); | |
var WebSocket = require('ws'); | |
var email = "SE email", | |
password = "SE pw", | |
roomid = 17; | |
var j = request.jar() |
How do you add a list of image links to a document?
Suppose I have a an array full of image source URLs, like:
var imgs = ['http://lorempizza.com/380/240', 'http://dummyimage.com/250/ffffff/000000', 'http://lorempixel.com/g/400/200/', 'http://lorempixel.com/g/400/200/sports/'];
How do I grab all of those images and insert them into my page at a particular location? Say...
<div id="imageContainer"></div>
This file contains hidden or 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 | |
namespace Application\View; | |
use Fracture\Presentation\View; | |
use Fracture\Presentation\Template; | |
class Profile extends View | |
{ |
This file contains hidden or 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 | |
ini_set('display_errors', '1'); | |
error_reporting(E_ALL | E_STRICT); | |
class testRef { | |
function test (&$parm1, &$parm2) { | |
echo '<br>In testRef::test(), param1: '.$parm1; | |
echo '<br>In testRef::test(), param2: '.$parm2; | |
} |
When writing constructors, most constructor bodies usually just assign passed arguments to some properties. While technically not a problem, it is somewhat tedious and could be simplified with some syntactic sugar.
Borrowing from the Dart Language, this RFC proposes the following shorthand constructor.
Instead of writing
This file contains hidden or 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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |