days

星期

时光总嘲笑我的痴心妄想 提交于 2019-12-01 13:23:39
#include <stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(days<=5&&days>=1) printf("学习\n"); else if(days==7||days==6) printf("休息\n"); else printf("Ooops, not in 1~7\n"); return 0; } 来源: https://www.cnblogs.com/ras123/p/11688277.html

ex2

我是研究僧i 提交于 2019-12-01 11:54:55
#include<stdio.h> int main() { int days; printf("please input:\n"); scanf("%d",&days); if(days>=1||days<=5) printf("workdays,fighting\n"); else if(days==6||days==7) printf("weekend,relax~\n"); else printf("Oops,not in 1~7\n"); getchar(); return 0; } 来源: https://www.cnblogs.com/faspk/p/11684295.html

Getting the number of days between two dates in java [duplicate]

本小妞迷上赌 提交于 2019-12-01 10:55:30
问题 This question already has answers here : Calculating the difference between two Java date instances (45 answers) Calculate date/time difference in java [duplicate] (17 answers) Closed 6 years ago . Hi have two dates in date format, how do i get the difference of days between the two ? Date date1; Date date2 ; int numberDays = ? 回答1: The recommendation is to use JodaTime API for Dates: import java.util.logging.Logger; import org.joda.time.DateTime; import org.joda.time.Duration; import org

python:日期计算

醉酒当歌 提交于 2019-12-01 10:10:21
python语言中的datetime模块可以利用其中的方法获取不同的日期,比如获取当前日期、明天、昨天、上个月、下个月和明年。下面利用几个实例说明这些日期的获取方法,操作如下: 第一步,利用datetime模块获取当前日期 datetime.date.today(); 如下图所示: 第二步,获取当前日期前一天日期,利用当前日期减去一天,如下图所示: 第三步,获取当前日期后一天日期,利用当前日期加上一天,如下图所示: 第四步,获取当前日期下一个月日期,利用当前日期加上30天,如下图所示: 第五步,获取当前日期上一个月的日期,利用当前日期减去30天,如下图所示: 第六步,获取当前日期返回明年今天的日期,利用当前日期加上365天,如下图所示: # -*- coding: utf-8 -*- #----------------------------------------------------------------------------------- import datetime #获取366天前的日期 day=(datetime.date.today() - datetime.timedelta(days=366)).strftime('%Y-%m-%d') print(day) #获取366天后的日期 day=(datetime.date.today() + datetime

Flex 4 DateChooser

 ̄綄美尐妖づ 提交于 2019-12-01 08:26:06
问题 I have an Array of days. I want those days to have a different background-color in the DateChooser component, say red. How can I do that please? 回答1: The DateChooser isn't that easy to customise! Something close to this will work, though you'll need to tweak it somewhat to suit what you want to do. public class FancyDateChooser extends DateChooser { public var fancyStyleName : String; public var dayToMakeFancy : String; protected override createChildren() : void { super.createChildren(); var

Bad Price —— 初学的思考

若如初见. 提交于 2019-12-01 06:18:25
Description: Polycarp analyzes the prices of the new berPhone. At his disposal are the prices for n last days: a1,a2,…,an, where ai is the price of berPhone on the day i. Polycarp considers the price on the day i to be bad if later (that is, a day with a greater number) berPhone was sold at a lower price. For example, if n=6 and a=[3,9,4,6,7,5], then the number of days with a bad price is 3 — these are days 2 (a2=9), 4 (a4=6) and 5 (a5=7). Print the number of days with a bad price. You have to answer t independent data sets. Input: The first line contains an integer t (1≤t≤10000) — the number

Oracle 解决无法生成Snapshot问题

和自甴很熟 提交于 2019-12-01 05:34:49
1. 概述 Specify the number of days of snapshots to choose from ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Entering the number of days (n) will result in the most recent (n) days of snapshots being listed. Pressing <return> without specifying a number lists all completed snapshots. Enter value for num_days: 2 Listing the last 2 days of Completed Snapshots Snap Instance DB Name Snap Id Snap Started Level ------------ ------------ --------- ------------------ ----- orcl ORCL 4759 29 Mar 2028 17:04 1 现象:查看snapshot生成历史,发现很长一段时间都没有生成snapshot 这是一个开发数据库,经过和开发沟通,由于业务测试经常修改操作服务器系统时间。 原因分析

以友好的方式展示时间

a 夏天 提交于 2019-12-01 04:37:06
package com.industry.base.util; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; /** * 以友好的方式展示时间 * * @author z * @date 2018/3/31 13:53 */ public class TimeFriendlyUtil { private final static ThreadLocal<SimpleDateFormat> dateFormater2 = new ThreadLocal<SimpleDateFormat>() { @Override protected SimpleDateFormat initialValue() { return new SimpleDateFormat("yyyy-MM-dd"); } }; private static final int SEC = 1000; private static final int MIN = 60000; private static final int HOUR = 3600000; private static final int DAY = 86400000; /**

docker 停止服务 部署服务

微笑、不失礼 提交于 2019-12-01 02:56:04
//显示所有容器 一个容器只管理一个服务 即使容器挂掉也不会影响其他容器的服务 做到业务之间不影响root@river-NUC8i7HNK:/# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e8cfcbe6a280 etl-online:1.0 "java -Djava.securit…" About an hour ago Up About an hour 0.0.0.0:8070->8070/tcp etl-online_etl-online_1 377db9b29f0f web:3.0 "java -Djava.securit…" 11 days ago Up 11 days 0.0.0.0:30003->30003/tcp web_power_1 cf44fc608372 power:2.0 "java -Djava.securit…" 11 days ago Up 11 days 0.0.0.0:8000->30001/tcp power_power_1 4f951b13e170 etl:2.0 "java -Djava.securit…" 2 weeks ago Up 2 weeks 0.0.0.0:8090->8090/tcp etl_power_1 524d7d7ae738

获取当前日期及对应星期

跟風遠走 提交于 2019-12-01 02:31:11
var myDate = new Date(); var year = myDate.getFullYear(); //年 var month = myDate.getMonth() + 1; //月 var day = myDate.getDate(); //日 var days = myDate.getDay(); switch (days) { case 1: days = '星期一'; break; case 2: days = '星期二'; break; case 3: days = '星期三'; break; case 4: days = '星期四'; break; case 5: days = '星期五'; break; case 6: days = '星期六'; break; case 0: days = '星期日'; break; } console.log(year + "年" + month + "月" + day + "日 " + days) 来源: https://www.cnblogs.com/xiaoxiao2017/p/11648269.html