Wednesday, March 31, 2010

Ultimate Countdown Kids Collection: 200 Sing-A-Long Favorites album

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

Dga2_4674
I have the perfect gift for my child on Easter and that is theUltimate Countdown Kids Collection: 200 Sing-A-Long Favorites album. Amazon will be offering a great MP3 Daily Deal for this album where you only have to pay $3.99 for your child to enjoy this great sing a long fun. This album usually sells for $11.99. This album has 200 songs that your child will enjoy. Your child can sing a long to “Alice The Camel”, “ABCs and 123s”, and even A Peanut Sat On A Railroad Track”. I am thinking of getting this album for my child because I know how much she loves to sing. There are so many songs to sing such as “Bye Baby Bunting”, “Boom, Boom, Ain’t It Great To Be Crazy?”, and even “Bobby Shafto”. This is a great deal to get so many songs for only $3.99, and I know this album will make a great Easter gift. So what are you waiting for? If you have been looking for the perfect item for your child’s Easter basket, you should checkout this sing a long album. You don’t want to wait until the album goes up in value. This is the perfect time to save some money on a great children’s album.
Visit my sponsor: 200 Sing-a-long Favorites: $3.99 Album Download

Read more...

Search Through All Fields in a SQL Database

I posted Narayana Vyas Kondreddi code to allow you to search through an entire database but the code only searches text fields. I found that someone modified the code to allow it to search through number fields as well. The modified code didn't post very well and had a couple of errors so I fixed it and here it is for you to use. You should be able to run this code and use it right away without making any changes. You can execute it in your query analyzer by typing "exec SearchAllTablesWithNumber 'value'". My modification will only search through number columns. You can use the other query I posted to look through text columns.



set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


create PROC [dbo].[SearchAllTablesWithNumber]
(
@SearchStr nvarchar(100)
)
AS
BEGIN

-- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
-- Purpose: To search all columns of all tables for a given search string
-- Written by: Narayana Vyas Kondreddi
-- Site: http://vyaskn.tripod.com
-- Tested on: SQL Server 7.0 and SQL Server 2000
-- Date modified: 28th July 2002 22:50 GMT


CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

SET NOCOUNT ON

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)

WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
BEGIN


--@@@@@@@@@@@@NUMERIC
IF ISNUMERIC(@SearchStr) = 1
BEGIN
SET @ColumnName =
(
SELECT MIN(QUOTENAME(COLUMN_NAME))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND TABLE_NAME = PARSENAME(@TableName, 1)
AND DATA_TYPE IN ('int','bigint','smallint','tinyint','decimal','float','real')
AND QUOTENAME(COLUMN_NAME) > @ColumnName
)

IF @ColumnName IS NOT NULL
BEGIN

INSERT INTO #Results
EXEC
(
'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' + @TableName + ' (NOLOCK) ' +
' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
)
End




--@@@@@@@@@@@@@@@@@@@




END
END
END

SELECT ColumnName, ColumnValue FROM #Results
END

Read more...

USC Rossier School of Education

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



If you are thinking of going back to school, you can obtain a prestige Master of Arts in Teaching degree online. One of the best times to go back to school is during a tough economy. The USC Rossier School of Eduction is now offering current educators and other people interested in becoming teachers the opportunity to earn their Master of Arts degree in teaching. They have all their program information directly on their website. This awesome opportunity will give you the flexibility of going to school without having to attend classes. This will be a great opportunity if you are working, or a stay at home mom. You will still get the highly interactive online learning combined with field-based experience using this program. You now have the opportunity of becoming a part of the elite USC Trojan Family, and you will have obtained your Master's degree. This school is an internationally renowned researched institute and will make your degree worth more. You can earn your degree in 12 months from a school that has been ranked #22 in the United States, and #9 among all private universities by US News and World Report. If you are looking to get your Master's degree from distinguished faculty, you should checkout this Masters program today.
Visit my sponsor: Master of Arts in Teaching degree online from USC

Read more...

Tuesday, March 30, 2010

iLASIK Video Contest

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


I have wanted to get corrective eye surgery for a while now and now that I have seen the iLASIK Video Contest, I am thinking about it more seriously. Abbott Medical Optics Inc. (AMO) has just announced the winners of the “You Gotta See This” video contest. They are the global leaders in laser vision correction and are the company who sponsored this contest. The Grand Prize winner won $5,000, and other winners won HDTV packages worth $2,500 and a Flip UltraHD camcorder worth $199.99. Contestants had to submit videos of how corrective surgery has improved their lives. If you have been thinking about getting corrective surgery, you should checkout iLASIK Video Contest. These videos might give you the testimonies you need to decide to get it yourself. Even though the contest has ended, it isn’t too late to make the decision to get vision quality which comes with the iLASIK procedure. You can view the videos of the winners, and even the people who didn’t win. So what are you waiting for? If you need some help making the decision to get corrective surgery for your eyes, you should watch these videos and see how it has improved other people’s lives.
Visit my sponsor:

Read more...

Java Out of Heap Space In Eclipse Galileo Tomcat

If you get this error, it can be quite confusing where to increase the memory.

1) You can try and increase the memory in eclipse.ini file.
2) You can add -vmargs parameters when starting eclipse.
3) You can add -vmargs to your JVM when starting it.

I added the -vmargs to my eclipse.ini file and that didn't help. My application continued to get the Java Out of Heap Space error. I selected the properties on my eclipse shortcut and added the parameters there like so: C:\EclipseGalileo\eclipse\eclipse.exe -vmargs -Xms512M -Xmx512M. That actually increases eclipse heap space. You can check that by selecting windows->preferences->general and selecting show heap status. This will show you the heap space memory usage in the lower right hand corner of eclipse.

But, to prevent your application from running out of memory in Tomcat, you have to increase the parameters in your JVM. You can do that by selecting Windows->Preferences->Java->Installed JREs and select edit on your Installed JRE that you are using. I added -Xms512M -Xmx512M under the default VM arguments which solved my problem.

Read more...

Allison Maslan's book Blast Off!

This is a Sponsored Post written by me on behalf of Allison Maslan, author of "Blast Off!". All opinions are 100% mine.


Are you looking to make some more money and take your career to a new level? Have you been thinking of starting a business for yourself? If you have been looking for a way to get financial freedom, you should checkout Allison Maslan’s new book called Blast Off! This book will give you some great insight, strategies and techniques that can help you obtain financial freedom. It gives you a step-by-step approach to attain success and prosperity. Allison can help guide you in creating a big picture for your career, personal life, finances, relationships, health and even your spiritual life. You can get all of this in a simple book which costs only $24.00. I think this book can help me by giving me some ideas to be more successful. I can always use ideas to improve my spiritual life, health, relationships and finances. The launch date for this book was January 19th, 2010, and it is available on Amazon. You can also get this book at Borders, Barnes and the Barnes and Noble’s website. You can also find it in all other major bookstores. So what are you waiting for? If you are looking for a good book that can help you obtain financial freedom, you should checkout Allison Maslan’s book called Blass Off! What do you have to lose?
Visit my sponsor: Blast Off!

Read more...

Sunday, March 28, 2010

Using Distinct and Criteria Object with Pagination Groovy

I have discovered an issue with the Criteria Object when it comes to pagination.

My code looks like this:

def softwareList = c.listDistinct {
environments {
if (params.environmentId) {
eq('id', new Long(params.environmentId))
}
}

statuses {
if (params.active) {
gt('endDate', new Date())
reference {
eq('name', 'Active')
}
}
}
maxResults(5)


firstResult(params.offset)

}

Even though I am declaring my maxResults to be 5, I am getting different number or rows returned each time the user changes to a different page. I want each page to display 5 items. However, on the first page there might be only one item, and the next page there could be 4. The number of rows returned will always be between 1 and 5 though. I found out that the issue has to do with using distinct in this part of the code: c.listDistinct. If I removed distinct, then each page will display 5 items. I am not sure why it does this, but in my case I didn't need to use distinct.

Read more...

Friday, March 26, 2010

Have it all this spring in Branson, Missouri!

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



Spring time is the perfect time to relax and unwind. It feels great to spend a spring break vacation together with your loved one. Are you looking for a great spot to enjoy spring? How about going to the famous Branson, Missouri? This place has become a great vacation spot. This place is situated within the electrifying entertainment capital of the Midwest.

Here's an itinerary that you might like to do in Branson:
- 14th annual Branson Tri-Lakes Building and Home Show
- NAIA Division II Men’s Basketball Tournament
- Branson’s Best Boat and Recreation Show
- Silver Dollar City’s Family Spring Break Day and the memorable Young Christian’s Weekend

And also they have a series of amazing concerts on the Branson Landing including shows from 65 South, Colgate Country Showdown with KHOZ 102.9, EXILE, The Nashvegas All Stars, and David Letterman Stupid Human & Pet Trick Auditions. While visiting at Branson, you might need to stay at the Hilton Promenade at Branson Landing. This is a great hotel located in the heart of the Historic Downtown which is directly across form the Hilton Branson Convention Center. When staying at the Hilton in Branson Landing, you can enjoy the easy access to shops, boutiques, restaurants, a river walk and other attractions. This place is only minutes away from the all-new Payne Stewart Golf Club. This golf club offers hole after hole of breathtaking scenery. So what are you waiting for? You should check out some special offers and packages available at the Hilton Promenade at Branson Landing and the Hilton Branson Convention Center Hotel.
Visit my sponsor: Have it all this spring in Branson, Missouri!

Read more...

Sunday, March 21, 2010

Out Of Memory Error Using an Array in ASP

If you get this bizarre message in ASP:

Microsoft VBScript runtime error '800a0007'
Out of memory

It doesn't necessarily mean that you are out of memory. I received this error when I was creating an array using a variable. The variable was a negative value and that is why I received this error.

So if you get this error, you might want to check what value you are instantiating your array with.

For instance, if you have a statement like this:

redim testvariable(-6)

You will get an Out Of Memory Error.


Read more...

Monday, March 15, 2010

Billet Grilles for Trucks

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

Billet-grille


If you are looking for some cool truck accessories, you should checkout realtruck.com. They have all kinds of cool accessories for trucks such as a billet grille. The Putco Billet Grille is one of the best brands and at this website you can browse over 20 styles. It doesn’t matter if you are looking for stainless steel or a specialty built one, Putco offers the largest selection. You might be interested in the Putco Designer FX Billet Grille or the Putco Blade Billet Grille for only $88.12. There are many other accessories that you should checkout as well. You can purchase automotive lights, body kits, car covers, chrome and billet accessories and even fender flares. You can also get mud flaps, floor mats, nerf bars, and tail lights. This website is your one stop shop for all of your truck accessories. This company prides themselves in customer service and gives you online order tracking. They will also give you the best price guarantee. You can also get free shipping and 40% off the listed price of these great products. So what are you waiting for? If you are looking for some truck accessories or a putco billet grille, you need to checkout realtruck.com today.  

Visit my sponsor: Billet Grilles for Trucks

Read more...

Tuesday, March 9, 2010

Calculate WorkDays, Get Number of Days in Month in ASP

If you are looking for code to calculate workdays, then you have come to the right place. I found some examples by other people, but they never worked correctly. These examples are written in ASP.

The parameters are two dates and a year. The year is only used for the holiday function. This function will return the number of working days between those two dates. The assumption is that the dates are valid, and that the end date is greater than the start date. This function will subtract the holidays and requires the holiday function below.

WorkDays Function

' WorkDays
' returns the number of working days between two dates
'Assume that enddate is greater then startdate
'Will subtract holidays
'year is only for the holiday schedule
Public Function WorkDays(d1, d2,year)
Dim errorflag,errorflag2

Dim newDate,count,subtract,absdays
subtract=0
if not (isdate(d1) and isdate(d2)) then
response.write "At least one date is invalid."
exit function
else
d1 = cdate(d1): d2 = cdate(d2)
if d1 > d2 then
Response.Write d1&"<br>"
Response.Write d2&"<br>"
response.write "Invalid date range."
exit function
end if
end if
absdays = datediff("d", d1, d2)+1
WorkDays=absdays
count=0
do while not count=absdays
newDate=dateadd("d",count,d1)
select case datepart("w", newDate)
case 1
subtract = subtract+1
case 7
subtract = subtract+1
end select
count=count+1
loop
WorkDays=WorkDays-subtract
if WorkDays < 0 then WorkDays = 0
WorkDays=WorkDays-HolidaySchedule(d1,d2,year)
End Function


This method will return the number of holidays between two dates in a year. The parameters are the two dates and the year. Holidays sometimes fall on different days but this function assumes all the holidays fall on the same day. You might need to modify this function based on your own requirements.


Holiday Function

'Returns the number of holidays within these two dates
'This Function assumes that all the Holidays are on the same day
public Function HolidaySchedule(StartDate1,EndDate1,year1)
Dim StartDate
StartDate=cdate(StartDate1)
Dim EndDate
EndDate=cdate(EndDate1)
Dim TotalDays
Dim Holidays
Dim checkDate
Holidays=0
dim loopcount
dim newyear
loopcount=cint(year(EndDate))-cint(year(StartDate))
loopcount=loopcount+1
newyear=year(StartDate)-1
do while not loopcount=0
newyear=newyear+1
'New Years Day
checkDate=cdate("1/1/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'President's Day
checkDate=cdate("2/18/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Memorial Day
checkDate=cdate("5/26/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Independence Day
checkDate=cdate("7/4/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Labor Day
checkDate=cdate("9/1/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Thanksgiving
checkDate=cdate("11/27/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'After Thanksgiving
checkDate=cdate("11/28/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Christmas
checkDate=cdate("12/25/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Martin Luther King
checkDate=cdate("1/21/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Lincoln's BD
checkDate=cdate("2/11/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Cesar Chavez
checkDate=cdate("3/31/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Columbus Day
checkDate=cdate("10/13/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
'Veterans Day
checkDate=cdate("11/11/"&newyear)
if EndDate=>checkDate and StartDate<=checkDate then
Holidays=Holidays+1
end if
loopcount=loopcount-1
loop
HolidaySchedule=Holidays
End Function


This function will return the number of days in a month. The parameters is the month and year and the function will give you the number of total days in the month.

Get the Number of Days within a Month Function



function getDaysInMonth(strMonth,strYear)
dim strDays
Select Case cint(strMonth)
Case 1,3,5,7,8,10,12:
strDays = 31
Case 4,6,9,11:
strDays = 30
Case 2:
if ((cint(strYear) mod 4 = 0 and _
cint(strYear) mod 100 <> 0) _
or ( cint(strYear) mod 400 = 0) ) then
strDays = 29
else
strDays = 28
end if
End Select
getDaysInMonth = strDays
end function

Read more...

Thursday, March 4, 2010

Get Your Daily Forecast

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


Unfortunately, the weather can ruin people’s day especially if they get caught in heavy traffic due to an accident. That is why I make it a habit to check the weather before I go to work or on vacation. I also check the weather before I decide to plan an event. AccuWeather has redesigned their website to make it easier for you to check the weather. You will now be able to view your forecasts with radar, and they also removed a lot of the clutter that they previously had on their website. They also have new “weather for your life” parameters that can help when you plan a business trip, recreation, and travel. You will get five-day forecasts with new lifestyle areas such as Weather and Health, Weather and Travel, Weather and Home and Garden, and Weather and Outdoor. I check the weather to decide if I want to drive to work, or walk to work since I live close enough. I also check the weather to decide if I want to go on a road trip or stay home. This site will make it easier for you to plan how the weather is going to change before you decide to do anything. So before you decide to travel or have a barbecue, you should checkout AccuWeather for your weather forecast.
Visit my sponsor: Weather for Your Life

Read more...