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.

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

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.
This is a Sponsored Post written by me on behalf of USC. All opinions are 100% mine.
This is a Sponsored Post written by me on behalf of Incendia Health. All opinions are 100% mine.
Read more...
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.
This is a Sponsored Post written by me on behalf of Allison Maslan, author of "Blast Off!". All opinions are 100% mine.
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.
This is a Sponsored Post written by me on behalf of Hiltons of Branson. All opinions are 100% mine.
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.
This is a Sponsored Post written by me on behalf of RealTruck. All opinions are 100% mine.

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
This is a Sponsored Post written by me on behalf of AccuWeather. All opinions are 100% mine.