Get property of an object no matther if it is deeply nested or doesn't even exist.
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 | |
function print_a(){ | |
$numargs = func_num_args(); | |
if($numargs>1){ | |
$out = ''; | |
ob_start(); | |
echo "<div style='background-color:#FFCC33;border:1px solid black;margin:3px;padding:5px;'>"; | |
for($a=0;$a<$numargs;$a++) | |
print_a(func_get_arg($a)); |
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
\usepackage{listings} | |
\usepackage{color} | |
\definecolor{dkgreen}{rgb}{0,0.6,0} | |
\definecolor{gray}{rgb}{0.5,0.5,0.5} | |
\definecolor{mauve}{rgb}{0.58,0,0.82} | |
\definecolor{gray}{rgb}{0.4,0.4,0.4} | |
\definecolor{darkblue}{rgb}{0.0,0.0,0.6} | |
\definecolor{lightblue}{rgb}{0.0,0.0,0.9} | |
\definecolor{cyan}{rgb}{0.0,0.6,0.6} |
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
@mixin box-shadow($shadow) { | |
-webkit-box-shadow: #{$shadow}; | |
-moz-box-shadow: #{$shadow}; | |
box-shadow: #{$shadow}; | |
} | |
@include box-shadow(0 3px 3px -2px rgba(0,0,0,0.6)); | |
@include box-shadow("inset 0 2px 4px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.20)"); |
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
Show hidden characters
{ | |
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin", | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, | |
"show_full_path": true, | |
"file_exclude_patterns": | |
[ | |
"*.sublime-workspace", |
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
if(typeof isDecNumber != 'function'){ | |
window.isDecNumber = function(e) { | |
// backspace, tab, enter, end, home, left, right | |
// we don't support the del key in Opera because del == . == 46. | |
var controlKeys = [8, 9, 13, 35, 36, 37, 39, 46] | |
// IE doesn't support indexOf | |
var isControlKey = controlKeys.join(",").match(new RegExp(e.which)) | |
// some browsers just don't raise events for control keys. Easy. | |
// e.g. Safari backspace. | |
if (!e.which || // control keys in most browsers. e.g. Firefox tab is 0 |
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
describe('Element "Dropdown":', function () { | |
var scope, dropdownScope, element, $compile; | |
beforeEach( module('html.element.dropdown') ); | |
beforeEach( module('html/element/dropdown.tpl.html') ); | |
beforeEach( inject( function ( _$rootScope_, _$compile_ ) { | |
scope = _$rootScope_.$new(); | |
$compile = _$compile_; |
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
Content = | |
all:(Element / Text)* { | |
return all.join("").replace(/\n$/, ''); | |
} | |
Element = | |
startTag:StartTag content:Content endTag:EndTag { | |
if (startTag != endTag) { | |
throw new Error( | |
"Expected </" + startTag + "> but </" + endTag + "> found." |
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
// Vars (I put these in a _globals.scss with all my other variables) | |
// ------------------------ | |
$breakpointTiny: 580; | |
$breakpointSmall: 790; | |
$breakpointNormal: 1200; | |
// Breakpoint Mixin | |
// ------------------------ | |
$oldie: false !default; |
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
<snippet> | |
<content><![CDATA[ | |
/** @requirement ${1:missing} */ | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<!-- <tabTrigger>hello</tabTrigger> --> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
<description>Insert Requirements Comment</description> | |
</snippet> |
OlderNewer