Merge branch 'master' of https://github.com/jsmaniac/2011-m1s2-ter
This commit is contained in:
commit
480074037f
BIN
code/PtiClic/res/drawable-hdpi/corbeille.png
Executable file
BIN
code/PtiClic/res/drawable-hdpi/corbeille.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
BIN
code/PtiClic/res/drawable-ldpi/corbeille.png
Executable file
BIN
code/PtiClic/res/drawable-ldpi/corbeille.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
code/PtiClic/res/drawable-mdpi/corbeille.png
Executable file
BIN
code/PtiClic/res/drawable-mdpi/corbeille.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
|
@ -1,6 +0,0 @@
|
|||
cat dump.url
|
||||
# Aller à cette adresse, et télécharger le dernier dump
|
||||
./dump2sqlite.sh 01232011-LEXICALNET-JEUXDEMOTS-FR-NOHTML.txt > sql
|
||||
pv sql | sqlite3 php/db
|
||||
sudo chown -R user.www-data php
|
||||
chmod 664 php/db
|
16
code/serveur/README.sh
Executable file
16
code/serveur/README.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
# cat dump.url
|
||||
# Aller à cette adresse, et télécharger le dernier dump
|
||||
echo "Étape 1/3 : Téléchargement"
|
||||
wget 'http://www.lirmm.fr/~lafourcade/JDM-LEXICALNET-FR/02122011-LEXICALNET-JEUXDEMOTS-FR-NOHTML.txt'
|
||||
|
||||
echo "Étape 2/3 : Conversion vers sql"
|
||||
./dump2sqlite.sh 01232011-LEXICALNET-JEUXDEMOTS-FR-NOHTML.txt > sql
|
||||
|
||||
echo "Étape 3/3 : Insertion dans la bdd"
|
||||
mv php/db php/db.old
|
||||
pv sql | sqlite3 php/db
|
||||
|
||||
sudo chown -R $USER.www-data php
|
||||
chmod 664 php/db
|
|
@ -1 +1 @@
|
|||
http://www.lirmm.fr/~lafourcade/JDM-LEXICALNET-FR/
|
||||
http://www.lirmm.fr/~lafourcade/JDM-LEXICALNET-FR/?C=M;O=D
|
||||
|
|
|
@ -8,6 +8,7 @@ echo " Et c'est parti !" >&2
|
|||
echo >&2
|
||||
|
||||
# Played_game(type) : 0 => partie de référence, 1 => joueur
|
||||
# Note : l'index i_played_game_all sert à la vérification lors du set_partie.
|
||||
|
||||
cat <<EOF
|
||||
begin transaction;
|
||||
|
@ -20,7 +21,15 @@ create table game(gid integer primary key autoincrement, eid_central_word, relat
|
|||
create table game_cloud(gid, num, difficulty, eid_word, totalWeight, probaR1, probaR2, probaR0, probaTrash);
|
||||
create table played_game(pgid integer primary key autoincrement, gid, login, timestamp);
|
||||
create table played_game_cloud(pgid, gid, type, num, relation, weight, score);
|
||||
|
||||
insert into user(login, mail, hash_passwd, score) values('foo', 'foo@isp.com', '$(echo -n 'bar' | md5sum | cut -d ' ' -f 1)', 0);
|
||||
|
||||
create index i_relation_start on relation(start);
|
||||
create index i_relation_end on relation(end);
|
||||
create index i_relation_type on relation(type);
|
||||
create index i_relation_start_type on relation(start,type);
|
||||
create index i_relation_end_type on relation(end,type);
|
||||
create index i_played_game_all on played_game(pgid, gid, login, timestamp);
|
||||
EOF
|
||||
|
||||
# tr : pour virer le CRLF qui traîne
|
||||
|
@ -38,13 +47,4 @@ cat "$1" \
|
|||
| grep -v '^//' \
|
||||
| grep -v '^$'
|
||||
|
||||
# Note : l'index i_played_game_all sert à la vérification lors du set_partie.
|
||||
cat <<EOF
|
||||
create index i_relation_start on relation(start);
|
||||
create index i_relation_end on relation(end);
|
||||
create index i_relation_type on relation(type);
|
||||
create index i_relation_start_type on relation(start,type);
|
||||
create index i_relation_end_type on relation(end,type);
|
||||
create index i_played_game_all on played_game(pgid, gid, login, timestamp);
|
||||
commit;
|
||||
EOF
|
||||
echo "commit;"
|
||||
|
|
|
@ -159,7 +159,7 @@ function cg_build_result_sets($cloudSize, $centerEid, $r1, $r2)
|
|||
*/
|
||||
function cg_choose_relations()
|
||||
{
|
||||
$relations = array(5, 7, 9, 10, /* Pas d'icônes pour celles-ci. */ 13, 14, 22);
|
||||
$relations = array(5, 7, 9, 10);// /* Pas d'icônes pour celles-ci. */ 13, 14, 22);
|
||||
$r1 = rand(0,count($relations)-1);
|
||||
$r2 = rand(0,count($relations)-2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user