Posts

Showing posts from 2015

Designing for the Color Blind

Image
via: http://webaim.org/articles/visual/colorblind#designing other sources: Designing maps for the colour-vision impaired Bernhard Jenny and Nathaniel Vaughn Kelso Bulletin of the Society of Cartographers SoC, 41, p. 9-12, 2007. Low resolution PDF  (174 KB) Color Design for the Color Vision Impaired Bernhard Jenny and Nathaniel Vaughn Kelso Cartographic Perspectives, 58, p. 61-67, 2007. Low resolution for screen reading  (706 KB) High resolution for print  (20.3 MB) Visual Disabilities Color-blindness You are here: Home  >  Articles  >  Visual Disabilities  > Page 4: Color-blindness Article Contents Page 1:  Introduction Page 2:  Blindness Page 3:  Low Vision Current page: Page 4: Color-blindness Types of Color-blindness Red-green deficiencies Other deficiencies Designing for Color-blindness Key Concepts Types of Color-blindness Before getting into the details of the types of color-blindness, you should know that the following explanations are

!function in javascript

JavaScript syntax 101. Here is a function declaration: function foo () {} Note that there's no semicolon: this is a function declaration; you need a separate invocation of  foo()  to actually run the function. On the other hand,  !function foo() {}  is an expression, but that still doesn't invoke the function, but we can now use  !function foo() {}()  to do that, as  ()  has higher precedence than  ! . Presumably the original example function doesn't need a self-reference so that the name then can be dropped. So what the author is doing is saving a byte per function expression; a more readable way of writing it would be this: ( function (){})();

Understanding JavaScript Promises

via: https://spring.io/understanding/javascript-promises Understanding JavaScript Promises A promise represents the eventual result of an asynchronous operation. It is a placeholder into which the successful result value or reason for failure will materialize. Why Use Promises? Promises provide a simpler alternative for executing, composing, and managing asynchronous operations when compared to traditional callback-based approaches. They also allow you to handle asynchronous errors using approaches that are similar to synchronous  try/catch . Promise States A promise can be in one of 3 states: Pending - the promise’s outcome hasn’t yet been determined, because the asynchronous operation that will produce its result hasn’t completed yet. Fulfilled - the asynchronous operation has completed, and the promise has a value. Rejected - the asynchronous operation failed, and the promise will never be fulfilled. In the rejected state, a promise has a  reason  that indicates wh

Front End Interview Questions

via: h5bp.github.io/Front-end-Developer-Interview-Questions Front-end Job Interview Questions This file contains a number of front-end interview questions that can be used when vetting potential candidates. It is by no means recommended to use every single question here on the same candidate (that would take hours). Choosing a few items from this list should help you vet the intended skills you require. Note:  Keep in mind that many of these questions are open-ended and could lead to interesting discussions that tell you more about the person's capabilities than a straight answer would. Table of Contents General Questions HTML Questions CSS Questions JS Questions Network Questions Coding Questions Fun Questions Getting Involved Contributors How to Contribute License General Questions: What did you learn yesterday/this week? What excites or interests you about coding? What is a recent technical challenge you experienced and how did you solve it? Wh

ID abd Class

ID's are unique Each element can have only one ID Each page can have only one element with that ID Classes are NOT unique You can use the same class on multiple elements. You can use multiple classes on the same element. ID's have special browser functionality If you have a URL like http://yourdomain.com#comments, the browser will attempt to locate the element with an ID of "comments" and will automatically scroll the page to show that element. It is important to note here that the browser will scroll whatever element it needs to in order to show that element, so if you did something special like a scrollable DIV area within your regular body, that div will be scrolled too.