background preloader

Programming

Facebook Twitter

The Go Programming Language. UTF-8 Icons - Your no.1 source for UTF-8 character icons. Drupal 7 Tutorial: Using Entityqueue. Now that Entityqueue has been released, I wanted to give a quick tutorial on how to use it. You can manage the queues from the /admin/structure/entityqueue page. Click "Add" to create a new queue. Once you're there you have several options. Enter the queue title and optionally change the machine name. Next you select the entity type for the queue. Under "Queue properties" you can set the minimum and maximum number of items allowed in the queue. Hit "Save" and now you can see your new queue in the list. Entityqueue uses Ctools, so you can Disable, Delete, Clone and Export your queues too! When you click "Edit items" you are presented with an Entityreference autocomplete field to add new items.

The item now shows up in a draggable table that allows you to reorder items. Once you have several items in the queue you can reorder them. Click the "Remove" button next to an item to remove it. Once you're all done adding, rearranging and removing items, hit "Save". 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.

Configuring Eclipse. 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. One of the primary reasons Raphaël became the de facto standard is that it supports browsers all the way back to IE 6. However, supporting so many browsers means only being able to implement a common subset of SVG features. Snap was written entirely from scratch by the author of Raphaël (Dmitry Baranovskiy), and is designed specifically for modern browsers (IE9 and up, Safari, Chrome, Firefox, and Opera).

Targeting more modern browsers means that Snap can support features like masking, clipping, patterns, full gradients, groups, and more. Another unique feature of Snap is its ability to work with existing SVG. Finally, Snap supports animation. Append block. 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. This involves: 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. Jackrabbit DBUG Presentation. Regular Expressions Cheat Sheet by DaveChild.