Automatic update with TortoiseSVN
On my current position, I had to update my project with Subversion every morning. It took half an hour every day ; some other guys prefered to update only once a week or twice a month… But they accepted to spend half a day for merges etc.
Yet, I found a way to make this update automatically, thanks to a planned task in Windows XP.
The command that is launched is
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\the\path\of\my\project" /notempfile /closeonend
Thanks to another planned task, I rebuild the complete project with Maven. And on breakfast I find my project up-to-date with all jars compiled and available.
Comment supprimer tous les accents, cedilles, etc. d’un texte en francais sous Unix?
Il suffit de lancer la commande suivante, en passant eventuellement en parametre le fichier source (sinon c’est l’entree standard qui sera utilisee):
tr "àçéèêëîïôöùüÂÇÉÈÊËÎÏÔÖÙÜ" "aceeeeiioouuACEEEEIIOOUU"
How to replace all lower case with upper case in Unix?
Use one of the three following commands:
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
tr a-z A-Z
tr '[:lower:]' '[:upper:]'
Remove duplicated lines from a file
Abstract: you have to remove duplicate lines in one file. For instance, you have a file:
foo1
foo2
foo2
Solution: use this command:
uniq myFile.txt
You’ll get:
foo1
foo2
uniq myFile.txt |
Sort the content of a file
Case: you have to sort the content of a file in Unix.
Solution
sort -d sourceFile > destinationFile
How to find all the files of which size is greater than a given value?
Abstract: we need to retrieve all the files in current folder (and its sub-folders) of which size is greater than 10 Mo
Use:
find . -type f -size +10000 -print
XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit
Error:
MyStrutsAction - Error on uploading: MyPersonnalClass@971720[primaryId=<null>,type=XXX,myDate=20080702,entityId=<null>,optimisticTimestamp=<null>] org.springframework.remoting.RemoteAccessException: Could not access remote service [my-service-bean]; nested exception is javax.transaction.TransactionRolledbackException: BEA1-0F416BB49A8BE6353E83: javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = myDatasource
Fix:
- Go on WebLogic console
- Then follow the pages: Home > Summary of JDBC Data Sources > myDatasource > Transactions
- Uncheck:
One-Phase Commit
- Check:
Emulate Two-Phase Commit
NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory
Error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsQueueConnectionFactory' defined in class path resource MyResourceApplicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory
Fix: In the classpath, replace Weblogic 8.X
jars with Weblogic 9.2
jars
How to set default keywords to files with Subversion?
Abstract: we would like to add the SVN-keyword $Id$
to all SQL files.
- go to SVN config folder (mainly
$HOME/Subversion/config
) - search for line:
[auto-props]
- just below, add the following line:
*.sql = svn:keywords=Id