Sunday, May 15, 2016

Raspberry Pi restarts my TV


11down voteaccepted
Try editing /boot/config.txt to include the line
hdmi_ignore_cec_init=1
If you're using OpenElec, the file is /flash/config.txt
More info on config.txt options can be found on the elinux wiki pages

Sunday, May 8, 2016

Difference between == and === in javascript

The == operator will compare for equality after doing any necessary type conversions. The ===operator will not do the conversion, so if two values are not the same type === will simply return false. It's this case where === will be faster, and may return a different result than ==. In all other cases performance will be the same.

Wednesday, May 4, 2016

Get connection information from entity manager in hibernate

Connection session = (getDbHelperDao().getEm().unwrap(Session.class)).connection();
System.out.println(session.getMetaData().getURL());