Partie optionnelle : [...]
Partie répétable 0 à N fois : {...}
angular.module('ngFixedHttp', []) | |
.factory('FixedHttp', ['$http', function($http) { | |
// Can't use $http.post() because JSON format is not | |
// recognized by the web server | |
// See : http://stackoverflow.com/questions/19254029/angularjs-http-post-does-not-send-data | |
// This service is supposed to be used as a replacement for $http | |
// /!\ Not tested | |
// /!\ /!\ Doesn't work with nested JSON objects (must write custom compile function for that) /!\ /!\ |
"use strict"; | |
angular.module('timezones', []) | |
.value('CommonTimezones', [ | |
"Africa/Abidjan", | |
"Africa/Accra", | |
"Africa/Addis_Ababa", | |
"Africa/Algiers", | |
"Africa/Asmara", |
def parse_http_accept_language_header(langs_str): | |
"""Returns the list of languages from a string formatted | |
according to the Accept-Language HTTP header, by order of | |
preference. | |
""" | |
def get_locale_q_pairs(lang_list): | |
for language in lang_list: | |
locale_q_pair = language.split(";") | |
if len(locale_q_pair) == 1: |
function trace(f) { | |
return function() { | |
var args = Array.from(arguments); | |
var res = f.apply(null, args); | |
console.debug("%s(%O) = %O", f.name, args, res); | |
return res; | |
}; | |
} |