Pages

24 December 2016

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".

03 December 2016

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

03 November 2016

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;

}


01 September 2016

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!

10 August 2016

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: [   10.940622] ata3: limiting SATA link speed to 1.5 Gbps
Aug 10 08:25:09 msi kernel: [   13.156558] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   13.156574] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [   23.156871] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   23.156887] ata3: reset failed (errno=-32), retrying in 33 secs
Aug 10 08:25:09 msi kernel: [   25.497046] random: nonblocking pool is initialized
Aug 10 08:25:09 msi kernel: [   58.169592] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   58.169610] ata3: reset failed, giving up
Aug 10 08:25:09 msi kernel: [   58.169627] ata3: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen t4
Aug 10 08:25:09 msi kernel: [   58.169644] ata3: irq_stat 0x00000040, connection status changed
Aug 10 08:25:09 msi kernel: [   58.169657] ata3: SError: { DevExch }
Aug 10 08:25:09 msi kernel: [   58.169668] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [   60.397605] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   60.397621] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [   68.169774] ata3: limiting SATA link speed to 1.5 Gbps
Aug 10 08:25:09 msi kernel: [   68.169777] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [   70.397807] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   70.397823] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [   78.169945] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [   80.430008] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [   80.430025] ata3: reset failed (errno=-32), retrying in 33 secs
Aug 10 08:25:09 msi kernel: [  113.170659] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  115.398716] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  115.398733] ata3: reset failed, giving up
Aug 10 08:25:09 msi kernel: [  115.398751] ata3: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen t3
Aug 10 08:25:09 msi kernel: [  115.398767] ata3: irq_stat 0x00000040, connection status changed
Aug 10 08:25:09 msi kernel: [  115.398781] ata3: SError: { DevExch }
Aug 10 08:25:09 msi kernel: [  115.398792] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  117.626755] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  117.626771] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [  125.398897] ata3: limiting SATA link speed to 1.5 Gbps
Aug 10 08:25:09 msi kernel: [  125.398899] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  127.626961] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  127.626977] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [  135.399117] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  137.627159] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  137.627175] ata3: reset failed (errno=-32), retrying in 33 secs
Aug 10 08:25:09 msi kernel: [  151.224523] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null)
Aug 10 08:25:09 msi kernel: [  170.399819] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  172.659867] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  172.659884] ata3: reset failed, giving up
Aug 10 08:25:09 msi kernel: [  172.659902] ata3: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen t2
Aug 10 08:25:09 msi kernel: [  172.659918] ata3: irq_stat 0x00000040, connection status changed
Aug 10 08:25:09 msi kernel: [  172.659932] ata3: SError: { DevExch }
Aug 10 08:25:09 msi kernel: [  172.659942] ata3: hard resetting link
Aug 10 08:25:09 msi kernel: [  174.919899] ata3: COMRESET failed (errno=-32)
Aug 10 08:25:09 msi kernel: [  174.919916] ata3: reset failed (errno=-32), retrying in 8 secs
Aug 10 08:25:09 msi kernel: [  181.635850] lp: driver loaded but no devices found