Qualifing an array
EOQualifier.filteredArrayWithQualifier( ARRAY, QUALIFIER );
In case of personal memory failures...
When all hell breaks loose when upgrading Eclipse/WOLips:
1. Go to Help - Software updates - Manage Configuration
2. Select what you want to replace and click "Replace with Another Version" and select the desired version.
Don't forget the little magic in
EOSortOrdering.sortedArrayUsingKeyOrderArray( form.elements(), new NSArray( ERXS.asc( Element.ORDER_KEY ) ) );
You can send yourself emails with the plus sign(+) after your gmail address and then any text you want after the plus sign and it will show up in your inbox. Ex. if your gmail address is rass@gmail.com you can send yourself and email to rass+gat@gmail.com.
This can be quite handy when giving your email to "unknown" websites and also with filters you can organize your email pretty neatly.
Note that not all website forms allow you enter the + sign, in those cases you can also replace gmail.com googlemail.com, e.x. rass@googlemail.com is delivered to rass@gmail.com ;)
More on this at digitalalchemy.tv
After spending an enormous amount of time trying to include the time with a java.sql.Date call to a Stored Procedure through CallableStamtent I found out that CS also accepts Timestamp...that really made my day =)
The caret symbol( ^ ) indicates that the value should be taken from the parent component.
Since Unit Tests are run from the command line( or Ant ) access to Resources of a WebObjects project are no good with ResourceManager. Simple functions to get resources based on the filesystem:
/**
* Returns a path to a resource filename in a folder(s) under the root folder
* */
private String resourceLocationString( String filename, String folder ) {
String urlToFile = getClass().getResource( "/" ).toString();
urlToFile = urlToFile.replace( "bin/", "" );
urlToFile = urlToFile.replace( "file:", "" ); // now we should be at the projects root directory
urlToFile = urlToFile.concat( folder + "/" + filename );
return urlToFile;
}
/**
* Returns data for pdf file
* */
private byte[] bytesForPDFResource( String urlToFile ) throws FileNotFoundException, IOException {
FileInputStream in = new FileInputStream( urlToFile );
byte[] data = new byte[in.available()];
in.read(data);
return data;
}
FileOutputStream fs = new FileOutputStream( ABSOLUTE_PATH_TO_FILE );
fs.write( SOME_DATA );
fs.close();
Need to call simple SQL commands, like getting the next primary key by calling a sequence:
NSArray rawRows = EOUtilities.rawRowsForSQL( EDITING_CONTEXT, MODEL_NAME, SQL_STRING, NSArray.EmptyArray );
NSDictionary rowWithPK = (NSDictionary)rawRows.objectAtIndex( 0);
Object maxPK = rowWithPK.objectForKey( "NR" );
Installined EZDrummer and created a stereo Instrument track in Pro Tools LE 7.1.1 but didn't get no output from the track. I had other audio tracks that worked fine, and creating a stereo audio track got the output from EZDrummer but you need the Instrument track to drop the midi loops onto. After about 2 hours of hacking Pro Tools, reading forms, reading manuals and other desperate measures I noticed that the volume on my Instrument track was turned down and the only thing I needed to do was to crank it up. Since this is not the case with audio tracks tracks I failed to check this...that won't happen again ;)