三个data set:
data set one columns: date, site, source, groupid, x1, x2
所有column都不是unique的
unique per /date/site/source/groupid
data set two columns: date, site, source, groupid, y1, y2
multiple per /date/site/source/groupid
data set three columns: date, site, source, groupid, z1, z2
multiple per /date/site/source/groupid
Combine all three for a particular date, then summarize it at the following
levels:
date
Site, date
Site, source, date
Site, source, groupid, date
create one column summary_by an... 阅读全帖
抛砖引玉:
SELECT
GroupID
, UserCount
FROM (
SELECT GroupID
FROM GroupMembers
WHERE UserID=3
) GRP INNER JOIN (
SELECT
GroupID
, COUNT(*) AS UserCount
FROM GroupMembers
GROUP BY
GroupID
) CNT
ON
GRP.GroupID = CNT.GroupID
DECLARE @UserID AS INT
DECLARE @UserName AS VARCHAR(50)
SET @UserID = 3
SELECT @UserName = UserName
FROM dbo.[User]
WHERE UserID = @UserID
SELECT gm.GroupID
, @UserID AS UserID
, MAX(g.GroupName) AS GroupName
, COUNT(1) AS cnt
, @UserName AS CreatorName
FROM dbo.GroupMember gm
INNER JOIN dbo.[Group] g
ON gm.GroupID = g.GroupID
WHERE gm.GroupID IN ( SELECT GroupID
FROM dbo.GroupMember
WHERE Use... 阅读全帖
Wall Street Networking
Business - Investing
Description:
Inception: Feb 7th, 2007
Find over 100 links in this group to help you with jobs/internships,
Economics, Bloomberg tutorials, excel spreadsheets, fund manager interviews,
interview questions, learning about the industry (investment banking or
trading? You decide), developing contacts & learning how to make money in
the markets.
_______________
Wall Street Networking Fan Page http://tinyurl.com/d3kszq
Blackberry Addicts group
http:/... 阅读全帖
if using hash table to compare existing ids, the speed should be ok
in python:
ids, group = {}, []
for seq in seqlist:
....n = len(group)
....g = [ids.get(id, n) for id in seq]
....groupid = min(g)
....if groupid == n: group.append([])
....for i in xrange(len(seq)):
........if g[i] == n:
............group[groupid].append(seq[i])
............ids[seq[i]] = groupid
Try this one, in sqlserver 2008:
;with cte as (
select 1 as GroupID,DAY,opentime,closetime
from OfficeHours
where DAY=1
union all
select cte.GroupID,o.Day,o.OpenTime,o.CloseTime
from cte,
OfficeHours as o
where o.Day=cte.Day+1
and cte.CloseTime=o.CloseTime
and cte.OpenTime=o.OpenTime
union all
select cte.GroupID+1,o.Day,o.OpenTime,o.CloseTime
from cte,
OfficeHours as o
where o.Day=cte.Day+1
SELECT g.GroupId, g.UserID, (SELECT COUNT(c.UserID) FROM GroupMembers AS c
WHERE c.GroupId = g.GroupId) AS GroupUserCount
FROM GroupMembers AS g
WHERE g.UserId = 3
performance should be worse, hehe
SELECT groupid, COUNT ( * ) CNT
FROM groupmembers
GROUP BY groupid
HAVING SUM (CASE WHEN userid = 3 THEN 1 ELSE 0 END) > 0
As I mentioned before: "As I mentioned before: "这些demo有些时候不是很严谨的
。你只可当做参考".
However, if you use this, it should work with Jetty version 7.2.0.v20101020.
用eclipse看dependency hierarchy,发现它depend on
spring-aop
spring-beans
spring-core
spring-expression
spring-asm
这些都不在我的pom.xml里面。那么这些dependency information
是在哪里存贮的?是在maven central repository网站存储维护的吗?
A usual way of doing this is, make the directory a group directory
and mode 775 and put your friends into the same group. If
your friends are already in different groups and you wish not
to change their existing groups, you can add additional groupid
under userid and use the command "newgrp groupid" to switch
the effective group id.
叮当网络助学爱心直通车的自我介绍
(Volunteers in US is also needed, thanks for your attention)
“叮当网络助学爱心直通车”是由爱心朋友们自发组织,为纯民间自发以网络为平台的
非赢利性公益慈善组织。成立于2007年11月1日。作为一个爱心助学网络平台,她向愿
意奉献爱心的朋友提供贫困学生的资料,并且长期跟进这些孩子的受助情况。“叮当网
络助学爱心直通车”的宗旨是通过网络与现实的交流,支持中国的教育,为中华民族的
伟大复兴贡献出她的一份力量
诚信、快乐、永远、共建和谐社会是我们的理念;
公平、公开、公正、透明的财务是我们的原则;
有深度、有广度、有信度的助学是我们的追求。
如果您曾经想资助一个孩子,或者一直以来在您的心中有这个打算,您同时也想看到自
己资助过的孩子的一切,而并不仅仅是把钱捐到不知未来的捐款箱里,请联系我。我会
提供需要资助的孩子的详细介绍、照片、联系方式等等,让您清楚的知道您所帮助的孩
子在哪里,家庭基本情况,学习怎么样等等,并且接受一切监督,保证每一分钱,每一
本书,每一件衣服,每一双鞋子都到捐助者的手中。
网... 阅读全帖