I moved my 5 gigabytes worth of digital photos from my Mac to my PC tonight. This is usually a pretty easy thing to do, as you just copy your “Originals” folder in the iPhoto directory to it’s new destination. I didn’t care about copying the photo albums from iPhoto, but the problem I ran into was getting to the keywords my wife and I added for every stinking photo. iPhoto uses it’s own proprietary method for storing keywords, so I needed to export them somehow.

Thankfully I found the iphotokeywordutilities app that did the trick for me. It’s a little tricky to get going, as you have to :
1.download iphotokeywordutilities
2.Open iPhoto and select the photos whose keywords you want to export.
3. You then click on the applescript from the downloaded zip

What iphotokeywordutilities does is take the iPhoto keyword and embed it right into the image’s IPTC keyword attribute.

Be the first to like this post.July 26, 2008 – Posted by rudesyle | iPhoto, Technology

View the original article here

I checked my GMail today, and noticed a new “Themes” link.  I clicked on it and behold, a plethora of new color themes for my GMail.  I then found the mother of all themes : Terminal!

11-20-2008 2-56-34 PM

Be the first to like this post.November 20, 2008 – Posted by rudesyle | Technology

No comments yet.

View the original article here

I listen to the same radio station each and every morning. Problem is, so do a lot of other people. The server I need to connect to allows for a maximum of 100 connections, so what I end up doing is repeatedly trying to connect until I can get one of those connections. Until now….

I created this little applescript to hammer away at that server. I saved it as a playlist, and just run the following :

local eset e to 0tell application “iTunes”repeattryplay playlist (“My Radio Station Playlist name”)delay (2)on error errStr number errorNumberset e to errorNumberend tryif e is not equal to -5421 thenexit repeatelselog “Try again”end ifend repeatend tellBe the first to like this post.January 7, 2009 – Posted by rudesyle | Technology | ITunes, Technology

View the original article here

The other day I was reading Joel Spolsky’s blog post on his new site he just released called Stackoverflow.com. To summarize, Joel and his team created Stackoverflow as a resource for developers to get answers to questions they have.  This got me to thinking about the resources I utilize on a daily basis.

Just Google it!
Joel points out that the way Developers usually go about getting those answers is to Google their question and grab the first response they find. I agree that this is usually the first thing I do, and for the most part, this usually works.  For instance if I’m trying to get a client’s C++ project up and running, and I’m coming across strange and cryptic compile time errors, I’ll do a Google search in hopes of having some light shed on the problem. Probably for most of us, Google does the trick, as nothing beats a finely indexed resource.  Like many Devs, I used to have a ton of those 600 page Wrox and O’Reilly books spread out all over the place.  But since just about any piece of information I need is on the web, tech reference books are pretty useless anymore.  In fact, I gave all of mine a way about a year ago on freecycle.org.

Use your networking skills
Of course if you work in an office with other Devs, you can always hit them up when you come across a problem.  But if you’re like me, and you telecommute, you have to build a network of resources you can bug.  I have a few pals whose ears I bend from time to time via instant messenger (and they do the same with me).  More times than not, just talking out a problem solves itself.

Message boards
Sometimes Google just doesn’t cut it and you just can’t get your question answered. So the next best thing is to post your question on a message board.  For instance, on the project I’m working on now, I’ve had to interface with the Quickbooks SDK. Intuit has a very nice message board with lots of activity. A lot of boards allow you to specify to have an email sent when a response is given to your question.  I would recommend looking at the current responses on a board to see how often people post (ie:is there a new response every minute versus a day).  If it appears as though only a few new posts per day get entered, then I would look elsewhere.

Paid technical support
A lot of products offer technical support you can pay for. One client I worked with actually purchased a year’s worth of tech support from Business Objects (Crystal Reports) and had me call them about an apparent bug with Crystal Enterprise.  I can report to you that this was a big waste of time, with me spending about a month going back and forth with the support people, who in the end, couldn’t address my issues.

Still no answers huh?
Sometimes no matter how hard you Google, or how many people you bug, you just can’t get an answer.  What I end up doing in times like this is to approach the problem differently.  For instance, I recently had to get a legacy COM application running in Windows SXS mode (this is COM free registration with the help of a manifest file). I had the majority of the app running ok, but there was one component that would continue to read from the registry rather than the manifest file I created.  I was able to narrow it down to line of code where this was happening.  I tried a few alternate approaches until finally I got it to work.

Be the first to like this post.September 25, 2008 – Posted by rudesyle | Programming | Programming

No comments yet.

View the original article here

I downloaded Google’s new browser Chrome last week, and wasn’t all that impressed.  It didn’t seem, to me, to run that much faster than my Firefox 3 (keep in mind I was running Chrome through my Parallels for Mac VM).

The one awesome thing Chrome brings to the table is the concept of an Application shortcut.  This is nothing more than a desktop shortcut to a particular Web Application.  For instance, I use Google Docs an awful lot, so I created an Application shortcut to a Google spreadsheet.  Now instead of opening up a browser and navigating to Google Docs, etc… I can now just click on the shortcut, and it opens up the spreadsheet in it’s own window, with it appearing to be an independent app, much like an MS Office document.

Be the first to like this post.September 12, 2008 – Posted by rudesyle | Firefox, Technology

View the original article here

You can download it from here.

I’ll have to download this and take a spin.

Two things I’ve read about that sound neat off the bat :

(1) Automatic auditing : one of my recent posts detailed how to do this. As I said, I end up doing this on practically every project, so it’s nice Microsoft is baking this right in.

(2) Date only and Time only datatypes : HALLELUJAH! I can’t tell you how many times this has screwed me when doing date comparison, and all I’m concerned with is a date, but the time element throws it off.

Be the first to like this post.March 13, 2008 – Posted by rudesyle | SQL Server, Technology

No comments yet.

View the original article here

I was tasked with this a month or so ago, and came upon a great site called http://www.wikimatrix.org/. It even has a wizard that asks you a number of questions, and then recomends different wiki apps for you.

I ended up downloading and trying 4 different Wikis. These ranged from one written in javascript, to a php based one, and even “asp.old” one. I went with ScrewTurn Wiki, which is a .Net based, Open Source app, written in C#. ScrewTurn comes with an installer, that creates an IIS site for you. One big requirement I had was that the Wiki content pages themselves had to be created outside of the Wiki, because I was using a script to pull out the API class data. Screwturn is also very easy to configure out of the box, has a support forum, and is skinnable.

Be the first to like this post.April 14, 2008 – Posted by rudesyle | ASP.Net, Technology

No comments yet.

View the original article here

I’m just getting around to snooping around Sql Server 2008, and noticed that they have FINALLY added just a DATE datatype. What this means is that we can now just store a date, rather than a date and the time. No more will we have to write SELECT CONVERT(VARCHAR,GETDATE(),101)!!!!!

This now does the trick :

SELECT CAST(GETDATE() AS DATE)

Be the first to like this post.December 18, 2008 – Posted by rudesyle | Technology | SQL Server 2008

No comments yet.

View the original article here

This post describes how to modify the User details stored in the Acegi Security Context.

Acegi Security uses the SecurityContextHolder object to store details of the current security context of the application. The SecurityContext holds the details of the authenticated principal in an Authentication object. By default the SecurityContextHolder uses a ThreadLocal to store these details, so that they will be available all methods in the current thread of execution.In order to obtain the Principal, you would use the following lineObject obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();Usually, the principal is an object of the type UserDetails. The UserDetails object is sort of an adapter between the security database and Acegi SecurityContextHolder. Acegi uses a UserDetailsSevice to build the UserDetails object. In order to modify the data stored Security Context of Acegi, you either have to setContext() method of the SecurityContextHolder. The SecurityContext object can be set to hold an Authentication object. This will mean that you have to add some additional security code to your application code.Implement the UserDetailsService and UserDetails interfaces. This way you can keep security code seperated from the application code.This post will describe how to implement UserDetailsService and UserDetails Objects. Here’s what to do to implement a UserDetailsService. Start with the implementing acegi security posts part 1 and part 2.Create the UserDetailsService:package authentication;

import java.util.HashMap;
import java.util.Map;

import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UserDetailsService;
import org.acegisecurity.userdetails.UsernameNotFoundException;
import org.springframework.dao.DataAccessException;

public class MyUserDetailsService implements UserDetailsService {

private Map users = init();

private Map init() {
Map tUsers = new HashMap();

tUsers.put(“scott”, new User(“scott”, “tiger”, “ROLE_USER”));
tUsers.put(“harry”, new User(“harry”, “potter”, “ROLE_ADMIN”));
tUsers.put(“frodo”, new User(“frodo”, “baggins”, “ROLE_USER”));

return tUsers;
}

public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException, DataAccessException {
User user = (User) users.get(s);
GrantedAuthority authority = new MyGrantedAuthority(user.getRole());
UserDetails userDetails = new MyUserDetails(new GrantedAuthority[] { authority }, user.getUserId(), user.getPassword(), “Additional Data”);
return userDetails;
}

}

MyUserDetailsService.java
Notice that all the user data is defined in this class. The UserDetailsService has to return a UserDetails object using the User name.Create the UserDetails class:package authentication;

import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.userdetails.UserDetails;

public class MyUserDetails implements UserDetails {

private GrantedAuthority[] authorities = null;
private String password = null;
private String username = null;
private String additionalData = null;

public MyUserDetails(GrantedAuthority[] authorities, String password, String username, String additionalData) {
super();
this.authorities = authorities;
this.password = password;
this.username = username;
this.additionalData = additionalData;
}

public GrantedAuthority[] getAuthorities() {
return authorities;
}

public String getPassword() {
return password;
}

public String getUsername() {
return username;
}

public boolean isAccountNonExpired() {
return true;
}

public boolean isAccountNonLocked() {
return true;
}

public boolean isCredentialsNonExpired() {
return true;
}

public boolean isEnabled() {
return true;
}
}

MyUserDetails.javaThe User class:package authentication;

public class User {

private String userId;

private String password;

private String role;

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

public String getRole() {
return role;
}

public void setRole(String role) {
this.role = role;
}

public String getUserId() {
return userId;
}

public void setUserId(String userId) {
this.userId = userId;
}

public User(String userId, String password, String role) {
super();
this.userId = userId;
this.password = password;
this.role = role;
}

}

User.javaModify the applicationContext.xml file: Modify the userDetailsService bean in the application context to as shown below
The GrantedAuthority class: The MyGrantedAuthority class is typically used to store application roles.package authentication;

import org.acegisecurity.GrantedAuthority;

public class MyGrantedAuthority implements GrantedAuthority {

private String authority = null;

public MyGrantedAuthority(String authority) {
this.authority = authority;
}
public String getAuthority() {
return authority;
}

}

MyGrantedAuthority.java

View the original article here

Google is going to offer Sun’s Star Office for free as a part of Google Pack. Also, Sun will now be traded under the Symbol JAVA replacing the old symbol SUNW.

View the original article here