Recently came accross a legacy code which had a lot of css code and files, which was written over years and most of it was obsolete. Dust-me, firefox plugin helped to figure out all the unused css code. Though I had to traverse all possible flows in the application, but end result was good as few files were identified which were not being used completely and were removed, saving page load time.
We know that in Java everything is pass by value. But the interesting thing is that in case of Objects, the reference of the Object is pass by value.
Lesson learned while testing previous method for reversing link list.
If I call the method just like
All I get in n1 is 1.
So correct way to make the call is
Interesting read to understand why at times the size of file is actually smaller then what it occupies on the hard disk. Explained here.
I definitely did not see this coming. Technology to detect shit and pee.
Read an interesting article on Linkedin mentioning diapers for young ones with an “app” fitted in them, that will message parents when the kid pees. What next? An app in your clothes sensing your sweat and messaging you “Dude! you need a bath.”?
Faced a weird issue with my new windows 7 laptop today. Whenever I downloaded a docx word document or pptx or xlsx it was getting saved as a zip file. The zip file had a lot of xml files. That reminded me how all the UI elements in windows are stored as xml files. So MS word is just a tool which will take these xml files and create the required document out of it.
But the question for me was how to open this zip file in MS word. The fluke I tried worked out for me that is, just change the extension. E.g. if you downloaded abc.docx, and while download the document got downloaded as abc.zip, you just need to change the name of downloaded file back to abc.docx.