Search Results

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

Page 26/827 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Why MySQL multiple-column index is overpopulated?

    - by actual
    Consider following MySQL table: CREATE TABLE `log` ( `what` enum('add', 'edit', 'remove') CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `with` int(10) unsigned NOT NULL, KEY `with_what` (`with`,`what`) ) ENGINE=InnoDB; INSERT INTO `log` (`what`, `with`) VALUES ('add', 1), ('edit', 1), ('add', 2), ('remove', 2); As I understand, with_what index must have 2 unique entries on its first with level and 3 unique entries in what "subindex". But MySQL reports 4 unique entries for each level. In other words, number of unique elements for each level is always equal to number of rows in log table. Is that a bug, a feature or my misunderstanding?

    Read the article

  • send and recive packet in the Lan with multiple mac Addresses in C#

    - by MGH
    Hi , in our Network bandwith assign to mac address and if you can get more than one , you can get more bandwith :) if there any application or class in C# that can do this .... I'm already have the http proxy or port maper to send packets in different ip addresses but because of they are use same mac address it won't work . Any help is appreciated .

    Read the article

  • Problem implementing a UITableView that allows for multiple row selections

    - by wgpubs
    This - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; int cardNumber = indexPath.row + 1; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; if (![self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers addObject:[NSNumber numberWithInt:cardNumber]]; } else { cell.accessoryType = UITableViewCellAccessoryNone; if ([self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers removeObject:[NSNumber numberWithInt:cardNumber]]; } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } ... modifies the "accessoryType" of every 6th cell INSTEAD of just the selected row. What am I missing? Thanks

    Read the article

  • jQuery load to multiple divs

    - by afcdesign
    I have this code $("body").on({ click: function(event){ event.preventDefault(); var aLink = $(this).attr("href"); $("#content").load(aLink+" #loader", function(){ //Callback here }); $("#crumbbar").load(aLink+' .breadcrumbs', function(){ //Callback here }); } }, "a"); Can this be optimized in such a way that I only have 1 load command?

    Read the article

  • .htaccess or PHP protection code against multiple speedy requests

    - by Phil Jackson
    Hi, I am looking for ideas for how I can stop external scripts connecting with my site. I'm looking for the same kind of idea behind Google. As in if a certain amount of requests are made per a certain amount of time then block the IP address or something. I thought there maybe a htaccess solution if not, I will write a PHP one. Any ideas or links to existing methods or scripts is much appreciated. Regards Phil

    Read the article

  • Wrapping multiple images inside a <div> in jQuery

    - by alekone
    hello! I need to find all the images inside a div, and wrap a div around them. here's the code I come up with, but that's not working! any ideas? thanks! jQuery(function(){ my_selection = []; $('.post').each(function(i){ if ($(this).find('img').length > 1 ){ my_selection.push(['.post:eq(' + i + ')']); } }); $( my_selection.join(',')).wrapAll('<div class="wrapper"></div>'); });

    Read the article

  • Multiple Inheritance Debates II: according to Stroustrup

    - by asksuperuser
    I know very well about the traditional arguments about why Interface Inheritance is prefered to multiple inheritance, there has been already a post here : http://stackoverflow.com/questions/191691/should-c-include-multiple-inheritance But according to Stroustrup the real reason why Microsoft and Sun decided to get rid off multiple inheritance is that they have vested interest to do so: instead of putting features in the languages, they put in frameworks so that people then become tied to their platform instead of people having the same capability at a language standard level. What do you think ? Why Sun and Microsoft consider developers too immature to just make the choice themselves ?

    Read the article

  • Multiple Foreign keys to a single table and single key pointing to more than one table

    - by user1216775
    I need some suggestions from the database design experts here. I have around six foreign keys into a single table (defect) which all point to primary key in user table. It is like: defect (.....,assigned_to,created_by,updated_by,closed_by...) If I want to get information about the defect I can make six joins. Do we have any better way to do it? Another one is I have a states table which can store one of the user-defined set of values. I have defect table and task table and I want both of these tables to share the common state table (New, In Progress etc.). So I created: task (.....,state_id,type_id,.....) defect(.....,state_id,type_id,...) state(state_id,state_name,...) importance(imp_id,imp_name,...) There are many such common attributes along with state like importance(normal, urgent etc), priority etc. And for all of them I want to use same table. I am keeping one flag in each of the tables to differentiate task and defect. What is the best solution in such a case? If somebody is using this application in health domain, they would like to assign different types, states, importances for their defect or tasks. Moreover when a user selects any project I want to display all the types,states etc under configuration parameters section.

    Read the article

  • Multiple Linked List in C

    - by LuckySlevin
    I have a problem about Linked Lists. I already know how to create structures and linked list. But now I have to create arbitrary number of linked list which are also be kept in another structure. Which means : struct list{int x, struct list *next; }; struct parent{int x, struct list *head, struct parent *next;} And after lists are created when i enter this input for example "123134 linked list should look like : 1 - 2 - 3 - 4 And for example 1 will contain 2-3 list inside of it, 3 will contain 1-4 list inside of it. I need a starting point and a spark from you. So how can i do this?

    Read the article

  • Jquery Selecting Multiple Classes, Loading External Files

    - by WillingLearner
    I have 2 links, with the class dynamicLoad. <ul class="navbar"> <li><a href="Page3-News.html" class="dynamicLoad news">NEWS</a></li> <li><a href="Page2-Events.html" class="dynamicLoad">EVENTS</a></li> </ul> and then I have this already working code, which loads external pages into a div named #MainWrapper: <script type="text/javascript"> $( document ).ready( function() { $( 'a.dynamicLoad' ).click( function( e ) { e.preventDefault(); // prevent the browser from following the link e.stopPropagation(); // prevent the browser from following the link $( '#MainWrapper' ).load( $( this ).attr( 'href' ) ); }); }); </script> How do I edit this code and my links, so that i can target the 1st link with the classes of both dynamicLoad and news, and then, load another script and/or pages into the main wrapper, without breaking its already working functionality?

    Read the article

  • Stacking multiple slideshows using Jquery

    - by plasticletter
    Hi, JQuery newbie here! I'm having difficulty stacking more than one slideshow with each it's own individual controls. The one slideshow works just fine. However, when I add another slideshow I lose the controls and title for that one. link: http://dl.dropbox.com/u/1466448/numbered/stack.html I read on other related posts about using a unique ID for each slideshow but I have very limited experience in jquery to understand that approach. Any help would be greatly appreciated. Thanks! -Thai

    Read the article

  • drupal multiple interest of user

    - by Arun
    hi i want to refresh user page with different data but with same template (user-profile.tpl.php) by simply clicking tabs. Can any one suggest the best way to do that ?. for ex: tab1:sports , tab2: music tab3: literature by clicking tabs the template is same but the data is going to refreshed. Note: Look like profile categories but not the same. all details are from user table

    Read the article

  • Playing multiple FLVs at the same time feasible?

    - by eb_Dev
    Hi, Is it feasible to play a number of FLV files at the same time on one SWF? Basically I have a brief to create a video banner with a number of FLVs of people playing at the same time but starting at different points in the videos. My concerns are with loading times, memory consumption and the starting of each FLV at a different point and looping it. The FLVs will be stored on a server and pseudo-streamed. Any tips would be greatly appreciated. Thanks, eb_dev

    Read the article

  • Assign multiple test categories using TestCategoryAttribute

    - by Michael Freidgeim
    I am using TestCategoryAttribute to filter which tests to run during builds and wandered, how to -how to assign multiple test categories.According to constructor documentation only single category can be specified.  However TestCategories Property (plural!)can return multiple categories.Grouping Tests into Test Categories: You can add an automated test to one or multiple test categories using a test attribute. Each test can belong to multiple test categories.The recommended approach from MSDN How to: Group and Run Automated Tests Using Test Categories is to specify multiple TestCategory attributes like the following[TestCategory("Nightly"), TestCategory("Weekly"), TestCategory("ShoppingCart"), TestMethod()]public Void DebitTest() { }Article http://toddmeinershagen.blogspot.com.au/2010/09/create-custom-test-category-attributes.htmlshows how enums can be used instead of strings.It also explains, that TestCategories Property can be used in derived custom attributes.v

    Read the article

  • Any valid reason to Nest Master Pages in ASP.Net rather than Inherit?

    - by James P. Wright
    Currently in a debate at work and I cannot fathom why someone would intentionally avoid Inheritance with Master Pages. For reference here is the project setup: BaseProject MainMasterPage SomeEvent SiteProject SiteMasterPage nested MainMasterPage OtherSiteProject MainMasterPage (from BaseProject) The debate came up because some code in BaseProject needs to know about "SomeEvent". With the setup above, the code in BaseProject needs to call this.Master.Master. That same code in BaseProject also applies to OtherSiteProject which is just accessed as this.Master. SiteMasterPage has no code differences, only HTML differences. If SiteMasterPage Inherits MainMasterPage rather than Nests it, then all code is valid as this.Master. Can anyone think of a reason why to use a Nested Master Page here instead of an Inherited one?

    Read the article

  • Are there any multiple desktops software for Vista? (similar to what is included in GNOME and KDE)

    - by Macha
    In GNOME and KDE, (and from what I hear, OS X aswell), you have a feature called multiple desktops. It allows you to have multiple screens of apps running, without having the same number of monitors. Does such a program exist for Vista? I'd like around four desktops (one for IM, one for programming, one for browsing/email and one for other apps), and at home I usually have one monitor if using my laptop outside of home, or two if I'm using it at home.

    Read the article

  • How do we know to favour composition over generalisation is always the right choice?

    - by Carnotaurus
    Whether an object physically exists or not, we can choose to model it in different ways. We could arbitarily use generalisation or composition in many cases. However, the GoF principle of "favour composition over generalisation [sic]" guides us to use composition. So, when we model, for example, a line then we create a class that contains two members PointA and PointB of the type Point (composition) instead of extending Point (generalisation). This is just a simplified example of how we can arbitarily choose composition or inheritance to model, despite that objects are usually much more complex. How do we know that this is the right choice? It matters at least because there could be a ton of refactoring to do if it is wrong?

    Read the article

  • overriding implemented base class methods

    - by user793468
    I read somewhere that the chain of inheritance breaks when you alter a behavior from derived class. What does "altering a behavior" mean here? Is overriding an already implemented method in base class considered as "altering behavior"? Or, does the author mean altering method signatures and the output? Also, I ready Duplicating code is not a good practice, and its a maintenance nightmare. Again, does overriding an already implemented method in base class considered "Duplicating code"? If not, what would be considered as "Duplicating code"? I

    Read the article

  • Squibbly Update: Multiple Document Support

    - by Geertjan
    An update on Squibbly, the recently announced free and open source integration framework for LibreOffice! Now multiple documents can be opened at the same time, either from "File | Open File" or from the File Browser (i.e., the rebranded Favorites window). Click to enlarge the image below to get a fuller perspective on Squibbly: Take note of the tabs at the bottom of the editor-area in the screenshot above, and especially when you click the image to enlarge it. Multiple tabs are available at the same time, each representing a different open document. Click a different tab and its document is activated and brought to the front of the application. That means multiple LibreOffice applications can be used simultaneously, each could be undocked from the frame of the application, and the user can work with multiple documents, from multiple LibreOffice applications, all at the same time. Info from this forum entry were useful in getting to the above solution: http://www.oooforum.org/forum/viewtopic.phtml?t=41955 Still several focus-related problems to solve for the application to be ready for general usage.

    Read the article

  • Why does the use of interface-based programming appear to be limited to behaviour?

    - by Carnotaurus
    I have been doing a little thinking about inheritance vs. realization vs. composition. I am not about to post the whole detail here. So I was wondering, when are not talking about supporting unit testing: Why does interface-based programming seem to focus upon the grouping of common behaviour, e.g., IPettable (for an animal), IEditable (for a user control), ISubmitable (for a form), etc. Why does the use of interface-based programming appear to be limited to behaviour when we could pragmatically group not so much on behaviour but on commonsense physical similarities which could have nothing to do with behaviour? It is not that there is some limiting feature within OOP; so how come?

    Read the article

  • MySQL – Scalability on Amazon RDS: Scale out to multiple RDS instances

    - by Pinal Dave
    Today, I’d like to discuss getting better MySQL scalability on Amazon RDS. The question of the day: “What can you do when a MySQL database needs to scale write-intensive workloads beyond the capabilities of the largest available machine on Amazon RDS?” Let’s take a look. In a typical EC2/RDS set-up, users connect to app servers from their mobile devices and tablets, computers, browsers, etc.  Then app servers connect to an RDS instance (web/cloud services) and in some cases they might leverage some read-only replicas.   Figure 1. A typical RDS instance is a single-instance database, with read replicas.  This is not very good at handling high write-based throughput. As your application becomes more popular you can expect an increasing number of users, more transactions, and more accumulated data.  User interactions can become more challenging as the application adds more sophisticated capabilities. The result of all this positive activity: your MySQL database will inevitably begin to experience scalability pressures. What can you do? Broadly speaking, there are four options available to improve MySQL scalability on RDS. 1. Larger RDS Instances – If you’re not already using the maximum available RDS instance, you can always scale up – to larger hardware.  Bigger CPUs, more compute power, more memory et cetera. But the largest available RDS instance is still limited.  And they get expensive. “High-Memory Quadruple Extra Large DB Instance”: 68 GB of memory 26 ECUs (8 virtual cores with 3.25 ECUs each) 64-bit platform High I/O Capacity Provisioned IOPS Optimized: 1000Mbps 2. Provisioned IOPs – You can get provisioned IOPs and higher throughput on the I/O level. However, there is a hard limit with a maximum instance size and maximum number of provisioned IOPs you can buy from Amazon and you simply cannot scale beyond these hardware specifications. 3. Leverage Read Replicas – If your application permits, you can leverage read replicas to offload some reads from the master databases. But there are a limited number of replicas you can utilize and Amazon generally requires some modifications to your existing application. And read-replicas don’t help with write-intensive applications. 4. Multiple Database Instances – Amazon offers a fourth option: “You can implement partitioning,thereby spreading your data across multiple database Instances” (Link) However, Amazon does not offer any guidance or facilities to help you with this. “Multiple database instances” is not an RDS feature.  And Amazon doesn’t explain how to implement this idea. In fact, when asked, this is the response on an Amazon forum: Q: Is there any documents that describe the partition DB across multiple RDS? I need to use DB with more 1TB but exist a limitation during the create process, but I read in the any FAQ that you need to partition database, but I don’t find any documents that describe it. A: “DB partitioning/sharding is not an official feature of Amazon RDS or MySQL, but a technique to scale out database by using multiple database instances. The appropriate way to split data depends on the characteristics of the application or data set. Therefore, there is no concrete and specific guidance.” So now what? The answer is to scale out with ScaleBase. Amazon RDS with ScaleBase: What you get – MySQL Scalability! ScaleBase is specifically designed to scale out a single MySQL RDS instance into multiple MySQL instances. Critically, this is accomplished with no changes to your application code.  Your application continues to “see” one database.   ScaleBase does all the work of managing and enforcing an optimized data distribution policy to create multiple MySQL instances. With ScaleBase, data distribution, transactions, concurrency control, and two-phase commit are all 100% transparent and 100% ACID-compliant, so applications, services and tooling continue to interact with your distributed RDS as if it were a single MySQL instance. The result: now you can cost-effectively leverage multiple MySQL RDS instance to scale out write-intensive workloads to an unlimited number of users, transactions, and data. Amazon RDS with ScaleBase: What you keep – Everything! And how does this change your Amazon environment? 1. Keep your application, unchanged – There is no change your application development life-cycle at all.  You still use your existing development tools, frameworks and libraries.  Application quality assurance and testing cycles stay the same. And, critically, you stay with an ACID-compliant MySQL environment. 2. Keep your RDS value-added services – The value-added services that you rely on are all still available. Amazon will continue to handle database maintenance and updates for you. You can still leverage High Availability via Multi A-Z.  And, if it benefits youra application throughput, you can still use read replicas. 3. Keep your RDS administration – Finally the RDS monitoring and provisioning tools you rely on still work as they did before. With your one large MySQL instance, now split into multiple instances, you can actually use less expensive, smallersmaller available RDS hardware and continue to see better database performance. Conclusion Amazon RDS is a tremendous service, but it doesn’t offer solutions to scale beyond a single MySQL instance. Larger RDS instances get more expensive.  And when you max-out on the available hardware, you’re stuck.  Amazon recommends scaling out your single instance into multiple instances for transaction-intensive apps, but offers no services or guidance to help you. This is where ScaleBase comes in to save the day. It gives you a simple and effective way to create multiple MySQL RDS instances, while removing all the complexities typically caused by “DIY” sharding andwith no changes to your applications . With ScaleBase you continue to leverage the AWS/RDS ecosystem: commodity hardware and value added services like read replicas, multi A-Z, maintenance/updates and administration with monitoring tools and provisioning. SCALEBASE ON AMAZON If you’re curious to try ScaleBase on Amazon, it can be found here – Download NOW. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: MySQL, PostADay, SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL

    Read the article

  • HUGE EF4 Inheritance Bug

    - by djsolid
    Well maybe not for everyone but for me is definitely really important. That is why I get straight into the point. We have the following model: Which maps to the following database: We are using EF4.0 and we want to load all Burgers including BurgerDetails. So we write the following query: But it fails. The error is : “The ResultType of the specified expression is not compatible with the required type. The expression ResultType is 'Transient.reference[SampleEFDBModel.Food]' but the required type is 'Transient.reference[SampleEFDBModel.Burger]'.Parameter name: arguments[0]”   So in the new version of EF there is no way to eager load data through Navigation Properties with 1-1 relationships defined in subclasses. Here is the relevant Microsoft Connect Issue. It is described through an other example but the result is the same.  Please if you think this is important vote up on Microsoft Connect.   EF 4.0 has many improvements. I am using it since v1 in large-scale projects and this version is faster,produces cleaner sql, more reliable and can be used for complicated business scenarios. That is why I believe this issue should be solved as soon as possible. I understand that release cycles are slow but I am hoping atleast for a hotfix. I also have uploaded the example project so you can test it. Download it from here. If anyone has found any workarounds please post it in the comments section. Thanks!

    Read the article

  • Implicit and Explicit implementations for Multiple Interface inheritance

    Following C#.NET demo explains you all the scenarios for implementation of Interface methods to classes. There are two ways you can implement a interface method to a class. 1. Implicit Implementation 2. Explicit Implementation. Please go though the sample. using System;   namespace ImpExpTest { class Program { static void Main(string[] args) { C o3 = new C(); Console.WriteLine(o3.fu());   I1 o1 = new C(); Console.WriteLine(o1.fu());   I2 o2 = new C(); Console.WriteLine(o2.fu());   var o4 = new C(); //var is considered as C Console.WriteLine(o4.fu());   var o5 = (I1)new C(); //var is considered as I1 Console.WriteLine(o5.fu());   var o6 = (I2)new C(); //var is considered as I2 Console.WriteLine(o6.fu());   D o7 = new D(); Console.WriteLine(o7.fu());   I1 o8 = new D(); Console.WriteLine(o8.fu());   I2 o9 = new D(); Console.WriteLine(o9.fu()); } }   interface I1 { string fu(); }   interface I2 { string fu(); }   class C : I1, I2 { #region Imicitly Defined I1 Members public string fu() { return "Hello C"; } #endregion Imicitly Defined I1 Members   #region Explicitly Defined I1 Members   string I1.fu() { return "Hello from I1"; }   #endregion Explicitly Defined I1 Members   #region Explicitly Defined I2 Members   string I2.fu() { return "Hello from I2"; }   #endregion Explicitly Defined I2 Members }   class D : C { #region Imicitly Defined I1 Members public string fu() { return "Hello from D"; } #endregion Imicitly Defined I1 Members } }.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }Output:-Hello C Hello from I1 Hello from I2 Hello C Hello from I1 Hello from I2 Hello from D Hello from I1 Hello from I2 span.fullpost {display:none;}

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >