Thursday, December 07, 2006

Windows Vista Product Guide

It is 300+ page guide about the next generation client operation system successor to Windows XP. Download the Windows Vista Product Guide Today!

(P25) Windows Easy transfer: it is very important to transfer all the data over from XP.

(P27) Windows Experience Index: Control Panel -> Performance Information and Tools. (1-5.9). Base score. 3.0

(P30) The first Windows operating system that scales the user experience to the hardware capabilities of your computer.

(P94) Shadow copy

(P110) Networked Projection. This is a real cool feature. Also you could phisically have multiple display.

(P120) Windows Hot start for playing music/media stored in your hard disk.

(P118) Windows SideShow Gadgets. Remote control without turning on your PC. One for windows mail and another is for Windows media player.

(P123) --- Windows SyncCenter.

(P132) Speech recognition.

(P140) --- Accessability. Showing narrator, on-screen keyboard, and magnifier.


P150 Home User

(P151) Parental Control.

(P161) Windows media centre Since 2002, Windows Media Center has seen four releases: Windows XP Media Center Edition, Windows XP Media Center Edition 2004, Windows XP Media Center Edition 2005, and a Windows Media Center Edition 2005 update. Windows Media Center now ships into more than 30 locales.

(210) XPS Document. You could browse it in IE. But you need .NET frameworks 3.0. installed. (Fonts embedded). Create by Print To.

(214) Windows Meeting Space, it is great for share the windows.

(220) With Windows XP, users can achieve stateless computing in two ways: through Roaming User Profiles (RUP) and Folder Redirection (FR).

Section 6: For IT professionals.

(250) SUA - Subsystem for Unix-based Application.

(256) Security Firewall, Spyware, Windows Service Hardening. Filewall supports inbound and outbound filtering.

(286) Microsoft .NET Framework 3.0

Tony

Tuesday, November 21, 2006

BLOG: some interesting libraries.

ant-contrib
apache.org
axis
chainsaw-bundle
coverage
creator-2
derby
dsview
eclipse
eclipse-os-pack
hibernate
hsqldb
jMock
jasper
javax
jawin
JBOSSRemoting
jce_policy-1_5_0 jcifs
jetty
jmimemagic
junit
jzlib
klassmaster
mail
onejar
pmd-3.2
poi
servlet
spring
sqlserver
wrapper_win32_3.1.2
xdoclet
Xenocode
ZLIBZero\ G\ InstallAnywhere\ 7\ Enterprise

BLOG: JBossRemoting

This is Java multiple virtual sockets running over a real socket.

http://labs.jboss.com/portal/jbossremoting


Pluggable transports - can use different protocol transports the same remoting API.
Provided transports:
Socket (SSL Socket)
RMI
HTTP(S)
Multiplex
Servlet

Tony

BLOG: RSYNC

About RSYNC

If you have cygwin installed, rsync is a great tool to have. Basically rsync uses a transfer protocol that works on very small diffs. For example, say you have a huge 500M text file that changes frequently but in small increment (like a log file), you can use rsync to "synchronize" the remote file (usually the sourcE) with a local file. Rsync will then apply a hash to small blocks in the local and remote file and only exchange those hashes. When a hash does not match, the block that failed will then be downloaded and swapped into your local file.

The really cool thing about rsync is the ability to not only apply this concept to large files but also to large directory structures (say svn?)

So, to see a list of files available in the rsync repository, you would use:

rsync rsync://YourWorkStation/

This will actually show you a list of modules that are currently available.

rsync rsync://YourWorkStation/YourProject

will show you the list of directories under that modules.

To download the latest version of the SDK you would first have to figure out which version is available:

rsync rsync://YourWorkStation/YourProject/nightly/

drwxr-xr-x 4096 2006/11/20 09:25:04 . drwxr-xr-x 4096 2006/11/17 09:20:59 3.4.0.89 drwxr-xr-x 4096 2006/11/20 16:20:01 3.4.0.90 drwxr-xr-x 4096 2006/11/20 15:12:06 3.4.0.93

Here you can see that the latest would be 3.4.0.93

To download all the latest builds for all the platforms you can use:

rsync -PWa rsync://YourWorkStation/YourProject/nightly/3.4.0.93 .

This will :

Give you progress on the download (-P),

Download the whole file instead of the increment (-W),

Recursively archive the directory (-a)

Create a local directory 3.4.0.93 will all the file within.

Now if you just want one file for one platform you can then go:

rsync -PW rsync://YourWorkStation/YourProject/nightly/3.4.0.93/setup.exe .

About RSYNC and Subversion

Rsync has one really tricky bit when it comes to recusive download. It really important to understand the difference between downloading a directory and the content of a directory so the following:

rsync -PWa rsync://YourWorkStation/YourProject/nightly/3.4.0.93 .

is not the same as

rsync -PWa rsync://YourWorkStation/YourProject/nightly/3.4.0.93/ .

is not the same as

rsync -PWa rsync://YourWorkStation/YourProject/nightly/3.4.0.93/* .

if you do not put a trailing / at the end of the rsync url, rsync will create a directory. If you do, then it will not create the directory. If you put a star (*) then you will only get the files that are NOT hidden (not file that start with ".").

So to get the latest copy of SVN you can use the following:

rsync -Pa --del rsync://YourWorkStation/YourProject/svn/ .

This will:

Give you progress (-P), Recursively archive (-a), Delete any files that are not in the source (--del : this is a must to remove deprecated files and build artifacts). Will NOT create a directory SVN and dump all the files under that directory in the current directory.

Use svn info . to make sure you have the right version of the YourProject source.

Tony

BLOG: PowerShell

New command shell from MS. Better late then never.... So far it seems not bad.

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

Most shells, including Cmd.exe and the SH, KSH, CSH, and BASH Unix shells, operate by executing a command or utility in a new process, and presenting the results to the user as text. Over the years, many text processing utilities, such as sed, AWK, and PERL, have evolved to support this interaction.
These shells also have commands that are built into the shell and run in the shell process, such as the typeset command in KSH and the dir command in Cmd.exe. In most shells, because there are few built-in commands.many utilities have been created.
Windows PowerShell is very different.
· Windows PowerShell does not process text. Instead, it processes objects based on the .NET platform.
· Windows PowerShell comes with a large set of built-in commands with a consistent interface.
· All shell commands use the same command parser, instead of different parsers for each tool. This makes it much easier to learn how to use each command.
Best of all, you don't have to give up the tools that you have become accustomed to using. You can still use the traditional Windows tools, such as Net, SC, and Reg.exe in Windows PowerShell.

A cmdlet (pronounced "command-let") is a single-feature command that manipulates objects in Windows PowerShell. You can recognize cmdlets by their name format -- a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service.

Tony

Monday, October 30, 2006

BLOG: Things to know about Windows Vista

Windows Vista wont be long before the final release is sent to the manufacturing. There are five versions: Business, Enterprise, Home Basic, Home Premium, and Ultimate.

Computer scan http://www.microsoft.com/windowsvista/getready/upgradeadvisor/default.mspx. needs DVD R/W and Video card (TV output/ TV Tuner card to watch TV on computer).

1. Vista image usually 2G and expand 5GB.
2. Vista supports Low right user which logon without administrator privilege. UAC (User access control). And BitLocker full-volume encryption.

3. Componentized OS. Security updates /Language packs /Drivers are components.
4. No I386, No text mode installation.
5. Boot.ini is history. Bootmgr /BCDedit.exe You can boot windows XP and vista either way.
6. Settings are configured in XML. You can use Windows System Image Manager and User State Migration Tool to manage Vista.

7. HAL Hardware abstraction Layer. You can create Windows PE 2.0 (Preinstall Environment).
8. Windows PE rules. Peimg.exe
9. WIM is the file based image. It supports multiple images per file.
10. Deployment is language neutral.

Security in Vista:

1. Security Centre
2. Windows Firewall
3. Windows Update
4. Windows Defender scan for spyware and other potentially unwanted software.
5. internet options
6. parent control (setup parent controls for any user; view activity reports).
7. Bitlocker driver encryption.

BLOG: Things to know in Vista

Windows Vista won’t be long before the final release is sent to the manufacturing. There are five versions: Business, Enterprise, Home Basic, Home Premium, and Ultimate.

Computer scan http://www.microsoft.com/windowsvista/getready/upgradeadvisor/default.mspx. needs DVD R/W and Video card (TV output/ TV Tuner card to watch TV on computer).

1. Vista image usually 2G and expand 5GB.
2. Vista supports “Low right” user which logon without administrator privilege. UAC (User access control). And BitLocker™ full-volume encryption.
3. Componentized OS. Security updates /Language packs /Drivers are components.
4. No I386, No text mode installation.
5. Boot.ini is history. “Bootmgr” /”BCDedit.exe” You can boot windows XP and vista either way.
6. Settings are configured in XML. You can use “Windows System Image Manager” and “User State Migration Tool” to manage Vista.
7. HAL – Hardware abstraction Layer. You can create Windows PE 2.0 (Preinstall Environment).
8. Windows PE rules. – Peimg.exe
9. WIM is the file based image. It supports multiple images per file.
10. Deployment is language neutral.

Security in Vista:
1. Security Centre
2. Windows Firewall
3. Windows Update
4. Windows Defender – scan for spyware and other potentially unwanted software.
5. internet options
6. parent control (setup parent controls for any user; view activity reports).
Bitlocker driver encryption.

Friday, October 27, 2006

BLOG: FF2 vs IE7

Today downloaded both and installed both. Both are impressive. There are a few Add-Ons which impressed me. https://addons.mozilla.org/firefox/recommended/ .  CoolIris preview - which auto load the page when you hover the links. Clipmarks is pretty good. Yoono give you more interesting related sites. Foxmarks keep a sync your favorites with server.

 

IE7 is pretty impressive as well and you can put add-ons as well. I found it is pretty sneaky. But clipmarks doesnt support the IE7 now. IE7 has many really cool features, such as RSS page. FlashGet is a surprise. You can set google as search provider. And the one I like most the research which could provide you with an easy way to look up word.

I also installed PowerToy of windows XP which provide a bunch of stuff for XP. The one I like most is the ClearType tuning which makes the text much readable in the screen. IE7 has this as well. It has a very powerful calculator and conversion. You can make slideshow HTML as well.

BLOG: Mustang improvement on CLASSPATH


1. Classpath support Mustang
java -classpath .;jars\*  oom.CheckOOMError

2. OutOfMemeory Error now have stack trace
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:45)
        at java.lang.StringBuilder.<init>(StringBuilder.java:80)
        at oom.CheckOOMError.main(checkOOMError.java:12)

Thursday, October 26, 2006

BLOG: Jetty redirect the root to target application

If you are using Jetty, you will find that there is not very convenient not to have the default context. Therefore, you have to overcome the root context in jetty to use your own target context.

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Make https://server/ redirect to https://server/targetApp/ -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Call name="addContext">
<Arg>
<New class="org.mortbay.http.HttpContext">
<Set name="ContextPath">/</Set>
<Call name="addHandler">
<Arg>
<New class="org.mortbay.http.handler.ForwardHandler">
<Set name="RootForward">/targetApp</Set>
<Call name="addForward">
<Arg>/favicon.ico</Arg>
<Arg>/targetApp/images/favicon.ico</Arg>
</Call>
</New>
</Arg>
</Call>
<Call name="addHandler">
<Arg>
<New class="targetApp.server.util.jetty.RedirectHandler" />
</Arg>
</Call>
</New>
</Arg>
</Call>

public class RedirectHandler implements org.mortbay.http.HttpHandler
{
public void handle(String pathInContext, String pathParams, HttpRequest httpRequest, HttpResponse httpResponse) throws HttpException, IOException
{
httpResponse.sendRedirect( "/targetApp" );
httpRequest.setHandled( true );
}
}

BLOG: Spring IDE

This is a really handy. Eclipse plug-in Spring IDE provides the following features. I enjoy Spring more and more.

· Project nature which supports a list of Spring bean config files and sets of bean config files (aka beans config sets)

· Incremental builder which validates all modified Spring bean config files defined in a Spring project
· View which displays a tree with all Spring projects and their Spring bean config files
· Image decorator which decorates all Spring projects, their bean config files and all Java classes which are used as bean classes

· Graph which shows all beans (and their relationships) defined in a single config file or a config set
· XML editor for Spring beans configuration files
· Extension of Eclipse's search facility to search for beans defined in the BeansCoreModel
· Wizard for creating a new Spring project

BLOG: Berteig Consulting Student Support (ScrumMaster)

You can download many useful tools and documentations related SCRUM from here.

http://finance.groups.yahoo.com/group/bci_student_support/files/

Monday, October 16, 2006

BLOG: Extract a resource from Jar file

Sometime we want to ship our product in one jar file. This is a practical solution where we can extract out the resource into a temporary file. In my specific project, I need to extract a dll out of the jar file and run the JNI call against with it.

public void extractFile(ClassLoader classLoader, String resName, File targetFile) throws IOException {

FileOutputStream fos = new FileOutputStream(targetFile);

URL url = classLoader.getResource(resName);

if (url == null) {

throw new IOException();

}

InputStream is = url.openStream();

byte[] c = new byte[BUF_LEN];

int i = 1;

while (i != -1) {

i = is.read(c, 0, BUF_LEN);

if (i > 0) {

fos.write(c, 0, i);

}

}

fos.flush();

fos.close();

}

Tony

Tuesday, October 10, 2006

BLOG: TSQL

All the following examples are in database Pubs. You can use Use database; or Select db_name(); to determine whether you are in the database.

select au_fname+ + au_lname, city + , + state + +zip from authors
select title_id, price from titles where price between 10 and 20
select au_lname, state from authors where state in ('CA','KS','MI','UT')
select au_fname, au_lname from authors where au_fname like 'M%'
select au_fname, au_lname from authors where au_fname like 'M_'
select notes from titles where notes like '%@%%' escape '@'
select au_lname, au_fname from authors where au_lname like '[LMS]%'
select au_lname, au_fname from authors where au_lname like '[A-Z][a-z][a-z][a-z]'
select title_id, titles from titles where title like '%[Ww][Ii][Tt][Hh][Oo][Uu][Tt]%'
select * from authors where au_fname like '[^ ] [^ ] [^ ] [^ ]'
select * from authors where state <> 'CA' might be written in select * from authors where state != 'CA'
select au_fname,au_lname from authors order by au_lname,au_fname
select distinct type from titles group by type order by 1 desc,
Aliases can reside in “select” or “from”.
select * from titles where royalty = null
select pub_id,sum(advance) from titles group by pub_id having sum(advance) > 10000
select title_id,type,price from titles where type like '%cook%' compute avg(price)
select title_id, type, price from titles where type like '%cook%' order by type compute avg(price) by type
select title_id,type,price from titles where type in ('business','mod_cook') order by type compute sum(price) by type compute sum(price)

select * from authors where state = 'CA' union select * from authors where state = 'MA'
select sum(qty) from stores,sales where stores.stor_id = sales.stor_id and state = 'CA'
select stores.stor_id,stor_name, ord_num, qty from stores,sales where stores.stor_id *= sales.stor_id
Dont try to use full outer join. Your DBA will be very angry about the full outer join because it might produce A x B rows of output.


Sub Query (Non-correlated or Correlated). Most of subqueries you can write them as join.

          select [distinct] select_list

          from table_list

          where {expression {[not] in comparison [anyall]}[not] exists}

          (select [distinct] subquery_select_list from table_list where conditions)

          [group by group_by_list]

          [having conditions]

          [order by order_by_list]

· Temp table: session temp tables preceeded by a # ex: #authors. Global temp tables ##authors which must be dropped explicitly. (SELECT INTO). You can also create an empty table by using SELECT INTO where 1=2.

· Views are nothing more than a name for a select statement that is stored in the database.
· create table people (SSN char(11) not null constraint chk_ssn check (SSN like '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]', low int, high, constraint chk_low_high check (LowQty <= HighQty))

· constraint constraint_name] references ref_table [ref_column] / [constraint constraint_name] foreign key (column [{,column}…]) references ref_table [(column [{, column}…])]

· select convert(varchar(8),pubdate,2) from titles where title_id = 'MC3026' (2 yy.mm.dd 3 dd/mm/yy 4 dd.mm.yy 5 dd-mm-yy 102 yyyy.mm.dd 103 dd/mm/yyyy 104 dd.mm.yyyy 105 dd-mm-yyyy).

· Local variables: declare @myvar int select @myvar = 42. Global Variables @@error @@identity @@rowcount @@version @@max_connections @@servername

· The ANSI standard defines four level of isolation for transactions @@isolation
· Level 0 allows dirty reads (You can see data that has been changed, but not necessarily committed, by another user (DEFAULT)

· Level 1 prevents dirty reads
· Level 2 prevents non-repeatable reads
· Level 3 prevents phantom reads
· begin tran; rollback tran; commit tran
· rollback {transaction tran work} savepoint_name @@transtate
· if @@error != 0
· Use the holdlock/noholdlock to override an isolation level setting
· Cursor Example

          declare mycursor cursor for select title from titles for read only

          declare @title_name varchar(80)

          open mycursor

          while @@fetch_status = 0

          begin

          fetch mycursor into @title_name

          end

          close mycursor

          deallocate mycursor

· Stored Procedure Example

          create procedure proc_name

          (@parameter datatype = default

          [,@parameter datatype output]

          [,@parameter datatype…])

          as

          SQL batch

          return

· Trigger Example (SPECIAL TABLE: inserted, deleted)

          create trigger trigger_name on table_name

          for {insert update delete}

          [,{insert update delete}]…

          as

          SQL statements

· A column or local variable of uniqueidentifier data type can be initialized to a value in the following ways:
o By using the NEWID function.
o By converting from a string constant in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, in which each x is a hexadecimal digit in the range 0-9 or a-f. For example, 6F9619FF-8B86-D011-B42D-00C04FC964FF is a valid uniqueidentifier value.

o Comparison operators can be used with uniqueidentifier values. However, ordering is not implemented by comparing the bit patterns of the two values. The only operations that can be performed against a uniqueidentifier value are comparisons (=, <>, <, >, <=, >=) and checking for NULL (IS NULL and IS NOT NULL). No other arithmetic operators can be used. All column constraints and properties, except IDENTITY, can be used on the uniqueidentifier data type.

Tony

Thumbs Up to GitHub Copilot and JetBrains Resharper

Having used AI tool GitHub Copilot since 08/16/2023, I’ve realized that learning GitHub Copilot is like learning a new framework or library ...