[OT] Help finding good SEO company in Australia

2012-10-03 Thread James Chapman-Smith
Hi folks, I hope you don't mind asking here, but we need a good local SEO company. There are so many that it's hard to figure out who is good and who is not. Can anyone recommend a good local SEO company? Cheers. James Chapman-Smith.

RE: LINQ to XML question

2012-11-19 Thread James Chapman-Smith
Hi Ian, I might have misunderstood what you're after, but doesn't ` ParkTestVideoXMLFile.Root.Add(/* content */)` work to solve this problem? Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Ian Thomas Sent: Monday, 19 November 2012 11:39

RE: What type of Insurance covers using your own custom developer machine at work place?

2012-11-25 Thread James Chapman-Smith
Hi Arjang, I can't answer your question on insurance, but I can't help to think that you're potentially opening yourself up to legal issues. Even with checking things in to an external machine you're still keeping source on your personal machine - even deleting the files fastidiously would leav

RE: Australian Weather Web Services

2012-11-27 Thread James Chapman-Smith
Hi Steven, If you're looking for observational data then the BoM provides free data in a variety of formats. Here's Adelaide in JSON format: http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json. Does that help? Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozd

[OT] Live Mesh Replacement

2013-01-01 Thread James Chapman-Smith
Hi Folks, You have probably heard that Live Mesh is being retired on Feb 13 this year. It's a bit of a bugger as I make heavy use of peer-to-peer sharing with colleagues in the office and SkyDrive, the anointed successor, doesn't have this feature. Can anyone suggest a good replacement for

RE: [OT] Live Mesh Replacement

2013-01-01 Thread James Chapman-Smith
Replacement Sorry james I don't know. But can you tell me how live mesh is different to the other cloud technologies like skydrive/drop box etc? On 2 January 2013 16:09, James Chapman-Smith wrote: Hi Folks, You have probably heard that Live Mesh is being retired on Feb 13 this yea

RE: Async coding pattern

2013-03-03 Thread James Chapman-Smith
Try this Greg: EventHandler handler = null; handler = (s, e) => { client.GetFooCompleted -= handler; Trace("GetFoo result is {0}", e.Result); }; client.GetFooCompleted += handler; client.GetFooAsync(rowId); You'll have to put i

RE: LINQ select nullable Id

2013-03-04 Thread James Chapman-Smith
Try this: int? id = (from t in things where t.Name == "Foo" select t.Id) .ToArray() .Concat(new int?[] { null }) .First(); Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg

[OT] Surface RT or Surface Pro?

2013-04-01 Thread James Chapman-Smith
Hi Folks, I'm thinking about getting myself either a Surface RT or a Surface Pro (or maybe some other alternative). Every time I think about it I convince myself that one is better than the other but then the next time I flip. What are everyone's thoughts? Should I get a Surface RT or a Surfac

RE: [OT] Surface RT or Surface Pro?

2013-04-01 Thread James Chapman-Smith
to:ozdotnet-boun...@ozdotnet.com] On Behalf Of James Chapman-Smith Sent: Tuesday, 2 April 2013 10:50 AM To: ozDotNet Subject: [OT] Surface RT or Surface Pro? Hi Folks, I'm thinking about getting myself either a Surface RT or a Surface Pro (or maybe some other alternative). Every time I thin

RE: regex - how to remove questionmark

2013-06-06 Thread James Chapman-Smith
Another alternative is to use LINQ: string.Join("", text.Where(x => x != '?')) It's probably not the most straight forward way of doing it, but it does allow a lambda to be used to filter on the characters of a string, which `Replace` and `Regex` do not. From: ozdotnet-boun...@ozdotnet.com [ma

RE: Scaling HTML

2013-07-12 Thread James Chapman-Smith
Hi Greg, Is this an example of the kind of scaling HTML that you're looking for? http://www.getgroundedfootwear.com/ Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of GregAtGregLowDotCom Sent: Friday, 12 July 2013 13:33 To: ozDotNet Subject

[OT] Purchasing Office & Visio

2013-07-28 Thread James Chapman-Smith
Hi folks, Sorry for the off topic post, but I need to get three licences for Office 2010 Professional & two licences for Visio 2010 Standard. I've looked on www.mwave.com.au and they have them for $235 & $419.67 respectively. I'm not sure if this is right, but Visio by

Swap File [Was: 240GB SSD?]

2013-08-08 Thread James Chapman-Smith
What's the deal with not having a swap file? I've heard that there are some programs in Windows that require a swap file to function. Or is that just BS? In the past I've run without one and things have seemed fine, but I'd like to know if I can get rid of it or not? Especially since I'm using

[OT] Surface 2 OR Surface Pro 2

2014-01-01 Thread James Chapman-Smith
Hi folks, I've made the decision to purchase either a Surface 2 or a Surface Pro 2, but I'm completely torn as to which one to get. I just want a tablet device that I can use when travelling, sitting on the couch, or in bed. I want a keyboard with trackpad/mouse so the touch cover is fine for

RE: [OT] reinstalling my Windows 7 RC machine to the RTM

2010-03-05 Thread James Chapman-Smith
_ Ian Thomas Victoria Park, Western Australia _ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of James Chapman-Smith Sent: Friday, 5 March 2010 5:25 PM To: ozdotnet@ozdotnet.com Subject: Splash Screen..thread safe Hi Anthony, I'v

RE: Splash Screen..thread safe

2010-03-06 Thread James Chapman-Smith
Given the sample code, what would you recommend? From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Saturday, 6 March 2010 09:09 To: 'ozDotNet' Subject: RE: Splash Screen..thread safe splashThread.Abort(); Don't do that. The Thre

RE: C# 4.0 Covariance Question

2010-03-25 Thread James Chapman-Smith
Wow - it's a brave new world coming. Using convariance does indeed return IHandle & IHandle instances. Taking out covariance only gives back the IHandle instances. Just when I thought I had co/contra-variance worked out! Sheesh. James. From: ozdotnet-boun...@ozdotnet.com [mailto

[OT] Australian Hosting of nopCommerce (ASP.Net/MSSQL) & CubeCart (PHP/MySQL)

2010-03-27 Thread James Chapman-Smith
Hi folks, I'm looking for a good local hosting company to run both nopCommerce (ASP.Net/MSSQL) & CubeCart (PHP/MySQL) sites. I've found ASPWebHosting which will do both. So my questions are: . Can anyone recommend other

RE: [OT] Vostro laptops

2010-04-13 Thread James Chapman-Smith
Hi folks, I too am interested to get feedback on this. I have a Dell XPS M1710 that is now three years old - and while it still out performs many current machines - it's getting a little long in the tooth as a development machine. I've been very happy with the support from Dell so I'm keen to s

RE: Contracting to a single company

2010-04-29 Thread James Chapman-Smith
Hi folks, You simply can't get away with PSI without serious implications from the ATO. You must earn at least 20% of your income from an independent source - ie no more than 80% from one company (or related company). You can NOT pay your spouse to do "secondary" tasks relating to your

RE: Contracting to a single company

2010-04-29 Thread James Chapman-Smith
dotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of James Chapman-Smith Sent: Friday, 30 April 2010 11:21 AM To: 'ozDotNet' Subject: RE: Contracting to a single company Hi folks, You simply can't get away with PSI without serious implications from th

RE: Contracting to a single company

2010-05-03 Thread James Chapman-Smith
g edge and needed bleeding edge tools to make the business sustainable. In this case many of the 'tools' that I bought were those that were used in one contract only and then 'upgraded' to the later ones for later contracts. On 30 April 2010 14:37, James Chapman-Smith wrote:

RE: Contracting to a single company

2010-05-03 Thread James Chapman-Smith
Here's a good summary of the PSI rules from: http://www.apesma.asn.au/connect/small_business/independent_operator.asp When is a contractor an independent operator? By Roger Lee, Director Finance, Professional Update - July 2000 >From 1 July 2000 the federal government will place major restricti

RE: Changing bound fields

2010-05-04 Thread James Chapman-Smith
If I understand correctly, you have TextBoxA bound to PropertyA (on the entity via the binding source) and when a change occurs in TextBoxA you're calculating a value and assigning it to TextBoxB - so TextBoxB is NOT bound to any property of the entity. If that's true then I would make sure tha

RE: Starting out with Entity Framework

2010-05-30 Thread James Chapman-Smith
Hi Clint, You can easily use partial classes to add the list of months member to the generated classes from entity framework. Will that do what you need? Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Clint Colefax Sent: Monday

RE: Ignoring excpetions in catch

2010-06-01 Thread James Chapman-Smith
Handling exceptions requires exceptional programming - literally & figuratively. I find that there are very few times that you actually need to handle exceptions. Very few. Rampant exceptional handling creates more nightmares than it solves. It makes debugging almost impossible as your code stops

[OT] Does anyone know of any SharePoint developers looking for work in Adelaide?

2010-06-09 Thread James Chapman-Smith
Hi folks, Does anyone know of any SharePoint developers looking for work in Adelaide? Cheers. James.

RE: How to validate directory path

2010-06-17 Thread James Chapman-Smith
How about this? public static bool CanCreateDir(string path) { var @return = false; try { var actions = new List(); var di = new System.IO.DirectoryInfo(path); while (true) { if (di.Exists) { @return

RE: Math.Round

2010-06-17 Thread James Chapman-Smith
Hi Alastair, Doing this would change the expected behaviour of the Round function and lead to ambiguous code. If you could do this then adding some bit of new code that changes the rounding could invalidate existing code that was functioning correctly. Think space shuttle challenger-like rounding

RE: How to validate directory path

2010-06-17 Thread James Chapman-Smith
th On Thu, Jun 17, 2010 at 7:30 PM, James Chapman-Smith wrote: > How about this? Ignoring the terrible coding style, it assumes that you've got delete priveledges, which may not be the case. It also assumes that nothing gets put in that directory outside of the program,

RE: [OT] Trouble setting up workgroup at home with XP and Win 7 machines

2010-06-20 Thread James Chapman-Smith
It's an NTLM v2 authentication issue. Windows 7 only allows NTLM v2 and not LM (LAN MANAGER) authentication. You need to "dumb down" Windows 7 to make it work. See http://serverfault.com/questions/69049/system-error-58-while-accessing-share s-on-win-7-from-xp/69113#69113 From: ozdotnet-b

RE: KPI's for software developers

2010-06-25 Thread James Chapman-Smith
Hi Richard & David, I'd be wary about using "amount of code" & "bugs they fix" as KPI's. IMHO both are terrible as far as KPI's. Here's why: It's my experience that there are two main things that create bugs - code & documentation. The more code you write the more bugs you'll get (and t

RE: Refactoring linq Query Expression

2010-07-13 Thread James Chapman-Smith
Hi Arjang, What about this: private Func, IQueryable> _getBoiFg = qs => from c in qs where c.DATAAREAID == "boi" && c.ITEMGROUPID == "fg" select c; public List GetAll() { using (var ctx = new DataEntities()) { ret

RE: Advice for Data Access - Hibernate/Linq/Fluent/etc

2010-07-13 Thread James Chapman-Smith
+1 for LINQPad From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Dylan Tusler Sent: Wednesday, 14 July 2010 10:20 To: 'ozDotNet' Subject: RE: Advice for Data Access - Hibernate/Linq/Fluent/etc Get a hold of LinqPAD (www.linqpad.net) and you won't look b

RE: EF/LINQ type conversion problem

2010-07-19 Thread James Chapman-Smith
Hi Arjang, I think you'll find that EF, as trying to convert your code into a SQL statement, it is failing because it doesn't know how to express DTO.IProduct as a SQL literal. This is because you are using a SelectMany with an in-memory list. I think you'll need to either put a ".ToArray()" on "c

RE: EF/LINQ type conversion problem

2010-07-19 Thread James Chapman-Smith
ader.com/ http://twitter.com/peitor On Mon, Jul 19, 2010 at 5:18 PM, James Chapman-Smith wrote: Hi Arjang, I think you'll find that EF, as trying to convert your code into a SQL statement, it is failing because it doesn't know how to express DTO.IProduct as a SQL literal. This is

RE: Return multiple files from webservice?

2010-07-20 Thread James Chapman-Smith
Your other option is to use the `System.IO.Packaging` namespace, built in to .Net 3.0, to package up your files. It's used by Word & Excel, for example, to save docx & xlsx docs, and uses the zip format internally. You just create parts (streams), add them to a package and you're essentially done.

RE: Generics, operators and native data types

2010-07-27 Thread James Chapman-Smith
public static T[] Remaining(this T[] list, T exclude) { return list.Except(new T[] { exclude }).ToArray(); } From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Burstin Sent: Wednesday, 28 July 2010 12:09 To: ozDotNet Subject: Generics, operat

RE: Dependency injection

2010-07-28 Thread James Chapman-Smith
Hi Jeff, You need to think twice about exposing low-level functionality through a high-level interface. The purpose of repositories is, in one respect, to hide low level functionality. If you feel that you need to do so then maybe you have problems with one or both of your interfaces. Some code

RE: [OT] Website required

2010-07-29 Thread James Chapman-Smith
Hi Matt, Take a look at nopCommerce - http://www.nopcommerce.com/featurelist.aspx - it's an open source, .NET commerce site that is quite excellent. The features are very extensive. I think the software will do what you want almost straight out of the box. I think subscriptions might require so

RE: converting List into IEnumerable

2010-08-12 Thread James Chapman-Smith
Hi Wal, With the release of .NET 4.0 the framework introduced co-variance & contra-variance on collection types. What you're trying to do is co-variance. This says that if `Order` can be assigned to `IOrder` then so too can `IEnumerable` be assigned to `IEnumerable`. Prior to .NET 4.0 you could

RE: Properties

2010-08-24 Thread James Chapman-Smith
Hi Jeff, Here are a few things to consider. . You can't ensure that the inner state (encapsulation) of your objects is maintained using fields. An `Age` field might be set to `-1`, for example. . You can't implement `INotifyPropertyChanged` on a field - so fields don't work

RE: Which is faster?

2010-08-25 Thread James Chapman-Smith
According to the below code, list is over 12,000 times faster than the data table. var x = new DataTable(); x.Columns.Add("Text", typeof(string)); System.Linq.Enumerable.Repeat(1,100).Run(i => { var dr = x.NewRow(); dr[0]="Hello"; x.Rows.Add(dr); }); var sw = new System.Diagnosti

RE: Which is faster?

2010-08-25 Thread James Chapman-Smith
ibrary/6sh2ey19.aspx> ." So, in the example x.Select would return an array with 1,000,000 elements, while x.Find would return a single string. No wonder x.Select takes so much longer. On Wed, Aug 25, 2010 at 7:33 PM, James Chapman-Smith wrote: According to the below code, li

RE: Use of GCHandle.Alloc and Free

2010-10-12 Thread James Chapman-Smith
I might be off track, but don't you need to call `Marshall.ReleaseComObject(object)` on all managed references to COM objects? My experience a few years back was that when you allocated and released COM objects many times you run out of some sort of handle that then causes things to randomly screw

RE: It's a question of Generics...

2010-11-03 Thread James Chapman-Smith
Hi Clint, What you're suggesting here can't work. Type inference only works when passing a parameter to a function (not a generic parameter). If you want to return an object of type `IBase(Of T, E)` then the function definition must include the `T` & `E` types. Your function only has a single g

RE: It's a question of Generics...

2010-11-04 Thread James Chapman-Smith
Interface IMyGenericInterface (Of T) Inherits IMyInterface Then my function could return any instance of the non generic interface, but I've not tried this as I've moved on. Thanks for the feedback. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotn

RE: Generic Interface Question (.net 4.0)

2010-11-06 Thread James Chapman-Smith
Hi Wolfgang, The simplest approach, which also works in 3.5, is to create an IPersistor interface that IPersistor inherits from. Then you can assign any IPersistor to a variable of IPersistor. In 4.0 though, you can now use co-variance or contravariance (not both) when designing your interf

RE: Generic Interface Question (.net 4.0)

2010-11-07 Thread James Chapman-Smith
ime. Thanks WVS On Sun, Nov 7, 2010 at 5:54 PM, James Chapman-Smith wrote: Hi Wolfgang, The simplest approach, which also works in 3.5, is to create an IPersistor interface that IPersistor inherits from. Then you can assign any IPersistor to a variable of IPersistor. In 4.0 tho

RE: OT - iPhone Programming

2010-11-25 Thread James Chapman-Smith
Hi silky, Try taking a look at `MonoTouch`. It's Mono for the iPhone. http://monotouch.net/ >From the website: "What is MonoTouch?" "MonoTouch allows developers to create C# and .NET based applications that run on Apple's iPhone, iPad, and iPod Touch devices, while taking advantage of the iPho

RE: One for next week

2010-11-25 Thread James Chapman-Smith
Hi Ian, I just did a test of the speed of removing the invalid chars using brute force. Here's my code: var invalids = System.IO.Path.GetInvalidPathChars() .Union(System.IO.Path.GetInvalidFileNameChars()); var text = new string('x', 20); var query = from c in text

[OT] Developer Laptop

2010-11-29 Thread James Chapman-Smith
Hi folks, I've been using a Dell XPS M1710 laptop now for the nearly the last 4 years. It's been a good little beast and it still performs better than many of the newer machines that I get lumbered with on some client sites. It is now time for me to upgrade. Being a development machine I wa

RE: [OT] Developer Laptop

2010-11-29 Thread James Chapman-Smith
: ozDotNet Subject: Re: [OT] Developer Laptop out of curiosity, what programs are you running that use up 8 GB ram ? VMs? Or future proofing? (to a degree) On 30/11/2010 8:13 AM, James Chapman-Smith wrote: Hi folks, I've been using a Dell XPS M1710 laptop now for the nearly the last 4

RE: Forcing Dispose to be Called.

2011-01-25 Thread James Chapman-Smith
Hi David, It's easy to force developers to call Dispose but your library calls must use a particular signature. Given an interface definition like so: public interface IPricingService : IDisposable { IEnumerable GetPrices(int @ref, DateTime date, PricingProviders prici

RE: Developer PC spec

2011-01-25 Thread James Chapman-Smith
I couldn't agree with you more Tony. I'm still using a Dell XPS M1710 that I bought nearly 4 years ago. It's still got an OK processor for today's standards, but it does have a 17" screen with 1920 x 1200 resolution. Knock on wood that it doesn't die on me any time soon, but I haven't found a goo

RE: Red Gate will be charging $35 for .NET Reflector

2011-02-02 Thread James Chapman-Smith
It even prompted me to write my first blog entry in nearly two and a half years about it! http://www.enigmativity.com/blog/2011/02/03/Red+Gate+Will+Be+Charging+35+For +NET+Reflector.aspx F

RE: LINQ extensions

2011-02-15 Thread James Chapman-Smith
LINQ doesn't cause `.Length` to disappear, but if you assign the array to an `IEnumerable` then you won't seen the `.Length` property. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tristan Reeves Sent: Wednesday, 16 February 2011 11:54 To: ozDotNet Su

RE: Listing event handlers at runtime

2011-02-23 Thread James Chapman-Smith
This should do it: void Main() { var foo = new Foo(); foo.Bang += Foo_Bang; foo.Bang += (s, e) => { }; var fooBangAsDelegate = (Delegate)foo.Bang; var ds = fooBangAsDelegate.GetInvocationList(); var methodInfos = ds.Select(d

RE: Listing event handlers at runtime

2011-02-23 Thread James Chapman-Smith
doesn't work. I get compilation error "The event 'System.AppDomain.AssemblyResolve' can only appear on the left hand side of += or -=". I assume your example works because you didn't use the "event" keyword when declaring the "Bang" event

RE: Linq (To Objects) Update ( like sql )

2011-02-24 Thread James Chapman-Smith
Hi Arjang, Have you installed the `Reactive Extensions for .Net (Rx)` (http://social.msdn.microsoft.com/Forums/en-US/rx/threads)? It gives you, not only the support for `IObservable/IObserver` for push collections and a back-port of the TPL for .NET 3.5SP1, but it also gives you a ton of extensio

RE: Linq Select from an array where element indexes satisfy a criteria

2011-03-03 Thread James Chapman-Smith
Easy. var numbers = new [] { 1, 2, 2, 3, 3, 5, 6, }; var evens = numbers.Where((n, i) => i % 2 == 0); var igt2 = numbers.Where((n, i) => i > 2); For this last one you could just go with `Skip(...)`. var igt2= numbers.Skip(3); Cheers. James. -Original Message-

HTML vs Silverlight - comparative effort?

2011-03-28 Thread James Chapman-Smith
Hi folks, I got asked a question today that I don't really have the experience to answer and was hoping someone here could help. If I'm going to develop a new "web-based" application in HTML or Silverlight, what would the comparative effort be like? And really, what kind of pros & cons are wor

RE: HTML vs Silverlight - comparative effort?

2011-03-28 Thread James Chapman-Smith
, 29 March 2011 13:03 To: ozDotNet Cc: James Chapman-Smith Subject: Re: HTML vs Silverlight - comparative effort? On Tue, Mar 29, 2011 at 12:31 PM, James Chapman-Smith mailto:ja...@chapman-smith.com>> wrote: If I'm going to develop a new "web-based" application in HTML or Silverligh

RE: Entity Framework and Linq

2011-04-18 Thread James Chapman-Smith
Hi Clint, Is this what you're after? var q = from c1 in context.Customers where c1.Name == "Fred" join c2 in context.Countries on c1.Country equals c2 join c3 in context.CountryRegions on c2 equals c3.Country where c3.Re

RE: Can you detect a checkbox state chnage by user not code?

2011-05-04 Thread James Chapman-Smith
How about an approach of using two check boxes - one hidden and one visible? Assuming I have a check box called "OzDotNetSubscriber" hide it (ie `.Visible = false`), and then add in a new check box called "OzDotNetSubscriberVisible" and place it on the UI to replace the hidden original check box

RE: Can you detect a checkbox state chnage by user not code?

2011-05-04 Thread James Chapman-Smith
dependent code? Using hidden GUI controls sounds like an oxymoron. Regards Arjang On 4 May 2011 18:16, James Chapman-Smith wrote: > How about an approach of using two check boxes - one hidden and one visible? > > > > Assuming I have a check box called "OzDotNetSubscriber"

RE: clever friday code

2011-05-20 Thread James Chapman-Smith
Hi Stephen, It sounds like you're trying to do the right thing and reduce boiler-plate code, but the approach seems a little awkward. I'd be inclined to adopt a "decorator" pattern on this to get your security to work. Basically have an inner implementation of your methods without security and

RE: install .net 4.0 on different drive

2011-05-20 Thread James Chapman-Smith
If the primary drive is NTFS you could attach a second drive to a path on the first thus giving you more space. Would that work? -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Noon Silk Sent: Friday, 20 May 2011 21:43 To: ozDotN

RE: Word VSTO question

2011-05-30 Thread James Chapman-Smith
Hi Ian, I couldn't see a difference in the file format for protected or non-protected documents. I got "Microsoft Word 97-2003 Document" for `.doc` and "Microsoft Word Document" for `.docx` though. Is what you're seeing based on the file extension or definitely on the protection status? Assumi

RE: Generic class question

2011-06-05 Thread James Chapman-Smith
The technique that I've used in the past for this is to have a dictionary of delegates for each type. Then I define a static variable to hold them - or use DI to inject them. private static Dictionary _parsers = new Dictionary() { { typeof(int), (Func)(t => int.Parse(t)) }, { typeof(doub

RE: [OT] Shopping for a shopping cart

2011-06-06 Thread James Chapman-Smith
Hi Kirsten, A very good looking open-source .NET shopping cart is "nop Commerce". They revved very often with earlier builds, but seem to be stabilizing now. They had 6 releases in 2008, 5 in both 2009 & 2010. The latest build is 1.9 (Dec 2010) and is a

RE: Set property of texbox by name

2011-07-25 Thread James Chapman-Smith
I assume you wanted VB.NET. If not, I can provide a better answer in C# if you need it. Try this: For Each button In (From x In Me.GetAllControls(Me).OfType(Of Button)() _ Where x.Name = "Button" & n _ Select x) button.Text = t Next You need

RE: Set property of texbox by name

2011-07-26 Thread James Chapman-Smith
something like either Ben's or my previous post. David "If we can hit that bullseye, the rest of the dominoes  will fall like a house of cards... checkmate!"  -Zapp Brannigan, Futurama On Tue, Jul 26, 2011 at 16:07, James Chapman-Smith wrote: > I assume you wanted VB.NET. If no

RE: Set property of texbox by name

2011-07-27 Thread James Chapman-Smith
we can hit that bullseye, the rest of the dominoes  will fall like a house of cards... checkmate!"  -Zapp Brannigan, Futurama On Tue, Jul 26, 2011 at 23:32, James Chapman-Smith wrote: > Hi David, > > What do you mean by incredibly slow? How many buttons are we talking about? &g

RE: timezone converasion and olson database

2011-08-28 Thread James Chapman-Smith
I'd be careful using `DateTime` - it doesn't understand the timezone inherently. Try using the new (to 4.0) `DateTimeOffset` which does. It picks up its TZ info from the repository so I suspect that it is going to be as good as the Olson DB. I don't know where MS gets their updates from, but I'm

RE: while (true) using Parallel.ForEach

2011-10-26 Thread James Chapman-Smith
Hi Tom, I've got some examples, but why do you want to do this? // Something to do in the loop Action action = () => Console.WriteLine(Thread.CurrentThread.ManagedThreadId); // standard while(true) loop while (true) { action();

RE: Other developers don't like dependency injection

2011-10-26 Thread James Chapman-Smith
No, you are not wrong. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Michael Ridland Sent: Thursday, 27 October 2011 13:46 To: ozDotNet Subject: Other developers don't like dependency injection So I've been working with this client for a few years now,

RE: Learning LINQ novice question

2011-12-05 Thread James Chapman-Smith
Here's a simple example: Action write = (n, a) => { Console.WriteLine("Hi {0}, you are {1} years old.", n, a); }; Now, strictly speaking the parentheses are required for zero and for 2 or more parameters. They are only optional for single parameters. From: ozdotnet-boun...@ozdotnet.com [

RE: Very simple LINQ query

2012-03-27 Thread James Chapman-Smith
Hi Peter, Based on what you've asked it sounds like you just need to do this: query.DefaultIfEmpty().Dump(); It sounds like that's what you were thinking already. Unless I've missed what you're asking for. Cheers. James Chapman-Smith [cid:image001.png@01CD0

RE: Unhooking events from Handler

2012-04-01 Thread James Chapman-Smith
Hi Michael, This is an awesome pattern for solving this problem. I use it myself quite a lot. I think it is perfect for Stephen. Cheers. James. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Michael Minutillo Sent: Monday, 2 April 2012 11:11 To: ozDotN