Sujets divers, specifiques, intéressant à aborder lors d'une formation JS avancée.
- bind, apply, call, closure
- procedural / oop / fonctionnel
- use strict
- IIFE
- lib client + serveur
- require
====================================================================== | |
ERROR: test_search_limits (api.tests.test_views.SearchTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits | |
assert False | |
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits | |
assert False | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bdb.py", line 46, in trace_dispatch | |
return self.dispatch_line(frame) |
from django.contrib.auth.models import User | |
username = "me" | |
user = User.objects.get_or_create(username=username)[0] | |
user.email = username+"@mozilla.com" | |
user.set_password(user.email) | |
user.is_verified = True | |
user.is_staff = True |
"Each child in an array should have a unique "key" prop. Check the render method of PanelsManager. See http://fb.me/react-warning-keys for more information." app.js:15174:2 | |
"panels generated: " Array [ Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, 4 more… ] app.js:25120:6 | |
"children" Array [ undefined, undefined, undefined, undefined ] app.js:24737:4 | |
"children" Array [ undefined, undefined, undefined, undefined, undefined, undefined, undefined ] app.js:24737:4 | |
"children" Array [ undefined, undefined, undefined ] |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<polymer-element name="my-element"> |
/* | |
We presume here that the `Pictures` collection has _url_ and _name_ attributes. | |
*/ | |
Template.mypictures.helpers({ | |
pictureAttributes: function(picture) { | |
var pic = picture.hash.picture; | |
return { | |
url: pic.url, | |
title: pic.name | |
}; |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="generator" content="Phusion Passenger"> | |
<title>Web application could not be started</title> | |
<style type="text/css"> | |
body { | |
font-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif; | |
font-size: 10pt; |
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
from django.conf import settings | |
XS_SHARING_ALLOWED_ORIGINS = getattr(settings, 'XS_SHARING_ALLOWED_ORIGINS', '*') |
parseInt("10000000000000000", 10) + 1 | |
//10000000000000000 | |
parseInt("10000000000000000", 10) + 2 | |
//10000000000000002 | |
parseInt("10000000000000000", 10) + 3 | |
//10000000000000004 | |
parseInt("10000000000000000", 10) + 4 | |
//10000000000000004 | |
parseInt("10000000000000000", 10) + 5 | |
//10000000000000004 |