Search Results

Search found 41 results on 2 pages for 'aston'.

Page 1/2 | 1 2  | Next Page >

  • Why does Microsoft Windows' performance appear to degrade over time?

    - by Ben Aston
    Windows XP/2k3 and earlier (can't attest to Vista, but suspect it's the same) all appear to become more sluggish over time as applications are installed and uninstalled. This is not a scientifically tested observation, but more of a learned-through-experience piece of wisdom. (I've always suspected the registry as being behind the issue.) Does anyone have any concrete evidence of this degradation occurring, or it just an invalid perception of mine?

    Read the article

  • Two wireless NICs on a MacBook - can I bind all VPN traffic to one, and everything else to another?

    - by Ben Aston
    I frequently connect to my workplace over a VPN. I would like to continue watching videos from, say YouTube, whilst I work on the VPN, without degrading the available VPN bandwidth (say for an RDP session). Can I configure a second NIC to deal with only the VPN traffic, with everything else going over the primary? Specs as requested: Macbook Pro, OSX Snow Leopard, using the built in OSX VPN connectivity, the in-built airport card and a USB external wifi adapter.

    Read the article

  • Polymorphic NHibernate mappings

    - by Ben Aston
    I have an interface IUserLocation and a concrete type UserLocation. When I use ICriteria, specifying the interface IUserLocation, I want NHibernate to instantiate a collection of the concrete UserLocation type. I have created an HBM mapping file using the table per concrete type strategy (shown below). However, when I query NHibernate using ICriteria I get: NHibernate cannot instantiate abstract class or interface MyNamespace.IUserLocation Can anyone see why this is? (source code for the relevant bit of NHibernate here (I think)) My ICriteria: var filter = DetachedCriteria.For<IUserLocation>() .Add(Restrictions.Eq("UserId", userId)); return filter.GetExecutableCriteria(UoW.Session) .List<IUserLocation>(); My mapping file: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="true"> <class xmlns="urn:nhibernate-mapping-2.2" name="MyNamespace.IUserLocation,MyAssembly" abstract="true" table="IUserLocations"> <composite-id> <key-property name="UserId" column="UserId" type="System.Guid"></key-property> <key-many-to-one name="Location" column="LocationId" class="MyNamespace.ILocation,MyAssembly"></key-many-to-one> </composite-id> <union-subclass table="UserLocations" name="MyNamespace2.UserLocation,MyAssembly2"> <property name="IsAdmin" /> </union-subclass> </class> </hibernate-mapping>

    Read the article

  • How to make an IDisposable object a class variable?

    - by Ben Aston
    I am working with Active Directory using C#. Instantiating the PrincipalContext object seems to be expensive, so I'd like to store one in a class variable. When using PrincipalContext as a local variable, I can use the convenient using syntax. When storing an IDisposable object in a static variable, how do I ensure the object is properly disposed of?

    Read the article

  • Entity Relationship Diagramming

    - by Ben Aston
    I'd like to improve my understanding of cardinality constraints in ER diagrams. I have two entities: User Location But, I want the relationship between these two entities to be many-to-many (a user can be in many locations and a location can have many users). To do this I need to introduce an association class UserLocation. Is it correct to say I now have 3 entities? If I were to draw an ER diagam of the above, would I draw in the UserLocation entity, and would the cardinality look like this? User 1 ------ * User Location * ------ 1 Location

    Read the article

  • What happens when I subscribe to a message using NServiceBus?

    - by Ben Aston
    When I subscribe as the recipient of a certain type of message using NServiceBus Bus.Subscribe<MyMessage>() What am I actually doing? Am I specifying that a particular method on the recipient type will be invoked upon message receipt? If so, within what context does the method run - in a static context, or within the context of a new'd-up parent class instance (and if so, how does NServiceBus know what constructor to use)?

    Read the article

  • Object initializer with explicit interface in C#

    - by Ben Aston
    How can I use an object initializer with an explicit interface implementation in C#? public interface IType { string Property1 { get; set; } } public class Type1 : IType { string IType.Property1() { get; set; } } ... //doesn't work var v = new Type1 { IType.Property1 = "myString" };

    Read the article

  • How to treat an instance variable as an instance of another type in C#

    - by Ben Aston
    I have a simple inheritance heirarchy with MyType2 inheriting from MyType1. I have an instance of MyType1, arg, passed in as an argument to a method. If arg is an instance of MyType2, then I'd like to perform some logic, transforming the instance. My code looks something like the code below. Having to create a new local variable b feels inelegant - is there a way of achieving the same behavior without the additional local variable? public MyType1 MyMethod(MyType1 arg) { if(arg is MyType2) { MyType2 b = arg as MyType2; //use b (which modifies "arg" as "b" is a reference to it)... } return arg; }

    Read the article

  • Alternatives to web.config files in ASP.NET

    - by Ben Aston
    In my experience, web.config files are widely reviled. In particular, I have found them difficult to manage when you have multiple environments to support, and fiddly to update due to the lack of validation at update-time and the verbosity of XML. What are the alternatives?

    Read the article

  • When should I stub out a type by manually creating a "stub" version, rather than using a mocking fra

    - by Ben Aston
    Are there any circumstances where it is favourable to manually create a stub type, as opposed to using a mocking framework (such as Rhino Mocks) at the point of test. We take both these approaches in our projects. My gut feel when I look at the long list of stub versions of objects is that it will add maintenance overhead, and moves the implementation of the stub away from the point of test.

    Read the article

  • Will the following NHibernate interface mapping work?

    - by Ben Aston
    I'd like to program against interfaces when working with NHibernate due to type dependency issues within the solution I am working with. SO questions such as this indicate it is possible. I have an ILocation interface and a concrete Location type. Will the following work? HBM mapping: <class name="ILocation" abstract="true" table="ILocation"> <id name="Id" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000"> <column name="LocationId" /> <generator class="guid" /> </id> <union-subclass table="Location" name="Location"> <property name="Name" type="System.String"/> </union-subclass> </class> Detached criteria usage using the interface: var criteria = DetachedCriteria.For<ILocation>().Add(Restrictions.Eq("Name", "blah")); var locations = criteria.GetExecutableCriteria(UoW.Session).List<ILocation>(); Are there any issues with not using the hilo ID generator and/or with this approach in general?

    Read the article

  • Why does Microsoft Windows' performance appear to degrade over time?

    - by Ben Aston
    Windows XP/2k3 and earlier (can't attest to Vista, but suspect it's the same) all appear to become more sluggish over time as applications are installed and uninstalled. This is not a scientifically tested observation, but more of a learned-through-experience piece of wisdom. (I've always suspected the registry as being behind the issue.) Does anyone have any concrete evidence of this degradation occurring, or it just an invalid perception of mine?

    Read the article

1 2  | Next Page >