background preloader

Npm

Npm

Things I wish I knew about MongoDB a year ago I’ve used MongoDB for over a year at scale at both Heyzap and Bugsnag and I’ve found it to be a very capable database. As with all databases, there are some gotchas, and here is a summary of the things I wish someone had told me earlier. Selective counts are slow even if indexed For example, when paginating a users feed of activity, you might see something like, In MongoDB this count can take orders of magnitude longer than you would expect. Inconsistent reads in replica sets When you start using replica sets to distribute your reads across a cluster, you can get yourself in a whole world of trouble. This is compounded if you have performance issues that cause the replication lag between a primary and its secondaries to increase to minutes or even hours in some cases. You can control whether a query is run on secondaries and also how many secondaries are replicated to during the insert, but this will affect performance and could block forever in some cases! Mongo’s BSON ID is awesome Profiler

UK Web Archive BOWER JavaScript MDN DOC [fr] JavaScript (JS) is a lightweight interpreted (or just-in-time compiled) programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, garbage-collected, dynamic language, supporting multiple paradigms such as imperative, functional, and object-oriented. JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for...in and Object utilities), and source-code recovery (JavaScript functions store their source text and can be retrieved through toString()). This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments.

React Alexander Luksidadi's Blog » ExpressJS without Jade? Use Underscore template! Many of you must have felt like a burden knowing that Express recommended you to learn another template language (Jade). Don’t worry, you can code all your templates on HTML using underscoreJS! Oh yay? Let’s take a look on how you implement that on your express app. First install express package, create your express app: $ npm install -g express $ express . Install your underscore package $ npm install -d underscore If you edit Now, all you need to do is, to comment out 1 line and register underscorejs: Now, go to routesindex.js : $ vi routes/index.js Change the template name from ‘index’ to ‘index.html’: Next, go to views directory and create layout.html And last, still in views directory, create another file called index.html And there you go.. you can write your HTMl code in peace =)

Frankenplace Grunt Javascript Cheat Sheet Basic Objects Math Methods DOM Events Event Object Constant Event Object Methods initEvent() preventDefault() stopPropagation() EventTarget Object addEventListener() dispatchEvent() removeEventListener() EventListener Object handleEvent() MouseEvent/KeyboardEvent Methods initMouseEvent() initKeyboardEvent() DOM Node Node Types Element1 Attr2 Text3 CDATASection4 EntityReference5 Entity6 ProcessingInstruction7 Comment8 Document9 DocumentType10 DocumentFragment11 Notation12 nodeName Returns Element element name Attr attribute name Text #text CDATASection #cdata-section EntityReference entity reference name Entity entity name ProcessingInstruction target Comment #comment Document #document DocumentType doctype name DocumentFragment #document fragment Notation notation name nodeValue Returns RegExp Modifiers i Perform case-insensitive matching g Perform a global match (find all matches rather than stopping after the first match) m Perform multiline matching Brackets Metacharacters . Quantifiers Core DOM length

jQuery

Related:  Software designModulesCode BuilderstechJavaScriptBase de Données et Stockage d'Informations :RepositoriesJavaScriptsjavascript