Search Results

Search found 20663 results on 827 pages for 'multiple inheritance'.

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

  • Does Java not support multiple inheritance?

    - by user1720616
    Lets us take instances of two classes public abstract class Shapes { public abstract void draw(Graphics g); } public class Rectangle extends Shapes { public void draw(Graphics g) { //implementation of the method } } here the class Rectangle has extended class Shapes and implicitly it extends class Object.I know no other extension is possible but cant we call inheriting classes Shapes and Object multiple inheritance?(Since inheriting two classes is multiple inheritance from one perspective)

    Read the article

  • How should I plan the inheritance structure for my game?

    - by Eric Thoma
    I am trying to write a platform shooter in C++ with a really good class structure for robustness. The game itself is secondary; it is the learning process of writing it that is primary. I am implementing an inheritance tree for all of the objects in my game, but I find myself unsure on some decisions. One specific issue that it bugging me is this: I have an Actor that is simply defined as anything in the game world. Under Actor is Character. Both of these classes are abstract. Under Character is the Philosopher, who is the main character that the user commands. Also under Character is NPC, which uses an AI module with stock routines for friendly, enemy and (maybe) neutral alignments. So under NPC I want to have three subclasses: FriendlyNPC, EnemyNPC and NeutralNPC. These classes are not abstract, and will often be subclassed in order to make different types of NPC's, like Engineer, Scientist and the most evil Programmer. Still, if I want to implement a generic NPC named Kevin, it would nice to be able to put him in without making a new class for him. I could just instantiate a FriendlyNPC and pass some values for the AI machine and for the dialogue; that would be ideal. But what if Kevin is the one benevolent Programmer in the whole world? Now we must make a class for him (but what should it be called?). Now we have a character that should inherit from Programmer (as Kevin has all the same abilities but just uses the friendly AI functions) but also should inherit from FriendlyNPC. Programmer and FriendlyNPC branched away from each other on the inheritance tree, so inheriting from both of them would have conflicts, because some of the same functions have been implemented in different ways on the two of them. 1) Is there a better way to order these classes to avoid these conflicts? Having three subclasses; Friendly, Enemy and Neutral; from each type of NPC; Engineer, Scientist, and Programmer; would amount to a huge number of classes. I would share specific implementation details, but I am writing the game slowly, piece by piece, and so I haven't implemented past Character yet. 2) Is there a place where I can learn these programming paradigms? I am already trying to take advantage of some good design patterns, like MVC architecture and Mediator objects. The whole point of this project is to write something in good style. It is difficult to tell what should become a subclass and what should become a state (i.e. Friendly boolean v. Friendly class). Having many states slows down code with if statements and makes classes long and unwieldy. On the other hand, having a class for everything isn't practical. 3) Are there good rules of thumb or resources to learn more about this? 4) Finally, where does templating come in to this? How should I coordinate templates into my class structure? I have never actually taken advantage of templating honestly, but I hear that it increases modularity, which means good code.

    Read the article

  • WCF data services (OData), query with inheritance limitation?

    - by Mathieu Hétu
    Project: WCF Data service using internally EF4 CTP5 Code-First approach. I configured entities with inheritance (TPH). See previous question on this topic: Previous question about multiple entities- same table The mapping works well, and unit test over EF4 confirms that queries runs smoothly. My entities looks like this: ContactBase (abstract) Customer (inherits from ContactBase), this entity has also several Navigation properties toward other entities Resource (inherits from ContactBase) I have configured a discriminator, so both Customer and Resource map to the same table. Again, everythings works fine on the Ef4 point of view (unit tests all greens!) However, when exposing this DBContext over WCF Data services, I get: - CustomerBases sets exposed (Customers and Resources sets seems hidden, is it by design?) - When I query over Odata on Customers, I get this error: Navigation Properties are not supported on derived entity types. Entity Set 'ContactBases' has a instance of type 'CodeFirstNamespace.Customer', which is an derived entity type and has navigation properties. Please remove all the navigation properties from type 'CodeFirstNamespace.Customer'. Stacktrace: at System.Data.Services.Serializers.SyndicationSerializer.WriteObjectProperties(IExpandedResult expanded, Object customObject, ResourceType resourceType, Uri absoluteUri, String relativeUri, SyndicationItem item, DictionaryContent content, EpmSourcePathSegment currentSourceRoot) at System.Data.Services.Serializers.SyndicationSerializer.WriteEntryElement(IExpandedResult expanded, Object element, ResourceType expectedType, Uri absoluteUri, String relativeUri, SyndicationItem target) at System.Data.Services.Serializers.SyndicationSerializer.<DeferredFeedItems>d__b.MoveNext() at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteItems(XmlWriter writer, IEnumerable`1 items, Uri feedBaseUri) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeedTo(XmlWriter writer, SyndicationFeed feed, Boolean isSourceFeed) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeed(XmlWriter writer) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteTo(XmlWriter writer) at System.Data.Services.Serializers.SyndicationSerializer.WriteTopLevelElements(IExpandedResult expanded, IEnumerator elements, Boolean hasMoved) at System.Data.Services.Serializers.Serializer.WriteRequest(IEnumerator queryResults, Boolean hasMoved) at System.Data.Services.ResponseBodyWriter.Write(Stream stream) Seems like a limitation of WCF Data services... is it? Not much documentation can be found on the web about WCF Data services (OData) and inheritance specifications. How can I overpass this exception? I need these navigation properties on derived entities, and inheritance seems the only way to provide mapping of 2 entites on the same table with Ef4 CTP5... Any thoughts?

    Read the article

  • Question about Virtual Inheritance hierarchy

    - by Summer_More_More_Tea
    Hi there: I encounter this problem when tackling with virtual inheritance. I remember that in a non-virtual inheritance hierarchy, object of sub-class hold an object of its direct super-class. What about virtual inheritance? In this situation, does object of sub-class hold an object of its super-class directly or just hold a pointer pointing to an object of its super-class? By the way, why the output of the following code is: sizeof(A): 8 sizeof(B): 20 sizeof(C): 20 sizeof(C): 36 Code: #include <iostream> using namespace std; class A{ char k[ 3 ]; public: virtual void a(){}; }; class B : public virtual A{ char j[ 3 ]; public: virtual void b(){}; }; class C : public virtual B{ char i[ 3 ]; public: virtual void c(){}; }; class D : public B, public C{ char h[ 3 ]; public: virtual void d(){}; }; int main( int argc, char *argv[] ){ cout << "sizeof(A): " << sizeof( A ) << endl; cout << "sizeof(B): " << sizeof( B ) << endl; cout << "sizeof(C): " << sizeof( C ) << endl; cout << "sizeof(D): " << sizeof( D ) << endl; return 0; } Thanks in advance. Kind regards.

    Read the article

  • symfony + doctrine + inheritance, how to make them work?

    - by imac
    I am beginning to work with Symfony, I've found some documentation about inheritance. But also found this discouraging article, which make me doubt if Doctrine handles inheritance any good at all... Has anyone find a smart solution for inheritance in Symfony+Doctrine? As an example, I have already structured the database something like this: CREATE TABLE `poster` ( `poster_id` int(11) NOT NULL AUTO_INCREMENT, `user_name` varchar(50) NOT NULL, PRIMARY KEY (`poster_id`), UNIQUE KEY `id` (`poster_id`), ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; CREATE TABLE `user` ( `user_id` int(11) NOT NULL, `real_name` varchar(50) DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_id` (`user_id`), CONSTRAINT `user_fk` FOREIGN KEY (`user_id`) REFERENCES `poster` (`poster_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; From that, Doctrine generated this "schema.yml": Poster: connection: doctrine tableName: poster columns: poster_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true user_name: type: string(50) fixed: false unsigned: false primary: false notnull: true autoincrement: false relations: Post: local: poster_id foreign: poster_id type: many User: local: poster_id foreign: user_id type: many Version: local: poster_id foreign: poster_id type: many User: connection: doctrine tableName: user columns: user_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: false real_name: type: string(50) fixed: false unsigned: false primary: false notnull: false autoincrement: false relations: Poster: local: user_id foreign: poster_id type: one User creation for this structure with Doctrine auto-generated forms does not work. Any clue will be appreciated.

    Read the article

  • Multiple domains and product categories but one company?

    - by Brad
    Hi Guys, My company is expanding online, and we are wondering the best way to go about our eCommerce strategy. We sell a wide range of products of a single material, lets use ceramics as an example. The current competition in our niche online is medium level. We currently have one site selling all our range: ceramicstuff.com However I have just found that ceramickitchenware.com, ceramicbowls.com, etc are currently unregistered, despite quite decent traffic search volume around those keywords monthly. What do you guys think about registering these domains to increase traffic? Would I put a standalone sites on those domains, or do I point them to my main domain? Or do I use them a "micro" sites to offer information, and then link to buy at my main domain, etc? Summary: I'm looking to employ "spammy" type SEO tricks, multiple domains, etc but the key point is I will be generating REAL content, and offering a REAL QUALITY product. How to proceed? Thanks!

    Read the article

  • How to handle multiple domains correctly? [closed]

    - by Eric Itzhak
    Possible Duplicate: Could I buy a domain name to increase traffic to my site like this? I have a website with multiple keyword based domains ( 2 actully) Now both domains are common google searches for the topic. What i'm intrested is to handle the domains as such that google can recognize the seconed domain with the same page rank as the primary domain, so it will also appear on the first page. My question is how do i do it correctly so i will help SEO? meaning i want the 2nd domain to be on the first page, because the primary is on the first page for it's keyword. do i simple put a redirect in the index.php file? Or to do a 301 redirect? or change the .htaccess file? Or create a domain pointer in the Control panel?

    Read the article

  • Multiple Monitors using nvidia-prime or bumblebee on Ubuntu 13.10

    - by user205626
    I've been unable to get multiple monitors to work with Ubuntu 13.10 using nvidia-prime or bumblebee. Could someone point me in the right direction? With nvidia-prime, I've tried the xorg.conf here http://us.download.nvidia.com/XFree86/Linux-x86/319.12/README/randr14.html, but I boot into "low graphics" mode and have to revert to get a desktop back. Any suggestions would be appreciated. Thanks. Edit: I've given up on nvidia-prime; I missed the fact that it never turns off the discrete card... So, I'm back to trying to get VIRTUAL displays working with Bumblebee.

    Read the article

  • Render a 3D scene in multiple windows - extended panoramic view

    - by teodron
    Is there any resource location on how to view a 3D scene from an application or a game on multiple windows or monitors? Each window should continue drawing from where the neighbouring one left off (in the end, the result should be a mosaic of the scene). My idea is to use a camera for each window and have a reference position and orientation for a meta-camera object that is used to correctly offset the other camera. Since there are quite some elements to consider (window specs, viewport properties, position-orientation of each render camera), what is the correct way to update the individual cameras considering the position and orientation of the central, meta-camera? I currently cannot make the cameras present the scene contiguously (and I am reluctant in working out the transformations without checking whether this is the actual way of doing things).

    Read the article

  • Multiple Base Addresses and Multiple Endpoints in WCF

    - by mnhab
    I'm using two bindings TCP and HTTP. I want to give mex data on both bindings. What I want is that the mexHttpBinding only exposes the HTTP services while the mexTcpBinding exposes TCP services only. Or is this possible that I access stats service only from HTTP binding and the eventLogging service from TCP? For Example: For TCP I should only have net.tcp://localhost:9001/ABC/mex net.tcp://localhost:9001/ABC/eventLogging For HTTP http://localhost:9002/ABC/stats http://localhost:9002/ABC/mex When I connect with any of the base address (using the WCF Test Client) I'm able to access all the services? Like when I connect with net.tcp://localhost:9001/ABC I'm able to use the services which are offered on the HTTP binding. Why is that so? <system.serviceModel> <services> <service behaviorConfiguration="ABCServiceBehavior" name="ABC.Data.DataServiceWCF"> <endpoint address="eventLogging" binding="netTcpBinding" contract="ABC.Campaign.IEventLoggingService" /> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" /> <endpoint address="stats" binding="basicHttpBinding" contract="ABC.Data.IStatsService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9001/ABC" /> <add baseAddress="http://localhost:9002/ABC" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ABCServiceBehavior"> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>

    Read the article

  • How does load balancing work with multiple server with multiple DBs

    - by Matt
    I guess what im looking for is a description on how this all works together. I'm used to setting up one server with maybe another server to handel the DB. My question is how does the load balancer work where do all the script(php,python) files go? If i make a change to one i have to rsync them to all the server that the balancer refers to? Also does each server need client side DB's installed so they can reference the DB's that are on other servers? If there is a site that explains all this i would be happy to read it.

    Read the article

  • (RoR) How to: link multiple apps, multiple URLs, one database

    - by Samson
    Hello. I am currently developing a site using Ruby on Rails. I am still a beginner who just started around a month ago. I use InstantRails on Windows 7. Here's my question. Let's say app A is functional using MYSQL database A_development. The files such as views and controller are under folder 'A'. I now know how to, say for example, link www.app.com to this app by opening port 80 and changing some lines in the mySQL config. In this app, you can register your username, login, and post some messages. I now want to create some pretty identical apps say B and C. The only thing different will be the posts that shows, and the views. You can still log in with the same username, and everything is saved in the same database. I now want the URLs to look something like A.app.com leading to app A, B.app.com leading to app B, etc. Can that be achieved? How? I've been googling for a few days already and I'm still lost. As I'm new to this forum, I'm not quite sure what info do you guys need. Please list and I'll provide them asap. Any help will be appreciated! Thanks.

    Read the article

  • Configuration tools for multiple monitors for X / Linux

    - by richard
    I have Ubuntu 10.04 running gnome and two monitors. I am wondering if a can get a better multi-monitor configuration tool. The one I have, gnome-display-properties, has too many problems, including: When I swapped my monitors over, the narrower (external) one now on the left. There is a width calculation error, such that I have a virtual monitor the width of the wide-monitor on the narrow-monitor and part of the wide monitor. And a virtual narrow-monitor on the remainder of the wide-monitor. Also the visible mouse pointer does is not aligned with the active spot, an x offset of one monitor width. I would like, in approximate order of importance: nobugs. to be able to select which is primary monitor. to have multiple configurations. configurations to be automatically selected based on which monitors are attached. configurations to be cycled (reliably) when display mode key is pressed. when a display is deactivated, for windows to migrate to remaining monitors. option to not change display resolution when mirroring, but to use side/top blanking bars to pad out screen.

    Read the article

  • multiple godaddy domains to home router then reverse proxy to multiple internal servers [closed]

    - by Dan
    I need someone to steer me correctly... advising on all required components. I have multiple domains with godaddy, say site1.com , site2.com, site3.net I have multiple home LAMP servers... one on say, lampsrv1 = 192.168.0.2:8080 (windows) and lampsrv2 = 192.168.0.3:9080 (linux srv2) I would like to have server1.site1.com point to lampsrv1 and server2.site1.com point to lampsrv2 . I may also want server1.site2.com also point to my lampsrv1 as an option. My thinking is - I have a dedicated linux srv1 with a reverse proxy server behind the router, ie Apache or NGINX or equivalent directing to appropriate LAMP server. It's the godaddy subdomains, cnames or redirections, etc I'm having a challenge with for starters... I have tested apache with virtual servers but can't get proxying to work based on host header info... seems to go to one address making me think its actually the apache reverse proxying that's not quite working. Finally to add to this, my router has a dynamic IP but does lease for quite a while but that would be my final piece. So, I'm sure this might be a popular question but can't seem to piece this together. I need someone who has actually configured this scenario to advise but will take other suggestions.... please indicate if you have successfully configured this.

    Read the article

  • Issue tracking multiple domains with Google Analytics

    - by user359650
    I have 2 domains mydomain.com and mydomain.net which I'm trying to track with the same GA code. Here are the options I turned on: Subdomains of mydomain ON Examples: www.mydomain.com -and- apps.mydomain.com -and- store.mydomain.com Multiple top-level domains of mydomain ON Examples: mydomain.uk -and- mydomain.cn -and- mydomain.fr Which gave me the following code: _gaq.push(['_setAccount', 'UA-123456789-1']); _gaq.push(['_setDomainName', 'mydomain.com']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); In this help page I read that _setDomainName must be changed for each domain which I did: -if you go to mydomain.net you get _gaq.push(['_setDomainName', 'mydomain.net']); -if you go to mydomain.com you get _gaq.push(['_setDomainName', 'mydomain.com']); When I generate traffic on both mydomain.dom and mydomain.net and watches GA push requests made with firebug I can see requests generated for both domains and the parameter called utmhn has the proper domain value (which matches that of _setDomainName and the browser address bar). However when I monitor the realtime statistics under Home->Real-Time->Overview I see pageviews for mydomain.net BUT NOT for mydomain.dom :( What am I missing to properly track both domains? PS: in the help page I mentioned they talk about setting up cross links which I didn't do for now as my understanding is that it shouldn't be needed to get what I'm trying to do to work. Also I want to mention that I do not have any tracking code for any of these 2 domains other than the one I mentioned.

    Read the article

  • Multiple monitors showing same screen but different resolutions

    - by Luis Alvarado
    Is it possible to have 2 or more monitors showing the same screen, for example the same desktop but with different resolutions. Like the clone option in Nvidia or the mirror option using the Display settings in Ubuntu but instead of showing the same output with the same resolution, the both show the same output using a resolution that is native for each monitor connected. In my case if I have a netbook that has max resolution of 1360x768 and a TV that has 1280x1024, the would both show the same desktop but each with their own resolution that is compatible for each device. This would help in trying to find a resolution that works on both monitors and in cases like a mini netbook and a huge TV it would solve issues like having max 800x600 in one monitor and min 1024x768 in the other. In the case I tested I was using an HDMI cable but this question also involves VGA and any other connection. I have 3 tests scenarios for this: Scenario 1 - Laptop HP DV6000 (Intel Integrated Video) with 1360x760 connected to a Samsung LED 42 TV that has 1280x900. Scenario 2 - Laptop EEE with 1024x600 (Intel Integrated Video) connected to Sony LCD TV that supports 1280x900. Scenario 3 - Intel Desktop with Nvidia 440 GT with HDMI connected to Soneview 32' TV that supports 1920x1080 and VGA connected to an Epson Video Beam that supports 1280x1024 max. In this 3 scenarios I need to be able to show the same desktop and same views but on different resolutions for each output device. UPDATE: Tested with Xubuntu and the way it handles multiple monitors is precisely what I am asking. The ability to handle the resolution of different monitors showing the same thing.

    Read the article

  • Entity Framework inheritance: TPT, TPH or none?

    - by silverfighter
    Hi, I am currently reading about the possibility about using inheritance with Entity Framework. Sometimes I use a approch to type data records and I am not sure if I would use TPT or TPH or none... For example... I have a ecommerce shop which adds shipping, billing, and delivery address I have a address table: RecordID AddressTypeID Street ZipCode City Country and a table AddressType RecordID AddressTypeDescription The table design differs to the gerneral design when people show off TPT or TPH... Does it make sense to think about inheritance an when having a approach like this.. I hope it makes sense... Thanks for any help...

    Read the article

  • Inheritance in Java

    - by Mandar
    Hello, recently I went through the inheritance concept. As we all know, in inheritance, superclass objects are created/initialized prior to subclass objects. So if we create an object of subclass, it will contain all the superclass information. But I got stuck at one point. Do the superclass and the subclass methods are present on separate call-stack? If it is so, is there any specific reason for same? If it is not so, why they don't appear on same call-stack? E.g. // Superclass class A { void play1( ) { // .... } } // Subclass class B extends A { void play2( ) { //..... } } Then does the above 2 methods i.e play1( ) and play2( ) appear on separate call stack? Thanks.

    Read the article

  • JPA Inheritance and Relations - Clarification question

    - by Michael
    Here the scenario: I have a unidirectional 1:N Relation from Person Entity to Address Entity. And a bidirectional 1:N Relation from User Entity to Vehicle Entity. Here is the Address class: @Entity public class Address implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) privat Long int ... The Vehicles Class: @Entity public class Vehicle implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne private User owner; ... @PreRemove protected void preRemove() { //this.owner.removeVehicle(this); } public Vehicle(User owner) { this.owner = owner; ... The Person Class: @Entity @Inheritance(strategy = InheritanceType.JOINED) @DiscriminatorColumn(name="PERSON_TYP") public class Person implements Serializable { @Id protected String username; @OneToMany(cascade = CascadeType.ALL, orphanRemoval=true) @JoinTable(name = "USER_ADDRESS", joinColumns = @JoinColumn(name = "USERNAME"), inverseJoinColumns = @JoinColumn(name = "ADDRESS_ID")) protected List<Address> addresses; ... @PreRemove protected void prePersonRemove(){ this.addresses = null; } ... The User Class which is inherited from the Person class: @Entity @Table(name = "Users") @DiscriminatorValue("USER") public class User extends Person { @OneToMany(mappedBy = "owner", cascade = {CascadeType.PERSIST, CascadeType.REMOVE}) private List<Vehicle> vehicles; ... When I try to delete a User who has an address I have to use orphanremoval=true on the corresponding relation (see above) and the preRemove function where the address List is set to null. Otherwise (no orphanremoval and adress list not set to null) a foreign key contraint fails. When i try to delete a user who has an vehicle a concurrent Acces Exception is thrown when do not uncomment the "this.owner.removeVehicle(this);" in the preRemove Function of the vehicle. The thing i do not understand is that before i used this inheritance there was only a User class which had all relations: @Entity @Table(name = "Users") public class User implements Serializable { @Id protected String username; @OneToMany(mappedBy = "owner", cascade = {CascadeType.PERSIST, CascadeType.REMOVE}) private List<Vehicle> vehicles; @OneToMany(cascade = CascadeType.ALL) @JoinTable(name = "USER_ADDRESS", joinColumns = @JoinColumn(name = "USERNAME") inverseJoinColumns = @JoinColumn(name = "ADDRESS_ID")) ptivate List<Address> addresses; ... No orphanremoval, and the vehicle class has used the uncommented statement above in its preRemove function. And - I could delte a user who has an address and i could delte a user who has a vehicle. So why doesn't everything work without changes when i use inheritance? I use JPA 2.0, EclipseLink 2.0.2, MySQL 5.1.x and Netbeans 6.8

    Read the article

  • Inheritance or identifier

    - by Lina
    Hi! Does anyone here have opinions about when to user inheritance and when to use an identifier instead? Inheritance example: class Animal { public int Name { get; set; } } class Dog : Animal {} class Cat : Animal {} Identifier example: class Animal { public int Name { get; set; } public AnimalType { get; set; } } In what situations should i prefer which solution and what are the pros and cons for them? /Lina

    Read the article

  • Linq to SQL inheritance and Table per Class - approach needed for multiple roles

    - by Ash Machine
    I am using L2S and an inheritance model for mapping Persons against certain roles. Guy Burstein's excellent blog post explains how to accomplish this: http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/10/01/linq-to-sql-inheritance.aspx However, I have a specific case where a Person has multiple roles. For example 'Jane Doe' is a Contact and a Programmer. In this model, she would need two rows in the People table, one as Contact (PersonType = 1) and one as Programmer (PersonType = 3). If she changes her last name, and that update happens in her role as Contact, I would need to change all instances of 'Jane Doe' to reflect the name change everywhere. What sort of best approach (improved data structure) could be used to change last name within all roles? Finally, I am hoping to avoid overriding each general form update events to include all instances, but that may be the only way. Any suggestions or approaches appreciated.

    Read the article

  • Table per subclass inheritance relationship: How to query against the Parent class without loading a

    - by Arthur Ronald F D Garcia
    Suppose a Table per subclass inheritance relationship which can be described bellow (From wikibooks.org - see here) Notice Parent class is not abstract @Entity @Inheritance(strategy=InheritanceType.JOINED) public class Project { @Id private long id; // Other properties } @Entity @Table(name="LARGEPROJECT") public class LargeProject extends Project { private BigDecimal budget; } @Entity @Table(name="SMALLPROJECT") public class SmallProject extends Project { } I have a scenario where i just need to retrieve the Parent class. Because of performance issues, What should i do to run a HQL query in order to retrieve the Parent class and just the Parent class without loading any subclass ???

    Read the article

  • Unity 3d support for multiple X-screens

    - by stewbond
    I've installed Ubuntu 12.04 this weekend and have had problems getting Unity3d to work with my triple monitor set-up. I've installed the latest nVidia drivers for my 2 nVidia video cards and have used NVIDIA X Server Settings to configure everything. If I stick each monitor on a separate X screen, all but the primary X screen will appear white and the cursor will be a black X. I can start a terminal on this screen but cannot drag other windows to it. If I kill the "Nautilus" process, the white background disappears and I see my desktop background, but my cursor is still an X and I still cannot drag windows to it. If I enable TwinView, I can get one screen on two monitors to work properly, but the white screen remains on my third monitor. In addition, I don't like using TwinView because my full-screen applications get stretched. My current solution is to "Enable Xinerama", use all separate X screens and revert to Unity2d. I'd love a solution to this as Ubuntu 12.10 is not planned to support Unity-2d and prefer the aesthetics of 3d anyways. I can provide Xorg.conf for all configurations and any other suggested diagnostic information. Below is my closest-to-working xorg.conf: # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 295.33 (buildd@zirconium) Fri Mar 30 13:38:49 UTC 2012 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" RightOf "Screen2" Screen 1 "Screen1" RightOf "Screen0" Screen 2 "Screen2" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "1" EndSection Section "Files" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "CRT-1" HorizSync 28.0 - 55.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor2" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor3" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 0 EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9500 GT" BusID "PCI:2:0:0" EndSection Section "Device" Identifier "Device2" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 1 EndSection Section "Device" Identifier "Device3" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 2 EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-0: 1280x1024_75 +0+0; DFP-0: 1280x1024 +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen2" Device "Device2" Monitor "Monitor2" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-2: 1280x1024_75 +0+0; DFP-2: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen3" Device "Device3" Monitor "Monitor3" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-2: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Extensions" Option "Composite" "Disable" EndSection Other people have had similar issues. I haven't been successful at any of the few suggestions submitted. Can not get Dual Monitors to work on Different GPUs http://askubuntu.com/questions/30412/3-monitors-with-2-video-cards-not-working?rq=1 How to get second display to work alongside primary display? http://askubuntu.com/questions/148007/multiple-monitors-only-work-with-unity-2d/201086#201086 xorg.conf and Unity3D?

    Read the article

  • Alternatives to multiple inheritance for my architecture (NPCs in a Realtime Strategy game)?

    - by Brettetete
    Coding isn't that hard actually. The hard part is to write code that makes sense, is readable and understandable. So I want to get a better developer and create some solid architecture. So I want to do create an architecture for NPCs in a video-game. It is a Realtime Strategy game like Starcraft, Age of Empires, Command & Conquers, etc etc.. So I'll have different kinds of NPCs. A NPC can have one to many abilities (methods) of these: Build(), Farm() and Attack(). Examples: Worker can Build() and Farm() Warrior can Attack() Citizen can Build(), Farm() and Attack() Fisherman can Farm() and Attack() I hope everything is clear so far. So now I do have my NPC Types and their abilities. But lets come to the technical / programmatical aspect. What would be a good programmatic architecture for my different kinds of NPCs? Okay I could have a base class. Actually I think this is a good way to stick with the DRY principle. So I can have methods like WalkTo(x,y) in my base class since every NPC will be able to move. But now lets come to the real problem. Where do I implement my abilities? (remember: Build(), Farm() and Attack()) Since the abilities will consists of the same logic it would be annoying / break DRY principle to implement them for each NPC (Worker,Warrior, ..). Okay I could implement the abilities within the base class. This would require some kind of logic that verifies if a NPC can use ability X. IsBuilder, CanBuild, .. I think it is clear what I want to express. But I don't feel very well with this idea. This sounds like a bloated base class with too much functionality. I do use C# as programming language. So multiple inheritance isn't an opinion here. Means: Having extra base classes like Fisherman : Farmer, Attacker won't work.

    Read the article

  • Need multiple sound outputs to multiple speakers

    - by Usman Sajeel Haider
    How do I play 3 different music tracks at the same time on my computer, such that song1 is played in speaker1, song2 in speaker2... Is this possible programatically? What additional hardware will I need? Do I need 3 seperate sound cards? Given that the hardware is in place, how would I "route" the sound output for a particular song to a particular speaker. Alternatively, is there a special hardware that can handle multiple inputs and outputs? Appreciate your expert opinions.

    Read the article

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