Monday, December 28, 2009

Accessing Radio Buttons Using Javascript

I thought I would post some information about radio buttons in HTML.

If you have radio buttons like this:

<input type="radio" id="button" value="1" checked>Radio1
<input type="radio" id="button" value="2" >Radio2

To keep them in the same group, you have to make sure that the id is the same.

When you try to access them in Javascript, you can not use the document.getElementById("button")

You should access them by using document.formName.button and accessing them this way will return an array. If you are trying to access the first element, you will need to write document.formName.button[0] to get the first element of the radio set.

To get the value, you will write document.formName.button[0].value and you will write
document.formName.button[0].checked to get if the radio button is checked.

Read more...

Tuesday, December 22, 2009

Using PMD with Hudson Integration Environment Part 3

PMD is a static analysis tool and can be used with Hudson. To use it with Hudson, you should follow these steps:

1)Download PMD at http://sourceforge.net/projects/pmd/
2)You should set a environmental variable called PMD_HOME in Windows and in Hudson. Do not forget to set it in Hudson or it won't work.
3)Select PMD from the Plugin list in Manage Plugins and install it.
4) To display PMD information, you should open the config section under the project and select Publish PMD. You should put the name of the file that you have as your output in the text box. Make sure this name matches your output you put in your build script.
5) You should add this to your build.xml file:

<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
<classpath><pathelement location="${env.PMD_HOME}/lib/pmd-4.2.5.jar"/></classpath>
</taskdef>

and add this as a target to run your PMD:

<target name="pmd" depends="findbugs">
<pmd shortFilenames="true">
<ruleset>delegata_pmd_ruleset_standard.xml</ruleset>
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
<formatter type="xml" toFile="pmd.xml"/>
<fileset dir="/Hudson/jobs/ProjectName/workspace/src/">
<include name="**/*.java"/>
<exclude name="**/*Test*"/>
</fileset>
</pmd>


(Part 4 Coming Soon)

Read more...

Saturday, December 19, 2009

Los Angeles Hotels

This is a Sponsored Post written by me on behalf of DiscoverLosAngeles.com. All opinions are 100% mine.


Nye-loews-santa-monica-beach-hotel
Are you preparing for the New Year? You should treat yourself to a luxury hotel located in one of the greatest cities in the world, Los Angeles. This is the city that is going to have one of the best parties around, and they have great hotels that you could stay at. Enjoying one of the LA new year's eve hotel specials will allow you to enjoy many comforts that many people only dream of. You can stay at the Loews Santa Monica Beach Hotel and enjoy live entertainment while enjoying a great four course meal which would include sea scallops, Beaumes venis poached pear and much more. These los angeles hotels contain pet friendly hotels, and contain some of the hottest pools that you can enjoy even in the winter. You also might want to enjoy a boutique hotel that consists of beautiful outdoor gardens. Many of these hotels in los angeles were used in some of your favorite movies. The Hollywood Roosevelt Hotel was used in Charlie's Angels, Mighty Joe Young and more. The Millennium Biltmore Hotel was used in Wedding Crashers, Daredevil and more. So what are you waiting for? If you want to stay at an exciting place for New Years, you should consider visiting Los Angeles.
SocialSpark Disclosure Badge

Read more...

Friday, December 18, 2009

Relevance Search in SQL 2000

This is a query that can be used to retrieve a relevance search from a SQL database. You will need to be using the full text catalog on the SQL server. You then can join with the FreeTextTable to get a ranking. You can order by the ranking to give your search results some relevance. The dbo.LibraryItemVersions is the table and the LIV_Content is a blob field in the LibraryItemVersions table. The 'Project Management Plan' is the item that you are searching on.

SELECT FT_TBL.LIV_LIGUID,FT_TBL.LIV_VERGUID,FT_TBL.LIV_URL,FT_TBL.LIV_FileLocation
,KEY_TBL.RANK
FROM dbo.LibraryItemVersions AS FT_TBL
INNER JOIN FREETEXTTABLE(dbo.LibraryItemVersions, Liv_Content,
'Project management plan')
AS KEY_TBL
ON FT_TBL.LIV_verGUID = KEY_TBL.[KEY]
order by rank desc;
GO

Read more...

Gravy Tips Video

This is a Sponsored Post written by me on behalf of Club House. All opinions are 100% mine.


There is one thing that I love when it comes to my holiday meal and that is the gravy we use. What would Christmas be without some good gravy poured over the Turkey? You can now learn how to make the best gravy for the holidays from the Club House website. The Club House traces its roots back to 1883, and today they still demonstrates their quality, taste and freshness so everybody can enjoy some great tasting meals. You should watch the gravy tips video which will give some great information on making your gravy taste great. There are other videos that you might want to checkout as well like the video on grilling and making the perfect steak. They also have videos on marinating tips and how to make the best Jam. This website contains all kinds of great information to help you improve your cooking such as information on seafood, preserving and your family favorites. You might want to visit the newsletter sign-up and contest entry page to enter their contest. This contest will allow you to win a club house gravy gift pack. So what are you waiting for? If you are looking for the best place to learn about the best gravy, you need to checkout the Club House today.
SocialSpark Disclosure Badge

Read more...

Installing Hudson and Connecting to CVS Part 2

Hudson is an Open Source application used to monitor executions of repeated jobs such as building a software project. Hudson provides an easy-to-use continuous integration system to make it easier for developers to integrate changes to their projects, and to make it easier for users to obtain a fresh build. These are the steps of setting up Hudson using CVS on a Windows System for a Java project. However, Hudson can also be used to .Net projects as well. These installation instructions work for version 1.337 of Hudson, and we will be using Ant version 1.7.

1) You will need to download the War file from this website: http://hudson-ci.org/

2) You should already have Java Installed. If you don't, you should install it. To verify your Java version on a Windows System, you can open a command prompt and type: java -version. You should have Java 1.5 or greater.

3)Open a command prompt and navigate to the directory containing the downloaded hudson.war file. If you want to run Hudson with the default configurations, issue the following command:
java -jar hudson.war

To change the directory Hudson works from and the port that Hudson runs on, use this command:

java -DHUDSON_HOME=<dir> -jar hudson.war --httpPort=<port>

4) If you installed Hudson on the default port, you should be able to see it by visiting this URL: http://localhost:8080/ If you change the port number, modify 8080 to your new port number.

5) To install Hudson as a service, you should open Hudson and select Manage Hudson. You should see a link to install Hudson as as service. After installing Hudson as a service, you should see hudson listed under your computer management. However, if you changed the port from your default port, you need to do an extra step. You should change the port located in hudson.xml from 8080 to the new port and then restart the service. After installing it as a service, you can close your command prompt that you used to start hudson.

6) Ant is a build script commonly used in Java. If you are using Ant, you will need to set it up to be used with Hudson. You can download Ant from this website. http://ant.apache.org/bindownload.cgi. You should download the most current zip file and unzip it somewhere on your hard drive. These instructions are using ant 1.7.1.

7) You should select Manage Hudson, and Configure System. Under the Ant Section, you should put a name which will represent the version of this ant. You should input the ANT_HOME variable as a path like this: C:\apache-ant-1.7.1 This path is the path to the ant installation you downloaded already.

8) You should download the cvs.exe file from the related assets and place the file under your Windows/System32 folder.

9) create a .cvspass file by typing echo ":pserver:login@192.168.0.5:/cvs password" > .cvspass in a command prompt. This is the password file to connect to your cvs repository that you will be using. The login should be your CVS login, the 192.168.0.5 is your CVS ip address, and /cvs is your cvs path and password is the cvs password. Place this file in your HUDSON_HOME directory.

10) Go to Manage Hudson, Configure System and input your CVS information under the CVS section. The cvs executable should read cvs which is the name of your cvs.exe file. You should input the path to your .cvspass file. An example is: /HUDSON_HOME/.cvspass


Go To Part 3

Read more...

Yamaha Portable Player Dock

This is a Sponsored Post written by me on behalf of Yamaha. All opinions are 100% mine.

http://www.yamaha.com/yamahavgn/Images/YEC/Mini_Systems/Main/M_pdx60bl.jpg
I just purchased an iPod player for Christmas, and I have used it everyday at work since I purchased it. I love to be able to listen to all my music from this little iPod player. I have already burned all my CDs and placed them on my iPod. I much prefer to listen to music on my iPod player than watch videos or movies. I can listen to music when I jog, and work, but I can’t watch videos when I do those activities. If you enjoy your iPod or iPhone, you should checkout the Yamaha PDX-60 Speaker Dock. This docking station has exclusive Yamaha yAired ™ wireless technology where you could get instant connection. You also will have no sound delay and excellent sound quality which is my favorite feature of this docking station. You can also charge two iPods on this station at the same time. One can use the dock and the other can used the charging cradle. You can purchase this docking station right from the Yamaha’s website. So what are you waiting for? If you are looking for the best docking station that gives you great sound quality, you should checkout the PDX-60 Speaker Dock today.
SocialSpark Disclosure Badge

Read more...

Wednesday, December 16, 2009

Celebrate Your Christmas at the Hiltons of Branson

This is a Sponsored Post written by me on behalf of Hiltons of Branson. All opinions are 100% mine.


There are many places to go during holiday season, and one of the great places to visit is Branson Landing. Have you ever been to Branson, Missouri? How would you like to spend your holiday vacation over there? When visiting Branson Landing, you get to enjoy the warmth and comfort of an Ozark Mountain Christmas this coming holiday season. There are many exclusive packages that you can find at Hilton Promenade at Branson Landing and Hilton Branson Convention Center Hotel. Here are some exclusive packages they offer:

It’s a Wonderful Life, starting at $329 per night and running thru Dec 23:
- experience the ultimate holiday getaway for shopping, relaxation and entertainment
- loaded with discounts at dozens of shops and restaurants along with a treatment at Aspire Medical Spa.

Santa’s Coming to Town Package, starting at $189 per night and running thru Dec 23:
- Story Time with Mrs. Claus in the lobby of the Hilton Branson Convention Center Hotel
- little ones will enjoy Story Time with Mrs. Claus in the lobby
- Santa himself will deliver presents, cookies and milk to guest’s rooms

Polar Express Package starting at $289 for a family of four :
- includes deluxe accommodations, first-class excursion on the Polar Express with dining car seating, hot cocoa and cookies along with a souvenir ceramic mug.
- Advance reservations are required and additional tickets are available at $49.00 per adult and $39.00 for children ages 2-12.

For more exclusive rates, you should visit them today for details.
SocialSpark Disclosure Badge

Read more...

Wednesday, December 9, 2009

Dungeons and Dragons Jones Soda

This is a Sponsored Post written by me on behalf of Jones Soda. All opinions are 100% mine.


Are you a fan of Dungeons and Dragons? You are going to want to checkout their unique Dungeons and Dragons Jones Soda which has many different flavors such as Sneak Attack, Potion of Healing and more. They also have Dwarven Draught and Eldritch Blast. These sodas sound pretty interesting to me. They have some that are sugar free, and some that are pure cane. I would love to try the Dwarven Draught drink which I would imagine would taste like Vodka. I would figure that Dwarves would be heavy drinkers. The Potion of Healing drink I would expect to taste like medicine. The Sneak Attack drink probably would be a very strong tasting drink that would give me a huge boost of energy. If you are looking for a cool gift to give to someone this holiday season, you might want to get some of these Dungeons and Dragons drinks. This would be the perfect gift for anybody who enjoys playing Dungeons and Dragons or someone who is into fantasy. So what are you waiting for? If you are looking to try a different kind of drink, or are looking for the perfect gift, you should checkout one of these drinks today.
SocialSpark Disclosure Badge

Read more...

Retrieve Count with Multiple Rows in SQL

If you are querying a database and also want to display the count of the items in the table, you might run into this issue.

If you query a table like this: select distinct title, uniqueid from table

You might retrieve the count like this: select count(distinct title) from table

However, the count you retrieve might be different from the number of rows you retrieved from the actual table. That is because the distinct title, uniqueid is retrieving two rows that are distinct, and the count is retrieving one row that is distinct. If the distinct title is different from the distinct title, uniqueid, then your count would be wrong.

You could write the count query like this to get the actual number of rows.

SELECT count(distinct title+CONVERT(varchar(2000),uniqueid)) FROM table

This query will retrieve the count of the two rows assuming that the uniqueid is actually unique. This will work to get you an actual count.

Read more...

Tuesday, December 8, 2009

Bidazzled.com. Redefining Online Auctions

This is a Sponsored Post written by me on behalf of Bidazzled. All opinions are 100% mine.


Are you looking for a place to save a lot of money? You can now save up to 90% on name brand merchandise and fund charities at the same time. Bidazzled is a online Auction site that has redefined the way people purchase items online. These sites usually are called Penny Auctions or Pay-Per-Bid Auctions. The price increase a few cents with each bid placed and a few seconds are added to the countdown clock to give others a chance to bid. The auction ends when no other bids are placed. That is how easy it is to get great deals. Usually the auction winners save over 80% off retail items. Nobody loses because if the people who don't win can receive up to 50 Bonus Bids. You can purchase the items less than the investment you had in the auction. Bidazzled might even offer to purchase the item back for either cash or bids. If you use one of these codes, you can get 15 additional bids.
Blog: BBP1202A
Twitter: BTP1202A

So what are you waiting for? If you are looking for a great place to get great deals, you need to checkout Bidazzled today. You can also purchase bid packs as low as $25.
SocialSpark Disclosure Badge

Read more...

Unzip Files and Upload Each File To Server

This method will allow you to unzip a zipped file and upload all the files separately to your server. You will need to import the proper libraries. The directory is the location to place the files after they are unzipped. The location of the zipped file will be contained in the FormFile class.


final static int BUFFER = 2048;
/**
* This method unzips the file and upload the documents to a file directory.
* The path is the Selected FormFile the user selected from the jsp page which is a zip file.
* The directory is the location where the files will be stored.
*
*/
public void uploadWithNameZip(FormFile path,String directory)
{
try {
BufferedOutputStream dest = null;
//Creates a zipinput stream
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(path.getInputStream()));
ZipEntry entry;
while((entry = zis.getNextEntry()) != null) {
int count;
byte data[] = new byte[BUFFER];
//pulls the filename from each in the zip file
String fileName = entry.getName().trim();
//creates the path where file will be stored with filename
String dir = directory.trim();
dir = dir+System.getProperty("file.separator");
String totalName=dir+fileName;
//saves each individual file on the file server
OutputStream fileOut = new FileOutputStream(totalName);
dest = new BufferedOutputStream(fileOut, BUFFER);
while ((count = zis.read(data, 0, BUFFER))!= -1) {
dest.write(data, 0, count);
}
dest.flush();
dest.close();
}
zis.close();
} catch(Exception e) {
e.printStackTrace();
return null;
}
}


Read more...

Monday, December 7, 2009

LG Chocolate Touch

This is a Sponsored Post written by me on behalf of LG Chocolate Touch. All opinions are 100% mine.


Wouldn’t you like to have a phone that allows you to make calls, send texts, use the Internet, use social media, take pictures and videos and also has a music player with Dolby Mobile technology for crystal-clear sound quality? Well, now you can have a phone that includes all this technology by purchasing the LG Chocolate Touch phone. I would find life much easier by having all of these technologies contained in one phone. I won’t have to wait until I get on my home computer to get on Facebook, and I will still have excellent crystal clear sound. If I had this phone, I wouldn’t need my home phone and the internet on my desktop computer anymore either. The Dolby Mobile technology for crystal-clear sound quality will greatly improve my ability to communicate with my friends and family members. This phone also has sweet visual effects and features which include rhythmical beat that vibrates the handset to the beat of the music. What a great idea! It also has a one touch social network message key for easy use of Mobile Blogging such as Facebook. It also has mobile media such as pictures, videos and more. This phone also has a 3.2MP Camera/Recorder with excellent quality. So what are you waiting for? If you are looking for a great phone, you should checkout the LG Chocolate Touch.
SocialSpark Disclosure Badge

Read more...

Make Your Camera Wireless

This is a Sponsored Post written by me on behalf of Eye-Fi. All opinions are 100% mine.


Are you someone who never gets the time to transfer your pictures from your camera to your computer? I know I get lazy transferring my pictures from my camera to my computer. When people ask me where my vacation pictures are, I usually end up saying that they are still on my camera which is located in my dresser drawer. Now, there is an easier way to handle my digital photo album by using the Wi-Fi-enabled SD card. The Eye-Fi is the easiest way to transfer what is in my camera, and it can save me a lot of time and hassle. It creates an effortless sharing while the memory is still fresh. This way I can actually do something with all those pictures that I take instead of leaving them on my camera. The Eye-Fi card could change the way that I upload and share photos by making it extremely easy. This is the first wireless memory card, and it fits into my camera just like a regular SD/SDHC card. This card has a build in wireless network to effortlessly transfer photos and videos. I can add up to 32 networks for my card to use. So if you are looking for a great Christmas gift, you need to checkout the Wi-Fi-enabled SD card.
SocialSpark Disclosure Badge

Read more...

Wednesday, December 2, 2009

Yamaha PDX-60 Speaker Dock

This is a Sponsored Post written by me on behalf of Yamaha. All opinions are 100% mine.

http://www.yamaha.com/yamahavgn/Images/YEC/Mini_Systems/Main/M_pdx60bl.jpg
I just bought a new iPod so I now I am able to listen to all my favorite music at a click of a button. Now I can listen to my iPod, play games, and watch movies wirelessly from anywhere in the room using the powerful Yamaha PDX-60 Speaker Dock. They are using exclusive Yamaha wireless technology. This technology is awesome because you don’t have any sound delays and the quality is awesome which is what I like most about these speakers. You can also use the dual charging mechanism to charge two separate iPhones or iPods at the same time. One of them can use the dock on the speaker, and the other can charge using the charging cradle. I use my iPod all the time and the Yamaha PDX-60 Speaker Dock would be great for me. I usually use my iPod at work, but I also use it at home, and on vacations. You can enjoy the simple and convenient operation and unlike Bluetooth products, no pairing is needed. So what are you waiting for? If you are looking for a cool speaker dock for your iPod or iPhone, you should checkout the Yamaha PDX-60 today. This would be a great Christmas present to give to someone as well.
SocialSpark Disclosure Badge

Read more...

Using Ajax and JQuery Part 1

If you are planning on implementing Ajax into your website, you should use JQuery. Ajax is shorthand for asynchronous Javascript and XML. It allows you to create intereactive web applications on the client-side.

JQuery is an amazing Javascript library that makes it easy to create cool websites with just a few lines of code. It is a Javascript library that makes it easy to write the complex Javascript that you will need to create attractive websites.

You should use JQuery if you need a small library that gives you power over the Document Object Model. You should also use it if you need quick access to Ajax without a lot of bloat (overhead-wasted code).

You can also use it to add some basic animation effects to spice things up.

I will post more on using Ajax and JQuery.

(Part 2 Coming Soon)

Read more...

Tuesday, December 1, 2009

Master of Arts in Teaching degree online from USC


This is a Sponsored Post written by me on behalf of USC. All opinions are 100% mine.


SocialSpark Disclosure Badge

Read more...