Posts

Where is Java EE 7 Examples?

It annoys me that I couldn' t find javaee 7 tutorial examples which are referring them as under "tut-install/examples/persistence" directory. But there is none. Thanks google to help me finding examples and others... But why a man on earth place java ee 7 tutorials under svn.java.net and make no direct link to them? https://svn.java.net/svn/javaeetutorial~svn/ If you are using eclipse to work with examples like me; you will encounter maven install problems because of relative path dependencies on pom.xml of "javaeetutorial".             <properties>                 <glassfish.home>${basedir}/../../../</glassfish.home>             </properties> Also, don' t forget to start derby database instance before "mvn install".

How to install fonts to linux?

I downloaded merriweather from fonts.google, it is delivered in truetype font (TTF) format. To install them system wide in ubuntu, I made "merriweather" folder under /usr/share/fonts/trutype then locate all ttf files related to various weight of merriweather font, here. Then restart font cache to make the system reflected by the changes. > mkdir /usr/share/fonts/truetype/merriweather/ > cp *.ttf /usr/share/fonts/truetype/merriweather/ > sudo fc-cache -fv

SASS Problem with Compass - can't extend nested selectors

While compiling materialize.scss with compass to override some trivial classes as in the getting started guide, I got this annoying error. error scss/screen.scss (Line 9: Can't extend .blue .lighten-4: can't extend nested selectors) Compilation failed in 1 files. I was trying to apply this as shown in the materialize.css guide: http://materializecss.com/color.html .ilike-blue-container {     @extend .blue-text, .text-lighten-4; } Everyone on the stackoverflow guesses without a reasonable source of problem; I have come to this conclusion after just few scrolls on sass documentation. The problem is using wrong sytax while extending another .class. http://sass-lang.com/documentation/file.SASS_REFERENCE.html#multiple_extends .ilike-blue-container {     @extend .blue-text;     @extend .text-lighten-4; }

Why doesn't 'git diff' invoke external diff tool?

Because "git difftool" does! But how? Default, git difftool is not related to any merge tool, of course. We have to do it on our own. I am using ubuntu and as far as I experienced, meld is a good choice to use with git difftool. Following command will make meld is default merge tool. git config --global --add diff.tool meld When git difftool is executed, that will ask user each of changed files in order. git difftool If you want to investigate changes in a specific commit, you can use the command below. git difftool commit_hash{^,} take care !

COMRESET failed (errno=-32)

Early in the morning, I hit this issue because of putting my nose into boot options. I changed the option form AHCI to RAID then restart but what I see flood of "COMRESET failed (errno=-32)" errors. I immediately restart and rollback my action but this doesnt prevent me from falling into desperate flow of error logs in /var/log/syslog. To solve problem, I make my talisman: used screwdriver to remove dvdrom. Because some ubuntu forum posts mentioning the reason is poor SATA cable connection. In my laptop there is no cable but there is  a socket to easily remove dvdrom. Anyway after removing, start the system and EUREKA the problem logs are gone! I checked mounted disks and validate reading and writing data is ok with some consequent restarts. Then of course I didnt leave the dvdrom empty. I shutdown the system and stick it into place roughly. And now everyone is allright. The lesson do not touch (mess up with) anything if it is working.  :) Aug 10 08:25:09 msi kernel:

Domain Name System(DNS) Syntax Rules

What is a domain name, Why IANA cares? Domain names are used to access machines over local network or internet with human readable syntax instead of IPs. www.example.com is the global example domain name that is reserved for educational purposes by IANA. IANA(International Assigned Numbers Association) manages DNS root zone and many other critical protocols and standards of internet. At first glance, i will highlight the right most part of domain name "com", our example domain name. "com" is defined by IANA as a top level domain name (TLD) and there are 312 TLDs and six kind of top level domain names presented in IANA DNS Root Zone : country-code(tr, ru, us, uk...),  sponsored(xxx, jobs, travel),  infrastructure(arpa),  generic-restricted(biz, name, pro),  generic(com, info, net),  test(.భారత్) In the IANA DNS Root zone page, there is each of top level domain names and related organizations listed. tlds-alpha-by-domain.txt # Version 2011121300, Last

Centering Circles Problem in CirclePageIndicator

Image
ViewPagerIndicator library fits well the need of indicator circles for sliding views. But there is micro level bug in library; it cannot align circles center vertically; then there is a slight cut top of circles.It is really difficult to notice, take a look closer. :) The red line is border of CirclePageIndicator View; it cuts the circles CirclePageIndicator has boolean centered attribute but it doesnt work expected, instead I used 2dp padding top to shift the circles below. It worked well. But I wish I had time to fork and fix this issue and make a pull request in github. https://github.com/JakeWharton/ViewPagerIndicator/blob/master/library/src/com/viewpagerindicator/CirclePageIndicator.java#L58 After simply adding padding 2dp to top, quite satisfactory