Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
(function($){ | |
$.isBlank = function(string){ | |
return(!string || $.trim(string) === ""); | |
}; | |
})(jQuery); | |
$.isBlank(" ") //true | |
$.isBlank("") //true | |
$.isBlank("\n") //true | |
$.isBlank("a") //false |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?
APPENGINE_RUNTIME | python27 |
APPLICATION_ID | s~appid |
AUTH_DOMAIN | gmail.com |
CONTENT_LENGTH | 148 |
CONTENT_TYPE | application/x-www-form-urlencoded |
CURRENT_MODULE_ID | default |
CURRENT_VERSION_ID | appid.370290628632119235 |
DATACENTER | us1 |
DEFAULT_VERSION_HOSTNAME | appid.appspot.com |
HTTPS | on |
package main | |
import ( | |
"encoding/base64" | |
"net/http" | |
"strings" | |
) | |
type handler func(w http.ResponseWriter, r *http.Request) |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type test_struct struct { | |
Test string |
https://www.avaneya.com/images/gallery/vlr/Sample_01.jpg https://www.avaneya.com/images/gallery/vlr/Sample_02.jpg https://www.avaneya.com/images/gallery/vlr/Sample_03.jpg https://www.avaneya.com/images/gallery/vlr/Sample_04.jpg https://www.avaneya.com/images/gallery/vlr/Sample_05.jpg https://www.avaneya.com/images/gallery/vlr/Sample_06.jpg https://www.avaneya.com/images/gallery/vlr/Sample_07.jpg https://www.avaneya.com/images/gallery/vlr/Sample_08.jpg https://www.avaneya.com/images/gallery/vlr/Sample_09.jpg https://www.avaneya.com/images/gallery/vlr/Sample_10.jpg
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent