Saturday, 25 December 2010

Merry Christmas

   


<%
Dim msg
if date() = "25/12/2010" then
   msg = "MERRY CHRISTMAS TO ALL"
else
   msg = "Where's Santa?"
end if
Response.write msg
%>


Friday, 24 December 2010

Should I close the blog for Christmas holidays?

   


That's a question, isn't it? I've been struggling finding the answer for a week or so and I've reached a conclusion. 

The Web Thought will be closed for Christmas.

I will restart posting on January the 10th.
That's a loooong time. Will you resist?

Have a nice and splendid Christmas time, enjoy yourself, stay with your family and forget about programming for a while.

Wednesday, 22 December 2010

HTML: How to create bar charts with tables

   


In this post I will explain a very - very! - simple method to create vertical or horizontal bar charts using only HTML. You already know that on the web you can find many different solutions to create charts. In October, I  posted a list of jQuery plugins and I know there are other JavaScript snippets or Flash stuff available to draw graphs. However I've always found hard to apply those solutions to my needs. That is because I wanted to use data from a database, while many of the available snippets get the data from txt or xml files.

Monday, 20 December 2010

ASP: The Response.Flush method

   


Experience in programming is something that comes with time. You always learn something new, especially when you need to solve an issue. Sometimes, having a problem, a syntax error thrown by your favourite browser, could be the right moment to learn a new trick. Solved the problem, you might soon forget about the solution, or you might forget to understand better the solution. That is what happened to me with Response.Flush and in this post I would like to get a deeper look at it.

Friday, 17 December 2010

SQL Server: basic functions (part 9) - Substring

   


One of the most interesting Sql function, when working with strings, is Substring. Basically, it returns a part of a string, given the starting point and the length (number of characters).

The syntax
Let's see Substring syntax:
SUBSTRING ( expression , start , length )
In the function we have to declare:
  1. expression, which is the string we want to manipulate;
  2. start, which is an integer or bigint indicating where to start the extraction. If it is 0 (zero), the starting point will be at the beginning of the expression -1 (see below in "examples"). If start is greater than the length of expression, the function will return a zero-length expression;
  3. length, which is a positive integer or bigint indicating how many characters to consider from the start (starting point).

Wednesday, 15 December 2010

CSS: create a footer (header) for your asp page

   


I write this post because someone asked me how to create footer in an asp page. That's the main reason. However, after writing a lot about Sql Server functions (and I don't think I am really finished with that!), I indeed needed a break. Anyway...
Creating a footer for your asp page is very easy. I will show you how to do it with css styles, assuming you have a default.asp page which is your home page, an include named footer.asp which is your footer and an external css.css page containing your styles.

Monday, 13 December 2010

SQL Server: basic functions (part 8) - @@IDENTITY

   


In this post I will introduce you a very tricky and useful function called @@IDENTITY. The function returns the last inserted identity value. As you may already know, the identity column in a Sql Server table is a numeric column that auto increments when a new value is inserted in the table itself. To put it simply, it is the ID column in your table. Now, what is the practical use of @@IDENTITY?