by Ross Buggins
16. April 2012 13:47
Our first server has been in colocation now for a couple of months and all is going well. Below are a few shots of it in place.
8a69c7c1-5d24-4ef4-9e24-0493f78711fe|0|.0
Tags:
by Ross Buggins
1. April 2012 12:37
Its easy to want to do this:
using (var stream = new MemoryStream())
using (var writer = new StreamWriter(stream))
{
writer.WriteLine("My line to write");
writer.Flush();
}
However, code analysis points out that stream can get disposed twice.
So, the first way to get round this is just to nest the stream inside the writer and don't hold reference to it.
using (var writer = new StreamWriter(new MemoryStream()))
{
writer.WriteLine("My line to write");
...
[More]
3375c213-3ea8-4fb5-981b-6219e08bbd61|0|.0
Tags:
by Ross Buggins
1. April 2012 12:32
It's an old post from 2003, but i think it still holds true today.
LoadFrom() goes through Fusion and can be redirected to another assembly at a different path but with that same identity if one is already loaded in the LoadFrom context.
LoadFile() doesn't bind through Fusion at all - the loader just goes ahead and loads exactly what the caller requested. It doesn't use either the Load or the LoadFrom context.
Extract from: http://blogs.msdn.com/b/suzcook/archive/2003/09/19/loadfile-vs-loadfrom.aspx
1f2f1fba-4e3d-4d0a-8463-be90ce84c272|0|.0
Tags:
by Ross Buggins
8. March 2012 12:02
Yesterday (7 March 2012) DNN released an update to 6.1. the highlights are: Major Highlights Fixed issue with loading the splash page skin in the login, privacy and terms of use pages Fixed issue when searching for keywords with special characters Fixed redirection issue when the user does not have permissions to access a resource Fixed issue when clearing the cache using the ClearHostCache() function Fixed issue when displaying the site structure in the link to page feature Fixed issue when inline editing the modules title Fixed issue with incorrect redirect...
[More]
25bca0c6-0b6f-4368-aa62-a07ef52fe647|0|.0
Tags:
by Ross Buggins
8. March 2012 11:23
We’re currently working on a project www.theatretripskent.co.uk and we needed a booking system to integrate with it as quickly as possible. We chose to buy the source code for invenmanager events. They had a lot of the core functionality we required, including multiple payment gateway, and with the source code we knew we could do a few changes to get it in line with the requirements. The only draw back for us with the source was the fact the it is all VB has not been ported to C# to be inline with the core of DNN. The first big change we made was to the registration process....
[More]
b7cd14bd-af8d-4da4-bd53-ee26a7e629cd|0|.0
Tags:
by Ross Buggins
9. February 2012 12:31
ImageDuplicationFinder.rar This photo image duplication finder looks through the specified directories and can move duplicated to a new folder. It bases the comparison on: camera model camera make date taken The program is designed to help you find duplicate photos and leave the most recently modified version in place. Files that have been modified but are the same photo will be identified as duplicates. The most recently modified image will be left in place and all others moved to the move folder. It will also pick up photos that have been renamed. The du...
[More]
7ad8fe6e-7fed-4815-86b6-c49bee800380|0|.0
Tags:
by Ross Buggins
1. February 2012 22:43
A red phone box in the garden would be a nice quirky addition, http://www.uniquelybritish.com/Item/BRITISH_RED_K6_TELEPHONE_BOX.aspx. From their site we have a nice use of www.photolinedrawing.com to convert the images into a pretty good line drawing.
35d582ca-d74c-4865-afd7-dc46a7349274|0|.0
Tags:
by Ross Buggins
29. January 2012 01:10
Here is a neat fix for making ie7 deal with inline blocks:
http://flipc.blogspot.com/2009/02/damn-ie7-and-inline-block.html
d79adce1-789f-42f4-ad68-e072885ff142|0|.0
Tags:
by Ross Buggins
27. January 2012 12:41
My AVR Dragon arrived today. It enables me to debug as well as program with the STK600. It plugs into the STK600 via the 6 pin ISP ribbon and via USB to the PC. You have to also remove the jumper on the reset on the STK600. Now in AVR Studio you can enable debug wire on the fuse and use the debug button.
dc68ae96-7318-4afc-949d-39fce1a571b5|0|.0
Tags:
by Ross Buggins
27. January 2012 12:02
Its been along time since I really did any electronics work and programming the ATTiny44 microcontroller has got be back into it. I’ve ordered some electronic starter kits, Beginners and Component Kit as the first you can use with some tutorials from the electronics club web site. The first circuit I’ve made is a 555 timer which is is sending its signal to a 4017 decade counter. A 555 timer can have lots of functions but I’m using it as an astable circuit. This means it makes regular pulses on its own without any interaction from you. The 55 does this by continual charging and d...
[More]
202ebcca-548f-4b9d-b371-512d0d838de3|0|.0
Tags:
by Ross Buggins
27. January 2012 11:22
The ATTiny44 is a small 8 bit AVR microcontroller with a 10Mhx processor, 4KB of Flash, 256B of EEPROM and 256B of SRAM. There is a comprehensive data sheet from Atmel which is pretty much the bible for when trying to program the chip. There are also lots of copies of the STK600’s manual online. When you first look on the Atmel web site for finding the equipment needed to program an AVR microcontroller, your naturally drawn towards the starter kit, the latest version of which is the STK600, I was. Once you start looking around on the internet people say it has a few draw...
[More]
2b9c893f-c80d-49ca-a19e-7f786fab05de|0|.0
Tags:
by Ross Buggins
21. January 2012 19:19
This is my first foray into Linux. It makes sense to do it now with a powerful server going into colocation I can make the most of offing Linux hosting to clients.
I’m going with Centos 6 as my first option. This is how I got on.
I’m aming to install the LAMP stack so play to try and follow http://library.linode.com/lamp-guides/centos-6
First things first make sure you install a legacy network adapter on the virtual machine as by default linux doesn’t pick up the standard adapter.
I downloaded the DVD ISOs from the University of Kent mirror service via the Cen...
[More]
c0f04086-767d-4451-82d3-fcb5ba967971|0|.0
Tags:
by Ross Buggins
17. January 2012 11:28
So, all of the parts for the colocation server have arrived. In the end I have gone for: Supermicro SYS-2026T-6RF+ Xeon 2.4ghz E5645 24GB Ram 9 x 147GB 10K SAS6Gb Drives The super micro board is a beast, supporting 2 processors and its 18 DIMM slots supporting 198GB of RAM. This server should be good for a while. The 9 2.5” SAS Drives are only 147GB. I wanted 300GB but the hard drive shortages and high costs at the moment made it impossible to get anything but very small or very large SAS drives, and my budget wasn’t going to stretch to 9 900GB SAS drives righ...
[More]
6abc3905-91e2-4950-b53e-953977ea2911|0|.0
Tags:
by Ross Buggins
3. January 2012 20:05
If you get the error
System.InvalidOperationException: '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadStyleSheetManager
when installing DNN via the Web apps in WSP, just add this to the web config for the domain:
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode"/>
<add name="RSSHandler" path="RSS.aspx" verb="*" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" pr...
[More]
8e3e3302-df5f-4a8c-b674-a3c50d65769d|0|.0
Tags:
by Ross Buggins
21. December 2011 16:02
I’m currently working on building our first server for colocation. Until now our servers have all been rented servers. This has been fine until now, but with the new version of TARAS, our rota software, we’re looking to build a more powerful server to host this. We could rent a server, but I want to be fairly specific over the specifications, and the ability to easily upgrade the server if demand requires it.
The big negative with colocation is having to worry about component failure and having to replace the parts yourself. Luckily, a new data centre has opened within...
[More]
cca10547-62a8-4ca1-9bdc-d2e8e81d5b7c|0|.0
Tags:
by Ross Buggins
20. December 2011 15:20
I always forget the syntax for parsing a string and converting it to an enumerable.
Here it is:
object Enum.Parse(System.Type enumType, string value, bool ignoreCase)
The use is:
var planetEarth = (PlanetEnum) Enum.Parse(typeof(PlanetEnum), "Earth" true);
8769266b-0b47-4e76-bbe4-83d2dd7a7472|0|.0
Tags:
by Ross Buggins
14. December 2011 16:13
I've recently found a compact little tool in Windows 7 that generates a report for your power consumption. It looks at drivers and settings over a 60 second period to see what can be done to improve the power efficiency of your machine.
To run it just use:
powercfg.exe /energy
It generates a HTML file in your standard user space with its findings.
dc75365f-8be6-4ed9-8957-69f3ddf22845|0|.0
Tags:
by Ross Buggins
8. December 2011 10:21
I've recently started using the Mega2DNN DNN menu on a site but found that on certain large sub menus it starts to flicker.
It's all down to a z index problem on the menu. To overcome it, just add this to the portal.css throught ADmin -> Site Settings -> Stylesheet editior.
ul.megamenu li .sub {z-index:9999;}
If there is nothing else in there - note. -The first time you add anything to the portal stylesheet you must click update after you click save style sheet otherwise the portal.css style sheet will not be loaded to each page. On subsequent changes to the...
[More]
d8bf7ba4-6ec2-4577-a055-0495915be6eb|0|.0
Tags:
by Ross Buggins
6. December 2011 11:00
With the DNN 6.1.1 release, sitemaps lost their friendly URLs and were replaced with TAB Ids. Here is the report of the problem http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=18770&PROJID=2 .
DNN have fixed this bug in 6.1.2, but what if you don’t want to wait for the release?
I have compiled the latest DNN Sitemap provider and its available attached to this post (DotNetNuke.SitemapProviders.CoreSitemapProvider.rar (3.94 kb)). Just extract the DLL and upload it to you bin/providers folder overwriting the new one.
Then got portals\[your portal]\sitemaps and dele...
[More]
b8951667-f565-4f57-80b8-96bcd8825d4e|1|5.0
Tags:
by Ross Buggins
28. September 2011 09:27
SELECT
name, create_date
FROM sys.databases
order by create_date desc
c43304f3-13da-4435-8944-d26181b7f576|0|.0
Tags:
by Ross Buggins
10. August 2011 11:21
Here's the info you need:
http://stackoverflow.com/questions/1933134/add-iis-7-apppool-identities-as-sql-server-logons
and
http://learn.iis.net/page.aspx/624/application-pool-identities/
88eb0557-bd97-40d1-95d9-c6ef827acf31|0|.0
Tags:
by Ross Buggins
8. August 2011 17:17
The custom TimeSpan format specifiers do not include placeholder separator symbols, such as the symbols that separate days from hours, hours from minutes, or seconds from fractional seconds.
[More]
3fd24cfb-2591-48f6-83b4-6b2d7ae8da0a|0|.0
Tags:
by Ross Buggins
8. August 2011 17:16
OWASP https://www.owasp.org/index.php/Category:How_To
Web application security is an essential component of any successful project, whether open source PHP applications, web services such as straight through processing, or proprietary business web sites. Hosters (rightly) shun insecure code, and users shun insecure services that lead to fraud. The aim of this Development Guide is to allow businesses, developers, designers and solution architects to produce secure web applications. If done from the earliest stages, secure applications cost about the same to develop as insecure applications, bu...
[More]
7c8bde7c-01cb-40fd-9b87-40f8583766dc|0|.0
Tags:
by Ross Buggins
20. July 2011 11:55
One of our projects, photolinedrawing.com has had a few updates. You can now buy credits via paypal and download all your processed images in a handy zip file.
A little bit about LICA:
"Using LICA you can convert any photograph into a line drawing, quickly and easily.
Unlike other solutions you do not need to download or install a program onto your computer. You can access your line drawings and work on your line drawings from any internet connection.
You can customise and change the processing of your photographs into line drawings to find the best processing for differ...
[More]
fed3f4c0-1d52-4793-a1b5-072a9948a087|0|.0
Tags:
by Ross Buggins
18. July 2011 15:15
http://technet.microsoft.com/en-us/library/dd776382.aspx
7f6adace-cc75-408e-8abf-5a3891d6b2a3|0|.0
Tags:
by Ross Buggins
18. July 2011 14:47
Heres the query you need (found at http://bradsruminations.blogspot.com/)
select index_advantage=user_seeks*avg_total_user_cost*(avg_user_impact*0.01)
,migs.last_user_seek
,TableName=mid.statement
,mid.equality_columns
,mid.inequality_columns
,mid.included_columns
,migs.unique_compiles
,migs.user_seeks
,migs.avg_total_user_cost
,migs.avg_user_impact
from sys.dm_db_missing_index_group_stats migs with (nolock)
join sys.dm_db_missing_index_groups mig with (nolock)
on migs.group_handle=mig.index_group_handle
join sy...
[More]
9e018888-4bfb-4234-8202-846bba3ad3c6|0|.0
Tags:
by Ross Buggins
16. July 2011 22:07
I've been fed up trying to browse through the Execution plan diagrams in SSMS so I have put together a page so that you can paste in the XML and it will generate tables of statistics for you.
You can see each operation, sorted by CPU, IO, over all cost, own cost and in a bulleted tree. It also gives you the parent operation for each of them.
I've put it at http://www.shoretechsystems.co.uk/epa/
Hope it's useful.
7c3fc13d-71ca-4fed-82a1-f7b49cd5060b|0|.0
Tags:
by Ross Buggins
13. July 2011 18:18
http://yoelarnon.wordpress.com/2008/10/04/meet-you-in-pdc-2008-usa-visit-is-send-thread-safe/
23a50b4a-6f9d-42c3-9fd4-0cd65cbc5ca3|0|.0
Tags:
by Ross Buggins
7. July 2011 20:43
http://smallvoid.com/article/winnt-services-regedit.html
Change Value data: to the wanted state:
0 = Boot
1 = System
2 = Automatic
3 = Manual
4 = Disabled
0680fc30-efb8-41d6-8df9-61ecde1e1b45|0|.0
Tags:
by Ross Buggins
29. June 2011 17:35
Quickly check dns records: www.testthe.net
e105aa28-7f2d-4be0-b496-ac8583cdc4cf|0|.0
Tags:
by Ross Buggins
17. June 2011 14:42
http://databasechallenges.com/SQLServer/toolbox/tally-table
/***********************************************************************
Purpose:
Create a standared "Numbers" table for use in solving T-SQL Challenges.
Programmers Notes:
1. This table contains all INTEGER values from 0 (zero) to 1,000,000
inclusive and has a clustered index on the single INTEGER column
called "N".
2. The table is named for the challenges so as not to overwrite
existing Tally or Numbers tables by accident. Even then, if the
tsqlc_Tally exists, this run will abort...
[More]
8ed45071-e016-4a7a-934b-1a009e619a32|0|.0
Tags:
by Ross Buggins
8. June 2011 14:50
http://blogs.msdn.com/b/fpintos/archive/2009/06/12/how-to-properly-convert-securestring-to-string.aspx
10bfda99-655e-4638-b849-dc77e0f7136c|0|.0
Tags:
by Ross Buggins
26. May 2011 08:12
If you ever want to forward events between a class and an instance of a class wihin that class, then here is the best way to do it.
public class Test
{
public Test()
{
var a = new A();
a.MyEvent += new EventHandler<EventArgs>(a_MyEvent);
}
void a_MyEvent(object sender, EventArgs e)
{
//event fired!
}
}
/// <summary>
/// my class
/// </summary>
public class A
{
private B MyB = new B();
public event EventHandler<...
[More]
bab9b836-5751-4106-9ed5-8bb46d99b6ca|0|.0
Tags:
by Ross Buggins
16. May 2011 16:37
[No text]
cdcddfae-48e0-46b7-8bd7-605bc4dc114b|0|.0
Tags:
by Ross Buggins
16. May 2011 16:35
Example of using Flag Attribute on enums:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
[FlagsAttribute]
enum Survival : short
{
GiveWater = 1,
GiveFood = 2,
GiveSleep = 4
};
class Program
{
static void Main(string[] args)
{
for (int i = 1; i < 8; i++)
Console.WriteLine(((Survival)i).ToString());
Console.WriteLine("*"); Console.WriteLine("*");
Test(Survival.GiveWater);
...
[More]
d53bcded-a920-4abe-8f32-ea9d50302cf3|0|.0
Tags:
by Ross Buggins
22. April 2011 10:33
http://blogs.msdn.com/b/ericlippert/archive/2009/11/12/closing-over-the-loop-variable-considered-harmful.aspx
0c03e1b4-3789-4964-b0fc-3923bddb299f|0|.0
Tags:
by Ross Buggins
13. April 2011 14:17
http://msdn.microsoft.com/en-us/library/ms229043.aspx
020ac068-aa3c-4813-a68f-0249be5209a3|0|.0
Tags:
by Ross Buggins
12. April 2011 12:57
Good post
http://blogs.msdn.com/b/codeanalysis/archive/2006/04/27/585476.aspx
7d7c5ee4-bf47-4df9-a0a4-0de1cb8baf72|0|.0
Tags:
by Ross Buggins
12. April 2011 12:57
http://dixond.blogspot.com/2010/08/everything-what-you-might-want-to-know.html
69692c50-0ff7-483c-ad53-f127104a063c|0|.0
Tags:
by Ross Buggins
1. February 2011 18:39
In a current project I am dynamically creating an object of a certain type depending on a value read back from the database.
For example, in the data reader results i may have 2 results coming back, the first with a object type value of ‘STS.Person’ and the second with a type of ‘STS.Location’.
The result with a object type of ‘Sts.Person’ should have a C# type created Person() and the result with an object type of ‘Sts.Location’ should create C# type Location(). Person() and Location() both implement the interface ISTSObjects() so ...
[More]
by ross buggins
28. January 2011 19:39
As part of our current marketing and sales drive at Shore Tech we’ve set up a Facebook page. I thought it would be interesting to experiment with the advertising platform the Facebook offers and to see what increase in page views and enquiries it gives us. I have created our basic Shore Tech Facebook page at http://www.facebook.com/pages/Shore-Tech/126077450796511?ref=ts I’m going to go with 3 adverts. 2 with slightly different wordings which link to out Facebook page and one which links to the home page of http://www.shoretechsystems.co.uk/ I’m setting a daily budget of £10 and...
[More]
1b67cf7a-ad29-44a9-ac8e-5e633346ad30|0|.0
Tags:
by Ross Buggins
27. January 2011 18:12
My previous post showed a way to get around the limitations of the DateDiff function by creating a .NET CLR function that could cope with returning values between dates that were far apart. I’ve now taken this a step further by creating a SQL .NET CLR User Defined Type which represents a TimeSpan object.
The object has basic Add and Subtract methods which utilise an underlying C# TimeSpan object.
The object is byte orders and all methods to create it are deterministic meaning that it can be used in a persisted computed column.
First of all start with a SQL CLR projec...
[More]
by Ross Buggins
27. January 2011 14:31
The built in SQL dateDiff function has issues when trying to calculate the difference between dates that are far apart when you request a high precision. There are solutions available which request a difference with a lower precision and multiply that by a constant, however I was looking for a more absolute answer, so I turned to the .Net runtime.
[More]
by Ross Buggins
9. November 2010 15:40
This is post one of my new blog, separate to our core Shore Tech Blog. I've made the move to force me to keep a tech and rambling blog as well as our business blog (which admittedly doesn't get updated too often anyway).
I'm going to keep the blog as technical as possible, with a target of a post a week. Hopefully it will follow along side the work that is currently going on here at Shore Tech and will let me document any cool tricks and tips I find out along the way.
Visual Studio Async CTP
To keep with the tech theme in every post I'm quickly going to mention PDC 2010. I've started wading...
[More]