diff --git a/APP(Android)/jilju/assets/sample_data_1.txt b/APP(Android)/jilju/assets/sample_data_1.txt deleted file mode 100644 index 98af7ee..0000000 --- a/APP(Android)/jilju/assets/sample_data_1.txt +++ /dev/null @@ -1,196 +0,0 @@ -10,-61,30 -20,-74,43 -30,-67,50 -40,-61,51 -50,-47,51 -60,-39,38 -70,-15,82 -80,-1,92 -90,12,97 -100,20,103 -110,17,113 -120,25,125 -130,36,129 -140,44,129 -150,53,135 -160,67,148 -170,82,159 -180,85,172 -190,89,178 -200,93,175 -210,94,173 -220,97,173 -230,102,168 -240,101,168 -250,104,173 -260,111,168 -270,123,180 -280,142,199 -290,153,212 -300,162,235 -310,176,247 -320,185,258 -330,201,270 -340,213,277 -350,223,299 -360,223,299 -370,223,297 -380,221,299 -390,222,299 -400,224,302 -410,225,299 -420,224,302 -430,224,299 -440,225,302 -450,226,302 -460,231,304 -470,244,312 -480,255,308 -490,264,296 -500,268,281 -510,279,264 -520,291,253 -530,301,237 -540,312,225 -550,321,212 -560,325,201 -570,331,188 -580,342,173 -590,350,160 -600,358,148 -610,367,133 -620,376,118 -630,382,103 -640,389,89 -650,395,77 -660,407,61 -670,413,43 -680,417,37 -690,429,48 -700,442,57 -710,453,64 -720,465,73 -730,476,86 -740,489,97 -750,498,103 -760,511,116 -770,524,126 -780,532,131 -790,537,141 -800,540,144 -810,553,162 -820,565,162 -830,575,167 -840,586,178 -850,600,188 -860,613,196 -870,623,201 -880,633,215 -890,646,227 -900,661,237 -910,674,253 -920,687,263 -930,698,271 -940,708,277 -950,719,289 -960,732,302 -970,744,315 -980,756,320 -990,765,331 -1000,779,344 -1010,788,353 -1020,794,363 -1030,793,363 -1040,794,360 -1050,794,360 -1060,793,363 -1070,793,363 -1080,793,363 -1090,795,363 -1100,796,363 -1110,793,363 -1120,793,360 -1130,804,367 -1140,812,372 -1150,825,383 -1160,836,393 -1170,843,405 -1180,856,412 -1190,871,421 -1200,884,435 -1210,894,442 -1220,907,445 -1230,922,460 -1240,928,461 -1250,941,478 -1260,946,495 -1270,948,508 -1280,951,510 -1290,949,510 -1300,947,510 -1310,947,508 -1320,948,510 -1330,949,510 -1340,949,508 -1350,947,508 -1360,958,515 -1370,961,524 -1380,951,543 -1390,941,551 -1400,936,559 -1410,925,572 -1420,915,585 -1430,907,603 -1440,896,614 -1450,887,626 -1460,876,632 -1470,867,646 -1480,854,659 -1490,841,666 -1500,835,679 -1510,841,701 -1520,844,709 -1530,856,730 -1540,865,738 -1550,872,751 -1560,881,765 -1570,888,782 -1580,897,797 -1590,907,807 -1600,915,820 -1610,923,834 -1620,933,856 -1630,942,872 -1640,950,885 -1650,958,894 -1660,968,909 -1670,976,922 -1680,988,943 -1690,994,942 -1700,994,936 -1710,989,940 -1720,987,942 -1730,987,936 -1740,988,936 -1750,989,940 -1760,989,940 -1770,988,940 -1780,988,942 -1790,989,942 -1800,989,943 -1810,996,956 -1820,1004,969 -1830,1011,984 -1840,1020,997 -1850,1026,1010 -1860,1035,1025 -1870,1042,1038 -1880,1049,1051 -1890,1059,1061 -1900,1070,1052 -1910,1080,1042 -1920,1089,1036 -1930,1100,1031 -1940,1108,1026 -1950,1107,1020 -1960,1100,1020 diff --git a/APP(Android)/jilju/assets/sample_data_2.txt b/APP(Android)/jilju/assets/sample_data_2.txt deleted file mode 100644 index 54ab380..0000000 --- a/APP(Android)/jilju/assets/sample_data_2.txt +++ /dev/null @@ -1,132 +0,0 @@ -10,4,-7 -20,15,-24 -30,23,-35 -40,24,-47 -50,29,-58 -60,40,-74 -70,50,-83 -80,61,-89 -90,72,-103 -100,83,-110 -110,95,-102 -120,103,-102 -130,114,-96 -140,130,-83 -150,139,-76 -160,152,-73 -170,164,-61 -180,175,-66 -190,181,-74 -200,191,-89 -210,198,-100 -220,205,-113 -230,212,-128 -240,220,-148 -250,228,-162 -260,231,-172 -270,240,-185 -280,247,-205 -290,256,-218 -300,260,-234 -310,267,-250 -320,271,-273 -330,276,-287 -340,280,-302 -350,288,-320 -360,291,-330 -370,301,-349 -380,304,-360 -390,308,-370 -400,308,-376 -410,308,-377 -420,310,-373 -430,312,-373 -440,313,-373 -450,314,-373 -460,315,-373 -470,315,-376 -480,315,-376 -490,315,-377 -500,315,-377 -510,321,-377 -520,332,-373 -530,344,-367 -540,360,-360 -550,374,-351 -560,387,-347 -570,400,-341 -580,412,-336 -590,421,-334 -600,430,-340 -610,440,-336 -620,455,-323 -630,468,-317 -640,477,-302 -650,481,-299 -660,490,-305 -670,502,-320 -680,505,-328 -690,519,-340 -700,530,-354 -710,537,-370 -720,553,-392 -730,566,-408 -740,569,-418 -750,579,-435 -760,586,-450 -770,590,-458 -780,596,-473 -790,606,-491 -800,615,-502 -810,628,-512 -820,633,-525 -830,643,-535 -840,646,-550 -850,648,-559 -860,657,-574 -870,666,-593 -880,659,-603 -890,654,-610 -900,655,-614 -910,658,-614 -920,659,-617 -930,656,-616 -940,671,-630 -950,684,-633 -960,696,-636 -970,705,-633 -980,714,-637 -990,726,-646 -1000,741,-655 -1010,751,-665 -1020,756,-676 -1030,769,-685 -1040,779,-693 -1050,794,-719 -1060,806,-728 -1070,822,-751 -1080,839,-756 -1090,847,-762 -1100,856,-766 -1110,867,-774 -1120,873,-781 -1130,883,-785 -1140,896,-788 -1150,907,-800 -1160,913,-804 -1170,925,-813 -1180,935,-818 -1190,945,-828 -1200,955,-836 -1210,955,-859 -1220,945,-877 -1230,939,-886 -1240,929,-903 -1250,922,-913 -1260,915,-926 -1270,909,-943 -1280,906,-952 -1290,890,-966 -1300,886,-962 -1310,879,-952 -1320,872,-945 diff --git a/APP(Android)/jilju/lib/database.dart b/APP(Android)/jilju/lib/database.dart index aa42e6c..84c24f2 100644 --- a/APP(Android)/jilju/lib/database.dart +++ b/APP(Android)/jilju/lib/database.dart @@ -1,6 +1,5 @@ import 'dart:collection'; import 'dart:convert'; -import 'dart:math'; import 'package:hive_flutter/hive_flutter.dart'; @@ -71,29 +70,6 @@ class DatabaseManager { return box.keys.isEmpty ? 1 : (box.keys.last + 1); } - static Future loadSampleData(int seed) async { - List sampleDatas = []; - for (int i = 1; i < 3; i++) { - sampleDatas.add(await readFileAsString('sample_data_$i.txt')); - } - Random random = Random(seed); - int fileId = 1; - for (int day = -29; day <= 0; day++) { - int j = 0; - for (int i = 1; i < 3; i++) { - for (; random.nextBool(); j++) { - int startTime = DateTime.now() - .add(Duration(days: day, hours: j)) - .millisecondsSinceEpoch; - startTime ~/= 1000; - String fileData = startTime.toString() + '\n' + sampleDatas[i - 1]; - DatabaseManager.putJilju(Jilju.fromFileData(fileId, fileData)); - fileId++; - } - } - } - } - static Future clearAllData() async { var jiljuBox = await _jiljuBox; var jiljuTagBox = await _jiljuTagBox;