I hereby claim:
- I am mikegioia on github.
- I am mikegioia (https://keybase.io/mikegioia) on keybase.
- I have a public key whose fingerprint is 3F05 8150 9190 DC80 0EA6 FC6A C886 8A2A 4B50 820B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<div class="clndr-controls"> | |
<div class="clndr-previous-button">‹</div> | |
<div class="month font-mono"><%= intervalStart.format( 'M/DD' ) + ' — ' + intervalEnd.format( 'M/DD' ) %></div> | |
<div class="clndr-next-button">›</div> | |
</div> | |
<div class="days-of-the-week font-mono clearfix"> | |
<% i = 0; %> | |
<% _.each( daysOfTheWeek, function ( day ) { %> | |
<% if ( extras.show_weekends || ! ( i % 7 === 0 || i % 7 === 6 ) ) { %> | |
<div class="header-day"><%= day %></div> |
<?php | |
$email = "youremail@gmail.com"; | |
$password = "password123" | |
$folder = "INBOX"; | |
$imapStream = imap_open( | |
"{imap.gmail.com:993/imap/ssl}$folder", | |
$email, | |
$password ); |
/** | |
* Hash the password using bcrypt algorithm. This function takes | |
* in a plaintext password, generates a strong and random salt, | |
* and returns the crypted password to be stored for the user. | |
* | |
* @param string $password | |
* @return string | false | |
*/ | |
public static function passwordHash( $password, $options = array() ) | |
{ |
<?php | |
use Phalcon\DI as DI; | |
class Dummy { | |
private $test; | |
function getTest() { | |
return $this->test; | |
} |
JavaScript has a feature known as implied globals. Whenever a name is used, the interpreter walks the scope chain backwards looking for a var statement for that name. If none is found, that variable is assumed to be global. If it’s used in an assignment, the global is created if it doesn’t already exist. This means that using or creating global variables in an anonymous closure is easy. Unfortunately, this leads to hard-to-manage code, as it’s not obvious (to humans) which variables are global in a given file.
Luckily, our anonymous function provides an easy alternative. By passing globals as parameters to our anonymous function, we import them into our code, which is both clearer and faster than implied globals. Here’s an example:
(function ($, YAHOO) {
// now have access to globals jQuery (as $) and YAHOO in this code
}(jQuery, YAHOO));