Revision 1004:6a76bed8aa32

View differences:

extra/soundsoftware/extract-javadoc.sh
35 35
# package declarations
36 36

  
37 37
find "$projectdir" -type f -name \*.java \
38
    -exec grep '^ *package [a-zA-Z][a-zA-Z0-9\._-]*; *$' \{\} /dev/null \; |
39
    sed -e 's/\/[^\/]*: *package */:/' -e 's/; *$//' |
38
    -exec egrep '^ *package +[a-zA-Z][a-zA-Z0-9\._-]*;.*$' \{\} /dev/null \; |
39
    sed -e 's/\/[^\/]*: *package */:/' -e 's/;.*$//' |
40 40
    sort | uniq | (
41 41
	current_prefix=
42 42
	current_packages=
extra/soundsoftware/get-statistics.rb
5 5
# ./script/runner -e production extra/soundsoftware/get-statistics.rb 
6 6
#
7 7

  
8
d1 = Date.parse("20101201") # => 1 Dec 2010
8
d1 = Date.parse("20100701") # => 1 Jul 2010
9 9
d2 = Date.today
10 10

  
11
def delta_array (iarray)
12
  # returns an array with the deltas
13
  ## prepends a zero and drops the last element
14
  deltas = [0] + iarray
15
  deltas = deltas.first(deltas.size - 1)
16

  
17
  return iarray.zip(deltas).map { |x, y| x - y }
18

  
19
end
20

  
11 21
def months_between(d1, d2)
12 22
   months = []
13 23
   start_date = Date.civil(d1.year, d1.month, 1)
......
32 42

  
33 43
   while (start_date < end_date)
34 44
     weeks << start_date
35
     start_date = start_date + 1.week
45
     start_date = start_date + 2.week
36 46
   end
37 47

  
38 48
   weeks << end_date
39 49
end
40 50

  
41
# dates = months_between(d1, d2)
42
dates = weeks_between(d1, d2)
51
def get_user_project_evol_stats()
52
  # dates = months_between(d1, d2)
53
  dates = months_between(d1, d2)
54
  
55
  # number of users 
56
  n_users = []
57
  n_projects = []
58
  qm_users = []
59
  
60
  dates.each do |date|
61
    users =  User.find_by_sql ["SELECT * FROM users WHERE users.status = '1' AND users.created_on <= ?;", date]
62
    projects =  Project.find_by_sql ["SELECT * FROM projects WHERE projects.created_on <= ?;", date]
63
    
64
    qm_users_list = User.find_by_sql ["SELECT * FROM users,ssamr_user_details WHERE users.status = '1' AND ssamr_user_details.user_id = users.id AND (users.mail like '%qmul%' OR ssamr_user_details.institution_id = '99') AND users.created_on <= ?;", date ]
65
    
66
    qm_users << qm_users_list.count
67
    n_users << users.count
68
    n_projects << projects.count
69
    
70
    #  private_projects =  Project.find(:all, :conditions => {:created_on  => d1..date, is_public => false})
71
  end
72
  
73
  user_deltas = delta_array(n_users)
74
  proj_deltas = delta_array(n_projects)
75
  qm_user_deltas = delta_array(qm_users)
76
  
77
  puts "Date Users D_Users QM_Users D_QM_users Projects D_Projects"
78
  
79
  dates.zip(n_users, user_deltas, qm_users, qm_user_deltas, n_projects, proj_deltas).each do |a, b, c, d, e, f, g|
80
    puts "#{a} #{b} #{c} #{d} #{e} #{f} #{g}"
81
  end
82
  
83
end
43 84

  
44
dates.each do |date|
45
  users =  User.find(:all, :conditions => {:created_on  => d1..date})
46
  all_projects =  Project.find(:all, :conditions => {:created_on  => d1..date})
47
  private_projects =  Project.find(:all, :conditions => {:created_on  => d1..date, 
48
                                                          :is_public => false})
49
  top_level_and_private_projects =  Project.find(:all, :conditions => {:created_on  => d1..date,
50
                                                                        :is_public => false, 
51
                                                                        :parent_id => nil})
52 85

  
53
  puts "#{date} #{users.count} #{all_projects.count} #{private_projects.count} #{top_level_and_private_projects.count}\n"
86
def get_project_status()
87
  date = "20121101"
88
  
89
   all_projects = Project.find(:all, :conditions => ["created_on < ?", date])
90
  #  all_projects = Project.find(:all, :conditions => ["is_public = ? AND created_on < ?", true, date])
91
#  all_projects = Project.find(:all, :conditions => ["is_public = ? AND created_on < ?", false, date])
92
  
93
  collab = []
94
  users_per_proj = []
95
  
96
  #  puts "Public Users Institutions"
97

  
98
  all_projects.each do |proj| 
99
    insts = []
100

  
101
    proj.users.each do |u|  
102
      if u.institution == "" || u.institution == "No Institution Set"
103
        if u.mail.include?("qmul.ac.uk") || u.mail.include?("andrewrobertson77")
104
          insts << "Queen Mary, University of London"          
105
        else
106
          insts << u.mail
107
        end
108
      else
109
        insts << u.institution
110
      end
111
    end
112

  
113
    users_per_proj << proj.users.count
114
    collab << insts.uniq.count
115
  end
116
  
117
  
118
  #  freq = collab.inject(Hash.new(0)) { |h,v| h[v] += 1; h }
119
  #  freq = freq.sort_by {|key, value| value}
120
  #  puts freq.inspect.sort
121

  
122
  puts "Projects: #{all_projects.count} UpP: #{users_per_proj.sum / users_per_proj.size.to_f} Users1+: #{users_per_proj.count{|x| x> 1}} Users2+: #{users_per_proj.count{|x| x> 2}} Collab1+: #{collab.count{|x| x > 1}} Collab2+: #{collab.count{|x| x > 2}} IpP: #{collab.sum / collab.size.to_f}"
123
end
124

  
125
def get_user_projects_ratios()
126
  user_projects = User.find(:all, :conditions=> {:status => 1})
127
  pub_proj_user = user_projects.map{|u| u.projects.find(:all, :conditions=>{:is_public => true}).count}
128

  
129
  user_projects.zip(pub_proj_user).each do |u, pub|
130
      puts "#{u.projects.count} #{pub}"
131
  end
54 132

  
55 133
end
56 134

  
135
def get_inst_list()
136
  users = User.find(:all, :conditions => {:status => 1})
137
  inst_list = users.map{|user| user.institution}
138
  
139
  freq = inst_list.inject(Hash.new(0)) { |h,v| h[v] += 1; h }
140
  
141
end
57 142

  
58 143

  
144
# get_user_projects_ratios()
145
# get_user_project_evol_stats()
59 146

  
147
get_project_status()
public/stylesheets/application.css
5 5
h1 {margin:0; padding:0; font-size: 24px;}
6 6
h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
7 7
h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
8
h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
8
h4, .wiki h3 {font-size: 14px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
9 9

  
10 10
/***** Layout *****/
11 11
#wrapper {background: white;}
......
24 24

  
25 25
#account {float:right;}
26 26

  
27
#header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
27
#header {height:68px;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
28 28
#header a {color:#f8f8f8;}
29 29
#header h1 a.ancestor { font-size: 80%; }
30 30

  
31 31
#project-search-jump {float:right; }
32 32

  
33 33

  
34
#main-menu {position: absolute;  bottom: 0px;  left:6px; margin-right: -500px;}
34
#main-menu {position: absolute;  bottom: 0px;  left:8px; margin-right: -500px;}
35 35
#main-menu ul {margin: 0;  padding: 0;}
36 36
#main-menu li {
37 37
  float:left;
public/themes/soundsoftware/stylesheets/application.css
34 34

  
35 35
h2,h3,h4,.wiki h1 {
36 36
  color: #3e442c;
37
  font-weight: bold;
37
/*  font-weight: bold; */
38 38
}
39 39

  
40 40
.wiki h2,.wiki h3,.wiki h4 {
......
119 119
#quick-search { margin-right: 6px; margin-top: 1em; color: #000; }
120 120
#project-jump-box { float: right;  margin-right: 6px; margin-top: 5px; color: #000; }
121 121
#project-ancestors-title {
122
    margin-bottom: 0px;
122
    margin-bottom: -6px;
123 123
    margin-left: 12px;
124 124
    margin-top: 6px;
125 125
}
126 126

  
127
#main-menu { position: absolute; top: 100px; /* background-color: #be5700; */ left: 0; border-top: 0; width: 100%;/* height: 1.82em; */ padding: 0; margin: 0; border: 0; }
127
#main-menu { position: absolute; top: 100px; /* background-color: #be5700; */ left: 2px; border-top: 0; width: 100%;/* height: 1.82em; */ padding: 0; margin: 0; border: 0; }
128 128
#main-menu li { margin: 0; padding: 0; }
129
#main-menu li a { background-color: #fdfbf5; color: #be5700; border-right: 1px solid #a9b680; font-size: 97%; padding: 0em 8px 0.2em 10px; font-weight: normal; }
129
#main-menu li a { background-color: #fdfbf5; color: #be5700; border-right: 1px solid #a9b680; font-size: 97%; padding: 0em 8px 0em 10px; font-weight: normal; }
130 130
#main-menu li:last-child a { border-right: 0; }
131 131
#main-menu li a:hover { background-color: #fdfbf5; color: #be5700; text-decoration: underline; }
132 132
#main-menu li a.selected, #main-menu li a.selected:hover { background-color: #fdfbf5; color: #3e442c; }
......
145 145
h2, h3, h4, .wiki h1, .wiki h2, .wiki h3 { border-bottom: 0px; }
146 146
/*h2, .wiki h1 { letter-spacing:-1px; }
147 147
*/
148
h4 { border-bottom: dotted 1px #c0c0c0; }
148
/* h4 { border-bottom: dotted 1px #c0c0c0; } */
149

  
150
.wiki p { margin-left: 3em; margin-right: 3em; }
149 151

  
150 152
div.issue { background: #fdfaf0; border: 1px solid #a9b680; border-left: 4px solid #a9b680; }
151 153

  
public/themes/soundsoftware/stylesheets/fonts-generic.css
1 1
@import url(fonts.css);
2 2

  
3
h1, #project-ancestors-title {
4
  font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif;
5
  font-weight: normal;
3
h1, #project-ancestors-title, #top-menu a {
4
  font-family: Insider, 'Gill Sans', Tahoma, sans-serif;
5
  font-weight: bold;
6 6
}    
7 7

  
8
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 { 
9
  font-family: DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; 
8
#top-menu div, #top-menu li {
9
  font-size: 12px;
10
}
11

  
12
body,p,li,table { 
13
  font-family: Insider, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; 
14
  font-size: 14px;
15
  line-height: 1.34;
16
  font-weight: normal;
17
}
18

  
19
h2,h3,h4,.wiki h1,.embedded h1 { 
20
  font-family: Insider, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; 
21
  font-weight: bold;
10 22
  line-height: 1.34;
11 23
}
12 24

  
public/themes/soundsoftware/stylesheets/fonts-mac.css
1 1
@import url(fonts.css);
2 2

  
3
h1, #project-ancestors-title {
4
  font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif;
5
  font-weight: normal;
3
h1, #project-ancestors-title, #top-menu a {
4
  font-family: Insider, "Lucida Grande", sans-serif;
5
  font-weight: bold;
6 6
}    
7 7

  
8
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 { 
9
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; 
8
#top-menu div, #top-menu li {
9
  font-size: 12px;
10
}
11

  
12
body,p,li,table { 
13
  font-family: Insider, "Lucida Grande", sans-serif;
14
  font-size: 14px;
15
  line-height: 1.34;
16
  font-weight: normal;
17
}
18

  
19
h2,h3,h4,.wiki h1,.embedded h1 { 
20
  font-family: Insider, "Lucida Grande", sans-serif;
21
  font-weight: bold;
10 22
  line-height: 1.34;
11 23
}
24

  
public/themes/soundsoftware/stylesheets/fonts-ms.css
1 1
@import url(fonts.css);
2 2

  
3
h1, #project-ancestors-title {
4
  font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif;
3
/* IE likes us to separate out normal & bold into different fonts
4
   rather than use the selectors on the same font */
5

  
6
h1, #project-ancestors-title, #top-menu a {
7
  font-family: Insider-Medium, Tahoma, sans-serif;
5 8
  font-weight: normal;
6 9
}    
7 10

  
8
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 { 
9
  font-family: Calibri, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; 
11
#top-menu div, #top-menu li {
12
  font-size: 12px;
13
}
14

  
15
body,p,li,table { 
16
  font-family: Insider-Regular, tahoma, verdana, sans-serif; 
17
  font-size: 14px;
18
  line-height: 1.34;
19
  font-weight: normal;
20
}
21

  
22
h2,h3,h4,.wiki h1,.embedded h1 { 
23
  font-family: Insider-Medium, tahoma, verdana, sans-serif; 
24
  font-weight: normal;
10 25
  line-height: 1.34;
11 26
}
public/themes/soundsoftware/stylesheets/fonts.css
1

  
2
/* Font pack generated by FontSquirrel */
3 1

  
4 2
@font-face {
5
	font-family: 'GilliusADFNo2';
6
	src: url('fonts/gilliusadfno2-bolditalic-webfont.eot');
7
	src: local('☺'), url('fonts/gilliusadfno2-bolditalic-webfont.woff') format('woff'), url('fonts/gilliusadfno2-bolditalic-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-BoldItalic.otf') format('opentype'), url('fonts/gilliusadfno2-bolditalic-webfont.svg#webfontLmhvPwzc') format('svg');
8
	font-weight: bold;
9
	font-style: italic;
3
    font-family: 'Insider';
4
    font-weight: bold;
5
    font-style: normal;
6
    src: url('fonts/24BC0E_0_0.eot');
7
    src: url('fonts/24BC0E_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC0E_0_0.woff') format('woff'), url('fonts/24BC0E_0_0.ttf') format('truetype');
8
}
9
 
10
@font-face {
11
    font-family: 'Insider';
12
    font-weight: normal;
13
    font-style: normal;
14
    src: url('fonts/24BC35_0_0.eot');
15
    src: url('fonts/24BC35_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC35_0_0.woff') format('woff'), url('fonts/24BC35_0_0.ttf') format('truetype');
10 16
}
11 17

  
12 18
@font-face {
13
	font-family: 'GilliusADFNo2';
14
	src: url('fonts/gilliusadfno2-italic-webfont.eot');
15
	src: local('☺'), url('fonts/gilliusadfno2-italic-webfont.woff') format('woff'), url('fonts/gilliusadfno2-italic-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Italic.otf') format('opentype'), url('fonts/gilliusadfno2-italic-webfont.svg#webfonteHBtzgS0') format('svg');
16
	font-weight: normal;
17
	font-style: italic;
19
    font-family: 'Insider-Medium';
20
    font-weight: normal;
21
    font-style: normal;
22
    src: url('fonts/24BC0E_0_0.eot');
23
    src: url('fonts/24BC0E_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC0E_0_0.woff') format('woff'), url('fonts/24BC0E_0_0.ttf') format('truetype');
18 24
}
19

  
25
 
20 26
@font-face {
21
	font-family: 'GilliusADFNo2';
22
	src: url('fonts/gilliusadfno2-bold-webfont.eot');
23
	src: local('☺'), url('fonts/gilliusadfno2-bold-webfont.woff') format('woff'), url('fonts/gilliusadfno2-bold-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Bold.otf') format('opentype'), url('fonts/gilliusadfno2-bold-webfont.svg#webfontntXmQMqk') format('svg');
24
	font-weight: bold;
25
	font-style: normal;
27
    font-family: 'Insider-Regular';
28
    font-weight: normal;
29
    font-style: normal;
30
    src: url('fonts/24BC35_0_0.eot');
31
    src: url('fonts/24BC35_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC35_0_0.woff') format('woff'), url('fonts/24BC35_0_0.ttf') format('truetype');
26 32
}
27

  
28
@font-face {
29
	font-family: 'GilliusADFNo2';
30
	src: url('fonts/gilliusadfno2-regular-webfont.eot');
31
	src: local('☺'), url('fonts/gilliusadfno2-regular-webfont.woff') format('woff'), url('fonts/gilliusadfno2-regular-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Regular.otf') format('opentype'), url('fonts/gilliusadfno2-regular-webfont.svg#webfontvJUiAdi3') format('svg');
32
	font-weight: normal;
33
	font-style: normal;
34
}
35

  
36
@font-face {
37
	font-family: 'DroidSans';
38
	src: url('fonts/DroidSans-webfont.eot');
39
	src: local('☺'), url('fonts/DroidSans-webfont.woff') format('woff'), url('fonts/DroidSans-webfont.ttf') format('truetype'), url('fonts/DroidSans-webfont.svg#webfontKYIQSBQk') format('svg');
40
	font-weight: normal;
41
	font-style: normal;
42
}
43

  
44
@font-face {
45
	font-family: 'DroidSans';
46
	src: url('fonts/DroidSans-Bold-webfont.eot');
47
	src: local('☺'), url('fonts/DroidSans-Bold-webfont.woff') format('woff'), url('fonts/DroidSans-Bold-webfont.ttf') format('truetype'), url('fonts/DroidSans-Bold-webfont.svg#webfontljpTCDjw') format('svg');
48
	font-weight: bold;
49
	font-style: normal;
50
}
51

  

Also available in: Unified diff