iHologram
Posted by Ryan Baxter Fri, 22 Aug 2008 21:58:00 GMT
An application written by David OReilly gives Apple’s iPhone the illusion of an animated hologram. The trick uses a technique called perspectival anamorphosis. A tabletop surface provides the needed viewing angle of between 35 and 45 degrees.
- Meta no trackbacks, 2 comments, permalink, rss, atom
Using LoginView on HyperLinkFields within a GridView
Posted by Ryan Baxter Wed, 13 Aug 2008 19:45:00 GMT
The title of this post is a bit misleading. Using a LoginView to manage the security of HyperLinkFields within a GridView does not work. There are, however, other means to achieve the same result.
Using the GridView’s OnRowDataBound event, I’ve set my Cells containing HyperLinkFields, on DataRows with a RowIndex of -1, to an empty string if the user does not belong to the “Administrators” role. This hides my HyperLinkFields from underprivileged users and prevents elements of my GridView’s header and footer from not appearing.
protected void GridView1_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex != -1)
{
if (!Page.User.IsInRole("Administrators"))
e.Row.Cells[0].Text = String.Empty;
}
}*Update
I just found a thread on the ASP.NET forums that covers the same problem. In their solution, the GridView’s RowType is checked before setting the Cell’s Visibility property to false. This makes more sense than relying on the RowIndex property to determine whether or not a DataRow’s Cell should be hidden. In the method below, I’ve integrated the DataControlRowType enumeration as suggested by the ASP.NET forums. Since setting the Visibility property of Cells containing HyperLinkFields caused my GridView headings to not line up properly, I decided to assign the Cell’s Text property to String.Empty as in my previous example.
protected void GridView1_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (!Page.User.IsInRole("Administrators"))
e.Row.Cells[0].Text = String.Empty;
}
}- Posted in Code Snippets
- Meta no comments, permalink, rss, atom
Kaminsky DNS Repair Visualization
Posted by Ryan Baxter Thu, 07 Aug 2008 22:17:00 GMT
A time-lapse visual representing the patching of a DNS vulnerability discovered by Dan Kaminksy. The animation was made using the Clarified Analyzer from https://www.clarifiednetworks.com.
- Meta no comments, permalink, rss, atom

