вторник, 2 ноември 2010 г.
DataGridView Filter Popup - CodeProject
петък, 1 октомври 2010 г.
Human Memory Capacity is Larger than Expected
Via aibits.com
According to an MIT news release, cognitive neuroscientists studying human memory capacity and visual memory have discovered that the brain's ability to store information is "much higher than previously believed or shown". The researchers showed a series of 2,500 images to test subjects for 3 seconds each. Later, they were show pairs of very similar images and asked which they had seen earlier. The researchers were surprised to see recall rates as high as 92 percent. Timothy Brady, one of the researchers, said, "To give just one example, this means that after having seen thousands of objects, subjects didn't just remember which cabinet they had seen, but also that the cabinet door was slightly open". While we still don't know the total memory capacity of the human brain, the researchers were able to prove that the minimum amount of long term storage needed to for test subject's performance would be 228,000 bits. So, if we're burning up 28 kB of memory for simple tasks, the total amount available must be significantly larger than any previous estimates. Big changes are needed to existing cognitive models to account for this and there may be implications in AI research as well. For more details including samples of the image sets used, visit the MIT Massive Memory website and read the full paper, Visual long-term memory has a massive storage capacity for object details (PDF format).
Source: Robots.NET
23/09/2008
Robots.NET
вторник, 20 април 2010 г.
CodeSOD: Don't Pass The Password
CodeSOD: Don't Pass The Password: "
It’s a generally accepted practice that passwords should be masked when being displayed to users. In addition to preventing over-the-shoulder password snooping, displaying “*****” instead of the actual password gives users a sense of security that somehow, through the magical wizardly of computers, their password is secure. Whether that’s worth the usability hassle, however, is certainly up for debate.
Adam’s colleagues take this practice very seriously, and have gone so far as to mask it from themselves. Their application is a fairly standard three-tier system – database, middle-tier objects, and user interface – and the password masking occurs smack-dab in the middle.
public string Password
{
get
{
return "*******";
}
set
{
if (value != null && value.Length < User.MIN_USER_LENGTH)
{
string msg1 = Translator.Instance.Translate(
Translation.MsgList.String_Type.PasswordLen);
try
{
System.Windows.Forms.MessageBox.Show(
string.Format(msg1, User.MIN_USER_LENGTH.ToString()));
}
catch
{
System.Windows.Forms.MessageBox.Show(
msg1 + ", " + User.MIN_USER_LENGTH.ToString());
}
}
else
{
if(log != null )
{
string msg = Translator.Instance.Translate(
Translation.MsgList.String_Type.PasswordChanged);
try
{
msg = string.Format(msg, this.Name);
}
catch
{
msg += ": " + this.Name;
}
log.AddToLog(msg,"","*******");
}
string oldname = password;
password = value;
if (eventHandler != null)
{
CustomEventArgs e = new CustomEventArgs();
e.name = "******"; //dont pass the password around
eventHandler(this,e);
}
}
}
}
Of course, the real problem in all this is not so much the masked password, but the fact that Adam was tasked with using the middle tier to develop a web-based version of their application. Given that this property (and so many more) fires an interactive dialog (System.Windows.Forms.MessageBox), he’s being extra-careful not to pass unvalidated data to them.