A new micro clearfix hack – Nicolas Gallagher
A new micro clearfix hack via @necolas #css
Blogs · @wyome
Tagged tutorial · everything
A new micro clearfix hack via @necolas #css
This tutorial explains how to use jQuery's `getJSON()` function to retrieve and display data from external APIs, using Twitter's search API as a practical example. It demonstrates how to construct API URLs with proper callback parameters, parse the returned JSON object, loop through results using `$.each()`, and dynamically append the data to the DOM—in this case, displaying tweet text alongside user profile images. The guide walks through building a complete working example: a search box that queries Twitter and renders results, showing both the conceptual framework and full code needed to implement cross-domain JSON requests.
Generating CSV file using #CodeIgniter Framework -
This documentation page explains Transit, a jQuery plugin for CSS animations, and covers its behavior across different browsers and configurations. For older browsers that don't support CSS transitions, Transit degrades gracefully by either skipping transformation effects while maintaining standard CSS changes, or delegating to jQuery's animate() method as a fallback. The page also provides guidance on customizing animation defaults, easing functions, and working around Webkit rendering issues like flickering.
#jQuery - The Little Things -
This tutorial explains how to install Facebook's XHProf profiler on a production server and integrate it with CodeIgniter applications using hooks to monitor real-world performance. XHProf provides hierarchical function-level profiling with minimal overhead, showing wall time, CPU usage, and memory consumption, and includes features like call graphs, run comparisons, and aggregated analysis across multiple page loads. The guide covers installation from source on Ubuntu, CodeIgniter integration setup, and interpretation of profiling results to identify bottlenecks in database calls and external service requests.
jQuery's cross-browser compatibility and size make it inefficient for mobile development, where older IE support is unnecessary and download/parsing time matters significantly. The piece surveys five lightweight alternatives—Zepto.js (8kb, jQuery-like with touch support), Snack.js (3kb, non-jQuery API), $dom (2kb, animations-included), xui.js (4kb, multi-device framework), and 140medley (0.5kb, minimal)—each optimized for mobile by using hardware-accelerated CSS animations instead of jQuery's CPU-intensive style modifications and eliminating unnecessary features.
Rickshaw: A #JavaScript toolkit for creating interactive time series graphs -
Stroll.js is a library that demonstrates various CSS3 scroll-triggered animation effects, including grow, wave, flip, fly, helix, and papercut transformations. The collection includes both 2D effects and CSS 3D transforms, with working examples that function across modern browsers including Chrome, Safari, Firefox, and mobile platforms.
DataMapper #codeigniter -
MySQL events are time-triggered objects that execute SQL commands on a schedule, offering an alternative to cron jobs for database-specific tasks like purging old records or aggregating data. The article explains how to enable the event scheduler, create one-time or recurring events with specific start and end dates, view and modify existing events, and demonstrates a practical example of using events to automatically publish scheduled blog posts at designated times. Unlike triggers which respond to data changes, events execute based on elapsed time and cannot run external code, making them suitable only for MySQL-internal operations.
EXPLAIN is a MySQL diagnostic tool that shows how the query optimizer executes a query, revealing crucial information through columns like join type, indexes used, and rows examined. The article walks through interpreting each EXPLAIN output column and demonstrates how adding appropriate indexes and rewriting queries—such as moving WHERE conditions inside subqueries—can dramatically reduce the number of rows scanned, often improving performance by orders of magnitude. Understanding EXPLAIN output is essential for optimizing poorly performing queries, since simply adding indexes without structuring queries to use them effectively often yields minimal gains.
Most websites sort user-rated content using flawed methods that either ignore the proportion of positive ratings or fail to account for statistical uncertainty in small samples. The Wilson score confidence interval, derived from 1927 statistical theory, provides the correct approach by calculating the lower bound of a 95% confidence interval for the true positive rating proportion, effectively balancing high positive percentages with sufficient sample size so that items with many ratings don't automatically rank above items with few ratings but higher quality scores. The piece provides the mathematical formula, code implementations in multiple languages, and practical SQL examples to sort content correctly.
10 things every designer needs to know about forms |
The article compares three CSS font-sizing approaches: pixels (px), which offer consistency but prevent text resizing in older IE versions; ems, which allow resizing but create compounding issues in nested elements; and rem units (new in CSS3), which size relative to the root element rather than the parent, eliminating the compounding problem while maintaining resizability in modern browsers. The author recommends rem with px fallbacks as the optimal solution, allowing both accessibility and cross-browser compatibility.
The All-In-One Almost-Alphabetical Guide to Detecting Everything #HTML5 -
This is a comprehensive reference guide to keyboard shortcuts for macOS, organized by function (Finder actions, window management, text editing, screenshots, Spotlight, Safari, Mail, and more) and covering versions from Big Sur through Sequoia. It includes both common shortcuts and lesser-known power-user tricks, such as using Command-drag to customize toolbars, Option-click to access hidden Dock menus, and Emacs key bindings that work in certain applications. The guide is designed as a living document that the author continues to update for the latest macOS versions.
Owen Christian and the author developed a CodeIgniter administration tool that lets translators manage language files through a web interface rather than editing them manually. The tool synchronizes translation keys across multiple language files, supports UTF-8 and embedded PHP code, and includes syntax checking to catch errors before they break the application. It requires setting up a master language file and corresponding empty slave files, then making them writable so the web interface can manage translations.
Understanding #JavaScript OOP - #toread