- improve project list page

This commit is contained in:
David Anderson 2012-12-26 21:26:34 -08:00 committed by Oliver Bock
parent 13f1257355
commit 77233c7bcc
6 changed files with 131 additions and 29 deletions

View File

@ -7908,7 +7908,7 @@ Charlie 26 Dec 2012
NoticeListCtrl.cpp
sg_DlgMessages.cpp,.h
David 27 Dec 2012
David 26 Dec 2012
- eliminate use of alloca() and strdupa().
- don't include malloc.h
- fix compile warnings
@ -7920,4 +7920,3 @@ David 27 Dec 2012
str_util.cpp
sched/
hr_info.cpp

View File

@ -1366,6 +1366,8 @@ void do_client_simulation() {
exit(1);
}
// if tasks have pending transfers, mark as completed
//
for (unsigned int i=0; i<gstate.results.size(); i++) {
RESULT* rp = gstate.results[i];
if (rp->state() < RESULT_FILES_DOWNLOADED) {

View File

@ -42,7 +42,7 @@ function html_tag() {
}
}
function page_head($title) {
function page_head($title, $extra="") {
global $book;
global $chap_num;
if ($book) {
@ -59,6 +59,7 @@ function page_head($title) {
<link rel=\"stylesheet\" type=\"text/css\" href=\"white.css\">
<link rel=\"shortcut icon\" href=\"logo/favicon.gif\">
<title>$title</title>
$extra
</head>
<body bgcolor='ffffff'>
<table width='100%'>

View File

@ -19,6 +19,7 @@ $sensing = array(
tra("Stanford University"),
tra("Seismology"),
tra("The Quake-Catcher Network is developing the world's largest seismic network using sensors attached to Internet-connected computers. You must buy a sensor to participate."),
""
),
array(
"Radioactive@Home",
@ -35,6 +36,14 @@ $sensing = array(
$cogsci = array(
tra("Cognitive science and artifical intelligence"),
array(
// array(
// "MindModeling@Home",
// "http://mindmodeling.org/",
// "University of Dayton and Wright State University",
// "Cognitive Science",
// "MindModeling@Home uses computational cognitive process modeling to better understand the human mind, and specifically to study the mechanisms and processes that enable and moderate human performance and learning.",
// ""
// ),
array(
"FreeHAL",
"http://www.freehal.net/freehal_at_home/",
@ -408,7 +417,7 @@ $math = array(
tra("Mathematical Institute of Leiden University / Kennislink"),
tra("Mathematics"),
tra("Search for 'abc-triples': positive integers a,b,c such that a+b=c, a &lt; b &lt; c, a,b,c have no common divisors and c > rad(abc), where rad(n) is the product of the distinct prime factors of n. The ABC conjecture says that there are only finitely many a,b,c such that log(c)/log(rad(abc)) > h for any real h > 1. The ABC conjecture is currently one of the greatest open problems in mathematics. If it is proven to be true, a lot of other open problems can be answered directly from it."),
""
"abclogo.jpg"
),
array(
"PrimeGrid",
@ -471,7 +480,7 @@ $math = array(
"http://sudoku.nctu.edu.tw/",
"National Chiao Tung University, Taiwan",
tra("Mathematics"),
"Sudoku@vtaiwan seeks to solve the minimum Sudoku problem, which is a well-known problem in mathematics and computer science.",
"Sudoku@vtaiwan seeks to solve the minimum Sudoku problem, a well-known problem in mathematics and computer science.",
"sudoku.png"
),
array(

View File

@ -2,7 +2,10 @@
require_once("docutil.php");
require_once("projects.inc");
require_once("get_platforms.inc");
page_head("Choosing BOINC projects");
page_head("Choosing BOINC projects",
'<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="popup.js"></script>'
);
echo "
<p>
@ -15,14 +18,14 @@ In deciding whether to participate in a project,
read its web site and consider the following questions:
<ul>
<li> Does it clearly describe its goals?
<li> Does the project clearly describe its goals?
Are these goals important and beneficial?
<li> Do they have any published results? See
<a href=/wiki/Publications_by_BOINC_projects>
<li> Has the project published results in peer-reviewed
journals or conferences? See <a href=/wiki/Publications_by_BOINC_projects>
A list of scientific publications of BOINC projects</a>.
<li> Do you trust it to use proper security practices?
<li> Do you trust the project to use proper security practices?
<li> Who owns the results of the computation?
Will they be freely available to the public?
Will they be freely available?
Will they belong to a company?
</ul>
<p>
@ -40,20 +43,88 @@ If your computer is equipped with a Graphics Processing Unit
(GPU), you may be able to
<a href=http://boinc.berkeley.edu/wiki/GPU_computing>use it to compute faster</a>.
";
list_start("cellpadding=2 width=100%");
list_heading_array(array(
"Project<br><span class=note>Mouse over for details; click to visit web site</span>",
"Home",
"Research area",
"Supported platforms"
));
shuffle($areas);
foreach ($areas as $area) {
$title = $area[0];
if (sizeof($area)==3) $title .= $area[2];
list_bar($title);
$projects = $area[1];
shuffle($projects);
// Display projects grouped by area.
// Randomize order of areas, and of projects within an area
//
function grouped_display($areas) {
list_start("cellpadding=2 width=100%");
list_heading_array(array(
"Project<br><span class=note>Mouse over for details; click to visit web site</span>",
"Home",
"Research area",
"Supported platforms"
)
);
shuffle($areas);
foreach ($areas as $area) {
$title = $area[0];
if (sizeof($area)==3) $title .= $area[2];
list_bar($title);
$projects = $area[1];
shuffle($projects);
$n = 0;
foreach ($projects as $p) {
$img = "";
if (array_key_exists(5, $p) && $p[5]) {
$img= "<img align=right vspace=4 hspace=4 src=images/$p[5]>";
}
$desc = addslashes($p[4]);
$x = "<a href=$p[1] onmouseover=\"popup('$img <b>Sponsor:</b> $p[2]<hr><b>Area:</b> $p[3]<hr><b>Goal:</b> $desc')\">$p[0]</a>";
$home = $p[2];
$area = $p[3];
$master_url = $p[1];
if (array_key_exists(6, $p)) {
$master_url = $p[6];
}
$p = get_platforms_string($master_url);
echo "<tr class=row$n>
<td valign=top>$x</td>
<td valign=top>$home</td>
<td valign=top>$area</td>
<td width=30% valign=top>$p</td>
</tr>
";
$n = 1-$n;
}
}
list_end();
}
function comp_name($p1, $p2) {
return strcasecmp($p1[0], $p2[0]);
}
function comp_area($p1, $p2) {
if ($p1['area'] == $p2['area']) {
return strcasecmp($p1[0], $p2[0]);
}
return $p1['area'] > $p2['area'];
}
function ordered_display($areas, $sort) {
// make a list of projects
//
$projects = null;
foreach ($areas as $area) {
$title = $area[0];
if (sizeof($area)==3) $title .= $area[2];
$projs = $area[1];
foreach ($projs as $p) {
$p['area'] = $title;
$projects[] = $p;
}
}
usort($projects, $sort=="area"?'comp_area':'comp_name');
list_start("cellpadding=2 width=100%");
list_heading_array(array(
(($sort=="area")?"<a title='Sort by name' href=projects.php>Name</a>":"Name")
."<br><span class=note>Mouse over for details; click to visit web site</span>",
($sort!="area")?"<a title='Sort by category' href=projects.php?sort=area>Category</a>":"Category",
"Area",
"Sponsor",
"Supported platforms"
)
);
$n = 0;
foreach ($projects as $p) {
$img = "";
@ -61,9 +132,10 @@ foreach ($areas as $area) {
$img= "<img align=right vspace=4 hspace=4 src=images/$p[5]>";
}
$desc = addslashes($p[4]);
$x = "<a href=$p[1] onmouseover=\"return escape('$img <b>Home:</b> $p[2]<hr><b>Area:</b> $p[3]<hr><b>Goal:</b> $desc')\">$p[0]</a>";
$x = "<a href=$p[1] onmouseover=\"popup('$img <b>Sponsor:</b> $p[2]<hr><b>Area:</b> $p[3]<hr><b>Goal:</b> $desc')\">$p[0]</a>";
$home = $p[2];
$area = $p[3];
$area = $p['area'];
$spec_area = $p[3];
$master_url = $p[1];
if (array_key_exists(6, $p)) {
$master_url = $p[6];
@ -71,15 +143,21 @@ foreach ($areas as $area) {
$p = get_platforms_string($master_url);
echo "<tr class=row$n>
<td valign=top>$x</td>
<td valign=top>$home</td>
<td valign=top>$area</td>
<td valign=top>$spec_area</td>
<td valign=top>$home</td>
<td width=30% valign=top>$p</td>
</tr>
";
$n = 1-$n;
}
list_end();
}
list_end();
//grouped_display($areas);
$sort = $_GET['sort'];
ordered_display($areas, $sort);
echo "
</ul>

View File

@ -212,3 +212,16 @@ input.btn {
}
.dev { color: red; font-weight: bold }
#pup {
position:absolute;
z-index:200; /* aaaalways on top*/
padding: 3px;
margin-left: 10px;
margin-top: 5px;
width: 650px;
border: 1px solid black;
background-color: #fff;
color: black;
font-size: 0.95em;
}