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
sub new { | |
my $self = shift; | |
my $args = @_ && ref $_[0] eq 'HASH' ? shift : { @_ }; | |
my $class = ref($self) || $self; | |
return bless $args, $class; | |
} |
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
#!/opt/local/bin/perl | |
use strict; | |
use warnings; | |
use Test::More; | |
my $name = 'barney'; | |
my $status = 'in trouble'; | |
ok($name, 'we have $name'); | |
isnt($name, '', "\$name isn't empty"); |
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
Object.prototype.getName = function() { | |
var funcNameRegex = /function (.{1,})\(/; | |
var results = (funcNameRegex).exec((this).constructor.toString()); | |
return (results && results.length > 1) ? results[1] : ""; | |
}; |
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
getPhotoWithTransformations : function(id, forceFetch) | |
{ | |
if(forceFetch || !(photo = pbx.babel.photos[id])) | |
{ | |
photo = pbx.babel.callBabel('Community.Photo.Fetch', { | |
objectid : id, | |
object_property_filter : ['transformation', 'is_edited'] | |
//object_property_filter : { ':default' : { ':standard' : 't', 'transformation' : 'r', 'is_edited' : 'r' } } | |
}).response; | |
pbx.babel.photos[id] = photo; |
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 bindTimer = setInterval(function() { | |
if ("undefined" != typeof jQuery && isMobileDevice) { | |
$('.myclass').bind('click', clickHandlerToMobilePage); | |
clearTimeout(bindTimer); | |
} | |
}, 50); |
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
/* For modern browsers */ | |
.cf:before, | |
.cf:after { | |
content:""; | |
display:table; | |
} | |
.cf:after { | |
clear:both; | |
} |
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
/* | |
html5doctor.com Reset Stylesheet | |
v1.6.1 | |
Last Updated: 2010-09-17 | |
Author: Richard Clark - http://richclarkdesign.com | |
Twitter: @rich_clark | |
*/ | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
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
http://code.jquery.com/jquery-latest.js |
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 elem = (document.getElementsByClassName('mentionsTextarea'))[0]; | |
elem.value = 'www.youtube.com'; | |
elem.blur(); | |
elem.value += ' '; | |
var evt = document.createEvent('KeyboardEvent'); | |
evt.initKeyEvent( | |
'keypress', | |
true, // key down events bubble | |
true, // and they can be cancelled | |
null, // Use the default 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
my_tf.addEventListener(FocusEvent.FOCUS_IN, onFocusIn); | |
my_tf.addEventListener(FocusEvent.FOCUS_OUT, onFocusOut); | |
function onFocusIn(event:FocusEvent):void { | |
setTimeout(event.target.setSelection, 50, 0, event.target.text.length); | |
} | |
function onFocusOut(event:FocusEvent):void { | |
event.target.setSelection(0,0); | |
} |