- If the java class the XStream using is an inner class, you will find something like Outer-class in the xml, better don't use inner class for XStream.
- If you have a filed called "children" which is a list of object, but you don't want to show the name of "children", you want only show the list of object directly, you could doxs.addImplicitCollection(Node.class, "children"); in this way, "children" will not show up in xml file.
- If you want one attribute name showed in side the tag, using xs.useAttributeFor(Employee.class, "name");
- <employee>
- <name>Jack</name>
- <role>Manager</role>
- <department>Finance</department>
- </employee>
- to
- <employee name="Jack">
- <role>Manager</role>
- <department>Finance</department>
- </employee>
XStream Notes
Labels:
xstream
How To Import/Export Environment Variables
Use RegEdit to import/Export
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment HKEY_CURRENT_USER\Environment
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment HKEY_CURRENT_USER\Environment
Labels:
Windows7
What is the difference between :ssh: and :ext:?
Both these protocols normally use the SSH (Secure Shell) protocol to communicate with the CVS server, meaning that your passwords and data are safe from eavesdroppers (although :ext: can be configured to use other protocols as well).
The difference is that :ssh: uses an SSH client built into CVSNT, while :ext: relies on an external SSH client. If you use CVS from the command line, :ssh: has the advantage that you do not need any other software. Since TortoiseCVS already comes with its own SSH client, there is nothing gained from preferring :ssh:. Additionally, at least some versions of CVSNT have problems communicating with non-CVSNT servers, such as those used on the majority of UNIX servers.
Another important point is that it is not possible to configure :ssh: to use another port etc. in the Preferences dialog of TortoiseCVS. That dialog applies only to :ext:. Therefore, we recommend that you always use :ext: instead of :ssh:.
The difference is that :ssh: uses an SSH client built into CVSNT, while :ext: relies on an external SSH client. If you use CVS from the command line, :ssh: has the advantage that you do not need any other software. Since TortoiseCVS already comes with its own SSH client, there is nothing gained from preferring :ssh:. Additionally, at least some versions of CVSNT have problems communicating with non-CVSNT servers, such as those used on the majority of UNIX servers.
Another important point is that it is not possible to configure :ssh: to use another port etc. in the Preferences dialog of TortoiseCVS. That dialog applies only to :ext:. Therefore, we recommend that you always use :ext: instead of :ssh:.
Labels:
CVS
How do I tell if my computer can run a 64-bit version of Windows?
How do I tell if my computer can run a 64-bit version of Windows?
To run a 64-bit version of Windows, your computer must have a 64-bit-capable processor. To find out if your processor is 64-bit-capable, do the following:
- Open Performance Information and Tools by clicking the Start button
, clickingControl Panel, clicking System and Maintenance, and then clickingPerformance Information and Tools.
- Click View and print details.
- In the System section, you can see what type of operating system you're currently running under System type. Under 64-bit capable, you can see whether you can run a 64-bit version of Windows. (If your computer is already running a 64-bit version of Windows, you won't see the 64-bit capable listing.)
Labels:
Windows7
How to make a bootable Windows 7 USB installer with CMD:
How to make a bootable Windows 7 USB installer with CMD:
ThinkPad T400S, hit F1 enter BIOS.
Make sure put USB HDD as the first priority of start up.
- Open and run CMD as Administrator.
- Type Diskpart, press Enter.
- Type List Disk, press Enter.
- Type Select Disk # (where # is the number your USB drive shows up as), press Enter.
- Type Clean, press Enter.
- Type Create Partition Primary, press Enter.
- Type Active, press Enter.
- Type Format Quick FS=FAT32, press Enter.
- Type Assign, press Enter.
- Type Exit, press Enter.
- Copy everything from the Windows 7 installation DVD onto the USB key (a simple drag and drop will do; if you have an .iso extract or mount first).
Make sure put USB HDD as the first priority of start up.
Labels:
Windows7
Base 64 Encoidng and Decoding
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import org.apache.commons.codec.binary.Base64;
String strTobeEncoded = "This is message body which will be 64 encoded";
String strTobeDecoded = "VGhpcyBpcyBtZXNzYWdlIGJvZHkgd2hpY2ggd2lsbCBiZSA2NCBlbmNvZGVk";
String encodedResult = "";
String decodedResult = "";
try
{
// encoding using sun.misc.BASE64Encoder;
BASE64Encoder encoder = new BASE64Encoder();
encodedResult = encoder.encode(strTobeEncoded.getBytes());
System.out.println("Encoded by Sun's encoder: " + encodedResult);
// decoding using sun.misc.BASE64Encoder;
BASE64Decoder decoder = new BASE64Decoder();
decodedResult = new String(decoder.decodeBuffer(strTobeDecoded));
System.out.println("Decoded by Sun's decoder: " + decodedResult);
// encoding using org.apache.commons.codec.binary.Base64;
encodedResult = new String(Base64.encodeBase64(strTobeEncoded.getBytes()));
System.out.println("Encoded by Apache's encoder: " + encodedResult);
// encoding using org.apache.commons.codec.binary.Base64;
decodedResult = new String(Base64.decodeBase64(strTobeDecoded.getBytes()));
System.out.println("Decoded by Apache's decoder: " + decodedResult);
}
catch (Exception e)
{
}
Target runtime SpringSource tc Server Developer Edition (Runtime) v2.1 is not defined.
Solutions:
1. Delete the server
2. Recreate the server: create new instance, choose template insight.
3. Right click the project, find "Targeted Runtimes", removed the old one.
1. Delete the server
2. Recreate the server: create new instance, choose template insight.
3. Right click the project, find "Targeted Runtimes", removed the old one.
Subscribe to:
Posts (Atom)