MySQL has a canonical implementation:
SELECT FROM_DAYS(730669);
+-------------------+
| FROM_DAYS(730669) |
+-------------------+
| 2000-07-03 |
""" | |
This uses a fake sprintf style construction to handle easily resetting searchstrings without rebuilding the whole database. | |
Anything in a string like this: | |
%(blah blah)s | |
will be broken out in mysql as a literal. | |
By default, this assumes you only need the "catalog" field: things will get strange if you try to use any non-unique fields. |
MySQL has a canonical implementation:
SELECT FROM_DAYS(730669);
+-------------------+
| FROM_DAYS(730669) |
+-------------------+
| 2000-07-03 |
[{"field":"date", | |
"datatype":"time", | |
"type":"numeric", | |
"unique":true, | |
"derived":[{"resolution":"month"}]}, | |
{"field":"searchstring", | |
"datatype":"searchstring", | |
"type":"text", | |
"unique":true}, | |
{"field":"series", |
d3.selectAll("code") | |
.filter(function(d) { | |
try {JSON.parse(d3.select(this).text()); | |
return true } | |
catch(exception) { | |
return false}}) | |
.each(function(d) { | |
d3.select(this).on("click",function() { |
[client] | |
user = _www | |
password = mysecret | |
[mysqld] | |
myisam_sort_buffer_size = 512M | |
read_rnd_buffer_size = 8M | |
read_buffer_size = 4M | |
max_heap_table_size = 1024M | |
tmp_table_size = 1024M |
ubuntu@ip-172-30-0-121:~/bookworm-setup$ cat install.sh | |
apt-get install emacs | |
apt-get install apache2 | |
apt-get install mysql-server | |
apt-get install libmysqlclient-dev | |
apt-get install git | |
apt-get install make |
MariaDB [DEGREES]> SELECT cip,cipTitle,SUM(count) FROM degrees NATURAL JOIN cip WHERE year=2010 AND school=186131 and variable="TOTAL" AND level=5 GROUP BY cip; | |
+---------+----------------------------------------------------------------------+------------+ | |
| cip | cipTitle | SUM(count) | | |
+---------+----------------------------------------------------------------------+------------+ | |
| 4.0201 | Architecture. | 15 | | |
| 5.0104 | East Asian Studies. | 10 | | |
| 5.0108 | Near and Middle Eastern Studies. | 13 | | |
| 14.0701 | Chemical Engineering. | 36 | | |
| 14.0801 | Civil Engineering, General. | 18 | | |
| 14.0901 | Computer Engineering, General. | 44 | |
American Empire (1942) | Western | American __ | |
---|---|---|---|
American Teen (2008) | Documentary | American __ | |
American Nymphette 2 (2001) (V) | Adult | American __ | |
An American Journalist (2009) | Drama | An American __ | |
An American Journalist (2009) | Short | An American __ | |
American Arab (2013) | Biography | American __ | |
American Arab (2013) | Documentary | American __ | |
American Arab (2013) | Family | American __ | |
American Arab (2013) | News | American __ | |
An American Dream (1966) | Drama | An American __ |
This is just a dummy file to get started
mkdir GUI | |
make linechartGUI webDirectory=GUI | |
git clone http://github.com/Bookworm-Project/BookwormAPI GUI/cgi-bin | |
git clone http://github.com/bmschmidt/BookwormD3 GUI/BookwormD3 | |
cd GUI; python -m CGIHTTPServer 8000 |