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

 ALL


  The danger of target=_blank and opener

When want to open a new page in a new tab on clicking a link on a page, the usual way of achieving this is to use target="_blank" property in a tag. However, the use of this leaves space for phishing website.Backgroundparent and openerBefore talking about the opener object, let's know a bit about parent object when using iframe. HTML provides a parent object which is used to communicate between the parent page and the embedded iframe element. This parent object can be accessed using window.parent. Similar to parent, opener can be used to access the window element of the page which op...

38,961 2       REL NOOPENER TARGET BLANK HTML REL NOREFERRER


  Loading images progressively using Gaussian blur

The popular online publishing platform Medium has adopted an impressive image loading mechanism -- pure color - blur image loading - real image loading.Since images on Medium usually have high definition, it takes much time to load an image and hence brings a bad user experience if rendering the image after it's completely downloaded. The solution Medium comes out is to preload an small image when the real image is being loaded. On Medium, the HTML code will have below pattern for every page.<figure name="512a" id="512a" class="graf--figure graf--layoutCroppedHe...

38,286 1       JAVASCRIPT ALGORITHM GAUSSIAN BLUR MEDIUM BLUR IMAGE


  Check file readability in Java

File operation is quite platform dependent. Although Java is a cross platform programming language, the file operation in Java is also platform dependent. The obvious evidence is the file permission check. In Java, we can call canRead(), canWrite() and canExecutable() to check whether the program can read, write or execute the file specified. However, on Windows, when we call canRead() on a File object, we may get unexpected result.Actually, on Windows, when we call canRead() on a File object, we will always get the true returned even if we have denied the read access to the file. There is als...

38,118 0       JAVA READABLE CHECK FILES


  What is pjax and why we should use it?

What is pjax?Now many websites such as Facebook, Twitter support one browsing style which is when you click one link on their sites, the page will not be redirected, instead only the page contents are updated and URL on address bar is changed. This kind of user experience is much better compared to load the whole page with a blink.There is one important component in the above browsing experience, these websites' AJAX refresh support browser history, when refreshing the page, the address on the address bar will also get updated, and when we click back button we can go back to the previous page....

38,016 0       AJAX HISTORY PJAX


  Install and configure git plugin in Eclipse

When developing using IDE, it's always a good experience if everything can be done in the IDE including development, testing and version control. This also applies to Eclipse. In this post, we will show the process of installing and configuring git plugin in Eclipse. The pre-requisite is that you have git installed on your local machine. The detailed steps for installing and configuring git plugin are below.1. Installing Git pluginInstall using "Install New Software..." menu. a. Click Help -> Install New Software...b. Click Add... and add below informationName: EgitLocation:&...

37,248 0       GIT PLUGIN GITHUB ECLIPSE


  Create animated refresh button in Android

In Android, we can have drawings on a button, also we can put animated drawings on a button as well. Today we will show how to create an animated refresh button with an animated spinner on it.We need to create an animated drawing first. Here we name it as progress.xml and put it in the res/drawable folder:<?xml version="1.0" encoding="utf-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/spin_refresh" android:oneshot="false">    <item android:drawable="@drawable/ic_action_refresh1" android:duration="4...

36,150 3       ANDROID ANIMATION SPINNER REFRESH BUTTON


  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.DOMParserdocument.createElementDOMParserDOMParser can parse XML or HTML source stored in a string into a DOM Document. After the conversion, the normal JavaScript call of handling DOM elements can be used, like getting element by id or using selectors.For example, assuming there...

35,672 1       JAVASCRIPT HTML DOM DOMPARSER DOCUMENT.CREATEELEMENT


  Different types of keystore in Java -- Windows-MY

Windows-MY is a type of keystore on Windows which is managed by the Windows operating system. It stores the user keys and certificates which can be used to perform cryptographic operations such as signature verification, data encryption etc. Since it's a kind of native keystore, Java doesn't have a general API to access it.To help Java applications access the keys and certificates stored in Windows-MY keystore, Java provides a separate API -- SunMSCAPI. The SunMSCAPI provider is layered on top of CAPI and helps Java platform applications access CAPI cryptographic services using ...

35,238 6       JAVA KEYSTORE WINDOWS-MY SUNMSCAPI