background preloader

Regular Expressions Cheat Sheet by DaveChild

Regular Expressions Cheat Sheet by DaveChild

Constraints HomeContents In this part of the SQLite tutorial, we will work with constraints. Constraints are placed on columns. We have the following constraints: NOT NULL constraint A column with a NOT NULL constraint cannot have NULL values. sqlite> CREATE TABLE People(Id INTEGER, LastName TEXT NOT NULL, ...> FirstName TEXT NOT NULL, City TEXT); We create two columns with NOT NULL constraints. sqlite> INSERT INTO People VALUES(1, 'Hanks', 'Robert', 'New York'); sqlite> INSERT INTO People VALUES(2, NULL, 'Marianne', 'Chicago'); Error: People.LastName may not be NULL The first INSERT statement succeeds, while the second fails. UNIQUE constraint The UNIQUE constraint ensures that all data are unique in a column. sqlite> CREATE TABLE Brands(Id INTEGER, BrandName TEXT UNIQUE); Here we create a table Brands. sqlite> INSERT INTO Brands VALUES(1, 'Coca Cola'); sqlite> INSERT INTO Brands VALUES(2, 'Pepsi'); sqlite> INSERT INTO Brands VALUES(3, 'Pepsi'); Error: column BrandName is not unique Primary key Foreign key

» Variables Personnalisées Google Analytics – Le guide complet | Deeper WebAnalytics Dans cet article : 1. Historique des variables personnalisées 2. Fonctionnement des variables personnalisées 3. Clés de lecture des variables personnalisées 4. La fonctionnalité la plus méconnue de Google Analytics se révèle également être la plus puissante. 1. Un outil de web-analytics n’a pas la faculté de tout recueillir lui même. 2. Alors que le setVar() restait collé à l’internaute ad vitam aeternam, c’est à dire qu’à partir du moment où je disais qu’il est “bouddhiste” toutes les visites suivantes il apparaissait comme bouddhiste. 2.1 Catégorisation de l’information au sein des CustomVar (Variables Personnalisées) Les valeurs personnalisés permettaient d’insérer qu’une seule information, ex : setVar(‘male’); Pour insérer plusieurs information il fallait finasser ( setVar(‘sexe:male,age:29,statut:celibataire’) ) puis retraiter les informations sous Excel (Bref, pas intuitif). Les variables personnalisées permettent de hiérarchiser l’information insérée. Cliquez pour agrandir 3. 5.

Django + skelJS / Static Files Issue / References to Images in CSS Move logic to the front end with AngularJS At Lullabot, we always aim to make sites as performant and maintainable as possible. Recently, we've started to decouple bits of logic from Drupal and move them to the client's browser using JavaScript. Let's look at an example. We want to display the weather of a given city in our website. Calling a public API with some parameters. The result would look like the following: In Drupal, we could create a block that uses drupal_http_request() to fetch the data, then passes its results to a theme function that renders it. Instead, let's move this to pure JavaScript and HTML so the client's browser will be the one in charge of fetching, processing and caching the data. Meet AngularJS AngularJS is an MVC JavaScript framework which elegantly separates controller, business and model logic in your application. The full example can be found at Bootstrapping our AngularJS application Let's start by adding a directive to bootstrap our AngularJS application.

Understanding JavaScript Closures In JavaScript, a closure is a function to which the variables of the surrounding context are bound by reference. Every JavaScript function forms a closure on creation. In a moment I’ll explain why and walk through the process by which closures are created. Then I’ll address some common misconceptions and finish with some practical applications. But first a brief word from our sponsors: JavaScript closures are brought to you by lexical scope and the VariableEnvironment… Lexical Scope The word lexical pertains to words or language. Consider the following example: Function inner is physically surrounded by function outer which in turn is wrapped by the global context. global outer inner The outer lexical scope of any given function is defined by its ancestors in the lexical hierarchy. VariableEnvironment The global object has an associated execution context. We could represent the VariableEnvironment with pseudo-code… However, it turns out this is only part of the picture. The [[scope]] property

Guide Google Analytics WordPress & Référencement naturel Mes servicesWordPress - Référencement Hébergement WordPress Vous êtes ici : SeoMix » Guide Google Analytics Guide Google Analytics Naviguez parmi les différentes rubriques du Guide Google Analytics avec le sommaire de gauche. Concepts de webanalytics <img width="200" height="200" src=" class="hlistimg wp-post-image" alt="Détecter un profil Analytics qui ne fonctionne plus" /> 6 astuces pour Google Analytics 6 astuces pour améliorer votre analyse du trafic sur Google Analytics: tri pondéré, exclusion d'IP, affichage des donnée... <img width="200" height="200" src=" class="hlistimg wp-post-image" alt="Le taux de rebond d&#039;Analytics doit être modifié !" Fonctionnement de Google Analytics Filtres Analytics CPC et Adwords Les outils complémentaires Les autres logiciels Vous aimez ce guide ? WordPress

The Django template language Django’s template language is designed to strike a balance between power and ease. It’s designed to feel comfortable to those used to working with HTML. If you have any exposure to other text-based template languages, such as Smarty or CheetahTemplate, you should feel right at home with Django’s templates. Philosophy If you have a background in programming, or if you’re used to languages which mix programming code directly into HTML, you’ll want to bear in mind that the Django template system is not simply Python embedded into HTML. The Django template system provides tags which function similarly to some programming constructs – an if tag for boolean tests, a for tag for looping, etc. – but these are not simply executed as the corresponding Python code, and the template system will not execute arbitrary Python expressions. Templates A template is simply a text file. Below is a minimal template that illustrates a few basics. Oh, and one more thing: Making humans edit XML is sadistic! <! <!

Snap.svg - Why Snap Snap.svg is a brand new JavaScript library for working with SVG. Snap provides web developers with a clean, streamlined, intuitive, and powerful API for animating and manipulating both existing SVG content, and SVG content generated with Snap. Currently, the most popular library for working with SVG is Raphaël. Another unique feature of Snap is its ability to work with existing SVG. Finally, Snap supports animation. Snap is 100% free and 100% open-source (released under an Apache 2 license).

The Node Beginner Book » A comprehensive Node.js tutorial How to Track Social Media Traffic With Google Analytics You have a website and you are building traffic to it, but what do you know about your visitors? Do you know where they come from, how engaged they are with your website or if they have converted as a reader, subscriber or customer? You can see all of these insights for free using Google Analytics. Why Google Analytics? Google Analytics allows you to see where your visitors come from and if they engage with your content or leave immediately. With Google Analytics, you can get valuable insights about your visitors and in this article I am going to show you how to track social media traffic. This will help you identify the social media sites that send the most visitors back to your website to see which one needs more attention. You will also discover how you can learn more about the visitors who come to your site from Twitter, Facebook, Google+ or other social media sites. Getting Started With Google Analytics Click the New Version link to switch to the latest version of Google Analytics.

Widgets A widget that is composed of multiple widgets. MultiWidget works hand in hand with the MultiValueField. MultiWidget has one required argument: widgets An iterable containing the widgets needed. And one required method: decompress(value) This method takes a single “compressed” value from the field and returns a list of “decompressed” values. This method must be implemented by the subclass, and since the value may be empty, the implementation must be defensive. The rationale behind “decompression” is that it is necessary to “split” the combined value of the form field into the values for each widget. An example of this is how SplitDateTimeWidget turns a datetime value into a list with date and time split into two separate values: from django.forms import MultiWidget class SplitDateTimeWidget(MultiWidget): # ... def decompress(self, value): if value: return [value.date(), value.time().replace(microsecond=0)] return [None, None] Tip Other methods that may be useful to override include:

Test your CSS media queries features - pieroxy.net This tool will detect many features of your browser / device (called a user agent.) It is designed to display the exact value of the various features tested. Visit this page with as many devices as you want in order to get the values you need. This will help understand how these values work across devices and should give more insight as to which media queries you should use to have the desired result. If you want to give some feedback, see my blog entry on the subject. I've also set up a page showing the results of this test on different devices (the ones I've got in my hands). Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0 @media Stage 2 Dynamic CSS loading @media screen: yes @media print: no @media handheld: no @media projection: no @media tty: no @media tv: no @media aural: no @media braille: no orientation: landscape

Related: