Monday, February 16, 2009

SQL injection attack example

attacker deliberately input username as admin'--

select * from user where username='admin'--' and password='piggytail';
-->
select * from user where username='admin'

because -- is treated as comment/remark indicator

Thursday, February 12, 2009

How to get "FontStyle and Color" in Silverlight?

[Q] How to port system.drawing.FontStyle to Silverlight?
[Q] How to port system.drawing.Color to Silverlight?
[Q] How to use System.Drawing in Silverlight?



[try]
http://silverlight.net/forums/t/1274.aspx
"... use Reflector to look at the Silverlight assemblies to find out exactly what is and what is not there
...
use Reflector + the FileGenerator plugin to dump the entire source code of the System.Drawing namespace to disk. Then you could use just the classes (and any dependencies they might have) to create a lightweight version of the desired assembly that your code can build + run against
...
"


http://silverlight.net/forums/p/53640/138983.aspx#138983
Silverlight and System.Drawing

Monday, February 9, 2009

Ajax color picker

"Ajax Color Picker using Anthem,"
http://www.codeproject.com/KB/ajax/ajaxcolorpicker.aspx

by UsualDosage
[http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=2032887]

Saturday, February 7, 2009

Causes of javascript timeout error

0. usage of setTimeout and setInterval/clearTimeout and clearInterval

"Javascript Tutorial - Using setInterval and setTimeout"
http://www.switchonthecode.com/tutorials/javascript-tutorial-using-setinterval-and-settimeout

"... passing an actual function reference instead of a string, we get the added benefit of maintaining the scope of the function (instead of the assumption of global scope).
...
"



1. "Session Timeout Error in Ajax Applications"
http://www.openjs.com/articles/ajax/session_timeout.php

2. "... An AJAX request made from a timed-out session will throw a 500 error..."
www.nabble.com/An-AJAX-request-made-from-a-timed-out-session-will-throw-a-500-error-td18069903.html

*** 3. "Prevent session timeout in your ASP.NET AJAX application"
http://www.webdoubt.com/5/a-session-keep-alive-timer-for-ajaxnet-applications/
"... wonder if the worker processes are being recycled for some reason..."

Tuesday, January 27, 2009

PHP swf support

http://www.php.net/manual/en/intro.swf.php

PHP with Shockwave Flash support --> PECL

libswf:
PHP offers the ability to create Shockwave Flash files via Paul Haeberli's libswf module.
The libswf does not have support for Windows. The development of that library has been stopped, and the source is not available to port it to another systems. For up to date SWF support take a look at the MING functions.

Ming:
http://www.php.net/manual/en/book.ming.php


[samples]
http://www.php.net/manual/en/swf.examples-basic.php

Monday, January 26, 2009

session state and global variable across asp pages

[Q] HOw to maintain state across requests/webpages?

ASP.NET use application state and session state

support.microsoft.com/kb/307598

Global.asax file

Generally speaking, using Global.asax for session state isn't a recommended solution???


//=== forums.asp.net/p/1371928/2871909.aspx#2871909
global variables should be used sparingly.
The most common approaches to store global variables are :
Application, Cache, and Session

//=== steveorr.net/faq/GlobalVariables.aspx
Understanding session state modes

Friday, January 23, 2009

Issue Tracking/Bug Tracking tools

Issue Tracking/Bug Tracking

Trac
Bugzilla
BugTracker.net
MANTISS + Subversion(svn)
google code
jtrac+svn

Serena的PVCS Version Manager一個License 大概要台幣25000以上 而且不好用??