Wednesday, June 10, 2009
From now on, until i can not use the internet from company
The network in my company can connect to here directly. That's a good news. :-)
Saturday, January 31, 2009
The Rich UI of Web browser
Flex, JavaFx, SilverLight, they are all for the the Rich Client Internet Interface Application. They are all focusing on the user control widgets. But, in other aspect, the internet application's report chart is a good point to make the diagram to use.
Sunday, October 12, 2008
C2061, a common compiler error with ntddk
This is a MS Windows application. A USB Camcorder with a USB port. Identify this device when the camcorder linked to computer and list the special directory's files.
I downloaded the Win2K3 DDK and want to use the "STORAGE_DEVICE_DESCRIPTOR" that defined in the file "ntddsdk.h".
I use the WTL library for Windows message driven framework. I try to use ::DeviceIoControl to query the device's properties, this Win32 function takes 2 struct STORAGE_DEVICE_DESCRIPTOR and STORAGE_PROPERTY_QUERY, they are defined in the ddk include file "ntddsdk.h". When I compile this cpp file, a compile error C2061 come out and tell me that has a syntax error arround the 2 struct declaration. I can not believe, because the defination is really existed in the header file!
Then, after "googled" for a long time, actually 2-3 hours later, I found a lot of people suffered this compiler error, but no one gave any useful suggestions. I gave up the search engine and try to drill into the header files.
I found the standard Platform SDK header include many symbols that define in the , there is a part copy of "ntddsdk.h" but exclude some DDK special symbols just like STORAGE_DEVICE_DESCRIPTOR etc. The use the macro define to avoid the symbols duplicate. The macro "_NTDDSTOR_H_" is the problem. I found the "winioctl.h" always included first. The "windows.h", line 198, #include "winscard.h", in this winscard.h line 31 is the "winioctl.h". The "winioctl.h" defines the "_NTDDSTOR_H_", so when I try to include the "ntddstor.h", the macro had been defined, the all symbols in the "ntddstor.h" will not be included in again!
Because the DDK symbols is defined in this file and not included in the "winioctl.h", I have to modify the stdafx.h to tell the compiler donot include the "winscard.h". I added #define NOCRYPT before the #include "atlbase.h". This macro will exclude the "wincrypt.h", "winefs.h" and "winscard.h". And the "ntddstor.h" also depends on some symbols from the "devioctl.h", this is another ddk header file. So the cpp file should include "devioctl.h" first and then include "ntddstor.h". OK! It's work now.
I downloaded the Win2K3 DDK and want to use the "STORAGE_DEVICE_DESCRIPTOR" that defined in the
I use the WTL library for Windows message driven framework. I try to use ::DeviceIoControl to query the device's properties, this Win32 function takes 2 struct STORAGE_DEVICE_DESCRIPTOR and STORAGE_PROPERTY_QUERY, they are defined in the ddk include file
Then, after "googled" for a long time, actually 2-3 hours later, I found a lot of people suffered this compiler error, but no one gave any useful suggestions. I gave up the search engine and try to drill into the header files.
I found the standard Platform SDK header
Because the DDK symbols is defined in this file and not included in the "winioctl.h"
Saturday, October 04, 2008
The JavaOnRails new validators released
The new version of validators for the JavaOnRails framework is working now. The new release of featured download is available.
I changed the package prefix name from "com.lvup" to "net.javaonrails" for the neutral open source project behaves.
I have updated an example for the Ajax support use the JavaOnRails framework. You could find the example in the http://code.google.com/p/jmap/wiki/AjaxEx. And I plan to write more examples for the framework utilization.
Friday, September 26, 2008
The validators
I will change the design of jmap.validators.
Now, the validators is using a set of if(...) to distinguish the annotation type. I should use another pattern to handle it. A set of classes may declare a common method to handle the "valid" and "formatMessage".
And the error messages may need more extra information. A field name may need to indicate this message's field.
Now, the validators is using a set of if(...) to distinguish the annotation type. I should use another pattern to handle it. A set of classes may declare a common method to handle the "valid" and "formatMessage".
And the error messages may need more extra information. A field name may need to indicate this message's field.
Saturday, September 20, 2008
Java On Rails
This is a ruby on rails succedaneum for Java. You can find the code and examples here.
http://code.google.com/p/jmap/
This framework can make URI map to Class and a Method call, and automatically create a form value bean to map the form values to bean's fields, use the validating annotations to check these values and output the multi-language error messages.
For example, the URI: /jmap/main/login, will be map to the class "package.prefixname.controller.Main" and call the controller class method "public void Login()". Before the controller method call, a form value bean "package.prefixname.bean.main.Login" will be created and set all form values to its fields and checked against the fields validating annotations. So, in the controller method call, you can easily get this form bean from the request attribute with a key name "MainLogin". You can check this bean's status for the form values validating and any other business data status to determin a response with a "render" method call.
http://code.google.com/p/jmap/
This framework can make URI map to Class and a Method call, and automatically create a form value bean to map the form values to bean's fields, use the validating annotations to check these values and output the multi-language error messages.
For example, the URI: /jmap/main/login, will be map to the class "package.prefixname.controller.Main" and call the controller class method "public void Login()". Before the controller method call, a form value bean "package.prefixname.bean.main.Login" will be created and set all form values to its fields and checked against the fields validating annotations. So, in the controller method call, you can easily get this form bean from the request attribute with a key name "MainLogin". You can check this bean's status for the form values validating and any other business data status to determin a response with a "render" method call.
Monday, September 01, 2008
Block the appspot.com?
So, in the grate China, after the Olympic Game, the appspot.com has been blocked. Cannot access anymore.
Monday, August 25, 2008
Wednesday, April 02, 2008
Monday, April 02, 2007
How to choose a web framework for python?
I am comparing the web framework in python. It's a little bit complex.
- Is the template engine in that framework support the template re-use?
- How about the database access layer? Is there more flexible SQL script inline supporting and has many popular database server can be connected?
- Is there any weird or some kind of unreadable code special?
- Does it support Apache integrated?
mssql and python on *nix
I can not find a good implement for the connection to the MSSQL on *nix.
unixODBC and iODBC and pymssql are not working correctly. And the pymssql can not support the query parameters with "?" or named parameters. It's not safe for the internet usage.
unixODBC and iODBC and pymssql are not working correctly. And the pymssql can not support the query parameters with "?" or named parameters. It's not safe for the internet usage.
Sunday, March 25, 2007
HTTP_X_FORWARDED_FOR the real variable name in the http header
The HTTP_X_FORWARDED_FOR http header name is 'X-Forwarded-For', so we should use
<%=request.getHeader("X-Forwarded-For")%> to get the real i want.
<%=request.getHeader("X-Forwarded-For")%> to get the real i want.
Saturday, March 17, 2007
Python or Ruby
Everything is about the web development for the rapid speed.
So the FastCGI is revived by the Ruby Rails. I still prefer the Python and the plenty of function library. I tried the django and TurboGear, but the TurboGear 1.0.1 can not work with the Python 2.5 now. The django can work with the new version.
So the FastCGI is revived by the Ruby Rails. I still prefer the Python and the plenty of function library. I tried the django and TurboGear, but the TurboGear 1.0.1 can not work with the Python 2.5 now. The django can work with the new version.
Friday, February 23, 2007
When Spring talk about configuration file
It's so funny that the Spring framework talk about how to reduce the configuration file's quantity. ;-/
Thursday, January 11, 2007
The HttpSessionBindingEvent
The listener of HttpSessionBindingEvent used for collecting the site user session event. When i wish to count the users online of a web application.
The interface HttpSessionAttributeListener and attributeReplaced method is always called and then i can event.getSession() is return the current session object. So, i can getAttribute to get the current value, and the event.getValue() is the old attribute value returned.
The interface HttpSessionAttributeListener and attributeReplaced method is always called and then i can event.getSession() is return the current session object. So, i can getAttribute to get the current value, and the event.getValue() is the old attribute value returned.
Tuesday, December 12, 2006
IE 7.0 dll conflict result the IE does not start
Oh, i have installed IE7 on my home PC, Windows XP SP2 simplified Chinese version, unfortunately, the IE7 can NOT be started! I clicked the icon and nothing happened!
I followed the KB926449, but nothing listed on that KB works.
I found if the psapi.dll in the Internet Explorer directory will make my IE 7 start failed without any messages!
My psapi.dll in the Internet Explorer directory is 14848 bytes, 4.0.1371.1, Process Status Helper. I guess this dll file is too old and I found the same psapi.dll in system32 directory and the version is 5.1.2600.2180. I guess this is a dll conflict but the IE 7 installer does not detect.
I remove this old psapi.dll IE 7 starts fine.
I followed the KB926449, but nothing listed on that KB works.
I found if the psapi.dll in the Internet Explorer directory will make my IE 7 start failed without any messages!
My psapi.dll in the Internet Explorer directory is 14848 bytes, 4.0.1371.1, Process Status Helper. I guess this dll file is too old and I found the same psapi.dll in system32 directory and the version is 5.1.2600.2180. I guess this is a dll conflict but the IE 7 installer does not detect.
I remove this old psapi.dll IE 7 starts fine.
Sunday, December 10, 2006
Friday, December 08, 2006
I found the dojo document
I found it, http://manual.dojotoolkit.org/WikiHome/DojoDotBook
The wiki is good thing ;-)
The wiki is good thing ;-)
Thursday, December 07, 2006
the dojo
dojo.require("dojo.event.*");
dojo.event.connect(dojo, "loaded", "init");
function init() {
dojo.event.connect(["userName", "nickyName", "email1", "btnRegister" ], "onfocus", infocus);
dojo.event.connect(["userName", "nickyName", "email1", "btnRegister" ], "onblur", outfocus);
dojo.byId("userName").focus();
dojo.byId("userName_tips").className = "tipSpan";
}
function infocus(evt) {
evt = dojo.event.browser.fixEvent(evt);
dojo.byId(evt.target.id + "_tips").className = "tipSpan";
}
function outfocus(evt) {
evt = dojo.event.browser.fixEvent(evt);
dojo.byId(evt.target.id + "_tips").className = "tipSpan1";
}
Subscribe to:
Posts (Atom)