Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- pseudo-element



  Going Fullscreen with Canvas

As notes in the Release Notes, Firefox Aurora introduced the Fullscreen API. This means that it will appear in the release version of Firefox in about 3 months.This is one of several features that will be fantastic for games on the web. Other exciting APIs are theGamepad, Canvas, and Audio. Some of these APIs still need work to be suitable for real-time games, but it’s a great time to be involved in building games for the web.I wanted to try out the Fullscreen API so I...

   HTML5,Canvas,Full screen,2D,Drawing     2011-11-22 08:37:23

  Advanced event registration models

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated. W3C and Microsoft have both developed their own event registration model to replace Netscape’s traditional model. Though I’m not impressed by the Microsoft model, W3C’s is very good, except for one crucial vagueness. Unfortunately few browsers support it at the moment. W3C W3Cââ‚...

   JavaScript,Event model,this,bubble,capturing     2011-12-27 09:20:44

  Show Bootstrap tooltip in AngularJS ng-repeat elements

In contemporary web application development, many front-end frameworks have been used to accelerate the speed of development and circumvent browser compatibility issues. Among them, AngularJS and Bootstrap are two frequently used.  AngularJS is a MVC JavaScript framework developed by Google to provide easy synchronization between user view and data model. While Bootstrap is developed by Twitter and it eases the work of designing a simple and concise UI without much manual design work ...

   BOOTSTRAP,ANGULARJS,TOOLTIP,NG-REPEAT     2016-05-21 10:52:02

  Some tricks and tips for using for range in GoLang

GoLang provides two major ways to loop through elements of array, slice and map. They are for and for range. Many people find that for range is very convenient when don't care about the index of the element. In this post, some tricks and tips would be talked about regarding for range. 1. Loop and get pointer of each element Assume there is a code snippet like below which is to get the pointer of each element in an array and create a new array with the corresponding pointer. arr := [2]int{1, 2} r...

   POINTER,FOR LOOP,GOLANG,FOR RANGE     2020-03-08 01:07:00

  3 ways to remove duplicates in List

Frequently, we may have an ArrayList which stores many values, and we need to process the ArrayList and get what are the distinct values in the list, or we may want to count occurrence of each value in the ArrayList. We can remove the duplicates in a few ways. Here we propose 3 methods :     public static void main(String[] args){        //SuperClass sub=new SubClass();                String[...

   Java,List,Duplicate,Clear     2012-09-03 09:44:32

  Cool HTML5 matrix effect

Do you still remember the movie The Matrix? Do you still remember the cool matrix effect in that movie? How is that effect achieved? Shaun Dunne shared a piece of HTML5 code which displays a cool matrix effect. The matrix demo can be found here. Below is the code which he achieves this effect: with var s = window.screen; var width = q.width = s.width; var height = q.height = s.height; var letters = Array(256).join(1).split(''); var draw = function () { q.getContext('2d').fillStyle='rgba(0,0,...

   Matrix,HTML5     2013-08-14 08:03:34

  CSS Selector for Web Scraping

Creating a web scraper is no easy task. This is because it requires precision to identify the specific data points that we intend to collect for the end goal we are working towards.  Whether we are looking to create a marketing content database or analyze market trends, the last thing we need from our scraper is for it to return a lot of unnecessary data that will not help our cause. To avoid the inconvenience of going through huge amounts of data to get what we requested, it is crucial to ...

   CSS,WEB DESIGN,SELECTOR     2023-02-20 07:32:53

  Build Hadoop environment in Linux

Hadoop standalone installation: 1. Install JDK Install JDK with below command: sudo apt-get install sun-java6-jdk Configure Java environment, open /etc/profile, add below contents: export JAVA_HOME = (Java installation directory) export CLASSPATH =".:$JAVA_HOME/lib:$CLASSPATH" export PATH = "$JAVA_HOME/:PATH" Verify installation of Java Type java --version, if it outputs Java version information, then Java is successfully installed. 2. Install SSH Install SSH with below command: sudo ...

   Hadoop.Linux,Configuration     2013-07-31 23:22:27

  Why exception would be thrown when deleting element while looping through HashMap in Java

HashMap and other Collection types are frequently used in Java application programming. This post will explain why exception would be thrown when deleting element with Map.remove() while looping through a Map using Iterator. This issue would also occur to other Collection types such as Set, List. Below is a sample code snippet demonstrating the exception thrown. Map<String,String> map = Collections.synchronizedMap(new TreeMap<String,String>()); map.put("key1","value1"); map.put("ke...

   JAVA,HASHMAP,CONCURRENTMODIFICATIONEXCEPTION     2018-06-30 12:49:09

  Understanding an interesting JavaScript map function question

With the evolvement of JavaScript, lots of new features have been added this old but robust language.  Among them are lots of functional programming language related functions like map, filter, each etc. In this post, we will cover one function map and its interesting behavior. Before dive into the details, let first take an example, do you know the output of below function call? ['1', '7', '11'].map(parseInt) You may think that it's easy and the output would be [1, 7, 11] Can you try to ru...

   JAVASCRIPT,MAP,FUNCTIONAL PROGRAMMING     2019-06-14 08:34:46