我得到响应的数组,我必须获取数组中存在的一些变量,并将其存储在手机的本地数据库中,当应用启动时,我必须检查数据库是否存在。
> wc junk
193 1042 11312 junk
> junk.pl junk
you counted 193 lines. Now do you want to proceed?yes
answer=yes
you said yes so we do something affirmative
> junk.pl junk
you counted 193 lines. Now do you want to proceed?no
answer=no
you said no which is not "yes" so we do NOT proceed
> cat junk | junk.pl
Use of uninitialized value $answer in scalar chomp at /Users/BNW/u/kh/bin/junk.pl line 10.
Use of uninitialized value $answer in concatenation (.) or string at /Users/BNW/u/kh/bin/junk.pl line 11.
answer=
Use of uninitialized value $answer in string eq at /Users/BNW/u/kh/bin/junk.pl line 12.
Use of uninitialized value $answer in concatenation (.) or string at /Users/BNW/u/kh/bin/junk.pl line 18.
you said which is not "yes" so we do NOT proceed
you counted 193 lines. Now do you want to proceed?>
这是我用来访问URL的代码段
Unitdata unitdata1 = new Unitdata(univ_year_semid:"18",semid: "2");
await _networkUtils.unitdata("http://hiddenmasterminds.com/web/index.php?r=jguest/allstudentsemdata",body: unitdata1.toMap());
这是用于存储URL的代码段,现在我必须在主题数组中存储一些变量。
class Unitdata{
final String univ_year_semid;
final String semid;
List subject, unit, topic;
Unitdata({this.univ_year_semid,this.semid});
factory Unitdata.fromJson(Map<List ,dynamic> json){
return Unitdata(
univ_year_semid: json['univ_year_sem_id'],
semid: json['sem_id']
);
}
Map toMap() {
var map = new Map<List,dynamic>();
map[subject] = subject;
map[unit]= unit;
map[topic] = topic;
return map;
}
}
这是用于创建数据库的代码