Articles Archive for March 2009
Programming / Coding »
Lets say you wanna have some ids from the rows of a table as comma seperated value, how would you do that. Using a simple user defined function this can be real easy task.
Sample code for the user defined function:
Here is a sample code to create the Scaler-Valued user defined function that gets the colors ids for a productId passed as variable in comma separated form.
CREATE FUNCTION [dbo].[GetColorIdsCSV](@productId int)
RETURNS varchar(1000)
AS
BEGIN
DECLARE @p_str VARCHAR(1000)
SET @p_str = ”
SELECT @p_str = @p_str + ‘,’ + CAST(colorId AS VARCHAR(10))
FROM ProductColors Where productId=@productId)
–if results exist there …
General, Technology »
With bad economy looming around the world cyber crime seem to be becoming a bigger problem. In 2008 online crime increased by 33% over the year before, 2007.
2008 $264.6 Million
2007 $239.1 Million
……….
2001 $18 Million
What a jump from 2001 to 2008.
The most common complaint of 2008 was non-delivery of promised merchandise, followed by auction fraud, credit card fraud and investment scams, according to the report.
Scammers in the United States comprised 66 percent of complaints referred to authorities, followed by Britain at 11 percent, Nigeria 7.5 percent, Canada 3 percent and …
General, Technology »
Recently FireFox been enjoying substantial growth in number of users. IE the opposite, just slipping more down by the percentage of users using it.
With the number of users growing for FireFox, there is another problem surfacing; attack.
When IE dominated more then 80% of the browser marketshare not much hackers care about FireFix, because there been less stake in it. Now that things are changing, hackers seem to be getting more and more interested in FireFox. Recently there was a unpatched flaw detected in FireFox which is to be fixed next …
Making Money, My Business News, Technology »
Bad economy seem to be effecting everybody in some ways, webmasters included. I used to earn enough money from the websites that gave me flexibility to run my sites covering costs for marketing, hosting etc.
Last two months incomes been down by 40%! One of the factors effected my income is change of hosting for my best earning site; it caused the site not working properly for about a month. Then bad economy added up.
How do you survive in bad economy? After giving some thought I went for the basics, cut …
Technology »
Last two weeks I was trying to setup a hosting for a client of mine at GoDaddy. The site was built on ASP .Net and some pages of the site uploads images and files on certain folders. And also the site requires a MS SQL database. The uploading files/images require ASP .NET have a Full Trust.
First the client bought a shared Windows hosting. Then we figure everything works fine except the file and image upload; we are getting permission exception thrown. Apparently it requires full trust permission to be able …
SEO »
Sandbox is a very popular term for SERP rankings for new sites. Sandbox theory states that new sites are burried over by old sites on SERP page until the site aged.
I personally do not think Sandbox really exists. If a site is competiting for a very competitive or even medium competitive keyword, it makes sense that results from the new site yet have to establish the usefulness over the old ones. You can see the same in our daily lifes. We value people more who we know for long time. …
Programming / Coding »
You might expect the parent div with blue background spanning the width with the inner div content. In reality thats not the case. You would find that there is no parent div with blue background on browser screen.
Programming / Coding »
ASP .Net Calendar control is a great tool for showing event calendars etc. If you want to show or hide the next/previous links you can set the NextMonthText and PrevMonthText property. Here is an example of how to do that.
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack){
calendar.VisibleDate = DateTime.Now;
}
}
protected void Calendar_PreRender(object sender, EventArgs e)
{
// we will show next 3 months from now in this example
DateTime dtMin = DateTime.Now;
DateTime dtMax = DateTime.Now.AddMonths(2);
Response.Write(“<div class=white>aaaaaaaaaaaaaaaa” + dtMin.CompareTo(calendar.VisibleDate) + “</div>”);
if (calendar.VisibleDate.Year == dtMax.Year && calendar.VisibleDate.Month == dtMax.Month)
{
calendar.NextMonthText = string.Empty;
}
else
{
calendar.NextMonthText = “>”;
}
if (calendar.VisibleDate.Year == dtMin.Year && calendar.VisibleDate.Month==dtMin.Month)
{
calendar.PrevMonthText …
