2024.3.19软件工程日报

news/发布时间2024/5/17 5:39:46

学习时间2h

代码量100

package com.example.text_five;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import java.util.Calendar;

public class Main extends AppCompatActivity {


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main3);


}

public void 打卡记录(View view) {

String account = getIntent().getStringExtra("account");
Intent intent = new Intent(this, View_records.class);
intent.putExtra("account", account);
startActivity(intent);
}


public void 打卡(View view) {

String account = getIntent().getStringExtra("account");
Intent intent = new Intent(this, Clock_in.class);
intent.putExtra("account", account);
startActivity(intent);

}
public void 分析(View view) {
Calendar calendar = Calendar.getInstance();
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);

// 判断当前系统日期是否为周五(Calendar.FRIDAY 对应值为6)
if (dayOfWeek == Calendar.FRIDAY) {
String account = getIntent().getStringExtra("account");
Intent intent = new Intent(this, analysis.class);
intent.putExtra("account", account);
startActivity(intent);
} else {
// 如果不是周五,给出提示或者执行其他操作
Toast.makeText(this, "今天不是周五,无法进行下列操作", Toast.LENGTH_SHORT).show();
}
}

public void 目标(View view) {
Calendar calendar = Calendar.getInstance();
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);

// 判断当前系统日期是否为周一(Calendar.SUNDAY 对应值为1,Calendar.MONDAY 对应值为2)
if (dayOfWeek == Calendar.MONDAY) {
String account = getIntent().getStringExtra("account");
Intent intent = new Intent(this, target.class);
intent.putExtra("account", account);
startActivity(intent);
} else {
// 如果不是周一,给出提示或者执行其他操作
Toast.makeText(this, "今天不是周一,无法进行下列操作", Toast.LENGTH_SHORT).show();
}
}










}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.ulsteruni.cn/article/04111671.html

如若内容造成侵权/违法违规/事实不符,请联系编程大学网进行投诉反馈email:xxxxxxxx@qq.com,一经查实,立即删除!

相关文章

拆解达文西内阻仪并分析电路

最近网上出现了一款名叫达文西的内阻测试仪,其实是一个表头,买回来需要自已焊接电池,价格很低,很受爱好者喜欢,因为本来不是专业人士,使用率和精确度要求都不高,今天我也入手了一个,拆解给大家看看,这是达文西内阻测试仪表头:再来看看之前网上数码管这款内阻仪表头内…

数据库getshell

数据库getshell mysql 拿sqli-labs实验 先弄环境 linux下: 下载sqli-labs到/var/www/html 开启apache2、mysql 连接mysql执行命令: create user sqlilab@localhost identified by sqlilab; GRANT ALL ON *.* TO sqlilab@localhost; set password for sqlilab@localhost = pas…

MYSQL主从同步原理

master的请求到达时会写入两个地方:写入到数据表 写入到binlog,此处主要写修改类型命令,select操作将不会被写入slave也有两个线程:读取主库的binlog,写入relay binlog 读取relay binlog 写入数据表和binlog(用于级联组建)进一寸有进一寸的欢喜。

HTTP请求报文

看到请求报文时问自己什么请求方法 GET 访问了哪个页面 /cms/show.php 传递了哪些参数 ?id=33请求报文POST /cms/admin/login.action.php HTTP/1.1 Host: 10.9.23.4 #目标主机ip Content-Length: 51 #正文长度 Cache-Control: max-age=0 Upgra…

协程与迭代器

自己实现unity的协程功能_c#实现类似unity的协程-CSDN博客 前天和同事聊天,聊起来协程,聊起原理,什么迭代器,什么MoveNext 几句话带过之后就算完了,事后再次想起,发现自己已经忘了具体细节,于是也打算写成博客,供自己以后回应 一句话概括 (yield外部的)(会运行的)代…

Pedagogic metalanguage of Harry Potter

✨The images below is all from Harry Potter.Prominence(visual) 2.Size:small 3.Sharpness foreground color:Harry is out of focus and the snake is in focus 4.Address(visual): indirect gaze 5.Angle: no angle 6.Distance/shot:close shot 💡In this picture,Harry…