45 Minutes in Powhite
Map your trip with EveryTrail
Technology, activities, etc.
I just discovered an excellent free (donations accepted) GPS software for Windows Mobile phones called GPS Sport Tracker. It has amazing features for running, biking, hiking, boating and probably many other things. I can’t wait to get this in the boat and fine tune the sail adjustments. The features I particularly like are:
This is fantastic work!
New in 6.0.19 [the] LockOut realm - it wraps around standard realms and provides a lock-out mechanism for multiple failed attempts for the same user. With this, there will also be the ability to have multiple realms for authentication - if any match, you get access - so you could use, for example, a tomcat users file for admins and a JNDI realm for users.
SELECT Coalesce(i.UserID, 0) UserID, Coalesce(i.Password, '') Password, Count(a.UserID) Attempts
FROM (SELECT 0 AS id) mstr LEFT JOIN
(SELECT 0 AS id, UserID, UserName, Password FROM User WHERE UserName = 'Scooby') i ON mstr.id = i.id
LEFT JOIN UserAttempts a ON i.UserID = a.UserID AND LastAttempt > 1266602785
GROUP BY i.UserID,i.Password
JdbcTemplate springTemplate = new JdbcTemplate(this.currDs);
int[] user = springTemplate.queryForObject(
"select UserID, count(*) from t_actor where orgID = ?",
new Object[]{new Long(1212)},
new RowMapper<int[]>() {
public int[] mapRow(ResultSet rs, int rowNum) throws SQLException {
int[] user = new int[2];
user[0] = rs.getInt(0);
user[1] = rs.getInt(1);
return user;
}
});
I have attempted to follow this Axis2 Tutorial and it has been painful. I will attempt to ease other’s pain by providing the mistakes that I made to prevent others from making the same…
When I got this error:
ClassDefNotFoundException org.apache.http.HttpResponseFactory
It was because I was using Axis2 ver 1.5.1. When I switched to 1.4.1 it was gone.
The tutorial says that opening http://localhost:8080/MyProject should display the Axis2 start page, but I found another Axis2 tutorial that said there was a bug and you actually needed to use:
http://localhost:8080/MyProject/axis2-web/index.jsp
I just discovered a few qwerks with the Flex Label’s htmlText property that I thought were worth passing along.
First off, Labels are limited to one line, so the default behavior of the <mx:htmlText> <![CDATA[ will not display:
<mx:Label>
<mx:htmlText>
<![CDATA[
<font color="Red">*</font> indicates required field.
]]>
</mx:htmlText>
</mx:Label>
Once I consolidated the the CDATA lines into one it displayed:
<mx:Label>
<mx:htmlText>
<![CDATA[ <font color="Red ">*</font> indicates required field.]]>
</mx:htmlText>
</mx:Label>
…but the color still didn’t work. Turns out you have to use Hex to specify font color:
<mx:Label>
<mx:htmlText>
<![CDATA[ <font color="#FF0000">*</font> indicates required field.]]>
</mx:htmlText>
</mx:Label>
The Adobe LiveDocs explain all this in more detail.
After adding my Flex project to VSS, the Flex Builder silently stopped generating the HTML wrapper files. To fix the problem, I unchecked the Generate HTML wrapper file in the project properties. I was prompted to delete the html-template directory and I did remove it (including the VSS linkage). I then changed the project properties back and the HTML wrappers generated again. Note, I did not check the html-template directory back in to VSS.
...
// display errorTip
if (showErrorsImmediately &&
currentControlIsValid == false &&
supressEvents == false)
{
// cast the focussed control to a UIComp to use callLater
var ffc:UIComponent = focusedFormControl as UIComponent;
ffc.callLater(showDeferred, [focusedFormControl]);
}
return currentControlIsValid;
}
private function showDeferred(target:DisplayObject):void {
target.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OUT));
target.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
}
package core.util
{
import mx.validators.ValidationResult;
import mx.validators.Validator;
public class CompareValidator extends Validator
{
public var valueToCompare:Object;
public var errorMessage:String = "Value does not match.";
public function CompareValidator()
{
super();
}
override protected function doValidation(value:Object):Array {
var results:Array = [];
var srcVal:Object = this.getValueFromSource();
if (srcVal != valueToCompare) {
results.push(new ValidationResult(true, null, "Match",errorMessage));
}
return results;
}
}
}
<coreutil:CompareValidator
id="comparePasswords"
source="{password2}"
property="text"
valueToCompare="{password.text}"
errorMessage="Passwords do not match."
/>