当前位置: 首页 > 编程日记 > 正文

java课堂测试样卷-----简易学籍管理系统

程序设计思路:分别建立两个类:ScoreInformation类(用来定义学生的基本信息以及设置set和get函数)ScoreManagement类(用来定义实现学生考试成绩录入,考试成绩修改,绩点计算等功能的函数)和一个主函数Text类 (通过输入的数字选项进行功能的实现,因为退出系统代码量极少,所以在主函数中实现此功能)

程序源代码及注释

ScoreInformation类:

 1 //信1805-3 20183658 王兵兵
 2 package adc;
 3 
 4 public class ScoreInformation 
 5 {
 6         private String stunumber;                   //学生学号
 7         private String name;                        //学生姓名
 8         private double mathematicsscore;            //高等数学
 9         private double englishscore;                //大学英语
10         private double networkscore;                //计算机网络
11         private double databasescore;               //数据库
12         private double softwarescore;                //软件工程
13         ScoreInformation(String stunumber,String name,double mathematicsscore,double englishscore,double networkscore,double databasescore, double softwarescore)
14         {  //通过构造函数默认赋值
15             this.stunumber=stunumber;
16             this.name=name;
17             this.mathematicsscore=mathematicsscore;
18             this.englishscore=englishscore;
19             this.networkscore=networkscore;
20             this.databasescore=databasescore;
21             this.softwarescore=softwarescore;
22         }
23         public void setstunumber(String stunumber)              //对学生的学号进行赋值操作
24         {
25             this.stunumber=stunumber;
26         }
27         public void setname(String name)                   //对学生的姓名进行赋值操作
28         {
29             this.name=name;
30         }
31         public void setmathematicsscore(double mathematicsscore)         //对学生的高等数学成绩进行赋值操作
32         {
33             this.mathematicsscore=mathematicsscore;
34         }
35         public void setenglishscore(double englishscore)                //对学生的大学英语成绩进行赋值操作
36         {
37             this.englishscore=englishscore;
38         }
39         public void setnetworkscore(double networkscore)                 //对学生的计算机网络成绩进行赋值操作
40         {
41             this.networkscore=networkscore;
42         }
43         public void setdatabasescore(double databasescore)             //对学生的数据库成绩进行赋值操作
44         {
45             this.databasescore=databasescore;
46         }
47         public void setsoftwarescore(double softwarescore)             //对学生的软件工程成绩进行赋值操作
48         {
49             this.softwarescore=softwarescore;
50         }
51         public String getstunumber()           //返回学生的学号
52         {
53             return this.stunumber;
54         }
55         public String getname()                  //返回学生的姓名
56         {
57             return this.name;
58         }
59         public double getmathematicsscore()         //返回学生的高等数学成绩
60         {
61             return this.mathematicsscore;
62         }
63         public double getenglishscore()               //返回学生的大学英语成绩
64         {
65             return this.englishscore;
66         }       
67         public double getnetworkscore()              //返回学生的计算机网络成绩
68         {
69             return this.networkscore;
70         }
71         public double getdatabasescore()              //返回学生的数据库成绩
72         {
73             return this.databasescore;
74         }
75         public double getsoftwarescore()              //返回学生的软件工程成绩
76         {
77             return this.softwarescore;
78         }
79 
80 }

ScoreManagement类

  1 package adc;
  2 import java.util.Scanner;
  3 public class ScoreMangerment 
  4 {        
  5          int j=0;
  6         Scanner te=new Scanner(System.in);
  7         ScoreInformation[] SI=new ScoreInformation[100];        //定义一个学生学籍信息的数组
  8         ScoreMangerment() 
  9         {   //利用构造函数初始化5个学生的信息
 10             SI[0]=new ScoreInformation("20183658","王兵兵",0,0,0,0,0);
 11             SI[1]=new ScoreInformation("20183659","张三",0,0,0,0,0);
 12             SI[2]=new ScoreInformation("20183660","李四",0,0,0,0,0);
 13             SI[3]=new ScoreInformation("20183661","王无",0,0,0,0,0);
 14             SI[4]=new ScoreInformation("20183662","李六",0,0,0,0,0);
 15         }
 16         public void meau()           //输出系统主界面函数
 17         {
 18             System.out.println("********************************************************");
 19             System.out.println("             \t石家庄铁道大学软件工程系");
 20             System.out.println("             \t学籍管理系统系统2019版");
 21             System.out.println("********************************************************");
 22             System.out.println("                1、学生考试成绩录入");
 23             System.out.println("                2、学生考试成绩修改");
 24             System.out.println("                3、计算学生成绩绩点");
 25             System.out.println("                4、退出学籍管理系统");
 26             System.out.println("********************************************************");
 27        }
 28         public void scorerecord()                 //功能1:实现学生信息的录入
 29         {
 30             System.out.println("********************************************************");
 31             System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
 32             System.out.println("             \t考生成绩录入");
 33             System.out.println("********************************************************");
 34             System.out.println("                请输入考生学号:");
 35             System.out.println("********************************************************");
 36              while(!getanswer())      //用来保证学生的输入的学号存在,否则一直输入,直到输入学生学号存在为止
 37              {
 38                  System.out.println("你输入的学号有误或不存在!");
 39                  System.out.println("********************************************************");
 40                  System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
 41                  System.out.println("             \t考生成绩录入");
 42                  System.out.println("********************************************************");
 43                  System.out.println("                请输入考生学号:");
 44                  System.out.println("********************************************************");
 45              }
 46              scoreluruPrint1(j);
 47              while(!pandun1())      //输入Y或N时对应的程序操作
 48              {
 49                  scoreluruPrint1(j);      //输入N返回录入界面
 50              }
 51              meau();            //输入Y后返回主界面
 52         }
 53         public Boolean getanswer()     //检查学号是否存在
 54         {   
 55             String a=te.next();
 56             Boolean temp=false;
 57             for(int i=0;i<5;i++)
 58             {  
 59                 if(a.equals(SI[i].getstunumber()))
 60                 {
 61                     temp=true;
 62                     j=i;
 63                     break;
 64                 }
 65             }
 66             return temp;
 67         }
 68         public void scoreluruPrint1(int j)                    //实现学生成绩信息的输入,并且在输入完一科成绩后进行学生信息的更新
 69         {   
 70              System.out.println("********************************************************");
 71              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
 72              System.out.println("             \t考生成绩录入");
 73              System.out.println("********************************************************");
 74              System.out.println("                学生学号:"+SI[j].getstunumber());
 75              System.out.println("                学生姓名:"+SI[j].getname());
 76              System.out.println("                请输入高等数学成绩:");
 77              System.out.println("********************************************************");
 78              SI[5]=new ScoreInformation(" "," ",0,0,0,0,0);
 79              SI[5].setstunumber(SI[j].getstunumber());
 80              SI[5].setname(SI[j].getname());
 81              double temp1=te.nextDouble();
 82              SI[5].setmathematicsscore(temp1);
 83              System.out.println("********************************************************");
 84              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
 85              System.out.println("             \t考生成绩录入");
 86              System.out.println("********************************************************");
 87              System.out.println("                学生学号:"+SI[5].getstunumber());
 88              System.out.println("                学生姓名:"+SI[5].getname());
 89              System.out.println("                高等数学成绩 :"+SI[5].getmathematicsscore());
 90              System.out.println("                请输入大学英语成绩:");
 91              System.out.println("********************************************************");
 92              double temp2=te.nextDouble();
 93              SI[5].setenglishscore(temp2);
 94              System.out.println("********************************************************");
 95              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
 96              System.out.println("             \t考生成绩录入");
 97              System.out.println("********************************************************");
 98              System.out.println("                学生学号:"+SI[5].getstunumber());
 99              System.out.println("                学生姓名:"+SI[5].getname());
100              System.out.println("                高等数学成绩 :"+SI[5].getmathematicsscore());
101              System.out.println("                大学英语成绩:"+SI[5].getenglishscore());
102              System.out.println("                请输入计算机网络成绩:");
103              System.out.println("********************************************************");
104              double temp3=te.nextDouble();
105              SI[5].setnetworkscore(temp3);
106              System.out.println("********************************************************");
107              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
108              System.out.println("             \t考生成绩录入");
109              System.out.println("********************************************************");
110              System.out.println("                学生学号:"+SI[5].getstunumber());
111              System.out.println("                学生姓名:"+SI[5].getname());
112              System.out.println("                高等数学成绩 :"+SI[5].getmathematicsscore());
113              System.out.println("                大学英语成绩:"+SI[5].getenglishscore());
114              System.out.println("                计算机网络成绩:"+SI[5].getnetworkscore());
115              System.out.println("                请输入数据库成绩:");
116              System.out.println("********************************************************");
117              double temp4=te.nextDouble();
118              SI[5].setdatabasescore(temp4);
119              System.out.println("********************************************************");
120              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
121              System.out.println("             \t考生成绩录入");
122              System.out.println("********************************************************");
123              System.out.println("                学生学号:"+SI[5].getstunumber());
124              System.out.println("                学生姓名:"+SI[5].getname());
125              System.out.println("                高等数学成绩 :"+SI[5].getmathematicsscore());
126              System.out.println("                大学英语成绩:"+SI[5].getenglishscore());
127              System.out.println("                计算机网络成绩:"+SI[5].getnetworkscore());
128              System.out.println("                数据库成绩:"+SI[5].getdatabasescore());
129              System.out.println("                请输入软件工程成绩:");
130              System.out.println("********************************************************");
131              double temp5=te.nextDouble();
132              SI[5].setsoftwarescore(temp5);
133              System.out.println("********************************************************");
134              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
135              System.out.println("             \t考生成绩录入");
136              System.out.println("********************************************************");
137              System.out.println("                学生学号:"+SI[5].getstunumber());
138              System.out.println("                学生姓名:"+SI[5].getname());
139              System.out.println("                高等数学成绩 :"+SI[5].getmathematicsscore());
140              System.out.println("                大学英语成绩:"+SI[5].getenglishscore());
141              System.out.println("                计算机网络成绩:"+SI[5].getnetworkscore());
142              System.out.println("                数据库成绩:"+SI[5].getdatabasescore());
143              System.out.println("                软件工程成绩:"+SI[5].getsoftwarescore());
144              System.out.println("           该学生生成绩已录入完毕,是否提交(Y/N)");
145              System.out.println("********************************************************");
146         }
147         public Boolean pandun1()     //输入Y或N并返回Boolean值
148         {
149             String temp6=te.next();
150             if(temp6.equals("Y"))
151             {
152                 SI[j]=SI[5];
153                 return true;
154             }
155             else
156             {
157                 return false;
158             }
159         }
160         public void modifyscore()      //功能2:实现学生成绩的修改
161         {
162             System.out.println("********************************************************");
163             System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
164             System.out.println("             \t考生成绩修改界面");
165             System.out.println("********************************************************");
166             System.out.println("                请输入考生学号:");
167             System.out.println("********************************************************");
168              while(!getanswer())          //通过while 判断输入的学号是否存在
169              {
170                  System.out.println("你输入的学号有误或不存在!");
171                  System.out.println("********************************************************");
172                  System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
173                  System.out.println("             \t考生成绩修改界面");
174                  System.out.println("********************************************************");
175                  System.out.println("                请输入考生学号:");
176                  System.out.println("********************************************************");
177              }
178              System.out.println("********************************************************");         //输出学生的全部信息
179              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
180              System.out.println("             \t考生成绩录入");
181              System.out.println("********************************************************");
182              System.out.println("                学生学号:"+SI[j].getstunumber());
183              System.out.println("                学生姓名:"+SI[j].getname());
184              System.out.println("              1、高等数学成绩 :"+SI[j].getmathematicsscore());
185              System.out.println("              2、大学英语成绩:"+SI[j].getenglishscore());
186              System.out.println("              3、计算机网络成绩:"+SI[j].getnetworkscore());
187              System.out.println("              4、数据库成绩:"+SI[j].getdatabasescore());
188              System.out.println("              5、软件工程成绩:"+SI[j].getsoftwarescore());
189              System.out.println("********************************************************");
190              modifyspecialscore();    //修改成绩
191              System.out.println("********************************************************");
192              System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
193              System.out.println("             \t考生成绩录入");
194              System.out.println("********************************************************");
195              System.out.println("                学生学号:"+SI[6].getstunumber());
196              System.out.println("                学生姓名:"+SI[6].getname());
197              System.out.println("               1、高等数学成绩 :"+SI[6].getmathematicsscore());
198              System.out.println("               2、大学英语成绩:"+SI[6].getenglishscore());
199              System.out.println("               3、计算机网络成绩:"+SI[6].getnetworkscore());
200              System.out.println("               4、数据库成绩:"+SI[6].getdatabasescore());
201              System.out.println("               5、软件工程成绩:"+SI[6].getsoftwarescore());
202              System.out.println("           该学生生成绩已录入完毕,是否提交(Y/N)");
203              System.out.println("********************************************************");
204              while(!pandun2())
205              {
206                  modifyscore() ;
207              }
208               meau();
209         }
210        public void modifyspecialscore()      //修改选定的成绩
211        {
212            SI[6]=new ScoreInformation(" "," ",0,0,0,0,0);
213            SI[6]=SI[j];
214            System.out.println("请输入你要修改的成绩对应的数字选项:");
215            int temp7=te.nextInt();
216            if(temp7==1)
217            {
218              System.out.println("********************************************************");
219                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
220                System.out.println("             \t考生成绩录入");
221                System.out.println("********************************************************");
222                System.out.println("                学生学号:"+SI[j].getstunumber());
223                System.out.println("                学生姓名:"+SI[j].getname());
224                System.out.println("            请输入修改后高等数学成绩 :");
225                System.out.println("********************************************************");
226                double index1=te.nextDouble();
227                SI[6].setmathematicsscore(index1);
228            }
229            else if(temp7==2)
230            {
231              System.out.println("********************************************************");
232                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
233                System.out.println("             \t考生成绩录入");
234                System.out.println("*******************************************************");
235                System.out.println("                学生学号:"+SI[j].getstunumber());
236                System.out.println("                学生姓名:"+SI[j].getname());
237                System.out.println("            请输入修改后大学英语成绩 :");
238                System.out.println("********************************************************");
239                double index2=te.nextDouble();
240                SI[6].setenglishscore(index2);
241            }
242            else if(temp7==3)
243            {
244              System.out.println("********************************************************");
245                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
246                System.out.println("             \t考生成绩录入");
247                System.out.println("*******************************************************");
248                System.out.println("                学生学号:"+SI[j].getstunumber());
249                System.out.println("                学生姓名:"+SI[j].getname());
250                System.out.println("            请输入修改后计算机网络成绩 :");
251                System.out.println("********************************************************");
252                double index3=te.nextDouble();
253                SI[6].setnetworkscore(index3);
254            }
255            else if(temp7==4)
256            {
257              System.out.println("********************************************************");
258                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
259                System.out.println("             \t考生成绩录入");
260                System.out.println("*******************************************************");
261                System.out.println("                学生学号:"+SI[j].getstunumber());
262                System.out.println("                学生姓名:"+SI[j].getname());
263                System.out.println("            请输入修改后数据库成绩 :");
264                System.out.println("********************************************************");
265                double index4=te.nextDouble();
266                SI[6].setdatabasescore(index4);
267            }
268            else if(temp7==5)
269            {
270              System.out.println("********************************************************");
271                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
272                System.out.println("             \t考生成绩录入");
273                System.out.println("*******************************************************");
274                System.out.println("                学生学号:"+SI[j].getstunumber());
275                System.out.println("                学生姓名:"+SI[j].getname());
276                System.out.println("            请输入修改后软件工程成绩 :");
277                System.out.println("********************************************************");
278                double index5=te.nextDouble();
279                SI[6].setsoftwarescore(index5);
280            }
281        }
282        public Boolean pandun2()         //输入Y或N并返回Boolean值
283        {
284            String temp8=te.next();
285            if(temp8.equals("Y"))
286            {
287                SI[j]=SI[6];
288                return true;
289            }
290            else
291            {
292                return false;
293            }
294        }
295        public void calulatescorepoint()        //功能3:计算学生考试成绩对应的绩点
296        {
297         System.out.println("********************************************************");
298         System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
299         System.out.println("             \t学生考试成绩绩点计算界面");
300         System.out.println("********************************************************");
301         System.out.println("                      请输入考生学号:");
302         System.out.println("********************************************************");
303            while(!getanswer())
304            {
305                System.out.println("你输入的学号有误或不存在!");
306                System.out.println("********************************************************");
307                System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
308                System.out.println("             \t考生成绩录入");
309                System.out.println("********************************************************");
310             System.out.println("                  请输入考生学号:");
311             System.out.println("********************************************************");
312        }
313            System.out.println("********************************************************");
314            System.out.println("    \t石家庄铁道大学软件工程系学籍管理2019版");
315            System.out.println("           \t学生成绩绩点计算界面");
316            System.out.println("********************************************************");
317            System.out.println("                   学生学号:"+SI[j].getstunumber());
318            System.out.println("                   学生姓名:"+SI[j].getname());
319            System.out.println("              1、高等数学成绩 :"+SI[j].getmathematicsscore());
320            System.out.println("              2、大学英语成绩:"+SI[j].getenglishscore());
321            System.out.println("              3、计算机网络成绩:"+SI[j].getnetworkscore());
322            System.out.println("              4、数据库成绩:"+SI[j].getdatabasescore());
323            System.out.println("              5、软件工程成绩:"+SI[j].getsoftwarescore());
324             concullate();
325            System.out.println("                是否返回主界面(Y/N)");
326            System.out.println("********************************************************");
327            pandun3();
328        }
329        public void concullate()           //判断学生绩点是否满足毕业要求
330        {   double sum=0;
331            sum+=scorepoint(SI[j].getmathematicsscore())*5.0;
332            sum+=scorepoint(SI[j].getenglishscore())*3.0;
333            sum+=scorepoint(SI[j].getnetworkscore())*4.0;
334            sum+=scorepoint(SI[j].getdatabasescore())*3.0;
335            sum+=scorepoint(SI[j].getsoftwarescore())*4.0;
336            sum=sum/19;
337            String result=String.format("%.2f", sum);
338            System.out.println("           你的平均学分绩点为:"+result);
339            if(sum>=2.0)
340                System.out.println("     提示信息:你的学分绩点已达到毕业要求!");
341            else
342                System.out.println("     提示信息:你的学分绩点不满足毕业要求!");
343        }
344        public double scorepoint(double sdc)          //返回学生成绩对应的绩点
345        {  
346            double index0=0;
347         if(sdc<60)
348         {
349             index0=0;
350         }
351         else if(sdc>=60&&sdc<=63.9)
352         {
353             index0=1.0;
354         }
355         else if(sdc>=64&&sdc<=65.9)
356         {
357             index0=1.5;
358         }
359         else if(sdc>=66&&sdc<=67.9)
360         {
361             index0=1.7;
362         }
363         else if(sdc>=68&&sdc<=71.9)
364         {
365             index0=2.0;
366         }
367         else if(sdc>=72&&sdc<=74.9)
368         {
369             index0=2.3;
370         }
371         else if(sdc>=75&&sdc<=77.9)
372         {
373             index0=2.7;
374         }
375         else if(sdc>=78&&sdc<=81.9)
376         {
377             index0=3.0;
378         }
379         else if(sdc>=82&&sdc<=84.9)
380         {
381             index0=3.3;
382         }
383         else if(sdc>=85&&sdc<=88.9)
384         {
385             index0=3.7;
386         }
387         else
388             index0=4.0;
389         return index0;
390        }
391        public void pandun3()            //输入Y或N后进行相应的操作
392     {
393         String temp9=te.next();
394         if(temp9.equals("Y"))
395         {
396             meau();
397         }
398         else;
399     }
400 }

主函数

 1 package adc;
 2 import java.util.*;
 3 public class Text {
 4 
 5     public static void main(String[] args) 
 6     {
 7         Scanner input=new Scanner(System.in);
 8         ScoreMangerment SM=new ScoreMangerment();
 9         SM.meau();                  //显示系统主界面
10         while(true)
11         {
12             int a=input.nextInt();
13             if(a==1)
14             {
15                 SM.scorerecord();        //调用成绩录入函数
16                 
17             }
18             else if(a==2)
19             {
20                 SM.modifyscore();    //调用成绩修改函数
21             }
22             else if(a==3)
23             {
24                 SM.calulatescorepoint();     //调用计算学生绩点函数
25             }
26             else if(a==4)             //退出系统
27             {
28                 System.out.println("********************************************************");
29                 System.out.println("             \t石家庄铁道大学软件工程系学籍管理2019版");
30                 System.out.println("             \t制作人:王兵兵");
31                 System.out.println("********************************************************");
32                 break;
33             }
34             else      //防止输入的选项不存在
35             {
36                 System.out.println("该选项不存在!");
37                 SM.meau();
38             }
39         }
40         input.close(); 
41     }
42     
43 }

心得体会:在写复杂且代码量庞大的程序时,一定要保证自己的逻辑思维清楚,一旦混乱,就会条理不清,调试寻找代码错误就会花费很长时间,所以逻辑思维很重要。

再者自己要保持良好的心态,一定要把题读懂读透,不要看一遍题后就立即开始做,先构造下自己的思路和框架。

最后就是基本功不扎实:对键盘不熟悉,敲代码的速度过慢以及准确率低,日后要多加练习。

转载于:https://www.cnblogs.com/weixiao1717/p/11506441.html

相关文章:

python3安装setuptools步骤_setuptools、pip的安装

第2篇分享 安装setuptools 下载setuptools源码setuptools-25.2.0.tar.gz选择需要的版本 这是一个压缩文件&#xff0c;将其解压到桌面&#xff0c;并进入该文件夹 按住shift键后&#xff0c;在文件夹空白处点击鼠标右键&#xff0c;选择&#xff1a;在此处打开命令窗重点&#…

如何将简单CMS后台管理系统示例转换为Java、Php等不同后台语言的版本

等下要去坐车&#xff0c;今天就不继续唠叨开发过程了&#xff0c;来谈一下普遍比较关心的后台语言问题。学习Ext JS&#xff0c;笔者一直强调学习的中心思路是“界面与数据是分离”。只要好好掌握这个思路&#xff0c;深入了解Ext JS的运作过程&#xff0c;就不会为后台语言使…

[面试]future模式

Future模式 什么是future模式? 传统单线程环境下&#xff0c;调用函数是同步的&#xff0c;必须等待程序返回结果后&#xff0c;才可进行其他处理。 Futrue模式下&#xff0c;调用方式改为异步。 Futrue模式的核心在于&#xff1a;充分利用主函数中的等待时间&#xff0c;利用…

java ide

tidespringsource sts a vmware product plugin:Aptana Studio 3(集成了Git) Run on Jettyeclipse for jee plugin:JBoss Tools,m2eclipe,spirng tools,svn

成长秘笈:是你教我,不是我教你

郑昀 20180622 “谢谢你&#xff0c;你是第一个面试的时候跟我说这么详细的。那我到你们公司之后怎么就能成长了呢&#xff1f;” “你们这些人最大的问题是出不了方案。 为什么出不了方案&#xff1f; 因为没有养成深度思考问题的习惯。 实现方案、算法、数据迁移、准备数据、…

计算机网络面试题(一)

1、OSI&#xff0c;TCP/IP&#xff0c;五层协议的体系结构&#xff0c;以及各层协议 OSI分层 &#xff08;7层&#xff09;&#xff1a;物理层、数据链路层、网络层、传输层、会话层、表示层、应用层。 TCP/IP分层&#xff08;4层&#xff09;&#xff1a;网络接口 网络层、运…

Ubuntu下安装和配置Apache2

在Ubuntu中安装apache 安装指令&#xff1a;sudo apt-get install apache2 安装结束后&#xff1a; 产生的启动和停止文件是&#xff1a;/etc/init.d/apache2 启动&#xff1a;sudo apache2ctl -k start 停止&#xff1a;sudo apache2ctl -k stop 重新启动&#xff1a;sudo apa…

苹果电脑安装python3密码_mac系统安装Python3初体验

前沿 对于iOS开发不要随便拆卸系统自带的Python,因为有很多 library 还是使用 Python2.7。 1 安装Xcode 1.1 App Store 搜索Xcode 并安装 1.2 安装 Xcode command line tool 1.2.1 打开命令行terminal工具 control space 输入terminal 回车 1.2.2 安装Xcode command line tool…

【IBM Tivoli Identity Manager 学习文档】3 系统部署

作者&#xff1a;gnuhpc 出处&#xff1a;http://www.cnblogs.com/gnuhpc/ ITIM 5.0 单服务器配置和部署。 部署ITIM之前要对其组件进行部署&#xff1a; IBM DB2 Enterprise 9.1 with FP2 IBM WebSphere Application Server 6.1 with FP9 IBM Tivoli Directory Server 6.2 IB…

数据结构Java版之红黑树(八)

红黑树是一种自动平衡的二叉查找树&#xff0c;因为存在红黑规则&#xff0c;所以有效的防止了二叉树退化成了链表&#xff0c;且查找和删除的速度都很快&#xff0c;时间复杂度为log(n)。 什么是红黑规则&#xff1f; 1.根节点必须是黑色的。 2.节点颜色要么是红要么是黑。 3.…

你真的了解Grid布局吗?

Grid网格布局 概述&#xff1a;Grid将容器划分为一个个网格&#xff0c;通过任意组合不同的网格&#xff0c;做出你想想要的布局 Grid与flex布局相似&#xff0c;将整个Grid分为了容器与子项&#xff08;格子&#xff09; Grid容器的三个重要的概念&#xff1a; 行和列单元格网…

webform里的验证控件

1.非空验证控件&#xff1a;RequireFieldValidator &#xff1b;2.数据比较验证&#xff1a;CompareValidator &#xff1b;3.数据范围验证&#xff1a;RangeValidator &#xff1b;4.正则表达式验证&#xff1a;RegularExpressionValidator &#xff1b;5.自定义条件验证&…

hash是线程安全的吗?怎么解决?_这次进程、线程、多线程和线程安全问题,一次性帮你全解决了...

1. 什么是进程一个软件&#xff0c;在操作系统中运行时&#xff0c;我们称其为进程。进程是操作系统分配资源的最小单元&#xff0c;线程是操作系统调度的最小单元。2. 什么是线程在一个进程中&#xff0c;每个独立的功能都需要独立的去运行&#xff0c;这时又需要把当前这个进…

WinXP不能共享Win7的打印机的解决方法

现在很多企业里存在着WinXP和Win7混用&#xff0c;WinXP不能正常共享Win7的文件和打印机&#xff0c;经过设置发现Win7可以Ping通Winxp并且也可以发现WinXP的共享文件&#xff0c;可是WinXP却不能共享Win7的文件和打印机&#xff0c;看了一下相关资料后简单设置就解决了这个问题…

第三阶段 10_JavaWeb基础_

因为要准备接本&#xff0c;不一定能够每天更新 转载于:https://www.cnblogs.com/BaiZe258/p/9251075.html

工厂模式(Factory)(转)

先来明确一个问题&#xff0c;那就是有的时候&#xff0c;实例化这个活动不应该总是公开的进行&#xff0c; 也就是不要公开的使用 new 操作符&#xff0c;因为&#xff0c;这样容易造成耦合问题。 我们不应该针对实现编程&#xff0c;但是当我们在使用 new 的时候&#xff0c;…

Asp.net后台创建HTML

为了使HTML界面中的内容能根据数据库中的内容动态显示用户需要的内容&#xff0c;或者根据权限不同要显示同而实现页面内容的动态创建 使用HtmlGenericControl创建HTML标签 引入命名空间: using System.Web.UI.HtmlControls; 更改其属性: hgg_div.Attributes.Add("style&q…

oracle视图(转)

视图的概念 视图是基于一张表或多张表或另外一个视图的逻辑表。视图不同于表&#xff0c;视图本身不包含任何数据。表是实际独立存在的实体&#xff0c;是用于存储数据的基本结构。而视图只是一种定义&#xff0c;对应一个查询语句。视图的数据都来自于某些表&#xff0c;这些…

Redis 事物

redis 事物&#xff1a; Redis 事物的实现&#xff1a; 首先 wath监控键值 myKey开启批量执行 multi&#xff0c;执行命令入列&#xff0c;执行 exec 。如果监控的键值mykey 没有被修改过&#xff0c;则exec 中批量执行的命令成功&#xff0c;否则执行失败。无论执行成功与否&a…

python dos攻击_利用SMB漏洞DoS攻击任何Windows系统

原标题&#xff1a;利用SMB漏洞DoS攻击任何Windows系统近日微软报出SMB V1存在漏洞&#xff0c;安全研究员并将此漏洞称作 “ SMBLoris ”&#xff0c;解释其能够发动拒绝服务&#xff08;Dos&#xff09;攻击&#xff0c;可以感染 Windows 2000 及以上操作系统的任一版本 SMB …

java基础编程题(2)

1、给定一个二叉树&#xff0c;找出其最大深度。 注&#xff1a;二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。 /*** Definition for a binary tree node.* public class TreeNode {* int val;* TreeNode left;* TreeNode right;* TreeNode(int x…

python元组转字典_python中怎么将元组、字典转化为列表

python中将元组、字典转化为列表的方法&#xff1a; python中可以使用list()方法将元组或字典转化为列表&#xff1a; list()方法语法&#xff1a;list( tup ) 参数 tup -- 要转换为列表的元组。 返回值 返回列表。 示例&#xff1a; 将元组转换为列表&#xff1a;#!/usr/bin/p…

搭建Git服务器教程转载

1. 在Windows下使用sshmsysgit客户端搭建Git服务器 http://www.codeproject.com/Articles/296398/Step-by-Step-Setup-Git-Server-on-Windows-with-CopS 2. 在Windows下使用Apachemsysgit客户端搭建Git服务器 http://www.devbean.info/2011/10/apache-git-server-on-windows/ 3…

存储过程处理错误数据

create or replace procedure ERR_REDUCEDATA is --sx --定义变量 v_realindiobjid VARCHAR2(100); v_indiobjid VARCHAR2(32); v_residuemoney number ; v_reducemoney number ; v_approbjid VARCHAR2(32); -- v_indiecoid VARCHAR2(32); --v_indiecocode VARCHAR2(32); v_Ap…

[置顶] 面向业务开发应用

自从计算机出现后&#xff0c;快速便捷的从太平洋一样的文海中找到水滴大小的资料真正成为了可能&#xff0c;而能够帮助人们实现这一愿望的程序员就像中世纪的航海家一样用神秘的代码程序指引着计算机一步一步实现的需求。而他们所用的被称之为“程序”的序列组合&#xff0c;…

vector方法

借鉴网上资料&#xff0c;整理了vector使用的一些方法&#xff0c;记录下来&#xff0c;方便以后查阅 vector初始化 vector<int>a(10) //只定义长度 vector<int>a(10,1)//长度为10&#xff0c;初始值为1 vector<int>a(b); //用b向量来创建a向量&#xff0c;…

MyEclipse Enterprise Workbench 9.0 破解及注册机 注册码

MyEclipse 9.0的激活机制终于破解了&#xff0c;破解步骤比老版本要复杂一些&#xff0c;但是是绝对可以破解的&#xff0c;这个破解对主程序无任何修改&#xff0c;只替换公钥&#xff0c;如果有牛人会快速从公钥反推私钥&#xff0c;那就什么都不用改了&#xff0c;步骤如下&…

python字典一键多值_python字典中如何一键多值的写入?

python字典中如何一键多值的写入&#xff1f; python字典中一键多值写入的方法&#xff1a; 1、循环写入字典key、value、删除指定的键值对&#xff1a; 原文本‘jp_url.txt’每行元素以逗号分隔:host_key,product_id,product_name,cont_start,cont_end ah2.zhangyue.com,10000…

向实现细节低头

本来想搞明白所有的东西&#xff0c;然后自己集成&#xff0c;避免引入额外的组件&#xff0c;避免复杂的维护成本。 现在想想&#xff0c;相比于投入的巨大精力&#xff0c;其收益过小&#xff0c;还是要有所取舍。转载于:https://www.cnblogs.com/youge-OneSQL/p/9268924.htm…