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

SEARCH KEYWORD -- Body



  No support of $.browser in jQuery 1.9

Starting from jQuery 1.9, $.browser is no longer supported to detect the nrpwser type and version. The substitute is $.support. In the newer jQuery 2.x versions, IE 6/7/8 are also not supported. If users want to support IE 6/7/8, they must use jQuery 1.9. If you want to fully support IE and want to use jQuery 1.9 and jQuery 2.0, the official solution is: <!--[if lt IE 9]> <script src='jquery-1.9.0.js'></script> <![endif]--> <!--[if gte IE 9]> <script src=...

   jQuery,$.browser,$.browser.version     2013-08-27 03:10:12

  How to draw pentagram in HTML5 canvas

I wrote simple function to this magical symbol I like so much: 123456789101112131415161718192021222324252627282930<!doctype html><html><body>    <canvas id="c" width="500" height="500"></canvas>    <script> var ctx = (document.getElementById("c")).getContext("2d"); // draws rotated pentagram with or without cirlefunction pentagram( ctx, x, y, radius, rotate, circle ){    ctx.beginPath();&nbs...

   Html 5,Canvas,pentagram     2012-04-23 12:56:06

  Update parent window after closing the window opened by window.open()

Imagine we have a webpage which has a text field to let user enter a date. Usually, we may create a calendar window to ask the user to pick one date from the calendar window, when the date is picked, the calendar window will close and the date picked will be put into the text field. This way involves the window.open() method in JavaScript, and we may think how the opened window knows its parent window and then updates the parent window. I give a simple demo on this.We have two pages, on is the p...

   window.open, JavaScript,update, return value     2012-06-23 01:36:32

  HTML5 Web Worker

Web Worker is a JavaScript multithreading solution provided by HTML5. we can put some compute intensive codes into Web Worker and it will not hang the user interface. 1. How to use Web Worker Web Worker's basic mechanism is to use Worker to load a JavaScript file to create a new thread in JavaScript's main thread. It will not block other thread's execution and will provide a data exchange interface between main thread and new thread : postMessage() and onmessage. Let's look at an example: //work...

   JavaScript,HTML,Web Worker     2012-12-02 06:25:00

  Will camera be Android's next target after smartphone and tablet?

In Samsung's Mobile Unpack conference, Samsung announced one Android smart camera which supports 3G, 4G and Wi-Fi. This smart camera called Galxy Camera is equipped with the latest Android 4.1 system, 21 times zoom, 23mm ultra-wide-angle lens and 16 megapixel back-illuminated CMOS sensor, along with the OIS image stabilization technology. You can install various Android applications on this smart camera and edit photos and then share, it also comes with voice control function and cloud storage ...

   ILDC,Smart camera,Samsung,Android     2012-08-30 19:52:02

  Cleansing data with Pig and storing JSON format to HBase with Pig UDF

Introduction This post will explain you the way to clean data and store JSON format to HBase. Hadoop architect experts also explain Apache Pig and its advantages in Hadoop in this post. Read more and find out how they do it. This post contains steps to do some basic clean the duplication data and convert the data to JSON format to store to HBase. Actually, we have some built-in lib to parse JSON in Pig but it is important to manipulate the JSON data in Java code before store to HBase. Apache Pig...

   JSON,HADOOP ARCHITECT,APACHE HBASE,PIG UDF     2016-06-10 01:13:41

  JavaScript Needs Blocks

While reading Hacker News posts about JavaScript, I often come across the misconception that Ruby’s blocks are essentially equivalent to JavaScript’s “first class functions”. Because the ability to pass functions around, especially when you can create them anonymously, is extremely powerful, the fact that both JavaScript and Ruby have a mechanism to do so makes it natural to assume equivalence. In fact, when people talk about why Ruby’s blocks are different ...

   JavaScript,Block,Style,Format,Maintainebility     2012-01-11 11:59:35

  IE ActiveX(”htmlfile”) Transport, Part II

In my last post I discussed using the ActiveX(”htmlfile”) technique to provide a usable streaming transport in Internet Explorer. The solution I provided will work, but since writing the last article I’ve made significant progress in understanding why IE behaves the way it does with respect to the streaming transport. The previous solution amounted to creating an array of messages, pushing messages on that array from the htmlfile iframe, and popping messages off of the array i...

   IE,Http,Streaming,htmlfile,Transport,Act     2011-09-05 04:07:02

  Finding selected checkbox items in a JSF dataTable

This is one of those problems that I couldn’t find a complete example for when I needed it, so hopefully this will save somebody else the extra time it took me to piece it together. We frequently need to have data tables in our UI, and allow the user to select a subset of those items for action. In JavaServer Faces, this means having a DataTable, each row having its own checkbox. But when the action is triggered, how to we find which items the user has selected. The first step is to ...

   JavaServer Faces,JSF,Datatable,Checkbox,Example     2012-01-03 03:02:46

  HTML Email Guide

Many of us may subscribe to some newsletters to get update about their site or information about a topic such as JavaScript Weekly, we may receive an email every week or every month to know what's happening there. The email we receive is just a simple HTML page but with an Email format called HTML Email. It seems it's simple to write this kind of HTML Email. But the thing is it's not so easy. It takes much effort by just designing an Email template. Whether the HTML Email can be displayed norm...

   HTML Email,Guide     2013-06-16 03:38:36