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

SEARCH KEYWORD -- View



  Add ContextMenu to a customized View in Android

In Android, we may sometimes need to add ContextMenu to a View, it's not so easy to add ContextMenu to a customized View. Here we explain how to add ContextMenu to a customized View. First, we may need to create View.OnCreateContextMenuListener so that the customized view can register for it. Here is the class definition: public class GraphView extends View {     private View.OnCreateContextMenuListener vC = new View.OnCreateContextMenuListener() {       &...

   Android, ContextMenu,Customized view     2012-11-04 07:10:40

  JavaScript to scroll element into view

In AJAX applications, there are frequent needs to scroll some element into view after some modification to the page. For example, after adding an item or updating an element in an admin panel, the page may need to be scrolled to the item added or updated so that we can see the changes immediately. In these cases, JavaScript can be used to scroll the element we want to show. In Vanilla JavaScript, there is no built-in function which can achieve scroll_element_into_view(), but most of modern brows...

   JAVASCRIPT,JQUERY,SCROLLTO,HOW-TO     2015-12-17 03:47:32

  Hide a file in a picture

Sometimes if you want to hide some important files on your computer which you don't want others to see, how would you do that? Find a professional tool? Set password for some folders? Change the file properties to hidden? They are possible, but they may not be so convenient or so secure. Here we share with you how to hide a file in a picture. Prerequisites 1 picture for example : test.jpg 1 test file, for example : test.txt WinRAR Steps Prepare the picture test.jpg and test file test.txt Use ...

   Trick,Picture,Fil hiding,WinRAR     2012-09-13 19:36:36

  Windows Control panel mail icon

The exact location depends on your version of Windows and your layout settings of Control Panel. If your Control Panel is in the classic layout, you should see the Mail applet directly in the list of icons. For a 64-bit version of Windows Vista, the icon would be listed in the “View 32-bit Control Panel Items” section. If your Control Panel is in category view you can find the Mail applet in; Windows XP: User Accounts Windows Vista: User Accounts Windows Vista 64-bit: Additional O...

   Windows,Control panel,Mail icon,Outlook     2011-04-26 06:15:05

  Learning Is More Important Than Knowing

Although DuckDuckGo's success is based more on ideology than technology, you'd have to be a pretty arrogant technologist to not appreciate and be impressed with what this small team (for a long time, 1 person) has accomplished. And while DuckDuckGo teaches us a number of valuable lessons (about business, and privacy), to me, the most important, is that good programmers should be measured by what they can learn, not what they already know. Gabriel Weinberg, DuckDuckGo's creator, has been wo...

   Learning,Knowing,Google,DuckDuckGo     2012-04-18 07:17:53

  Browse OpenJDK Java source code in Eclipse

Java 8 was recently released, many developers are now trying to extract the source code of Java 8 to find out how the new added features such as Lambda expressions, default method in interfaces, new Time API are implemented. How do you manage to download and browse the source code? Today we are going to show how to extract OpenJDK Java source code to Eclipse. Since OpenJDK is adopting Mercurial as its distributed version control system, you need to install Mercurial on your computer first before...

   OpenJDK,Java 8,Source code,Eclipse     2014-06-16 00:53:34

  Android socket programming example

Socket is a kind of interface for different sides t communicate, it usually identified by an IP and a port. There are many server side software on a server and they would provide different service. Each server many create some sockets and bind them to some ports so that clients can listen to. Software on the Internet will exchange data though a bidirectional connection established. Each end of the connection has a socket created. In Java, Socket and ServerSocket are in java.net package, ServerSo...

   Android,Socket,Java     2013-05-11 22:17:16

  What is Asian UI design like from a Western point of view?

From a western point view, Asian UI designs are usually quite dense and compact. People in Asia are think more in detail when they start design something. They think these designs have following characteristics Dense tightly packed text Tiny low-quality images More columns than you can count Bright clashing colours and flashing banners Overuse of outdated technologies like Flash While the Western design is much simpler. They are treating the design as a whole, so usually we will see some quite...

   UI design,Western,Asian     2014-04-28 06:52:22

  JavaScript's Two Zeros

JavaScript has two zeros: -0 and +0. This post explains why that is and where it matters in practice. The signed zero Numbers always need to be encoded to be stored digitally. Why do some encodings have two zeros? As an example, let’s look at encoding integers as 4-digit binary numbers, via the sign-and-magnitude method. There, one uses one bit for the sign (0 if positive, 1 if negative) and the remaining bits for the magnitude (absolute value). Therefore, -2 and +2 are encoded as f...

   JavaScript,zeros     2012-03-24 05:21:49

  JavaScript showModalDialog method

In JavaScript, showModalDialog()  method creates a simple modal dialog box which is a simple html page but when a modal dialog opens, user can't switch to another page until it closes the modal dialog box. Syntax:  window.showModalDialog( url, arguments, feature options); Where url is the URL of page which is to be opened in modal window and arguments are those arguments which we are passing to the modal window and feature options are the attributes set for the modal windo...

   JavaScript,JS,showModalDialog,Example     2011-07-27 10:51:47