RE: [OT] Backups

2011-06-03 Thread Greg Keogh
>Subversion.  That way I get a change history as well.  

 

Danger Will Robinson! A version control system is not a backup.

 

Greg



RE: [OT] Backups

2011-06-03 Thread Greg Keogh
Bec, don't rely on memory sticks. I bought a 16GB stick at the swap-meet a
few weeks ago and one morning when I put it in I was asked for format it. I
brushed this off as a coincidence, so I formatted and it work fine to
another week before I got the same message. That $30 stick is now landfill.

Also, as someone mentioned here months ago: A portable drive is also
fragile, and if you carry it around, say, with your laptop, then if you lose
the bag you lose the lot.

I'm not even sure how long CDs and DVDs are guaranteed to viable and
readable these days. At least a decade I hope. Each month I run a selected
backup to dual-layer DVD, verify it and put it in the toolshed.

I'm hoping that cloud storage will simplify by manually implemented
daily/monthly backup tasks.

I've purchased a Rackspace 'Clound Files' account, which is just space in
the cloud, which suits me fine. They have a primitive web interface to
manipulate files. But as ManiacD said, it's just space so I have to work out
how to best use it. Rackspace publish a REST API and a C# wrapper library
and a demo WinForms app, so it looks quite easy for me to write my own
simple sync facility, or even a fancy general-purpose GUI.

I can't find any security statement by Rackspace. I'm not sure what their
angle is on this issue.

Greg



RE: [OT] Backups

2011-06-03 Thread Ken Schaefer
You can back up to a central location in your house, and then back that central 
point up to the cloud. That can help protect you against a disaster (e.g. 
lightning strike, fire etc.) affecting your house.

-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Bec Carter
Sent: Friday, 3 June 2011 2:17 PM
To: ozDotNet
Subject: Re: [OT] Backups

Oops I forgot to say I don't want to backup to the cloud. I won't always have 
net access anyways.
I shall look into Windows Home Server. Thanks

On Fri, Jun 3, 2011 at 4:08 PM, Ken Schaefer  wrote:
> Windows Home Server for me.
>
> There's also a thread on cloud backup that you might want to read :)
>
> Cheers
> Ken
>
> -Original Message-
> From: ozdotnet-boun...@ozdotnet.com 
> [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Bec Carter
> Sent: Friday, 3 June 2011 2:06 PM
> To: ozDotNet
> Subject: [OT] Backups
>
> All this talk of SSDs and HDDs failing has got me a little scared to lose my 
> data. I just have one main folder with everything in there on my laptop and 
> copy this thing to my USB drive as backup - I manually do this i'm 
> starting to realise this is not enough.
>
> How do you all do your backups?
>
> Cheers
> Bec
>


RE: [OT] Backups

2011-06-03 Thread Ian Thomas
Ken

You're using WHS (v1 or 2011 - ?), so what Cloud service do you use that
does allow you to backup a server? Most cheaper ones preclude server backups
(eg, iiNet's Vault is specific about that). 



Ian Thomas
Victoria Park, Western Australia



Re: [OT] Backups

2011-06-03 Thread Grant Molloy
I've decided to go old school..
I just bought 10,000 floppy disks & a USB FDD.. (Got nothing else on this
weekend anyway !! )
:-D

On Fri, Jun 3, 2011 at 5:48 PM, Ian Thomas  wrote:

>  Ken
>
> You’re using WHS (v1 or 2011 - ?), so what Cloud service do you use that *
> does* allow you to backup a server? Most cheaper ones preclude server
> backups (eg, iiNet’s Vault is specific about that).
>
> 
>
> Ian Thomas
> Victoria Park, Western Australia
>


Re: [OT] Backups

2011-06-03 Thread Scott Barnes
I backed up to the cloud today. I grabbed a balloon and tied a memory stick
to it and then released it... Question if I may..how do i get it back down?
---
Regards,
Scott Barnes
http://www.riagenic.com


On Fri, Jun 3, 2011 at 9:02 PM, Grant Molloy  wrote:

> I've decided to go old school..
> I just bought 10,000 floppy disks & a USB FDD.. (Got nothing else on this
> weekend anyway !! )
> :-D
>
> On Fri, Jun 3, 2011 at 5:48 PM, Ian Thomas  wrote:
>
>>  Ken
>>
>> You’re using WHS (v1 or 2011 - ?), so what Cloud service do you use that
>> *does* allow you to backup a server? Most cheaper ones preclude server
>> backups (eg, iiNet’s Vault is specific about that).
>>
>> 
>>
>> Ian Thomas
>> Victoria Park, Western Australia
>>
>
>


Generic class question

2011-06-03 Thread Greg Keogh
Folks, in the tiny sample below I want to parse some text and set the
generic value, which will be int, double or long. The highlighted statements
show what I want to do, but how is it done in a generic way?

 

Greg

 

 

public class DemoClass where T : struct

{

private T value;

 

public void FromText(string rawValue)

{

value = double.Parse(rawValue);

value = int.Parse(rawValue);

}

}

 

 



RE: Generic class question (TypeConverter)

2011-06-03 Thread Greg Keogh
I asked my cat after I posted the question and he had the answer ... I have
to use a TypeConverter. I'll post the answer when I have it worked out -
Greg



Re: Generic class question

2011-06-03 Thread Richard Mason
The Convert class will help:

value = (T)Convert.ChangeType(rawValue, typeof(T))

On Sat, Jun 4, 2011 at 10:40 AM, Greg Keogh  wrote:

> Folks, in the tiny sample below I want to parse some text and set the
> generic value, which will be int, double or long. The highlighted
> statements show what I want to do, but how is it done in a generic way?
>
>
>
> Greg
>
>
>
>
>
> public class DemoClass where T : struct
>
> {
>
> private T value;
>
>
>
> public void FromText(string rawValue)
>
> {
>
> value = double.Parse(rawValue);
>
> value = int.Parse(rawValue);
>
> }
>
> }
>
>
>
>
>


RE: Generic class question

2011-06-03 Thread Greg Keogh
The Convert class will help:

value = (T)Convert.ChangeType(rawValue, typeof(T))

Fascinating. I've not noticed that method before. The MSDN doco says that
ChangeType expects an IConvertible, which int, double, long, etc do.

It turns out I couldn't use a TypeConverter because I'm in Silverlight.

I can't use ChangeType in my case either, but I will stick that in my head
for future use. I have to parse strings that are coming in a decimal number
strings and also as 0xn hex number strings. Sadly I had to use
reflection to get the Parse method and invoke it on the string after I have
tweaked it.

Greg

 



Re: Generic class question

2011-06-03 Thread Geoff Appleby
Surely there's very few types that a) you're using, that b) offer that Parse
method. Could you save the reflection call and simply do something like

if (typeof(T) is decimal) { decimal.Parse(...); }
elseif (typeof(T) is int) { int.Parse(...); }

?

On Sat, Jun 4, 2011 at 1:27 PM, Greg Keogh  wrote:

> The Convert class will help:
>
> value = (T)Convert.ChangeType(rawValue, typeof(T))
>
> Fascinating. I’ve not noticed that method before. The MSDN doco says that
> ChangeType expects an IConvertible, which int, double, long, etc do.
>
> It turns out I couldn’t use a TypeConverter because I’m in Silverlight.
>
> I can’t use ChangeType in my case either, but I will stick that in my head
> for future use. I have to parse strings that are coming in a decimal number
> strings and also as 0xn hex number strings. Sadly I had to use
> reflection to get the Parse method and invoke it on the string after I have
> tweaked it.
>
> Greg
>
>
>



-- 
Geoff Appleby

Blog: http://www.crankygoblin.com/geoff
Twitter: http://twitter.com/g_appleby
Facebook: http://www.facebook.com/geoff.appleby


RE: Generic class question

2011-06-03 Thread David Kean
There's not a lot of point being generic if end up doing switch if/switch 
statements. ie Why don't you just have a specialized class for each numeric 
type? Ie IntFooClass, DoubleFooClass, etc.


From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Geoff Appleby
Sent: Friday, June 03, 2011 8:59 PM
To: ozDotNet
Subject: Re: Generic class question

Surely there's very few types that a) you're using, that b) offer that Parse 
method. Could you save the reflection call and simply do something like

if (typeof(T) is decimal) { decimal.Parse(...); }
elseif (typeof(T) is int) { int.Parse(...); }

?
On Sat, Jun 4, 2011 at 1:27 PM, Greg Keogh 
mailto:g...@mira.net>> wrote:
The Convert class will help:
value = (T)Convert.ChangeType(rawValue, typeof(T))
Fascinating. I've not noticed that method before. The MSDN doco says that 
ChangeType expects an IConvertible, which int, double, long, etc do.
It turns out I couldn't use a TypeConverter because I'm in Silverlight.
I can't use ChangeType in my case either, but I will stick that in my head for 
future use. I have to parse strings that are coming in a decimal number strings 
and also as 0xn hex number strings. Sadly I had to use reflection to get 
the Parse method and invoke it on the string after I have tweaked it.
Greg




--
Geoff Appleby

Blog: http://www.crankygoblin.com/geoff
Twitter: http://twitter.com/g_appleby
Facebook: http://www.facebook.com/geoff.appleby



RE: Generic class question

2011-06-03 Thread Greg Keogh
Surely there's very few types that a) you're using, that b) offer that Parse
method. Could you save the reflection call and simply do something like
if (typeof(T) is decimal) { decimal.Parse(...); }
elseif (typeof(T) is int) { int.Parse(...); }

I can't cast a double, int or long to the generic type T which is
constrained to be a struct. Hmmm .. why?



As David says, if I'm doing if typeof(X) in the class then there's no point
in it being generic.

The class I'm using is in fact a wrapper around a two-dimensional array of
the T (a matrix of T). It just seemed natural to have a generic class to
hold the matrix of T values, and it was working lovely until I stumbled upon
this brain-teaser of parsing a string to set one of the T values.

Greg

<>