xyxsw
文章35
标签3
分类0
《大学生与法》案例分析

《大学生与法》案例分析

《大学生与法》写出生活中的法律案例并加以分析。

来福士母女

案例详情:

  • 母女隐瞒行程从沪来杭被立案,波及多家商场。
  • 4月6日13:18,杭州市新冠肺炎疫情防控指挥部发布消息,4月5日,宁某某、党某某从省外疫情中高风险地区来杭,接受防疫工作人员调查期间刻意隐瞒行程,造成社会面传播风险,已被上城区公安分局依法立案调查。
  • 网上有一段昨晚来福士皮爷咖啡店的现场视频,白大褂正在与两名坐在店门口的女子对话,其中一名身穿黑色上衣、没有戴口罩的女子面带笑容
  • 从地铁里的监控画面中可以看到,身穿同款黑色上衣的女子在人流密集的封闭区域没有规范戴好口罩,口鼻均露在外面,只有在被提醒的情况下,把口罩拉上。
  • 有消息说,她们以没有健康码为由,避开了验码环节,但签署了承诺书,不过,显然她们的“承诺”并不真实,这也是认定她们是否存在“刻意隐瞒”情节的重要因素之一。

涉及杭州市范围内的公共场所如下:

  • 4月5日,K1805次列车(2号车厢,无座)。

  • 4月5日,6时35分、9时25分分别进入铁道大厦负一楼核酸检测点附近公厕(女厕),7时31分进入城站广场平价超市,7时37分进入城站广场世纪华联超市,10时09分进入1号线城站地铁站,经近江地铁站转4号线至江锦路地铁站,于11时12分出站,11时17分进入杭州万象城(上城区富春路),11时40分-21时在杭州来福士中心(上城区新业路)。

  • 两人4月5日早上4时左右从上海出发,6时30分左右到达杭州站,出站后,上了一趟卫生间,购买早点并在出站层吃,吃完后乘坐地铁去万象城闲逛十几分钟后,中午来到来福士,购物、吃饭,并在咖啡店休息。

  • 二人必然刻意隐瞒了一些真实情况才能从上海一路闯关来到杭州。

    根据通报,宁某某两人在来福士逗留9个小时

资料查询

  • 不知道感染,但刻意隐瞒行程,要负法律责任吗?

隐瞒谎称病情、居住史、行踪轨迹等,这些隐瞒行为在法律上是可以被认定为拒绝疫情防控措施行为的。

这些客观上的行为,如果达到“引起甲类传染病传播或者有传播严重危险”的程度,如造成多人被确诊为新冠肺炎病人,那视具体情节及行为后果,是可以认定为妨害传染病防治罪的。

上海二人的行为能否以“以危险方法危害公共安全罪”进行定罪处罚,从法律上需要明确三个事实:其一,在主体上二人是否已经属于已确诊的新冠肺炎病人、病原携带者或者新冠肺炎疑似病人;其二,在主观上二人是否具有传播新冠肺炎病原体的故意;其三,在客观上需满足拒绝隔离治疗或者隔离期未满擅自脱离隔离治疗,且实施了进入公共场所或者公共交通工具的行为。

如果行为人不知道自己存在阳性感染,而仅是隐瞒从疫情高发地区(上海)的旅居史或行踪轨迹,在未造成严重危害后果的情况下,即使无法构成相关涉疫犯罪,也属妨害疫情防控的违法行为,可予以治安处罚。

  • 明知已感染,仍隐瞒潜入杭州,要面临怎样的法律后果?

如果相关行为人明知自身已经确诊为新冠肺炎病人或者疑似病人,是出于报复社会等主观故意,恶意向不特定多数人传播病毒,后果严重、情节恶劣的,将涉嫌以危险方法危害公共安全罪。

根据刑法第一百一十四条规定,犯此罪的,尚未造成严重后果的,处三年以上十年以下有期徒刑;致人重伤、死亡或者使公私财产遭受重大损失的,处十年以上有期徒刑、无期徒刑或者死刑。

此外,对于其他拒绝执行疫情防控措施,引起新型冠状病毒传播或者有传播严重危险的行为,则可能涉嫌妨害传染病防治罪

依据刑法第三百三十条第一款第五项的规定,违反传染病防治法的规定,拒绝执行县级以上人民政府、疾病预防控制机构依照传染病防治法提出的预防、控制措施,引起甲类传染病以及依法确定采取甲类传染病预防、控制措施的传染病传播或者有传播严重危险的,处三年以下有期徒刑或者拘役;后果特别严重的,处三年以上七年以下有期徒刑。

  • 除了刑事责任,被感染者可以要求民事赔偿吗?

依据传染病防治法第十二条的规定,在中华人民共和国领域内的一切单位和个人,必须接受疾病预防控制机构、医疗机构有关传染病的调查、检验、采集样本、隔离治疗等预防、控制措施,如实提供有关情况

若单位和个人违反本法规定,导致传染病传播、流行,给他人人身、财产造成损害的,还应当依法承担民事责任

也就是说,如果二人明知自己是确诊患者或者疑似患者仍然未按照国家疫情防控部门的要求,还与他人接触导致他人感染的,那么被感染者可以要求传播者赔偿损失。

法律规定

  • 传染病防治法》第十二条之规定,在中华人民共和国领域内的一切单位和个人,必须接受疾病预防控制机构、医疗机构有关传染病的调查、检验、采集样本、隔离治疗等预防、控制措施,如实提供有关情况。

  • 传染病防治法》第三十一条之规定,任何单位和个人发现传染病病人或者疑似传染病病人时,应当及时向附近的疾病预防控制机构或者医疗机构报告。

  • 突发事件应对法》第五十四条之规定:“任何单位和个人不得编造、传播有关突发事件事态发展或者应急处置工作的虚假信息。”

  • 突发事件应对法》第五十七条之规定,突发事件发生地的公民应当服从人民政府、居民委员会、村民委员会或者所属单位的指挥和安排,配合人民政府采取的应急处置措施,积极参加应急救援工作,协助维护社会秩序。

  • 如果明知自身已感染“新型冠状病毒”而故意传播,危害公共安全,依照《刑法》一百一十四条、一百十一五条第一款之规定,以危险方法危害公共安全罪定罪处罚,没有造成严重后果的,处三年以上十年以下有期徒刑,造成严重后果的,处十年以上有期徒刑、无期徒刑或者死刑。

  • 如果实际上感染“新型冠状病毒”,处于潜伏期,误以为自己没有感染该病毒,而拒绝接受检疫、强制隔离或者治疗,过失造成“新型冠状病毒”传播,情节严重,危害公共安全的,依照《刑法》一百一十五第二款之规定,按过失以危险方法危害公共安全罪定罪处罚,最高可处七年有期徒刑。

自己的想法

  • 如果明知自己携带新冠病毒,却还要在杭州大逛特逛,试图传播病毒,则罪不可赦。给她们的病毒测个序,凡是该序列之后的病毒感染者以及她们造成影响的商家都可以对她们进行民事赔偿诉讼,至于刑事责任由国家公诉。
  • 如不知道携带新冠病毒,为什么不亮健康码?为什么关掉手机签承诺书?为什么不遵守封控从危险的上海跑到杭州来?为什么在商场里待9小时?为什么从风险区出来在商场里不戴口罩谈笑风生?我觉得这些都是嫌疑点。不排除有其报复社会、妨碍疫情防控的可能。
java答案2

java答案2

选择

DDBDB BDCAA ADAAA

填空

4-1
BufferedInputStream

4-2
OutputStream
Reader

程序填空题

5-1
throw new
IllegalAccessException e

5-2
int t a
t

5-3
f[i]=f[i-1]+f[i-2]
int i=0
(i+1)%4==0

编程题

7-1

public class Main {
    public static void main(String[] args) {
        Dog animal = new Dog();
        animal.shout();
        animal.run();
    }
}
class Animal {
    void shout() {
        System.out.println("animal shout!");
    }
}
class Dog extends Animal {
    void shout() {
        super.shout();
        System.out.println("wangwang……");
    }

    void run() {
        System.out.println("Dog is running");
    }
}

7-2

public class Main {
    public static void main(String[] args) {
        Son son = new Son();
        son.method();
    }
}
class Parent {
    Parent() {
        System.out.println("Parent's Constructor without parameter");
    }

    Parent(boolean b) {
        System.out.println("Parent's Constructor with a boolean parameter");
    }

    public void method() {
        System.out.println("Parent's method()");
    }
}
class Son extends Parent {
    Son() {
        super(true);
        System.out.println("Son's Constructor without parameter");

    }
    public void method() {
        System.out.println("Son's method()");
        super.method();
    }
}

7-3

import java.util.Scanner;
public class Main{

    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int sum1=0,sum2=0;
        int []s=new int[n];
        for(int i=0;i<n;i++) {
            int m=in.nextInt();
            if(m>100||m<0) {
                System.out.println(m+"invalid!");
                i--;
                continue;
            }
            else
                s[i]=m;
            if(m<60) sum1+=1;
            else sum2+=1;
        }
        System.out.println(sum2);
        System.out.println(sum1);
    }

}

7-4

import java.util.Arrays;
import java.util.Scanner;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        double sum = 0;
        for (int i = 0; i < n; i++) {
            sum += arr[i];
        }
        double mean = sum / n;
        arr = Arrays.stream(arr).sorted().toArray();
        double median = 0;
        if (n % 2 == 0) {
            median = (arr[n / 2 - 1] + arr[n / 2]) / 2.0;
        }
        else {
            median = arr[n / 2];
        }
        System.out.print("mean=" + String.format("%.2f", mean) + ",median=" + String.format("%.1f", median));
    }
}

7-5

import java.util.Arrays;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            try{
                String str = scanner.next();
                arr[i] = Integer.parseInt(str);
            }catch (Exception e){
                System.out.println(e);
                i--;
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
java答案

java答案

选择

BDCDA CABCC

程序填空

5-1

str.toCharArray()
i<x.length
ch>='a'&&ch<='z' ||ch>='A'&&ch<='Z'
ch>='0'&&ch<='9'
c++

5-2

sc.nextLine()
str.charAt(i)
String.valueOf(curChar).toUpperCase()
String.valueOf(curChar).toLowerCase()
sb.append(s1)
sb.toString()

5-3

super(a);
this.a=super.a*10;
super.a
this.a

编程题

7-1

import java.util.Scanner;

class Rectangle {
    double width = 1;
    double height = 1;

    Rectangle() {
    }

    Rectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }

    double getArea() {
        return width * height;
    }

    double getPerimeter() {
        return 2 * (width + height);
    }
}
class Main{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double width = scanner.nextDouble();
        double height = scanner.nextDouble();
        Rectangle rectangle1 = new Rectangle(width, height);
        System.out.println(rectangle1.width + " " + rectangle1.height + " " + rectangle1.getArea() + " " + rectangle1.getPerimeter());
        width = scanner.nextDouble();
        height = scanner.nextDouble();
        Rectangle rectangle2 = new Rectangle(width, height);
        System.out.print(rectangle2.width + " " + rectangle2.height + " " + rectangle2.getArea() + " " + rectangle2.getPerimeter());
    }
}

7-2

import java.util.Scanner;

interface ICompute{
    int computer(int n, int m);
}

class Add implements ICompute{
    public int computer(int n, int m){
        return n+m;
    }
}

class Sub implements ICompute{
    public int computer(int n, int m){
        return n-m;
    }
}

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        ICompute add = new Add();
        ICompute sub = new Sub();
        System.out.println(add.computer(a, b));
        System.out.println(sub.computer(a, b));
    }
}

7-3

import java.util.Scanner;

class Circle{
    private double radius;
    Circle(double radius){
        this.radius = radius;
    }
    Circle(){
        this.radius =0;
    }
    void setRadius(double r){
        this.radius = r;
    }
    double getRadius(){
        return this.radius;
    }
    double getArea(){
        return Math.PI * this.radius * this.radius;
    }
    double getPerimeter(){
        return Math.PI * this.radius * 2;
    }
    public String toString(){
        return"Circle(r:"+this.radius+")";
    }
}

class Cylinder{
    private double height;
    private Circle circle;
    Cylinder(double height,Circle circle){
        this.height = height;
        this.circle = circle;
    }
    Cylinder(){
        this.height = 0;
        this.circle = new Circle();
    }
    void setHeight(double height){
        this.height = height;
    }
    double getHeight(){
        return this.height;
    }
    void setCircle(Circle circle){
        this.circle = circle;
    }
    Circle getCircle(){
        return this.circle;
    }
    double getArea(){
        return 2 * this.circle.getArea() + this.circle.getPerimeter() * this.height;
    }
    double getVolume(){
        return this.circle.getArea() * this.height;
    }
    public String toString(){
        return "Cylinder(h:"+this.height+","+this.circle+")";
    }

}

public class Main{
    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        for(int i = 0; i < n; i++) {
            String str = input.next();
            if(str.equals("Circle")) {
                Circle c = new Circle(input.nextDouble());
                System.out.println("The area of " + c.toString() + " is " + String.format("%.2f",c.getArea()));
                System.out.println("The perimeterof " + c.toString() + " is "+ String.format("%.2f",c.getPerimeter()));
            } else if(str.equals("Cylinder")) {
                Cylinder r = new Cylinder(input.nextDouble(), new Circle(input.nextDouble()));
                System.out.println("The area of " + r.toString() + " is " + String.format("%.2f",r.getArea()));
                System.out.println("The volume of " + r.toString() + " is " + String.format("%.2f",r.getVolume()));
            }
        }
    }
}

7-4

import java.util.Scanner;

class Shape{
    double PI=3.1415926;
    public double area(){
        return 0;
    }
    public double perimeter(){
        return 0;
    }
}

class Oval extends Shape{
    private double a;
    private double b;
    public Oval(double a,double b){
        this.a=a;
        this.b=b;
    }
    public Oval(){
        this.a=0;
        this.b=0;
    }
    public double area(){
        return PI*a*b;
    }
    public double perimeter(){
        return 2*PI*Math.sqrt((a*a+b*b)/2);
    }
    public String toString(){
        return "Oval(a:"+a+",b:"+b+")";
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double a=sc.nextDouble();
        double b=sc.nextDouble();
        Oval o=new Oval(a,b);
        System.out.println("The area of "+o.toString()+" is "+o.area());
        System.out.println("The perimeterof "+o.toString()+" is "+o.perimeter());
    }
}

7-5

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String statement;
            Scanner sc =new Scanner(System.in);
            statement=sc.nextLine();
            String word1=sc.next();
            String word2=sc.next();//用word2替换word1

            String words[]=statement.split(" ");
        /* for(int i=0;i<words.length;i++)
                System.out.print(words[i]+"\t");*/
            for(int i=0;i<words.length;i++) {//将句子分割成单词
                if(word1.equals(words[i])) {
                    words[i]=word2;
                }
            }
        StringBuffer stb=new StringBuffer();
        String sta=null;
        for(int i=0;i<words.length;i++) {//数组转换为句子
            if(i==words.length-1)stb.append(words[i]);
            else	stb.append(words[i]+" ");
        }
        sta=stb.toString();
        System.out.println(sta);
            sc.close();
    }

}

7-6

import java.util.Scanner;

interface Shape{
    double length();
}

class Triangle implements Shape{
    double a;
    double b;
    double c;

    Triangle(){
        this.a = this.b = this.c = 0;
    }

    Triangle(double a){
        this.a = this.b = this.c = 0;
    }

    Triangle(double a, double b){
        this.a = this.b = this.c = 0;
    }

    Triangle(double a, double b, double c){
        this.a = a;
        this.b = b;
        this.c = c;
        if(a <= 0 || b <= 0 || c <= 0 || !(a + b > c && a + c > b && b + c > a)){
            this.a = this.b = this.c = 0;
        }
    }

    @Override
    public double length() {
        return a + b + c;
    }
}

class Rectangle implements Shape{
    double a, b;

    Rectangle(){
        this.a = this.b = 0;
    }

    Rectangle(double a){
        this.a = this.b = 0;
    }

    Rectangle(double a, double b){
        this.a = a;
        this.b = b;
        if(a <= 0 || b <= 0){
            this.a = this.b = 0;
        }
    }

    @Override
    public double length() {
        return 2 * (a + b);
    }
}

class Circle implements Shape{
    double r;

    Circle(){
        r = 0;
    }

    Circle(double r){
        this.r = r;
        if(r <= 0) this.r = 0;
    }

    @Override
    public double length() {
        return 2 * 3.14 * r;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNextInt()) {
            double[] l = new double[5];

            String s;
            s = sc.nextLine();
            String[] str = s.split(" ");

            int cnt = 0;
            for (String value : str) {
                l[cnt++] = Double.parseDouble(value);
            }


            if(cnt == 1){
                Circle C = new Circle(l[0]);
                System.out.printf("%.2f\n", C.length());
            }

            else if (cnt == 2){
                Rectangle r = new Rectangle(l[0], l[1]);
                System.out.printf("%.2f\n", r.length());
            }
            else{
                Triangle t = new Triangle(l[0], l[1], l[2]);
                System.out.printf("%.2f\n", t.length());
            }
        }
    }
}
yaml

yaml

🍉前提知识

  1. Nodejs和npm,会使用Npm安装包
  2. 了解yaml基础语法
  3. 基本的js
  4. 从命令行接收参数 http://nodejs.cn/learn/nodejs-accept-arguments-from-the-command-line
  5. 如何本地直接运行js代码:打开终端,输入 node xxx.js

涉及到的库

  1. js-yaml

练习内容:无页面版Todo list

  1. 在你的项目文件夹新建一个 todo.yaml

    • 包含三大块: todo, doing, done,分别代表待办任务的三种状态
    • 每条任务分布在三大块中,每条任务有以下属性:id,content,
  2. 实现以下命令:

  • node xxx.js ls:列出所有任务
  • node xxx.js ls --status=done:列出所有任务完成的任务
  • node xxx.js ls --status=doing: 列出所有进行中的任务
  • node xxx.js ls --status=todo
  • node xxx.js done 任务id: 将该id对应的任务置为完成状态
  • node xxx.js todo 任务id
  • node xxx.js doing 任务id
  • 下面的我省略node xxx.js:
  • delete 任务id
  • add 任务内容
    。。。自行想象添加功能。。。

一些实现的细节:

  1. 利用js-yaml中的dump保存js对象到yaml文件
  2. 利用js-yaml中的load读取yaml文件到js对象
  3. 可以边写边加入es6语法来练习

最后声明

本练习真的只是为了你练习,主要是练习node,npm,js,es6,所以还是靠自觉完成,但是您的提交次数会作为我们评优的依据,完成了请推到你的分支

links

https://github.com/hduhelp/frontend_2021_pratice/

如何将yaml转为js对象: https://github.com/nodeca/js-yaml

每日一篇之yaml: http://www.ruanyifeng.com/blog/2016/07/yaml.html

每日一篇之es6: https://www.w3cschool.cn/escript6/escript6-827l37er.html ES6 简介_w3cschool

安利一本书https://es6.ruanyifeng.com/ ES6 入门教程

https://hduhelp21.yuque.com/staff-mhchbm/ergbdy/lobnc5

天气小组件入门

天气小组件入门

天气api

用的api是qweather
和风天气
qweather
api手册

我是蒟蒻

UI设计拉胯
使用世界上最好的js框架 vanilla js

已经实现的功能:

  • 获取实时气温 湿度 风向 风力 风速 大气压 能见度
  • 获取当前日期时间周几
  • 天气小图标
  • 3天天气预告
  • flex布局,适应设备

待实现功能:

  • 气温变化图表
  • 穿衣建议
  • darkmode
  • iconfont图标

通过这次小组件开发学会的东西:

  • flex的使用
  • fetch then promise (还是不会用抄的
  • 天气api的使用
  • json格式化处理
api请求格式
https://devapi.qweather.com/v7/weather/now?[请求参数]

必须参数 –location
必须参数 –key

返回数据例
// 北京实况天气 
// 商业版 https://api.qweather.com/v7/weather/now?location=101010100&key=你的KEY
// 开发版 https://devapi.qweather.com/v7/weather/now?location=101010100&key=你的KEY
{
  "code": "200",
  "updateTime": "2020-06-30T22:00+08:00",
  "fxLink": "http://hfx.link/2ax1",
  "now": {
    "obsTime": "2020-06-30T21:40+08:00",
    "temp": "24",
    "feelsLike": "26",
    "icon": "101",
    "text": "多云",
    "wind360": "123",
    "windDir": "东南风",
    "windScale": "1",
    "windSpeed": "3",
    "humidity": "72",
    "precip": "0.0",
    "pressure": "1003",
    "vis": "16",
    "cloud": "10",
    "dew": "21"
  },
  "refer": {
    "sources": [
      "Weather China"
    ],
    "license": [
      "commercial license"
    ]
  }
}
js例

function fetchwea() {
fetch(‘https://devapi.qweather.com/v7/weather/now?key=90304353392d4ea4ba00608cb2e7f9ae&location=101210101')
.then(res => res.json())
.then(json => {

  document.getElementById('temp').innerHTML=json.now.temp+"℃";

使用图标icon

图标api手册

document.getElementById('i').className='qi-'+json.now.icon;

这里json.now.icon会返回图标代码
导入图标css
改变HTML里 标签的class为qi-(图标代码)
就可以显示好看的图标啦~
images

最终效果

5CZo5V.png