Search Results

Search found 21663 results on 867 pages for 'result sets'.

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

  • Quickest algorithm for finding sets with high intersection

    - by conradlee
    I have a large number of user IDs (integers), potentially millions. These users all belong to various groups (sets of integers), such that there are on the order of 10 million groups. To simplify my example and get to the essence of it, let's assume that all groups contain 20 user IDs (i.e., all integer sets have a cardinality of 100). I want to find all pairs of integer sets that have an intersection of 15 or greater. Should I compare every pair of sets? (If I keep a data structure that maps userIDs to set membership, this would not be necessary.) What is the quickest way to do this? That is, what should my underlying data structure be for representing the integer sets? Sorted sets, unsorted---can hashing somehow help? And what algorithm should I use to compute set intersection)? I prefer answers that relate C/C++ (especially STL), but also any more general, algorithmic insights are welcome. Update Also, note that I will be running this in parallel in a shared memory environment, so ideas that cleanly extend to a parallel solution are preferred.

    Read the article

  • Full and Partial Matching of Sets

    - by jeffrey
    I have several sets of the same type [Y, M, D] and am trying to write a function to search these sets and return an array of the available sets that fit my parameters. ReturnedSets = return_matches(Y,M,D); I want the three parameters of the function return_matches to be optional. Which means any combination of values can be used to return the sets. For example, one could write - return_matches(13,null,2); - and the function would look for all sets that contain [13, anyValue, 2]; I'm writing this in PHP, to allow users to manage dated files on my website, but I'd like to be able to use this function again for other uses. Thanks! edit: (This, or variations of this, is all I can come up with so far... There is something extra that I don't understand, because this function ends up / would not work to return sets that contain y and d, but leaving m arbitrary. if(y == s[0]){ if(m == s[1]){ if(d == s[2]){ print "day match"; } } else {print "month match";} } else {print "year match";} } else {print "no match";}

    Read the article

  • New T-SQL Features in SQL Server 2011

    - by Divya Agrawal
    SQL Server 2011 (or Denali) CTP is now available and can be downloaded at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&displaylang=en SQL Server 2011 has several major enhancements including a new look for SSMS. SSMS is now   similar to Visual Studio   with greatly improved Intellisense support. This article we will focus on the T-SQL Enhancements in SQL Server 2011. The main [...]

    Read the article

  • Order hybrid mixed mysql search result in one query?

    - by Fredrik
    This problem is easy fixed clientside. But for performance I want to do it directly to the database. LIST a +------+-------+-------+ | name | score | cre | +------+-------+-------+ | Abe | 3 | 1 | | Zoe | 5 | 2 | | Mye | 1 | 3 | | Joe | 3 | 4 | Want to retrieve a joined hybrid result without duplications. Zoe (1st higest score) Joe (1st last submitted) Abe (2nd highest score) Mye (2nd last submitted) ... Clientside i take each search by itself and step though them. but on 100.000+ its getting awkward. To be able to use the LIMIT function would ease things up a lot! SELECT name FROM a ORDER BY score DESC, cre DESC; SELECT name FROM a ORDER BY cre DESC, score DESC;

    Read the article

  • construct graph from python set type.

    - by Vincent
    The sort question, is the an off the self function to make a graph from a set of python sets? The longer: I have several python set types. They each overlap or some are sub sets of others. I would like to make a graph (as in nodes and edges) with the edges weighted by common intersection of the sets. There are several graphing packages for python. (NetworkX, igraph,...) I am not familiar with the use of any of them. Will any of them make a graph directly from a list of sets ie, MakeGraphfromSets(alistofsets) If not do you know of an example of how to take the list of sets to define the edges. It actually looks like it might be straight forward but an example is always good to have.

    Read the article

  • Creating vCard action result

    - by DigiMortal
    I added support for vCards to one of my ASP.NET MVC applications. I worked vCard support out as very simple and intelligent solution that fits perfectly to ASP.NET MVC applications. In this posting I will show you how to send vCards out as response to ASP.NET MVC request. We need three things: some vCard class, vCard action result, controller method to test vCard action result. Everything is very simple, let’s get hands on. vCard class As first thing we need vCard class. Last year I introduced vCard class that supports also images. Let’s take this class because it is easy to use and some dirty work is already done for us. NB! Take a look at ASP.NET example in the blog posting referred above. We need it later when we close the topic. Now think about how useful blogging and information sharing with others can be. With this class available at public I saved pretty much time now. :) vCardResult As we have vCard it is now time to write action result that we can use in our controllers. Here’s the code. public class vCardResult : ActionResult {     private vCard _card;       protected vCardResult() { }       public vCardResult(vCard card)     {         _card = card;     }       public override void ExecuteResult(ControllerContext context)     {         var response = context.HttpContext.Response;         response.ContentType = "text/vcard";         response.AddHeader("Content-Disposition", "attachment; fileName=" + _card.FirstName + " " + _card.LastName + ".vcf");           var cardString = _card.ToString();         var inputEncoding = Encoding.Default;         var outputEncoding = Encoding.GetEncoding("windows-1257");         var cardBytes = inputEncoding.GetBytes(cardString);           var outputBytes = Encoding.Convert(inputEncoding,                                 outputEncoding, cardBytes);           response.OutputStream.Write(outputBytes, 0, outputBytes.Length);     } } And we are done. Some notes: vCard is sent to browser as downloadable file (user can save or open it with Outlook or any other e-mail client that supports vCards), File name is made of first and last name of contact. Encoding is important because Outlook may not understand vCards otherwise (don’t know if this problem is solved in Outlook 2010). Using vCardResult in controller Now let’s tale a look at simple controller method that accepts person ID and returns vCardResult. public class ContactsController : Controller {       // ... other controller methods ...       public vCardResult vCard(int id)     {         var person = _partyRepository.GetPersonById(id);         var card = new vCard                 {                     FirstName=person.FirstName,                     LastName = person.LastName,                     StreetAddress = person.StreetAddress,                     City = person.City,                     CountryName = person.Country.Name,                       Mobile = person.Mobile,                     Phone = person.Phone,                     Email = person.Email,                 };           return new vCardResult(card);     } } Now you can run Visual Studio and check out how your vCard is moving from your web application to your e-mail client. Conclusion We took old code that worked well with ASP.NET Forms and we divided it into action result and controller method that uses vCard as bridge between our controller and action result. All functionality is located where it should be and we did nothing complex. We wrote only couple of lines of very easy code to achieve our goal. Do you understand now why I love ASP.NET MVC? :)

    Read the article

  • Formatting Google Search Result [closed]

    - by user5775
    Possible Duplicate: What are the most important things I need to do to encourage Google Sitelinks? Hello, I am new to search engine optimization. I am working on customizing how my results appear in Google as best as possible. I have learned about the meta tags to customize the text summary. However, I have some hierarchical parts to my website. When a result appears related to the "tip-of-the-iceberg", I would like to show links related to the "child" pages. For instance, if you Google "Walmart" you will see the following links listed with the result: Electronics TV & Video Departments Furniture Toys Girls Living Room Computers Is there any way that I can help Google determine which links to show and the text to display for these child links on my site? Or is this something that Google automatically generates? thanks!

    Read the article

  • Data Structure / Hash Function to link Sets of Ints to Value

    - by Gaminic
    Given n integer id's, I wish to link all possible sets of up to k id's to a constant value. What I'm looking for is a way to translate sets (e.g. {1, 5}, {1, 3, 5} and {1, 2, 3, 4, 5, 6, 7}) to unique values. Guarantees: n < 100 and k < 10 (again: set sizes will range in [1, k]). The order of id's doesn't matter: {1, 5} == {5, 1}. All combinations are possible, but some may be excluded. All sets and values are constant and made only once. No deletes or inserts, no value updates. Once generated, the only operations taking place will be look-ups. Look-ups will be frequent and one-directional (given set, look up value). There is no need to sort (or otherwise organize) the values. Additionally, it would be nice (but not obligatory) if "neighboring" sets (drop one id, add one id, swap one id, etc) are easy to reach, as well as "all sets that include at least this set". Any ideas?

    Read the article

  • Clear/ Reset Result Table of Search page in OAF

    - by PRajkumar
    Normally problem faced by developers after creating Search Page is how to Clear/ Reset Result Table when developer open search page first time or after search when developer redirecting back to same search page from any other page (say delete page or update page)   Add following Code in your Search page Controller where you have constructed your Query Region   import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; ... public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");   // Here QueryRN is your Query Region Name as shown in following snap shot  queryBean.clearSearchPersistenceCache(pageContext); }     Note – After add this code, no need to worry about state of Application Module (AM). This code will clean up result table automatically every time when you will open Search page first time and when you are redirecting back to search page. But still as per good coding standard while redirecting back to search page always keep AM state to FALSE

    Read the article

  • SQL SERVER – Contest Winner – What Next on SQL in Sixty Seconds – Poll Result

    - by Pinal Dave
    A few days ago, I have asked a question on this blog. The question was - What would you like to see in the next episodes of SQL in Sixty Seconds. The poll is still active and posted over here: SQL SERVER – Poll – What would you love to see in SQL in Sixty Seconds? The contest was to suggest the next item of SQL in Sixty Seconds and vote for the your choice of subject. There have been plenty of votes to this contest, however, there were only 4 comments to this blog post. Hence, selecting a winner was very simple. Result of Poll It is very clear from result, most of the people would like to watch Performance Tuning subjects. I will continue to build video on this subject in future. Contest Winner Now is the time for the winner of the contest, who left comments on the blog. The winner is Raelyard. Here is the comment which he has left on the blog. raelyard please reach out to me via email and I will send you the gift card. Current Contest Here is the contest which is currently running on this blog. You can take part in the contest and can win a Drone. SQL in Sixty Seconds Here are few of the episodes of SQL in Sixty Seconds, which you can watch. We will have more episodes of SQL in Sixty Seconds from next week which are focused on performance. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Video

    Read the article

  • [Linq to sql] query result what should i use Count() or Any()...

    - by Pandiya Chendur
    I am checking login of a user by this repository method, public bool getLoginStatus(string emailId, string password) { var query = from r in taxidb.Registrations where (r.EmailId == emailId && r.Password==password) select r; if (query.Count() != 0) { return true; } return false; } I saw in one of the previous questions !query.Any() would be faster... Which should i use? Any suggestion....

    Read the article

  • Do leaderboard sets (in Game Center) allow 500 unique leaderboards?

    - by Korey Hinton
    The Game Kit Programming Guide for iOS claims: The number of different leaderboards allowed increases to 500 leaderboards per game when leaderboard sets have been enabled...Leaderboard sets offer developers the ability to combine several leaderboards into a single group. But their example (see image below) implies that a single leaderboard is placed into multiple leaderboard sets. Is that the only way to be able to use the full 500 leaderboards? by combining the same leaderboard into multiple sets? I want to be able to have 500 unique leaderboards that are not duplicated between sets. Is this possible?

    Read the article

  • add blank for 0 result into existing formula

    - by Tom
    is there any way to use this formula [<30,0,1)) for a group of cells in Sheet1!(A14:I100)] and if result == 0 insert blank or add [=IF(O16=0,"",] somehow so all 0 results just show a blank result. I'm just not sure how to add this to my formula so if Cell a176= 07:48:16 and formula [<30,0,1)) for a group of cells in Sheet1!(A14:I100)] changes it to 468, all is good - however if Cell a176= 00:00:16, the result is "0" - I would like the result to be "" blank "" instead of "0". any ideas??

    Read the article

  • Show "results - of" of internal search in Google search result

    - by Petra Barus
    I was doing some searches on Google Search and I stumbled on this As you can see in the screenshot above, the search results show a summary of an internal search page (the one I highlighted by red underline) on the website (homes.com and findaproperty.com). I would like to show up this kind of result in the Google search for my website internal search. How do I do it? Do I have to put some metatag or something?

    Read the article

  • website particular url suddenly disappeared from google search result

    - by Ragavendran Ramesh
    i have a website , in that a particular page url was indexed in google search result in the first 10 results , but suddenly it disappeared , not that page is not even in the 100results , what would be the reason. i am feeling that the page has be spammed by our competitors . is it possible to avoid that , or can i find that page has been spammed or not. Is it possible to find the particular page in a website is spam or malicious.

    Read the article

  • Strange Google Analytics result when new site launched

    - by Howard
    I have a web site which is mainly contains a few pages, and now we revamp-ed a new site which contains several hundred pages. We have Strange Google Analytics result, as follow: Before: Traffic sources (all traffic): 674 Content (all pages, unique PV): 674 After: Traffic sources (all traffic): 291 Content (all pages, unique PV): 1235 As you can see, the unique PV has increased as expected (as we have more pages now and the site is better), but why the traffic sources is lower and has a large gap? Any idea?

    Read the article

  • Sql statement return with zero result [closed]

    - by foodil
    I am trying to choose the row where 1)list.ispublic = 1 2)userlist.userid='aaa' AND userlist.listid=list.listid I need 1)+2) There is a row already but this statement can not get that row, is there any problem? List table: ListID ListName Creator IsRemindSub IsRemindUnSub IsPublic CreateDate LastModified Reminder 1 test2 aaa 0 0 1 2012-03-09 NULL NULL user_list table (No row): UserID ListID UserRights My test version SELECT l.*, ul.* FROM list l INNER JOIN user_list ul ON ul.ListID = l.ListID WHERE l.IsPublic = 1 AND ul.UserID = 'aaa' There is zero result. How can I fix that?

    Read the article

  • iptables change destination address base on result from mysql

    - by user1812225
    I need to change destination address of tcp/ip packets based on result of execution mysql query... SELECT `score` FROM `reputation` WHERE `ip` = packet.source_ip if (score < a) then packet.destination_ip = ... else packet.destination_ip = ... What ways of solving this problem do you see? Thanks. P.S. this is important that destination host knows REAL ip address where packet came from, not IP address of firewall.

    Read the article

  • looking for a set union find algorithm

    - by Mig
    I have thousands of lines of 1 to 100 numbers, every line define a group of numbers and a relationship among them. I need to get the sets of related numbers. Little Example: If I have this 7 lines of data T1 T2 T3 T4 T5 T6 T1 T5 T4 T3 T4 I need a not so slow algorith to know that the sets here are: T1 T2 T6 (because T1 is related with T2 in the first line and T1 related with T6 in the line 5) T3 T4 T5 (because T5 is with T4 in line 6 and T3 is with T4 in line 7) but when you have very big sets is painfully slow to do a search of a T(x) in every big set, and do unions of sets... etc. Do you have a hint to do this in a not so brute force manner? I'm trying to do this in python. Thanks

    Read the article

  • Best practices for multiple asserts on same result in C#

    - by asdseee
    What do you think is cleanest way of doing multiple asserts on a result? In the past I've put them all the same test but this is starting to feel a little dirty, I've just been playing with another idea using setup. [TestFixture] public class GridControllerTests { protected readonly string RequestedViewId = "A1"; protected GridViewModel Result { get; set;} [TestFixtureSetUp] public void Get_UsingStaticSettings_Assign() { var dataRepository = new XmlRepository("test.xml"); var settingsRepository = new StaticViewSettingsRepository(); var controller = new GridController(dataRepository, settingsRepository); this.Result = controller.Get(RequestedViewId); } [Test] public void Get_UsingStaticSettings_NotNull() { Assert.That(this.Result,Is.Not.Null); } [Test] public void Get_UsingStaticSettings_HasData() { Assert.That(this.Result.Data,Is.Not.Null); Assert.That(this.Result.Data.Count,Is.GreaterThan(0)); } [Test] public void Get_UsingStaticSettings_IdMatches() { Assert.That(this.Result.State.ViewId,Is.EqualTo(RequestedViewId)); } [Test] public void Get_UsingStaticSettings_FirstTimePageIsOne() { Assert.That(this.Result.State.CurrentPage, Is.EqualTo(1)); } }

    Read the article

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