grouping

Could not find Assembly System.ComponentModel

Hi All, I'm using Silverlight 4. I need to do grouping in my DataGrid. So i need to add add reference to System.ComponentModel. I could not find System.ComponentModel in "Add Reference". I added reference to System.ComponentModel.DataAnnotations and the added the following XMLNS in my XAML Page xmlns:cm="clr-namespace:System.Windows.Da...

F# - performing non-deterministic groupings on lists

I’m working on a problem which I know I can solve with C#. I would like to prove to my boss that F# would be able solve in a more succinct way. However my understanding of functional programming is still fairly immature. The Problem: I’m working with a list of ‘Trade’ classes. The definition of the class is as follows: type Trade(brok...

How to create a grouping listview based on fuzzy grouping

I have looked at Matt Berseth's Grouping Grid sample and have tried to adapt this to my needs, however my problem is a bit more sticky. I have two tables, call them LineItems and Headers. I need to Select all items from LineItems that meet a specific criteria, and group the items under various headers that are somewhat fuzzy. By fuz...

Can you create a grouping based on ranges?

This is related to Another Question, which I think really gets at a much simpler problem so I'm asking the simpler question here in the hopes it will help me solve the more complex one. I would like to be able to create a grouping in a linq to sql query that groups based on a range of data within another set of data. However, i think i...

Access 2007 Report Grouping

I'm using an access 2007 database to track and report down time and reliability of devices. I've got four different devices in the Devices table. I also track all downtime occurrences in it's own table. We also need to know when the devices are actually in use, so we can tell if the downtime affected our operation at all. We keep track o...

MySQL - group rows in 4's

I have a product table like this: Product name , Affiliate ID , ProductCode a, 1, 1 b, 1, 2 c, 1, 3 d, 1, 5 e, 1, 7 f, 2, 4 g, 2, 6 I want to return first four products from each Affiliate ID. The 'ProductCode' column signifies the order in which the products were added, so can I use this column to sort my results. But I don't know ho...

C# Algorithm to determine grouping of people based on a value

I'm attempting to write an algorithm that creates groups of people based on their 'score'. A person has two paramaters, a name and a score. (The range of the score is between -10 and 10 but that's really not relevant) I'm looking to create groups with equal numbers of people (if possible based on the number of people presented) where th...

Autogroup UITableView alphabetically

Hi there, is there a way to autogroup/autosection my UITableView alphabetically? I have a huge array which is being displayed nicely, but it would be even better if I had the sections like in addressbook.app. Best –f ...

Update rows in table A NOT present in table B

I need to list (and later update) all the items present in the table art who are never referenced in the table orders_items table art - artID - artName Table orders_items - itemID - parentID If i would be looking only by artID=itemID the query is pretty straightforward select artID, itemID, artName, parentID FROM art LEFT JOIN orders...

How do I group repeated values to find the start and end of series?

I have a table with the following data. serial date flag 1 1 aug 1 2 2 aug 1 3 3 aug 0 4 4 aug 0 5 5 aug 1 6 6 aug 1 7 7 aug 1 What I need is this result set: from to flag 1-aug 2-aug 1 3-Aug 4-Aug 0 5-Aug 7-Aug 1 When I group...

Number of all possible groupings of a set of values?

I want to find a combinatorial formula that given a certain number of integers, I can find the number of all possible groupings of these integers (such that all values belong to a single group) Say I have 3 integers, 1, 2, 3 There would be 5 groupings: 1 2 3 1|2|3| 1 2|3 1|2 3 2|1 3 I have calculated these computationally for N = 3 t...

Grouping Controls ASP.NET

Hi All, I have a question. Let's say I had a number of controls which when I click "Add" the same group of controls would display again. For example my grouped controls would look like this: First Name: TEXTBOX Last Name: TEXTBOX ADD When ADD is clicked an additional 2 textboxes appear. So on my page I'd have the following: First ...

Regex Group in Perl: how to capture elements into array from regex group that matches unknown number of/multiple/variable occurrences from a string?

In Perl, how can I use one regex grouping to capture more than one occurrence that matches it, into several array elements? For example, for a string: var1=100 var2=90 var5=hello var3="a, b, c" var7=test var3=hello to process this with code: $string = "var1=100 var2=90 var5=hello var3=\"a, b, c\" var7=test var3=hello"; my @ar...

Tsql - get entire row information with max and group by

I have a table, with the following columns: PK1 PK2 ID DATE Value flag I do a calculation that involves taking the max value per ID. select id, max(value) from table group by id I want to mark the flag on the rows that I am using. If id and the max(value) correspond to multiple rows flag the one with the...

How to GroupBy 2 values in a Generic list, VB.NET ?

I'm using VB.NET on Framework 2.0. I'm looking to quickly group a Generic List<> by two properties. For the sake of this example lets say I have a List of an Order type with properties of CustomerId, ProductId, and ProductCount. How would I get the average of ProductCounts grouped by CustomerId and ProductId in VB.NET ? Unfortunatly I c...

How do I get a group minimum over level combinations of factors?

I would like to find minimum values within groups. In stata, I think it is simply "by group, sort : egen minvalue=min(value)"... I tried to mess around with ave and rowsum, but to no avail. ave(value, group, FUN=min) did not work. ...

Grouping data in an RDLC

I'm sorry if this seems silly, but I'm new to using Report Definition Language (RDLC) files and I'm looking for advice on the best "plan of attack" for a report I must create. THE REPORT The report (itself) must display a table of data above a related set of calculations for each a grouping (of data). I'm hoping to keep one group per p...

Python regex, how-to group an item within a regex

Hi all, I'm having trouble creating a regex. Here is a sample of the text on which the regex should work: <b>Additional Equipment Items</b> <br> 40001 <br> 1 Battery Marathon L (8 cells type L6V110) <br> 40002 <br> What I now want to select is >>1<< and >>Battery Marathon L (8 cells type L6V110)<<. Therefore I have produced the...

Problem when grouping with spgridview

hi, I have a problem when trying to group item in my spgridview : http://cid-412cbc9baadd47dc.office.live.com/self.aspx/.Public/error%20when%20trying%20group.jpg The gridview take the groupfield to create group but only one item go into each group so i have : Group A : item 1 Group B : item 2 Group A : item 3 and i want this (wich ...

Distinct nodes on multiple keys with XSLT

Hello, i would like to get distinct nodes from my xml on multiple levels. Can anyone please give me some hints how to do this? The methods i googled (Muenchian method, for-each-group) were explained with single grouping keys and plain hearchie. Here's an example of my xml: <persons> <person> <name>Tom</name> <age>20</age> <mail...