What have I been up to?
It's been a while since I last wrote a blog on here, so what have I been up to? Well, it's been a very busy time for me as along with the birth of our first child, I've been working on a few startup projects. One of these that I've been working on with some friends of mine is a new IT community site aimed at providing forums, wikis and blogs for the community to discuss ideas, share knowledge and learn from the experts. This project is named LessThanDot.
What's The Difference ?
There are lots of places on the Internet that you can find that already have forums, wikis and/or blogs, so what makes this project different? Well, it's all about bringing together all of those ideas into a consistent environment that promotes the creation and sharing of knowledge. What makes LessThanDot really interesting and promising is the fact that the co-founders are experts from many of the top forums around the Internet. You'll find that you may already know some of us as we also blog on professional blogs, such as http://sqlblog.com/ and http://weblogs.asp.net. If you're even a semi-regular user of places like Tek-Tips, Google Groups, Microsoft Forums, Experts Exchange, LinuxQuestions and many others, you are likely to have been helped by one of the 30+ co-founders of LessThanDot - many of whom are top MVP's in their fields.
The Point of LessThanDot
What we aspire to do with LessThanDot is to do is deliver a quality experience for everyone (that includes professionals, students, researchers and anyone else with an interest in learning) to improve their IT knowledge and skills and raise the level for everybody. This involves more than just answering questions, but also inspiring interesting debate and discussion on best practices, methodologies and standards and continually improving the shared, community editable knowledge base of answers. Because of the many experts present of the site, we also have a blog that provides constant insight into new and interesting technologies, standards and solutions.
LessThanDot intends to cover all aspects of IT - from Web Developers to System Admins, from Architects to Data Management, IT Professionals (e.g. Project & Service management) to IT Students and Researchers, Desktop Developers to Enterprise Developers. And if you have an area that isn't there, just ask us to add it for you.
Coming Soon
We have set 1st June 2008 as our launch date, so we hope to see you join the community soon and start to share your knowledge and if you would like to learn something, feel free to ask or just browse the growing knowledge base.
The IT Community of the 21st Century: http://www.lessthandot.com
I have mixed feelings about LINQ. I don't want it interfering with my database, and running queries against it so I think I'll be sticking to stored procedures for this type of access. However, there are also cases where I think it is very useful.
Here's a blog post from my friend Christiaan Baes on an useful implementation of LINQ to order directories by creation date:
http://blog.baesonline.com/2008/01/17/OrderingDirectoriesByCreationDateUsingLinq.aspx
Edit: As Fabrice pointed out in one of the comments below, it's really DLINQ that I'm saying I'll be avoiding, and not other LINQ methods.
Today I found a strange bug in IE7. If you have an unordered list, and you specifically give a height to each li element, the numbers reset themselves so each number ends up being "1"! Try this out!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <style type="text/css"> ol li {height:40px;} </style> </head> <body> <ol> <li>This</li> <li>is</li> <li>just</li> <li>a</li> <li>test</li> </ol> </body>
</html>
Whilst this may not be something deemed as particularly important by web users, web developers will be pleasantly surprised that the latest version of IE passes the Acid2 test:
Read more...
Is this a big milestone for IE and Microsoft? Should we expect this from their latest browsers? Please let me know your thoughts...
I've just had a requirement to extract some data from a web page and manipulate it before sending it off elsewhere. The data in the web page was all included inside <table> tags, so I wrote a few Regular Expressions to extract this data and place it in a DataSet object.
Read More...
If you have any comments on this method, or have any other methods you would recommend, please let me know.
I've just created a site management section for one of my sites, and one of the pages allows you to clear certain elements from the cache. I wanted an option to remove all cached objects but it doesn't appear to have a clear method. A way around this is just to create a dictionary enumerator to loop through the cache and clear objects one at a time e.g.
Dim
CacheEnum As IDictionaryEnumerator =
Cache.GetEnumerator
While
(CacheEnum.MoveNext)
Cache.Remove(CacheEnum.Key.ToString)
End While
I've just come across the Windows Live SkyDrive beta which is basically an online storage facility that is driven by your Windows Live ID. Some of the features that is offers are:
- 1 GB of free online storage.
- Create personal, shared, and public folders -- you decide who has access to each folder.
- Your personal folders are password-protected with your Windows Live ID, so only you have access.
- When you create a shared folder, the friends you're sharing with need to sign in with their own Windows Live ID and password.
- Shared folders make it easy to collaborate with coworkers or classmates.
- You decide how much control each person has over each shared folder. Some can just read what's there: others can add and delete files.
- With public folders, anyone on the Internet can view your files, but they can't change them.
- Want to show your public files to others? Just send them a link! Each folder and file has its own web address.
I imagine this could come in quite useful, so click here to sign up.
I recently had a situation where I needed to highlight the ids in a given range which were out of sequence and not part of a range (i.e. 1,2,3,4,6, would show that 5 was missing). Fortunately, I found that this was quite easy to do with Common Table Expressions (CTE) in SQL Server 2005.
Firstly, to demonstrate this functionality, I'll create a table variable and populate it with some sample data. I can then use my CTE (along with an OVER clause to add a row number) to join the table to itself and highlight the "start" and "end" of the missing rows.
Here's the example I came up with for SQL Server 2005:
DECLARE
@Temp TABLE (IDName int)
INSERT INTO @Temp VALUES(1);
INSERT INTO @Temp VALUES(2);
INSERT INTO @Temp VALUES(3);
INSERT INTO @Temp VALUES(6);
INSERT INTO @Temp VALUES(7);
INSERT INTO @Temp VALUES(9);
INSERT INTO @Temp VALUES(11);
INSERT INTO @Temp VALUES(12);
INSERT INTO @Temp VALUES(13);
WITH rangesCTE(rowNum, IDName) AS
(
SELECT ROW_NUMBER() OVER(ORDER BY IDName)
AS RowNum, IDName FROM @Temp
)
SELECT a.IDName+1 AS MissingStart,
b.IDName-1 AS MissingEnd
FROM rangesCTE a INNER JOIN rangesCTE b
ON a.RowNum = b.RowNum - 1
WHERE a.IDName-(b.IDName-1) < 0
Which will then generate the following output:
MissingStart MissingEnd
4 5
8 8
10 10
I'd be interested to see if anyone has any other alternative methods to do this for both SQL Server 2005 and SQL Server 2000
I often use a XHTML Strict doctype on my websites and try to get them 100% valid every time (and I also put a link to the w3 validator service on each page). However, even though I do this the validator service often complains that my code isn't valid even though I know it is. The reason for this is that ASP.NET sees the request from w3 as coming from a "down-level" browser and as such sends different (and invalid for this doctype) XHMTL.
To get around this problem, I use a .browser file specifically for this service. To add it to your project you need to create an ASP.NET folder in your project called "App_Browsers". Then, inside that folder create a file named"w3cvalidator.browser" and add the following code:
<browsers>
<!--
Browser capability file for the w3c validator
sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"
-->
<browser id="w3cValidator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capture>
<userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*"
/>
</capture>
<capabilities>
<capability name="browser" value="w3cValidator" />
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
<capability name="w3cdomversion" value="1.0" />
<capability name="xml" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
</capabilities>
</browser>
</browsers>
Now, when the w3 service requests your page, it won't be treated as a low level browser and the correct HTML will be rendered so that your page will validate (assuming you haven't made any errors!).
You know those things where you just think "How didn't I know that?!", well I got one today. I only just found out (laugh at me if you want!) that you can add an alias to an "Imports" statement. So, instead of typing:
Imports System.Data
I can type:
Imports d = System.Data
and refer to it as "d". Here's what it would look like in Visual Studio:
Thanks to Christiaan Baes for the tip!
More Posts
« Previous page -
Next page »