background preloader

New, unsorted

Facebook Twitter

Journal of Eivind Uggedal — Deploying WSGI applications with Puppet. Websockets 101. Written on Monday, September 24, 2012 Out of curiosity I taught the Fireteam presence server websockets as a protocol in addition to the proprietary protocol it speaks out of the box. I don't really have a usecase for websocket per-se with the server, but I thought it might make it more useful for customers that want to use the event based parts of the API with HTML5 games. This post focuses on implementing websockets on the server, not so much about how you would use them from the client and basically collects all thing I wish I would have known before. What are Websockets So let's start with that part first. What are websockets and why would you use websockets? Basically only if you want to have a bidirectional communication between an actual web browser and some server.

Websockets in the current iteration as specified by RFC 6455 do a bunch of things differently to what a raw TCP connections does. When to use them? Websockets make you sad. Everybody knows about HTTP proxies. Alright. The truth about structuring an HTML5 page. Tuin smakelijk! | permacultuur, eetbare tuin, tuinontwerp, groenjournalistiek. 8 box-sizing: width(), css(“width”), and outerWidth() One of the great new features in jQuery 1.8 is a built-in understanding of box-sizing: border-box which is supported by every modern browser. (Sorry, IE6 and IE7, please take one step back; I said modern browser.) If you showed people an element with a border on the screen and asked them the width of that element, they would naturally measure from the outside edges of the border.

Yet that’s not the way CSS works in its default content-box mode. Normally, CSS width and height only include the “content” inside the border and padding. As a result, designers (and jQuery) often need to add the width to the right/left padding and border to get the “natural” width of the element. Using box-sizing: border-box changes the CSS notion of the width of an element to include both the padding and the border dimensions, just the way you’d naturally measure it. jQuery versions before 1.8 were not fully trained in the ways of the border-box, but we’ve fixed this bug. Using .outerWidth() as a setter. JavaScript Events And Responding To The User. Advertisement Whenever people ask me about the most powerful things in JavaScript and the DOM, I quickly arrive at events. The reason is that events in browsers are incredibly useful. Furthermore, decoupling functionality from events is a powerful idea, which is why Node.js1 became such a hot topic.

Today, let’s get back to the basics of events and get you in the mood to start playing with them, beyond applying click handlers to everything or breaking the Web with <a href="javascript:void(0)"> links or messing up our HTML with onclick="foo()" inline handlers (I explained in detail in 2005 why these are bad ideas2). Note: This article uses plain JavaScript and not any libraries. Disclaimer: The event syntax we’ll be using here is addEventListener()3, as defined in the “DOM Level 3 Events4” specification, which works in all browsers in use now except for Internet Explorer below version 9. All of this is based on event handling and reading out what the browser gives us.

For example: (al) Kadirpekel/hammock. Pyramid EuroPython tutorial video — Daniel Nouri's Blog. Here's the videos and material for the Writing a Pyramid application tutorial that I gave at last month's EuroPython 2012. The tutorial is around 3,5 hours long. The accompanying material includes code and documentation for the seven individual steps of the tutorial (ex1_hello through ex7_final). (Head here if the videos aren't displayed.) This is the tutorial's complete description of the tutorial from the EuroPython website: Pyramid is a very general open source Python web framework. As a framework, its primary job is to make it easier for a developer to create an arbitrary web application. The type of application being created isn’t really important; it could be a spreadsheet, a corporate intranet, or a social networking platform.

In this tutorial you will build from scratch a simple app in which users each have their individual workspaces, and can invite other users to collaboratively edit content. While writing the application, you will learn about many aspects of Pyramid. Publieke dienstverlening op de kaart | Geonovum. The Magical Number Seven. Originally published in The Psychological Review, 1956, vol. 63, pp. 81-97 (reproduced here, with the author's permission, by Stephen Malinowski) Table of Contents My problem is that I have been persecuted by an integer. For seven years this number has followed me around, has intruded in my most private data, and has assaulted me from the pages of our most public journals.

This number assumes a variety of disguises, being sometimes a little larger and sometimes a little smaller than usual, but never changing so much as to be unrecognizable. I shall begin my case history by telling you about some experiments that tested how accurately people can assign numbers to the magnitudes of various aspects of a stimulus. Information measurement The "amount of information" is exactly the same concept that we have talked about for years under the name of "variance. " The advantages of this new way of talking about variance are simple enough. There are two simple rules to follow. Figure 1. Figure 2. Nicholas Zakas: Scalable JavaScript Application Architecture.

Sources

How to Create an Android App and APK on Android with Python | Ben Rousch's Cluster of Bleep. De projectiestring van het Rijksdriehoekscoördinaten stelsel « OpenStreetMap Nederland. Are hashbang URLs a recommended practice. Writing an Android GUI using Python (Gallery) Introduction Wrapandroid version is updated to 0.8.2. Please use this version. We might write Python code outside eclipse. In this case, we have no logcat window to show print message from python. Do not worry about, cle supports syslog. The message can be output to syslog server. Using the following sentence to open syslog client: SrvGroup. The IP address should be adjusted based on your environment. Output looks like this: Android gallery is a little more complicate gui element. Create Adapter Object Wrapandroid’s adpterClass encapsulates android java class adapter. Because imageview object is created by python, when function returns. the object will be freed by GC.

Create Gallery Object MyGallery = Service.GalleryClass. The above codes and functions are simple. Screenshot: Examples download: [SOLVED] DNS Not Working Any Guest on Linux Mint 13/Ubuntu… Just upgraded from VBox 3.1.x on Ubuntu 10.04 to VBox 4.1.12 on Linux Mint 13, which is based on Ubuntu 12.04. I installed the Oracle version of VBox from the standard repository, 4.1.12-77245~Ubuntu~precise. I have several virtual machines, including WinXP, Win7, Ubuntu 12.04, and OSGeo-Live (a Xubuntu-based geographic distro). I have DNS configured on my router, not on my host OS. Running on 10.04, DNS lookup is working from all guest OSes. After upgrading the OS and the VBox version, DNS lookup is not working in any of them.

All guest OSes are set to NAT. Any ideas why this is and how to fix it? Thanks,--Lee. The Story of KRNWTR - 3 Redenen waarom je wel kraanwater en geen bronwater moet drinken. 7 HTML5 features that you may not know about - Aaron Lumsden | Aaronlumsden.com Aaron Lumsden | Aaronlumsden.com. 7 HTML5 Features That You May Not Know AboutWritten by Aaron Lumsden on 15 Sep 2012 HTML5 has been a hot topic recently. Although its been around for a while now, I still find myself coming across features that I didn’t know about. Here’s a few that I thought I’d share with you. To check what browsers support these following features visit When can i use. HTML5 autofocus Attribute The autofocus attribute let’s you automatically focus on an input, button or textarea as soon as the page has loaded. Previously I’ve had to refer to using javascript to implement such solutions. HTML5 download Attribute The HTML5 download attribute allows developers to force a file to download rather than go to that specific page.

<a href="my.pdf" download="MyPDFReport">Download PDF</a> HTML5 Link Prefetching Prefetching allows the browser to download another page or asset in the background. Here’s the code for it. HTML5 hidden element The hidden attribute works in a similar way to CSS ‘display:none’. Leave a comment.

Adventures in Unicode SMS. Learning JavaScript Design Patterns. Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions.

This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others. In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language. Acknowledgments Credits Reading We already use patterns everyday. Cairoplot by rodrigoaraujo01.