It's nice to know who and when people are logging on to your servers, here is a very simple way of recording someone logging on and logging off the server
Create a file called:
logon.cmd
echo logon %username% %computername% %date% %time% >> "C:\logon.log"
logoff.cmd
echo logoff %username% %computername% %date% %time% >> "C:\logon.log"
Update ther Group Policy, via gpedit.msc
User Configuration-> Windows Settings-> Scripts (Logon/Logoff)-> Logon
User Configuration-> Windows Settings-> Scripts (Logon/Logoff)-> Logoff
When the users log on and off a log file will be updated
Chrome
In the Google Chrome's address bar type:
about:internets (XP only)
about:stats
about:memory
about:network
about:histograms
about:dns
about:cache
about:plugins
about:version
Google Earth
Click [CTRL] + [ALT] + [A] in Google Earth to launch a Flight Simulator
The latest fad is to create Carousels to display images, and allow for easy navigation. I have not been able to find any .NET controls to enable you to create a Carousel on a web page.
ERROR - UNABLE TO LOAD CONTROL : ~/User controls/carousel.ascx
So I set myself the task of generating a web page control to allow for easy, managed code, configuration of a Carousel Control in .NET
First I went on the hunt for a simple javaScript Carousel that I could use, I found a lovely Carousel by Doug Greenall, the information on his blog goes in to great detail of how the Carousel works, but this was not intention to go in to detail about the inner working of a Carousel.
So I downloaded Doug Greenall's Carousel and then went to adapt the javaScript code to create a single DLL Control that could be reused.
The end product is a small DLL that can be dragged and dropped in to your ASP.NET application or Website
Carousel.dll (21.50 kb)
The project solution was generated using Visual Studio 2008 Pro,with a Target Framework of ".NET Framework 2.0"
Carousel.zip (191.73 kb)
How to use the Carousel
Okay, so now I've built the Carousel Control, you now want to to know how to use it?
-
First create a new WebSite
-
Add the Carousel.dll or a project reference to your website
-
On the web page register the control (or add it to your web.config)

- Next in the code behind you need to add to the CarouselDetail collection, which will add the images, links to the Carousel
And that is it, the more you add to the CarouselDetail collection the more items will appear on the Carousel.
I've always been able to create a standalone DLL control that can be reused in other web applications. I've never really found out how to embed other resources, or more to the point JavaScript files.
Until now
Here's how to embed the file:
- Create a js file such as carousel.js
- In Visual Studio, select the file in Solution Explorer and change the Build Action property to "Embedded Resource"
- Build the project and the carousel.js file is now part of the assembly (you don't need to distibute the js file now it's part of the assembly)
Now to get the resource out using code:
So if we have a resource named Control.carousel.js we can use the following to include it in our page:
System.IO.Stream script = Assembly.GetExecutingAssembly().GetManifestResourceStream("Control.carousel.js");
System.IO.StreamReader sr = new System.IO.StreamReader(script);
Page.ClientScript.RegisterClientScriptBlock(GetType(), "carousel", sr.ReadToEnd().ToString(), true);
sr.Close();
The above code injects the embedded file in to the page, how easy could it be?
One of the tasks Jon was given was to create an Audit module for LINQ, and came across this link which seems to provide a solution. I've not had time to go over the solution, but it appears to do a very good job at first glance.
LINQ to SQL Audit Trail
LINQ Audit Trail v2 - DoddleAudit
Do you still use Notepad that ships with Windows?
I did, until I found NotePad2, it's fast, it's easy to use, and more to the point it works.
I've been using it for the past 2 months, and I have not got any clue to the features, but what I like about it is it just works and is a very good replacement for the standard Windows Notepad.
Here are the features, cribbed from the NotePad2 Website:
Customizable syntax highlighting:
- HTML, XML, CSS, JavaScript, VBScript, ASP, PHP, CSS, Perl/CGI
- C/C++, C#, Java, VB, Pascal, Assembler, SQL, Python, NSIS
- INI, REG, INF, BAT, DIFF
- Drag & drop text editing inside and outside Notepad2
- Basic regular expression search and replace
- Useful word, line and block editing shortcuts
- Rectangular selection (Alt+Mouse)
- Brace matching, auto indent, long line marker, zoom functions
- Support for Unicode, UTF-8, Unix and Mac text files
- Open shell links
- Mostly adjustable
- Auto indentation
- Bracket matching
- Encoding conversion between ASCII, UTF-8 and UTF-16 formats
- Multiple undo/redo; rectangular block selection
- Newline conversion, between DOS (CR/LF), Unix (LF) and Mac (CR) formats
How to Replace notepad with notepad2 in Vista?
- First you need to download notepad2 from here
- First you need to Rename Notepad2.exe to notepad.exe.
- Find c:\windows\notepad.exe and c:\windows\system32\notepad.exe and set the owner to ‘Administrators’, and grant Administrators full control.
- Using Windows Explorer, drag and drop the renamed notepad2.exe to c:\windows and c:\windows\system32.
- Optional replace the permissions on the new notepad.exe to Read & Execute and Read.
Another one to look at is
Notepad++, it has a lovely set of plugins such as XML have a look at Tim Almonds post on the
XML plugin
I have a a wobble board for my Wii and I am looking for a game to play at Xmas, but which one?
After my work creating the Mad Tri web site, I submitted the theme it to the BlogEngine team a few months ago and they have included it in their Theme pack, what a lovely surprise.
The BlogEngine team are going to be working hard over Christmas, with updating the BlogEngine and release a new release. more...
I too are going to the working over the Christmas on an Enhanced Newsletter and a Resource Editor to enable changes to Internationalization from the web, power to the BlogEngine