background preloader

Programming

Facebook Twitter

Optimize browser rendering - Make the Web Faster. Once resources have been downloaded to the client, the browser still needs to load, interpret, and render HTML, CSS, and JavaScript code. By simply formatting your code and pages in ways that exploit the characteristics of current browsers, you can enhance performance on the client side. Use efficient CSS selectors Overview Avoiding inefficient key selectors that match large numbers of elements can speed up page rendering. Details As the browser parses HTML, it constructs an internal document tree representing all the elements to be displayed. It then matches elements to styles specified in various stylesheets, according to the standard CSS cascade, inheritance, and ordering rules. According to this system, the fewer rules the engine has to evaluate the better. The following categories of rules are considered to be inefficient: Rules with descendant selectors For example: Rules with the universal selector as the key body * {...}.hide-scrollbars * {...}

Rules with a tag selector as the key. Efficiently Rendering CSS. I admittedly don't think about this idea very often... how efficient is the CSS that we write, in terms of how quickly the browser can render it? This is definitely something that browser vendors care about (the faster pages load the happier people are using their products). Mozilla has an article about best practices. Google is also always on a crusade to make the web faster.

They also have an article about it. Let's cover some of the big ideas they present, and then discuss the practicalities of it all. Right to Left One of the important things to understand about how browsers read your CSS selectors, is that they read them from right to left. ID's are the most efficient, Universal are the least There are four kinds of key selectors: ID, class, tag, and universal. #main-navigation { } body.home #page-wrap { } .main-navigation { } ul li a.current { } ul li a { } * { } #content [title='home'] #main-nav > li { } Even though that feels weirdly counter-intuitive... Don't tag-qualify David Hyatt: Enable/Disable a network adapter with a keyboard shortcut. Why programmers should study the art of programming. Chip Camden encourages programmers to cultivate a broad and deep understanding of the trade by accumulating a knowledge of its history and keeping an eye on recent developments.

To the average programmer in the trenches, debating the theory of computation is like discussing the chemical properties of saltpeter while in a gunfight: it may all be correct, but it doesn't apply directly to the problem in front of them. Why waste time imagining the outcome of a deathmatch between Haskell Curry and Alan Kay when we've got a deadline to slap a new web UI over our legacy application? Why should we care whether we're using a monad or an exception to return an error state?

What the heck does "orthogonal" mean? Don't give me a research paper, just give me code that works. And so runs the "get it done yesterday" logic. The history of programming is dotted by false starts and pendulum swings. Nevertheless, the pursuit of programming theory does do us some good. Stripe Generator - ajax diagonal stripes background designer. Ultimate CSS Gradient Generator - ColorZilla.com. Flex After Dark | ActionScript XML. ActionScript's powerful XML support is based on E4X .

Let's see ActionScript's XML handling in action with some examples. Basic Examples The below examples use the following XML var xmlAlbum : XML = < album name = "Sky Blue Sky" artist = "Wilco" > < tracks > < track name = "Either Way" seconds = "187" /> < track name = "You Are My Face" seconds = "278" /> < track name = "Impossible Germany" seconds = "358" /> < track name = "Sky Blue Sky" seconds = "203" /> < track name = "Side With The Seeds" seconds = "256" /> < track name = "Shake It Off" seconds = "342" /> < track name = "Please Be Patient With Me" seconds = "199" /> < track name = "Hate It Here" seconds = "273" /> < track name = "Leave Me (Like You Found Me)" seconds = "250" /> < track name = "Walken" seconds = "267" /> < track name = "What Light" seconds = "216" /> < track name = "On And On And On" seconds = "241" /> </ tracks > </ album > Attribute Access First let's do some investigating of the XML object.

Child Access Adding Elements. CSS Text Wrapper. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pede. Donec iaculis, purus at porta tristique, pede nisi rhoncus pede, non nonummy augue nunc in tortor. Nunc gravida, nisl ac tempor rutrum, risus odio pharetra eros, eu feugiat diam nisi sit amet sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam quis neque at odio laoreet convallis. Suspendisse rhoncus dolor ac magna. Adobe ActionScript 3.0 * Capturing mouse input.

Mouse clicks create mouse events that can be used to trigger interactive functionality. You can add an event listener to the Stage to listen for mouse events that occur anywhere within the SWF file. You can also add event listeners to objects on the Stage that inherit from InteractiveObject (for example, Sprite or MovieClip); these listeners are triggered when the object is clicked. As with keyboard events, mouse events bubble. In the following example, because square is a child of the Stage, the event dispatches both from the sprite square as well as from the Stage object when the square is clicked: In the previous example, notice that the mouse event contains positional information about the click. The MouseEvent object also contains altKey, ctrlKey, and shiftKey Boolean properties. Creating drag-and-drop functionality For more details, see the section on creating drag and drop interaction in Changing position.

Customizing the mouse cursor Customizing the context menu Managing focus. Flash on 2012-4-4. Programming Concepts - Prof. Holowczak. Actionscript3 - Dan Kempton Multimedia Services. Tiny Scrollbar: A lightweight jQuery plugin. Nonsense The chart shows how much lessons young people took in sports during 1999 sorted by sport and gender. The most popular sport for boys was football with 67 lessons.

Girls do not seem to like football that much they only took 18 lessons. Swimming was the most popular sport for girls with 52 lessons. boys also took an interest in swimming and took 47 lessons. Boys took 59 lessons and girls 50 lessons in cycling. Girls took 28 lessons in roller blading slighly less for the boys with only 25 lessons. boys and girls almost took the same amount of hiking lessons, boys took 22 lessons and girls 24 lessons.

The least favorite sport is tennis with only 24 lessons for the boys and 19 lessons for the girls. overall this chart shows that boys practice sports more frequently then girls. The diagram shows the evolution of the horse over a period of 40 million years. The table shows where students got there money from over a ten year period in the United Kingdom. Jquery custom content scroller. Last updated on Mar 10, 2015 Originally published on August 1, 2010 by malihu, under Plugins. Highly customizable custom scrollbar jQuery plugin. Features include vertical and/or horizontal scrollbar(s), adjustable scrolling momentum, mouse-wheel (via jQuery mousewheel plugin), keyboard and touch support, ready-to-use themes and customization via CSS, RTL direction support, option parameters for full control of scrollbar functionality, methods for triggering actions like scroll-to, update, destroy etc., user-defined callbacks and more.

Current version 3.0.8 (Changelog)Upgrading from version 2 When upgrading from version 2.x to 3.x it’s important to use version 3 CSS and .png files. Version 2 is still maintained and updated here. How to use it Get started by downloading the archive which contains the plugin files (and a large amount of HTML demos and examples). Include jquery.mCustomScrollbar.css in the head tag your HTML document (more info) Initialization Initialize via javascript more info.

Webkit CSS properties. CSS Sprites: What They Are, Why They're Cool, and How To Use Them. By Chris Coyier On This article has been revised and re-written several times since its very first publication in 2007, to keep the information current. The most recent revision was done by Flip Stewart in January 2015. #What are CSS Sprites? Spoiler alert: they aren't fairies that write your stylesheets for you. I wish. To summarize: the term "sprites" comes from a technique in computer graphics, most often used in video games. CSS Sprites is pretty much the exact same theory: get the image once, and shift it around and only display parts of it. #Why use CSS Sprites? It may seem counterintuitive to cram smaller images into a larger image. Let's look at some numbers on an actual example: That adds up to a total of 14.38KB to load the three images. While the total image size (sometimes) goes up with sprites, several images are loaded with a single HTTP request.

Thus, sprites are important for the same reasons that minifying and concatinating CSS and JavaScript are important. $ sprity . #SVGs. Free Webmaster Resources | Free Scripts | Web Tools. Blog.SpoonGraphics. Who needs 'em anyway? Limit Your DIVS | That Css Guy! During the years of honing my HTML skills I have been tempted and often required to serve up the cleanest code I possibly can. I quickly learned that all elements within my document – everything from a <p> to a <ul> to a <h5>– can accept the same style rules as a div. This got me thinking, why even use a div for styling when you can apply the style directly to your elements? I started to explore this concept further and over time noticed one repeating outcome when limiting my div use: consistent cross browser rendering! When I limited the use of my divs all the major browser including both IE6 and IE7 would render the sites nearly perfectly.

Or with very little fixes needed. So, this obviously brings me to the point of this article, what if you build a site without any divs at all? It’s possible and I’ve done it- not that it’s magic but proves divs nor tables are necessary for layout No div Contact Box <div id="formHolder"><p>Order Your NoDivs Today</p><form><! And the css to go with it: Why tables for layout is stupid: problems defined, solutions offered. Build a Dynamic Menu in JavaScript Article. Here, we’re not talking about DHTML drop-down/pull-down menus. Here, we’re talking about a simple navigation menu using Javascript. It identifies the active page, and accordingly displays that link differently from the other links, making it easy for the user to navigate.

Here we’ll employ a single .js file that will be used for all the pages under the navigation menu. So you need not update all the pages: you’ll have to update only one javascript library file (.js file). For example, consider these 3 navigation links: Link 1 is active. Link 2 is active. Link 3 is active. As you can see, these are shots of how the navigation menu appears at different pages depending on which links is active. It’s possible to create such a menu using only Cascading Style Sheets (CSS), by defining a class (say .links) for the menus, and assigning different properties for .links:active. Though this is perfect, there is an advantage to using Javascript here.

Implementation And that’s your dynamic menu! CSS Extensions - MDN Docs. 30 Javascript Menu Plugins and Scripts. JqDock : a jQuery plugin. Customising Windows 7 logon screen. Ever wonder what to do with the tons of pictures taken of your daughters other than setting them as wallpapers? =) With Windows 7 you can set custom images as your logon background. Now you have the option to have your daughters greet you every time you login to your machine! =) original article. For the not so technically inclined, graphical instructions are available at my journal. Else, here’s a really quick 10minutes run through. start the group policy editor (gpedit.msc) using your favourite method. go to the following branch: Computer Configuration > Administrative Templates > System > Logon set “Always use custom logon background” to enabled. select the image you want to use as your background. it must be of the same dimensions as your primary monitor’s desktop resolution. the filesize must be less than 256kb, must be of jpg format, and must be saved as “backgroundDefault.jpg”. take note of the case!

Enjoy your new logon screen =) 13 Awesome Javascript CSS Menus - Noupe Design Blog. Oct 31 2007 Every web designer tries to be creative when it comes to designing the main navigation of the website. Now we present you with 13 awesome Javascript CSS menus that will be very handy and easy to modify to suit your needs. Lets take a look at recent examples of these … 1) Sexy Sliding Menu – Andrew Sellick decided to use mootools due to the smoothness of their effects, however, he developed a sliding menu using script.aculo.us . Demo: Mootols Version Demo: Script.aculo.usVersion 2) FastFind Menu Script – This script allows for nested menus, based on dynamic “AJAX” responses.

Demo: FastFind Menu 3) Webber 2.0 Dock Menu – Great example of a dock type navigation. Demo: Webber 2.0 Dock Menu 4) Phatfusion- Image Menu – Image menu using javascript, onClick event keeps selected item open and to close it again. Demo: Phatfusion- Image Menu Demo: Mootools version with XML parser 5) Drag and Drop ordering in a TreePanel – This example shows basic drag and drop node moving in a tree. Homepage. Professional Site Navigation Software. A Guide To Using Custom Scrollbars On Your Site. [tweetmeme]“Don’t play with the defaults”, people say. It confuses the users by adding complexity, where simplicity will do just fine.

But then, there’s “Think Different”. In this crowded internet space, your site needs to stand out from the mundane. If you know you can do something better, why not go the extra mile? When I first saw Tim Van Damme’s blog, the scrollbar immediately got my attention. So how does Tim do it then? The second thing, and I don’t know why this happens, but you need to alter the style for html as well. I don’t know why one needs to set the overflow-y to auto, but without it the new scrollbar doesn’t work properly, or at all. That should take care of your scrollbar, but wait, it looks the same?! This is your entire scrollbar unit. This is the little button at the start and end of the scrollbar. This is the thin background upon which your scrollbar moves in. This will style the scrollbar thumb itself. I hope this guide helped in the least. Styling Scrollbars. WebKit now supports styling of the scrollbars in overflow sections, listboxes, dropdown menus and textareas.

For those who want to skip the article and just go right to the source, here is an example: Scrollbar Example Here is a screenshot for those not running a recent enough WebKit: The scrollbar pseudo-element indicates that an object should use a custom scrollbar. When this pseudo element is present, WebKit will turn off its built-in scrollbar rendering and just use the information provided in CSS. The width and height properties on the scrollbar element indicate the width of the vertical scrollbar and the height of the horizontal scrollbar. A scrollbar consists of scrollbar buttons and a track. In addition the scrollbar corner can now be styled, as well as the resizer used by resizable textareas. Here is a complete list of all the new pseudo-elements. Scrollbar scrollbar-button scrollbar-track scrollbar-track-piece scrollbar-thumb scrollbar-corner resizer.

CSS Compressor - Online code compressor for Cascading Style Sheets.