I have a list of (label, count) tuples like this:
[('grape', 100), ('grape', 3), ('apple', 15), ('apple', 10), ('apple', 4), ('banana', 3)]
From that I want to sum all values with the same label (same labels always adjacent) and return a list in the same label order:
[('grape', 103), ('apple', 29), ('banana', 3)]
I know I could sol...
Is there any way to group/folder my pages in Wordpress. Pages as in pages, not posts. In case I'm using it as a CMS and have, say, 200 pages. 10 main pages and the rest are all sub-pages. It'd be really inconvenient to see all the pages as a one huge lists.
I know I could use posts and categories, as I won't be needing the blog function...
SELECT region, person, sum(dollars) as thousands
FROM sales
GROUP BY region, person
ORDER BY region, sum(dollars) desc
The SQL above produces a complete list of sales people per region like this
region person thousands
canada mike smith $114
canada joe blog $76
canada pete dodd $45
usa ...
I am trying to create a report that has a summary for each group. For example:
ID NAME COUNT TOTAL TYPE
-------------------------------------------------------------
1 Test 1 10 A
2 Test 2 8 A
...
Given a table of order items (OrderItems) that relates to a table of orders (Orders), which in turn relates to a table of users (Users), is it possible to retrieve all the OrderItems and group them into a dictionary by OrderId with just one query? ie. without performing an iteration over either the OrderItems result set or performing a q...
How do we input digit grouping in C#? My code works but only for one instance. I have to constantly click it to group every number in the calculator. How do we do group it so that if we click it, it groups every number (not only the number presented), and if we uncheck the checkbox, it doesn't?
This is the current code:
NumberFormatInf...
Using Crystal Report 8.5
Generating a report from table1
My Crystal Report Output
ID Name Date Totaltime
001 Raja 23/02/2009 08:00:00
001 Raja 24/02/2009 10:00:00
001 Raja 25/02/2009 09:00:00
001 Raja 26/02/2009 11:00:00
001 Raja 27/02/2009 07:00:00
002 Ravi 23/02/2009 11:00:00
002 Ravi 24/02/2009 10:00:00
002 Ravi 25/02/2009...
I'm trying to develop an alternative rating system for athletic results. We're all aware
of the traditional first past the post rating system for races. Think of the 100m final in
the Olympics. First gets gold, second silver, etc. This system only benefits the top three.
In my system, there is a series/league of races, where all eight ...
I have a logging table that contains data that looks like this:
ID MSG DATE
---------------------------------------------
1 TEst 2010-01-01 09:00:00
2 Job Start 2010-01-01 09:03:00
3 Do something 2010-01-01 09:03:10
4 Do something else 2010-01-01 09:03:12
5 Do so...
I'm having troubles to figure out a way to group items xslt 1.0.
I have a source xml similar to the one below:
<client name="client A">
<project name = "project A1"/>
<project name = "project A2"/>
<project name = "project A3"/>
<project name = "project A4"/>
</client>
<client name="client B">
<project name = "projec...
Hello,
I've got the following problem:
I have two tables: (simplified)
+--------+ +-----------+
| User | | Role |
+--------+ +-----------+
| ID<PK> | | ID <PK> |
+--------+ | Name |
+-----------+
and M:N relationship between them
+-------------+
| User_Role |
+-------------+
| User<...
Hi!
Im using the WPF-Toolkit DataGrid with an CollectionViewSource as Source. With PropertyGroupDescriptions I can create and display groups in the Grid. My problem is that i cannot create "uneven" groups, like:
A
A.A
A.B
B
B.A
B.B
B.B.A
B.B.B
C
D
I want some groups that are deeper than other, and some, that are only elements ...
I have multiple users with multiple entries recording times they arrive at destinations
Somehow, with my select query I would like to only show the most recent entries for each unique user name.
Here is the code that doesn't work:
SELECT * FROM $dbTable GROUP BY xNAME ORDER BY xDATETIME DESC
This does the name grouping fine, but as...
I am looking for a MDI manager solution that allows documents to be grouped and show/hidden programmaticly. Example, 3 document types, red, yellow and green. When you click a button the MDI manager shows only the red documents by hiding the other 2 types tabs. None of the MDI managers (Actipro, Infragistics, etx) I have looked at can ...
Using the XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<records>
<record>
...
Hi, basically what I am trying to achieve is to group data within a List view with an expanded set to false - so that basically all you see is the grouped name and count of items - nothing special and easy to work out.
Now for the difficult part (I have spent all day trying different options to get this to work!) when the expander is e...
When grouping in BIRT, we frequently want the grouping value to show up on the first line as follows:
Group User Reputation
------ --------------- ----------
Admins Bill The Weasel 51,018
Mark Grovel 118,101
Users Pax_my_bags_got_to_go 73,554
...
Hi Team,
I am trying to achieve the following without using sub query.
For a funding, I would like to select the latest Letter created date and the ‘earliest worklist created since letter created’ date for a funding.
FundingId Leter (1, 1/1/2009 )(1, 5/5/2009) (1, 8/8/2009) (2, 3/3/2009)
FundingId WorkList (1, 5/5/2009 ) (1, 9/9/20...
What is the difference between the createGroup and createGroupIgnoreTooBig?
I understand that createGroup will throw the too big exception when the object exceeds 64k, and createGroupIgnoreTooBig will not. But does it mean that createGroupIgnoreTooBig allows me to create objects larger than 64k, or will it only partially group it?
...
Hi all,
I have a table in an Oracle Database that has, among others, a DATE column that is loaded with the insertion timestamp of each row. I need to use existing data in such table to analyze the correlation between some events, so that with data like this:
COL_1 COL_2 TS
A 1 Mon 15, February 20...