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

SEARCH KEYWORD -- property



  this keyword in Lambda expression in Java 8

Since the release of Java 8, people are excited to see a big feature added to this language which is existing in other languages for a long time -- Lambda expression. The introduction of lambda expression in Java 8 gives people an easy way or a vertical to horizontal way to solve problems. There are many posts on the Internet which shows how to use lambda expression in Java, such as Lambda Quick Start and Java 8 Lambda Expressions Tutorial with Examples. In this post, we will only focus on the t...

   THIS,LAMBDA EXPRESSION,JAVA 8     2014-06-01 03:57:05

  Android create button tutorial

This tutorial assumes that you already have an activity and are using an XML layout. Open the layout XML and add the button element.  Assign an ID with the “@+id” operator.  The + tells Android to generate an ID for this element so that you can reference it in your Java files. This is an example. Your layout and text elements will probably be very different. In this example case, the ID of the button is “close”. <Button android:id="@+id/close" android:lay...

   Android,Simulator,Button,XML,Tutorial     2014-11-07 08:30:10

  The Anatomy of a Perfect Web Site

Many sites on the web are good. They are well-designed, clear, have great information architecture and are easy to navigate. Often, web designers emphasize the “design” part too much, and neglect the other equally important things. However, there are sites which aren’t that aesthetically pleasing, but still are the best sites in the world. They may look like a big, sad bag of wrestling underwear on the outside, but their underlying user experience is really, really refine...

   Website,web design,Anatomy,Interaction,Feature     2011-11-08 09:00:34

  File System vs Core Data: the image cache test

Code for this project is on GitHub While doing a full re-write of Droplr's iOS app for the 2.0 launch, I couldn't find any good file/image caches out there had a particular feature I really wanted: extending item expiration whenever it's touched. I set out to write my own — which wasn't that much of a challenge — but somewhere along the process I had this crazy idea that perhaps (SQLite-backed) Core Data would be a much better tool for the job: No mismatch between cache index ...

   File system.Image cache,Multimedia     2012-02-01 08:52:02

  Siri in Practice

Some quick comments on using Siri in practice—for things other than asking it to open the pod bay doors. Siri’s voice recognition is very impressive, and the scope of what it understands is very good given the difficulty of what it’s doing. But it has a lot of trouble with certain sorts of names—Irish names, for example, which often are not written as pronounced. For example there are a lot of people in Ireland named “Aoife”—it’s a very popul...

   Siri,Apple,Practice,Artificial Intelligence,AI     2011-10-15 15:01:13

  Put Your HTML in a Box

In the first article in this series, I walked through the basics of cascading style sheets (CSS) and showed how CSS can make your code easier to maintain. CSS allows you to keep your presentation rules separate from your content, and I showed you some of the benefits this separation provides. In this article, I’ll move forward with CSS and describe how to position elements on a page.The first step in understanding how to position elements is to understand the fundamental model of CSSâ€...

   HTML,Box,Div,Container,Format     2011-08-19 08:22:58

  JavaScript to open link in new window without being popup blocked

To ensure security and reduce spamming, modern browsers have implemented very strict rules on when a new window can be opened in a web page. Currently browsers restrict that any new web page to be opened in a new window must be initiated with an user action. The action is usually an user click event. Otherwise, a popup blocker would show on the browser address bar which indicates that something is blocked. To workaround this issue, normally you should implement the window open logic in a click e...

   JAVASCRIPT,IFRAME,NEW WINDOW,OPEN LINK     2018-09-22 04:29:30

  An Object is not a Hash

Following my article A String is not an Error, I want to bring attention to an issue that similarly applies to JavaScript in general, but has special relevance in the Node.JS environment. The problem boils down to the usage of {} as a data-structure where the keys are supplied by untrusted user input, and the mechanisms that are normally used to assert whether a key exists. Consider the example of a simple blog created with Express. We decide to store blog posts in memory in a {}, indexed ...

   Object,Hash,Node.js,JavaScript     2012-01-19 10:16:10

  CSS3 animation vs CSS3 transition

Both CSS3 animation and CSS3 transition can be used to transition an element in a webpage. They can be used to transition some CSS properties within a given period of time. They have many similarities. They do have a few differences as well. So an user needs to understand the differences between them in order to better use them in different scenarios. First, let's see an example on how to change the width of a div from 100px to 200px within 2 seconds when hovering on it. With CSS3 animation , th...

   CSS3 animation,CSS3 transition, Difference     2015-06-15 08:46:39

  Efficiency of code execution

If you want to optimize your program codes, you need to find their Hotspot, i.e, the codes which are executed most frequently. If you can optimize this portion of codes a bit, you may gain much improvement of your code efficiency. Here I give you three examples about efficiency of code execution.1. PHP's Getter and Setter (From Reddit)This example a quite simple, you can skip it if you want.Consider the code below, we can find it's slower when we use Getter/Setter method to read a member variabl...

   Code, Efficiency,Analysis,Trick     2012-07-13 10:59:21