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

SEARCH KEYWORD -- Static document



  static nested and non-static nested class in Java

Nested classes are divided into two categories: static and non-static(inner). Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes. Static class can be defined as : class OuterClass{ static class StaticNestedClass{ //OTHER STUFF } } Static nested classes are accessed using the enclosing class name: OuterClass.StaticNestedClass For example, to create an object for the static nested class, use this synta...

   Java,static nested class,inner class     2014-04-23 07:11:44

  Source code for sharing webpage to facebook

Copy and paste the following code blocks into your site and replace '<url>' with the link you want to Share.Text link:<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank...

   Source code,Facebook,Share,Webpage     2011-07-23 06:52:07

  Canonicalize XML in Java

XML canonicalization is often used when there is need to create digital signature to be sent to peers for verification. Since digital signature is created based on XML data, the XML data has to be canonicalized before its signature value can be calculated. Even an extra space may affect the signature value calculated, hence it must follow some rules to canonicalize the XML data so that it has a standard format. This is why W3C created specification Canonical XML Version 1.1. This specificat...

   JAVA,XML,JAVA SECURITY     2016-01-20 01:39:45

  Configure static IP for Linux

When a Linux server is running, it has to have an IP so that other machines can talk to it. It is often desired that the server would own a static IP so that every time other machines want to connect to it, the same IP address would be used. This is extremely useful when there are virtual machines installed on a host machine where the virtual machine would start and stop now and then.  To configure static IP address for a Linux server, the /etc/network/interfaces needs to be updated. Assumi...

   LINUX,NETWORK,STATIC IP,DNS     2017-07-08 08:39:58

  Add page number anywhere in word document

Have you ever frustrated when you want to add page number in a Microsoft word document start from page 2 or later. The way to ease you is to add sections to the word document in which page you want to add page number. The procedures are (in Word 2007) :1. Goto Page Layout->Breaks->Section breaks.2. In Section Breaks zone, you can choose Next Page and some others way to set sections.3. Then when you want to add the page number into next section. Go to Insert->Page Number->Format ...

   Office 2007, Word, Page number, Section,     2011-04-08 04:00:53

  Convert HTML to DOM elements using JavaScript

In some cases, one would want to convert a HTML string to the DOM elements so that JavaScript can handle them easily. This is frequently used when one get some data from third party APIs where the data is in HTML format. In JavaScript, there are a couple of ways one can use to convert HTML to DOM elements. DOMParser document.createElement DOMParser DOMParser can parse XML or HTML source stored in a string into a DOM Document. After the conversion, the normal JavaScript call of h...

   JAVASCRIPT,DOMPARSER,DOCUMENT.CREATEELEMENT,HTML,DOM     2017-08-18 22:51:46

  Tips of Drafting an R Markdown Document

When presenting the data summary and exploratory analysis, we used to copy a lot of tables, charts from Rstudio to PowerPoint, which makes the presentation preparation painful. It becomes essential for data scientists to make use of better reporting tools, such as R markdown, Jupyter notebook to prepare the analysis presentation in a more efficient and organized way. Of course, we want this to be reproducible! In this post, I would like to share some tips of using the right tools to draw tables,...

   R PROGRAMMING     2020-11-01 23:09:45

  CSS DIV position analysis

When using CSS to set the position of DIV, we may often get confused with the 4 position properties : static, relative, absolute and fixed. If we don't understand them correctly, we may often get unexpected result. Here we make some analysis to them.The definitions of these 4 properties:static : The default position property. It has no position actually. The element will appear where it should be (top, bottom, left, right or z-index has no use here)relative : This one will position relati...

   CSS, DIV,position,relative,absolute     2013-01-29 03:23:57

  Recursive class initialization in Java

When a Java class is referenced and initialized, it has to go through the loading and linking first. Once the loading and linking complete successfully. The class will be initialized. The static variables and constant variables will be initialized during this process. Once the class is initialized, it is ready for use. If when class A is initialized and it is referencing a class B, the class B will also get initialized. But what will happen if class B is referencing class A as well? This is call...

   Java,JVM,class initialization,static final     2015-04-15 21:04:29

  Understand this in JavaScript

In JavaScript, this is always pointing to the owner of a function or a method. Function Let's check out function first. function introduce() {      alert("Hello, I am Laruence\r\n"); } For this function, what does this point to? In JavaScript, a global function's owner is the current page, i.e, the window object. Because its a method of the window object if we define a global function. Now you should know the this will point to the window object in the above function. ...

   JavaScript,this,event,call     2013-04-03 04:10:03