If you are here you've probably heard of HSL, HSB or HSV color models. They are nothing more than transformations of RGB values. Simple equations are used to convert from RGB to HSL and HSV color. HSB is exactly the same as HSV, but HSL is slightly different as explained below. Because they are both based on RGB, they are also meant to be used to represent color in digital devices. This article explains the basic definitions involved (no previous knowledge on color theory is assumed) and shares the equations to convert between them.
Why did they bother creating color models that represent the same colors RGB already could? Although RGB is perfect for machines, it is not very human-friendly. HSL and HSV color models were created as a more convenient way for us to specify colors in software.
H stands for Hue and S stands for Saturation in all cases. Hue is usually a number between 0 and 360 that represents the angle in the color wheel (a hue wheel, that is). The B in HSB stands for Brightness and the V in HSV for Value, which are exactly the same: the perception of the ammount of light or power of the source.
Both Saturation and Brightness/Value are given as a real number between 0 and 1 or as a percentage. Playing around with the HSB fields of a color picker is probably the easiest way to understand these intuitive concepts.
HSL is slightly different. Hue takes exactly the same numerical value as in HSB/HSV. However, S, which also stands for Saturation, is defined differently and requires conversion. L stands for Lightness, is not the same as Brightness/Value. Brightness is perceived as the "amount of light" which can be any color while Lightness is best understood as the amount of white. Saturation is different because in both models is scaled to fit the definition of brightness/lightness.
Dont't have Photoshop and need a quick color? colpick color picker is an online color picker I developed recently aiming general users and designers. It allows to easily select a color the same way as in Photoshop, giving RGB, HEX and HSB color values. It serves a double purpose as it also helps me maintain the colpick jQuery plugin behind it. Some of its features aim web designers: RGB and HSL codes in CSS format for easy copy/pasting and basic color schemes: analogous, complementary, triad and square. It creates color schemes based on the currently selected color.
It also allows users to save up to ten colors (using a cookie) and has a list of color hexes used by famous brands (Facebook blue, Android green ...). Users may share the selected color using a short link.
It's main goal is to substitute Photoshop's picker when you don't have it and serve any other color picking need. Please consider adding it to favorites as it may be a handy resource. Any feedback will be appreciated.
CSS circles are very easy to create using border-radius. In this article I share the common fixed-width code along with my responsive CSS circles, which may include text. The downside of all CSS circles is that they don't work on IE8 and below because of lack of support for border-radius. If looking for fixed-width or responsive circular buttons, take a look at CSS Round Buttons.
Fixed width CSS circles
Fixed width CSS circles are very easy to implement. Set border radius equal to 50% of the width of a square box:
Fixed width CSS triangles can be created easily by specifying two transparent borders and a colored border to a zero width and zero height element. Creating variable width triangles for responsive designs is not straightforward because CSS accepts border widths in pixels only. I came accross this issue recently while working on making my jQuery color picker plugin responsive.
I came up with a simple solution that uses two divs or one div and a pseudo-element to create responsive CSS triangles. Both consist of a large fixed width triangle that is covered/uncovered according to width, effectively faking responsiveness. Partially covering/uncovering the triangle makes it keep its proportions.
Now, to the code. The following are up, down, right and left pointing CSS triangles. The code is presented for both the one and two div versions. The logic used is exactly the same for both. Using two divs makes these pure CSS triangles compatible with IE7, which does not support pseudo-elements. I set up a JSFiddle for playing around with the two-div triangles: jsfiddle.net/josedvq/xEGM4 and one div triangles: jsfiddle.net/josedvq/3HG6d.
Note: For the triangles to work properly box-sizing should be set to content-box (the CSS default). Add this rule to the triangle's class if necessary.
Up-pointing CSS triangles
The following triangle is set to take 25% of the width of its container. Resize it to see the triangle in action.
Note: this article is based on the article in spanish: Drivers (XP) Toshiba A215-SP5816.
The Toshiba Satellite A215-SP5816 drivers are not available from Toshiba's website as this is an old laptop. I'm posting them here as separate downloads and also as a complete driver pack. The drivers may also work for other Toshiba A210/A215 laptops. All are tested and working on Satellite A215-SP5816 under Windows XP.
The C Puzzles by Gowri Kumar are fifty C language programs meant to be compiled, run and explained. It's a great resource for those who are learning C. You'll learn the most if you use this post to compare with your own answers.
I took the time to understand and answer the first 25 problems. I'm not a C programmer (just know the basics) but did my best to explain each program both from my knowledge and googling for answers. Don't believe these are the correct answers as they may in fact be wrong. Most of the C puzzles answers may be found on different forums and Q&A sites but were not gathered on a single place before. Hope it helps. Please leave feedback and let me know any errors you find using the comments at the end of the page.
In this article I explain a choice of parts for building a quad-core desktop PC using the AMD A8-6600K APU. If you are here just for the part list see Review.
AMD APUs offer great benefit at low cost by integrating CPU and GPU on a single chip. It's a great deal for those who want a budget PC for everyday tasks and even capable of some discrete gaming. The third (latest) generation AMD A8-6600K Processor is a 4.3GHz quad core processor that costs $105. It integrates a GPU marketed as Radeon HD8570D though it's not comparable to "real" HD8000 GPUs. The socket is FM2, for which there are plenty of motherboards, most at low cost.
This article presents a nice choice of parts around the A8-6600K to build your own PC for $350, roughly the price of a just a high end processor. It's in no way a gaming PC but this APU does offer enough power for playing new games at low-medium settings. To get an idea of what the integrated GPU is capable of see Can AMD's Newest APU Play Your Favorite Games Without A Dedicated Graphics Card? .
Note: this article is a translation of the article in spanish: Driver Sabrent 6-Channel 5.1 PCI Windows 7 64 bits.
The Sabrent 6-Channel 5.1 PCI sound card may give a lot of trouble when installing it on Windows 7 x64. I'll share the steps I took to make it work.
The official Sabrent 32 bit driver for Windows 7 may be found here. However, this driver is not compatible with Windows 64. There are two solutions. The one given by Sabrent's technical support is to install the Windows Vista 64 bit driver. Download it from adf.ly/K1t8E.
A lot of people reported errors using this driver. If this is your case, the second option is to use the Aureon 5.1 unofficial driver:
- Download and extract Aureon 5.1 PCI driver: adf.ly/K1tSY
- Uninstall any previous driver using Windows Device Manager (right click on Computer, then Properties and Device Manager). Then restart the computer. Make sure that the driver was removed.
- Go to the extracted folder and run Setup.exe to install the driver.
- The last step is configuring the sound card. Remember that there are two input channels and six outputs.
Icarus Verilog is a Verilog standard IEEE-1364 compiler that targets Linux but works almost as well on Windows. It's lightweight, free software and includes a virtual machine that simulates the design. This tutorial goes through the process of downloading, installing and using Icarus Verilog to write a simple program, compile it, simulate it and view the simulation results on a timing diagram. It assumes no previous knowledge on Verilog, but prior programming experience is recommended.
Installing Icarus Verilog
Download Icarus Verilog latest stable release for Windows from: bleyer.org/icarus
Installing Icarus Verilog is as easy as installing any other Windows program. Just hit next, but be sure to select GTK Wave (full installation) and "Add Executables to Windows Path" option. You should be able to use it from a Command Prompt by now. On Windows Vista/7/8 press Windows key and type cmd to open a command prompt. Just type "iverilog" and you should get a message saying "iverilog: no source files" and some instructions. Type "gtkwave" and the GTKWave GUI should open. This program is used to view the simulation results graphically on a timing diagram.
CodeIgniter helpers are groups of utility functions you may need anywhere in your code. CodeIgniter has more than 20 helpers. You may be familiar with the URL, email, form or file helpers. These have functions that simplify common tasks when working with URLs, emails and files.
Whenever you feel the need to add a function to a view (which is not a good practice) it may be time to extend a CodeIgniter helper or create your own helper. For example, formatting dates directly in the view can get tedious and you may be repeating lots of code. This is specially true if you need to show time in some special, non trivial way, like showing time elapsed. In this case extending or creating a helper might be the best choice.