WP localization string
<?php _e('Some string', 'theme_textdomain'); ?>
i.e.
<?php _e('Some string', 'is_IS'); ?>
In case of personal memory failures...
<?php _e('Some string', 'theme_textdomain'); ?>
i.e.
<?php _e('Some string', 'is_IS'); ?>
grep -li 'TEXT TO FIND IN FILES' **/*.docwill find the 'TEXT TO FIND IN FILES' in all .doc files.
I like my gmail and the new Google Docs preview feature is just wonderful for someone like me how keeps most everything at Google Docs.
Got a new 2.66GHz MacBook Pro a few days ago and yesterday the scrolling/zooming flickers kicked in. I found this discussion but no help there yet.
Looks like a chip bug with the NVIDIA graphics card. Good thing there are two of them in the machine...best would have been if one was from another manufacturer ;)
I really had enough when trying to zoom with the trackpad in iPhoto so I decided to try to switch to the other graphics display card. That was simple. Seems to work, at least for now, but the issue seems to build up over time.
I'll add comments here to follow this through.
For some unknown reason a couple of WebObjects applications were not not launching as the APPLICATION_NAME.woa but as MainBundle.woa and totally unusable as such.
When launching from Eclipse I got an error on locating Info.plist in JavaDTWGeneration.framework, JavaEOGeneration.framework and JavaEOProject.framework that was causing the problem.
Reinstalled Webobjects 5.4.3 and everything when back to normal.
Converting TOD FHD files from JVC Everio on Mac OS X
If you wan't to edit you Full HD videos from your Everio in iMovie you'll have to convert the videos to work on the mac.
You'll need to download and install ffmpegx and connect your JCV Everio via USB and locate the TOD file(s).
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" );