Tails и Tor
http://www.webcafe.bg/id_323098878_Kak_Eduard_Snoudan_izlaga_slujbite
Wednesday, April 23, 2014
Tuesday, April 22, 2014
Ways of Inheritance in Hibernate
Here is a great article for hibernate inheritance.
An example of each of them is added. Advantages and disadvantages also are mentioned.
An example of each of them is added. Advantages and disadvantages also are mentioned.
Using Subversion in Netbeans - solutions for all issues
Some mandatory steps needed after Netbeans installation to get SVN working.
0. Start position: svn functionality is not working. Item "Show annotations" in Team menu is deactivated.
1. Your subversion client version must match requirements by Netbeans. They are different for every Netbeans version. So check link - http://wiki.netbeans.org/FaqSubversionClients
2. Show annotations menu item in Team menu is active now.
3. Navigate menus: Tools > Options > Team -> Versioning > Subversion . Select "Path to the SVN executable file". It is placed in folder C:\Program Files\TortoiseSVN\bin by default. If executable could not be selected, may not be installed in SVN installation. Ensure "command line utils" checkbox is selected in the reinstallation.
4. Update or any SVN action could cause "sslprotocolexception: handshake alert: unrecognized_name" in Netbeans. This is caused by missing configuration in Netbeans.
Solution:
Copy folders named: svn.ssl.client-passphrase, svn.ssl.server, svn.username
from folder: C:\Documents and Settings\<username>\Application Data\Subversion\auth
to folder: C:\Documents and Settings\<username>\AppData\Roaming\NetBeans\8.0\config\svn\config\auth
5. Finally solved! So enjoy your SVN client.
0. Start position: svn functionality is not working. Item "Show annotations" in Team menu is deactivated.
1. Your subversion client version must match requirements by Netbeans. They are different for every Netbeans version. So check link - http://wiki.netbeans.org/FaqSubversionClients
2. Show annotations menu item in Team menu is active now.
3. Navigate menus: Tools > Options > Team -> Versioning > Subversion . Select "Path to the SVN executable file". It is placed in folder C:\Program Files\TortoiseSVN\bin by default. If executable could not be selected, may not be installed in SVN installation. Ensure "command line utils" checkbox is selected in the reinstallation.
4. Update or any SVN action could cause "sslprotocolexception: handshake alert: unrecognized_name" in Netbeans. This is caused by missing configuration in Netbeans.
Solution:
Copy folders named: svn.ssl.client-passphrase, svn.ssl.server, svn.username
from folder: C:\Documents and Settings\<username>\Application Data\Subversion\auth
to folder: C:\Documents and Settings\<username>\AppData\Roaming\NetBeans\8.0\config\svn\config\auth
5. Finally solved! So enjoy your SVN client.
Spring repositories with native queries - Supported keywords inside findBy method names
Source: | http://docs.spring.io/spring-data/jpa/docs/1.4.3.RELEASE/reference/html/jpa.repositories.html |
---|---|
Wednesday, April 16, 2014
java syntax for catching multiple exceptions
New java syntax for catching multiple exceptions in a single section:
try {
// do something
} catch (ImageProcessingException | IOException ex) {
log.error("Unable to get orientation from file " + imagePath.toString(), ex);
}
try {
// do something
} catch (ImageProcessingException | IOException ex) {
log.error("Unable to get orientation from file " + imagePath.toString(), ex);
}
Friday, April 4, 2014
Skipping constraint checks in MySQL
Error
Cannot delete or update a parent row: a foreign key constraint fails
Issue:
mysql> update User SET id=6 where id = 8;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`database_name`.`table_name`, CONSTRAINT `FK_35jtu0049tkg8m9twhc03ii9` FOREIGN KEY (`customer`) REFERENCES `user` (`id`))
Solution:
SET foreign_key_checks = 1;
; execute code with constraint restrictions here
SET foreign_key_checks = 0;
Cannot delete or update a parent row: a foreign key constraint fails
Issue:
mysql> update User SET id=6 where id = 8;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`database_name`.`table_name`, CONSTRAINT `FK_35jtu0049tkg8m9twhc03ii9` FOREIGN KEY (`customer`) REFERENCES `user` (`id`))
Solution:
SET foreign_key_checks = 1;
; execute code with constraint restrictions here
SET foreign_key_checks = 0;
Hibernate: setting foreigh key without getting foreign object
A nice solution from stackoverflow:
http://stackoverflow.com/questions/21012293/hibernate-add-entity-with-child-entity-id
http://stackoverflow.com/questions/21012293/hibernate-add-entity-with-child-entity-id
Subscribe to:
Posts (Atom)