Search Results

Search found 390 results on 16 pages for 'vulcan eager'.

Page 3/16 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Mocking a namespace in a partial class.

    - by Nix
    I am messing around with Entity Framework 3.5 SP1 and I am trying to find a cleaner way to do the below. Basically I have an EF model and I am adding some Eager Loaded entities and i want to put them in the partial class context Eager namespace. Currently I am using composition but I feel like there is an easier way to do what I want. namespace Entities{ public partial class TestObjectContext { EagerExtensions Eager { get;set;} public TestObjectContext(){ Eager = new EagerExtensions (this); } } public partial class EagerExtensions { TestObjectContext context; public EagerExtensions(TestObjectContext _context){ context = _context; } public IQueryable<TestEntity> TestEntity { get { return context.TestEntity .Include("TestEntityType") .Include("Test.Attached.AttachedType") .AsQueryable(); } } } } public class Tester{ public void ShowHowIWantIt(){ TestObjectContext context= new TestObjectContext(); var query = from a in context.Eager.TestEntity select a; } }

    Read the article

  • How to enforce lazy loading of entities on certain conditions

    - by Samuel
    We have an JPA @Entity class (say User) which has a @ManyToOne reference (say Address) loaded using the EAGER option which in turn loads it's own @ManyToOne fields (say Country) in a EAGER fashion. We use the EntityQuery interface to count the list of User's based on a search criteria, during such a load all the @ManyToOne fields which have been marked as EAGER get loaded. But in order to perform a EntityQuery.resultCount(), I actually don't need to load the @ManyToOne fields. Is there a way to prevent loading of the EAGER fields in such cases so that we can avoid the unnecessary joins?

    Read the article

  • Installing Ubuntu in EFI mode Cant go beyond GRUB Menu

    - by Vulcan
    I created a LiveUSB of Ubuntu 12.04.3 LTS using Pendrive Linux. -Created a separate 30GB partition using Windows 8 Disk Management -Disabled Secure Boot (Didn't find an option to disable EFI boot) -Disabled Fast Startup The laptop starts the GRUB menu shows up but it doesn't go beyond that no matter what option i choose. After choosing any option the screen goes blank but the power is still on i can see the power light. My laptop is HP-n012tx processor- Intel i5 4200U Video Card- 2GBnVidia 740M The GRUB menu i see http://i.stack.imgur.com/buEAn.png

    Read the article

  • JPA association table is not deletable

    - by Marcel
    Hi I have a problem with JPA (EclipseLink). I am not able to delete a association table. This is the situation: Product 1:n to ProductResource Resource 1:n to ProductResource I first set the product and resource attributes of ProductResource. If I then try to delete the ProductResource object nothing happens (no sql is generated - no exception). If I comment out both OneToMany annotations in ProductResource I can delete the object. I can also delete the object when product and resource attributes are not set. If I comment out only the annotation above the ressource attribut the ProductResource object gets deleted upon the deletion of the product object (cascade=CascadeType.ALL). I hope someone could give me a hint. Thank you. Product Resource: public class ProductResource implements Serializable { @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.MERGE) private Product product; @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.MERGE) private Resource resource; Product: public class Product implements Serializable { @OneToMany(mappedBy="product", fetch=FetchType.EAGER, cascade=CascadeType.ALL) private List<ProductResource> productResources = new ArrayList<ProductResource>(); Resource: public class Resource implements Serializable { @OneToMany(mappedBy="resource", fetch=FetchType.EAGER, cascade=CascadeType.ALL) private List<ProductResource> productResources = new ArrayList<ProductResource>(); Greetings Marcel

    Read the article

  • NHibernate returning duplicate object in child collections when using Fetch

    - by UpTheCreek
    When doing a query like this (using Nhibernate 2.1.2): ICriteria criteria = session.CreateCriteria<MyRootType>() .SetFetchMode("ChildCollection1", FetchMode.Eager) .SetFetchMode("ChildCollection2", FetchMode.Eager) .Add(Restrictions.IdEq(id)); I am getting multiple duplicate objects in some cartesian fashion. E.g. if ChildCollection1 has 3 elements, and ChildColection2 has 2 elements then I get results with each element in ChildColection1 one duplicated, and each element in ChildColection2 triplicated! This was a bit of a WTF moment for me... So how to do this correctly? Is using SetFetchMode like this only supported when specifying one collection? Am I just using it wrong (I've seen some references to results transformers, but imagined this would be simplier). Is this something that's different in NH3? Update: As per Felice's suggestion, I tried using the DistinctRootEntity transformer, but this is still returning duplicates. Code: ICriteria criteria = session.CreateCriteria<MyRootType>() .SetFetchMode("ChildCollection1", FetchMode.Eager) .SetFetchMode("ChildCollection2", FetchMode.Eager) .Add(Restrictions.IdEq(id)); criteria.SetResultTransformer(Transformers.DistinctRootEntity); return criteria.UniqueResult<MyRootType>();

    Read the article

  • DPI Scaling in Windows 8.1 via command line

    - by Vulcan
    I'd like to create a keyboard shortcut to quickly and easily change the DPI scale on my machine. In Windows 8.1, the desktop display DPI scale can be set via the control panel (pictured below), taking effect immediately. Alternatively, the scale can be set manually in the registry, but doing so requires that the user sign in and out or restart the machine in order to take effect (and only works to imitate the "one scaling level for all my displays" option). How can I set the DPI scale via the command line, or otherwise programmatically?

    Read the article

  • mod_python with Python 2.6 on Windows

    - by Vulcan Eager
    How do I install mod_python to run with Python 2.6 on a Windows machine? I could not find an installer for Python 2.6. I downloaded this installer for (mod_python on Python 2.5): mod_python-3.3.1.win32-py2.5-Apache2.2.exe and extracted it to get PLATLIB and SCRIPTS folders. Where do I go from here?

    Read the article

  • PyPy -- How can it possible beat CPython?

    - by Vulcan Eager
    From the Google Open Source Blog: PyPy is a reimplementation of Python in Python, using advanced techniques to try to attain better performance than CPython. Many years of hard work have finally paid off. Our speed results often beat CPython, ranging from being slightly slower, to speedups of up to 2x on real application code, to speedups of up to 10x on small benchmarks. How is this possible? Which Python implementation was used to implement PyPy? CPython? And what are the chances of a PyPyPy or PyPyPyPy beating their score? (On a related note... why would anyone try something like this?)

    Read the article

  • Calling cli::array<int>::Reverse via a typedef in C++/CLI

    - by Vulcan Eager
    Here is what I'm trying: typedef cli::array<int> intarray; int main(){ intarray ^ints = gcnew intarray { 0, 1, 2, 3 }; intarray::Reverse(ints); // C2825, C2039, C3149 return 0; } Compilation resulted in the following errors: .\ints.cpp(46) : error C2825: 'intarray': must be a class or namespace when followed by '::' .\ints.cpp(46) : error C2039: 'Reverse' : is not a member of '`global namespace'' .\ints.cpp(46) : error C3149: 'cli::array<Type>' : cannot use this type here without a top-level '^' with [ Type=int ] Am I doing something wrong here?

    Read the article

  • PyPy -- How can it possibly beat CPython?

    - by Vulcan Eager
    From the Google Open Source Blog: PyPy is a reimplementation of Python in Python, using advanced techniques to try to attain better performance than CPython. Many years of hard work have finally paid off. Our speed results often beat CPython, ranging from being slightly slower, to speedups of up to 2x on real application code, to speedups of up to 10x on small benchmarks. How is this possible? Which Python implementation was used to implement PyPy? CPython? And what are the chances of a PyPyPy or PyPyPyPy beating their score? (On a related note... why would anyone try something like this?)

    Read the article

  • Implementing operator< in C++

    - by Vulcan Eager
    I have a class with a few numeric fields such as: class Class1 { int a; int b; int c; public: // constructor and so on... bool operator<(const Class1& other) const; }; I need to use objects of this class as a key in an std::map. I therefore implement operator<. What is the simplest implementation of operator< to use here?

    Read the article

  • Monitor vs Watch on SourceForge Tracker

    - by Vulcan Eager
    What exactly is the difference Watching and Monitoring a project on the SourceForge Tracker UI? PS: The tool tips are really helpful. Hold your mouse over the "Monitor" button and it says "Monitor this project"... hold it over "Watch" and it says nothing. That's really awesome coming from SF.

    Read the article

  • Dynamically generate Triangle Lists for a Complex 3D Mesh

    - by Vulcan Eager
    In my application, I have the shape and dimensions of a complex 3D solid (say a Cylinder Block) taken from user input. I need to construct vertex and index buffers for it. Since the dimensions are taken from user input, I cannot user Blender or 3D Max to manually create my model. What is the textbook method to dynamically generate such a mesh? Edit: I am looking for something that will generate the triangles given the vertices, edges and holes. Something like TetGen. As for TetGen itself, I have no way of excluding the triangles which fall on the interior of the solid/mesh.

    Read the article

  • Localized text in Java

    - by Eager Learner
    My requirement is to display localized text messages in a J2EE web application. I know J2EE provides very good support for this. My question is what is the practice followed to have the localized messages stored to be used by the application. If I want to display Japanese / Chinese kind of messages which are not like English like char sets how do we get that messages/text into the properties files or Database tables.

    Read the article

  • Rewrite Registry File in Windows

    - by Vulcan Eager
    I have been trying to find a way to "defragment" the registry on my Windows machine. Firstly, does this make sense? Any benefits in doing this? (Not much love on superuser.com) Secondly, I am looking for a way to rewrite the registry using C/C++ with Windows API. Is there a way to read the registry and write it to a new file getting rid of unused bytes along the way? (I might have to write the new file and then boot into another OS/disk before I can overwrite the original... but I am willing to take that risk.)

    Read the article

  • Can I cache a ManyToOne hibernate object without it being lazy loaded?

    - by Andrew
    @ManyToOne @JoinColumn(name = "play_template_id", table = "team_play_mapping" ) public Play getPlay() { return play; } public void setPlay( Play play ) { this.play = play; } By default, this is eager loading. Can I get it so that it will read the play object from a cache without making it lazy loading? Am I correct that eager loading will force it to do a join query and hence no caching?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >