木曜日, 6月 26, 2008

GenaratePassword.java

As the name suggests -- this snippet generates an 8-letter password (that's all).


public class GeneratePassword
{
public static void main(String args[])
{
String alphanumeric="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
int len=alphanumeric.length();
for(int i=0;i<8;i++)
{
int index=(int)Math.floor(Math.random()*len);
System.out.print(alphanumeric.charAt(index));
}
}
}

Flask の Blueprint のテンプレート問題

  Flask の Blueprint は、ルート、静的ファイル、テンプレートをまとめて管理できます。しかし、テンプレートが指定できません。 ここでは、Blueprint の template_folder の問題点と回避策を説明します。 Blueprint のテンプレート問題...