Posts

Showing posts from July, 2019

Google Chorme Extension is so fun for discovering

Image
Most of the people use google chrome today. So I want to show you how to create an Gooogle Chrome Extension to do something that you want. This extension is used to capture the username and password when users login on Facebook page So all what I get to do is below Step1: Create  your own folder named your_extension Step2: create a file named manifest.json this file is used to describe all about your extension such as Name version description permission that your extension want to access like network, storage .... Background script: Scripts run in background Action page: html for display in your extension .... Icon: Icon of your extension ........ manifest.json { "manifest_version" : 2 , "name" : "My Cool Extension" , "version" : "0.1" , "description" : " Demo extension" , "permissions" : [ "activeTab" , "storag...

Integer vs int in java

Is there anything interesting between them. If you are a Junior Java developer then maybe it is fun. If you are a Senior Java developer then maybe it is also funny for you If you are a Profesional Java Developer then maybe it is not excited Anyone try to run this block code public static void main (String[] args) {         Integer x = new Integer( 1 ) ;         int y = 1 ;          if (x == y) {             System.out.println( true ) ;         } else {             System.out.println( false ) ;         } }                ---> It is clearly: true public static void main (String[] args) { ...

Memory leak in XDocReport version 2.0.1

Image
This is one of my interesting tasks that I have been assigned in my company. When I arrived my workplace about 2 weeks. My leader gave me a task which would fix the issue existed since 3 years.(I dont knew this :-) then I think it is a simple issue and very excited with this task) All I know about this issues is that it is a restful webservice built by Java and  running in Tomcat. It  always stops working after running 3 4 working days. And Catalia logs throw "Out of heap memory". So I wondered that what caused this exciting issues. I thought that if I fix it completely then I will got an unforgettable memory in my life. The first step: Get all source code and run it in my localhost to see what happened The is no thing happened. :-( . Then I watch the source code carefully and I saw a synchonized block code in a service. I thought that it can caused this issue when so many Request call this service at the same time. Then I use Jmetter to call about 500 request in a p...