很实用的一个小程序(日历)

SolidWorks中怡合达FA插件安装配置与标准件高效调用指南 在非标自动化设备设计中,标准件类型繁多、规格复杂,工程师常面临三维模型下载繁琐、格式不统一、选型参数核对耗时等痛点。FA标准件作为自动化设备的基础组成单元,其高效调用直接关系到项目整体进度。借助三维模型库集成工具,可将选型数据与SolidWorks设计环境深度打通,实现从规格查询、模型加载到装配体插入的全流程操作。这类插件不仅缩短了模型获取时间,更通过统一的模型命名和基准面定义,提升了装配体质量与BOM提取准确性。在实际工程中,合理配置插件环境并制定标准化调用规范,可显著降低设计返工率,助力企业实现供应链资 阅读详情
package java320;


import java.util.Scanner;


public class P3 {


public static void main(String[] args) {


Scanner input =new Scanner(System.in); 定义键盘输入缓存区
System.out.print("请输入年份:");
int s=input.nextInt();
System.out.print("请输入月份:");
int s1=input.nextInt();
System.out.println("\t\t    "+s+"年"+s1+"月");
cal(s,s1);

}

/**
* 判断指定年是否闰年
* @param year 年份
* @return 
*/

public static boolean isr(int year){ 判断闰年
return (year%400==0) ||(year%100!=0 && year%4==0);
}

/**
* 求指定年的天数
* @param year 年份
* @return
*/

public static int daysInYear(int year){ 得到天数
if(isr(year)){
return 366;
}else{
return 365;
}
}

/**
* 指定年份和月份,获取该月份的天数
* @param year
* @param month
* @return
*/

public static int daysInMonth(int year,int month){
int r=31;
switch(month){ 每个月的天数
case 2:
if(isr(year)){
r=29; 平年和闰年2月份所代表的天数
}else{
r=28;
}
break;
case 4:
case 6:
case 9:
case 11:
r=30;
break;
}
return r;
}

/**
* 获取指定年月份的第一天是星期几
* @param year
* @param month
* @return 1-7 星期日--星期六
*/

public static int getFirstWeekDayOfMonth(int year,int month){
以1900 1.1为例得以下公式
int days=0;
//到前一年年底一共多少天
for(int y=1900;y<year;y++){
days+=daysInYear(y);
}
//今年的前一个月底一共多少天
for(int m=1;m<month;m++){
days+=daysInMonth(year,m);
}
days+=1;
//2017 3
int w=days%7;
return w+1;
}

/**
* 打印日历
* @param year
* @param month
*/

public static void cal(int year,int month){
System.out.println("日\t一\t二\t三\t四\t五\t六");
int w=getFirstWeekDayOfMonth(year,month);
int cnt=0;
for(int i=1;i<w;i++){
System.out.print("\t");
cnt++;
}


for(int i=1;i<=daysInMonth(year,month);i++){
System.out.print(i);
System.out.print("\t");
cnt++;
if(cnt%7==0)

System.out.println();

}
}

效果图
}
微信小程序之打卡日历 本文为原创作品,引用请注明出处,欢迎转载。 生活中有各种可以打卡的app,例如背单词打卡什么的,本人觉得很有意思,于是本人在大二时做了一款诚信状打卡的微信小程序,这里讲述一下编写的过程。 先说一下开发环境:用的是微信web开发工具开发的,后台采用了Bmob后台,比较方便。 先展示一下成果: 话不多说,直接上代码,里面也有挺多的注释,以防自己忘记,当然各位如果直接复制过去肯定不能有当... 阅读详情

相关推荐

vscode远程开发-调试模式下attach远程进程提示管理员权限失败的问题

vscode 远程开发 附加进程

comhaqs的专栏 2878

日历生成程序

使用C语言代码生成某年某月日历

wangzhicheng2013的专栏 347

解密UFS Explorer:Drobo BeyondRAID数据恢复实战指南

本文详细介绍了使用UFS Explorer Professional Recovery软件中的Drobo BeyondRAID助手进行数据恢复的完整实战流程。当Drobo设备因BeyondRAID配置信息丢失而无法访问时,该工具能安全、只读地扫描硬盘,虚拟重建存储池,帮助用户找回宝贵数据。指南涵盖了从前期准备、硬盘选择、配置扫描到数据安全导出的每一步关键操作与常见问题解决方案。

weixin_29219539的博客 270

C语言学习记录——一个简单的日历表程序的编写

用C语言实现输出当月日历的功能

weixin_48647669的博客 3275

Zynq7000混合启动方案:QSPI Flash引导与eMMC ext4文件系统部署实战

本文详细介绍了Zynq7000平台的混合启动方案,结合QSPI Flash引导与eMMC ext4文件系统部署,解决嵌入式Linux系统启动可靠性与大容量存储需求。通过硬件连接配置、分区规划、Petalinux工程配置及实战部署步骤,帮助开发者高效实现系统优化,提升启动速度和文件系统性能。

weixin_29190169的博客 447

TOD和PPS精确时间同步技术

授时

u010783226的专栏 1万+

Python 学习 ——懒人日志提醒小程序(欢迎指点和批评)

总是忘记每天填写工作日志,记录当天工作内容。学习了Python后,我用简单的基础代码编制了一个小程序。个人认为学习编程,就需要不断的寻找项目,没有项目创造项目,这样才能不断地丰富自己的编程技术。

a20888的博客 567

PICO+Unity MR空间网格开发实战:从零构建透视交互场景

本文详细介绍了使用PICO 4 Ultra与Unity引擎进行MR空间网格开发的完整实战流程。从环境准备、项目初始化、核心组件配置,到空间网格的生成、可视化与物理交互实现,手把手教你构建一个能识别真实环境并发射虚拟小球的透视交互场景。文章重点解析了PICO SDK中空间网格功能的关键配置与优化技巧,并提供了真机部署与调试的实用指南。

e3f4g5的博客 490

Python 学习 ——懒人日志提醒小程序(欢迎指点和批评)(1)

根据主文件输入的日期,判断是星期几,并生成weekday属性。输入日志内容,检查是否输错,调用t.py。借用别人编写的,生成excel文件。

2401_84010744的博客 446

R语言线性混合模型(LMM)分析

它将数据表示为固定效应和随机效应的线性组合,其中固定效应表示总体均值的影响,随机效应表示个体间的随机差异。LMM的目标是通过最大似然估计或最小二乘估计来估计模型中的固定效应和随机效应的参数。LMM结合了固定效应和随机效应,能够同时考虑个体间和个体内的变异,并适用于具有相关性的数据。目前在使用LMM的R语言包中,较常用的是lme4和nlme包,它们提供了丰富的函数和工具来拟合和分析线性混合模型。面板数据分析:LMM适用于分析具有面板结构的数据,如经济学中的面板数据或教育研究中的学生评估数据。

走向CTO的路上... 2969

rk3568 修改开机动画

bootanimation.zip是一个Android设备启动时播放的动画文件,它包含了一系列的图片和描述文件,用于描述动画的播放顺序和持续时间。

weixin_35723192的博客 2728

python 日程(待办事项) 提醒简单小程序——基于Timer和tkinter

python日程(待办事项)提醒——基于Timer和tkinter

weixin_54967057的博客 5617

1.为什么要学习MATLAB

学习MATLAB

FPGA/MATLAB学习教程/源码/项目合作开发 5807

练手小程序——Java日历小程序

日历小程序 功能 查看当前日期所在月份的日历 输入年份和月份,显示指定年月的日历 实现日历的翻页功能 界面类 public class UI { public void u_1() { System.out.println(&quot;\t 日历小程序\n&quot;); System.out.println(&quot;**************...

冷漠的小猿 2022

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

Java 日历的小程序

Java写的日历小程序,算法效率虽然不算很高,却是简单实用的 CalendarBean.java importjava.util.Calendar; publicclassCalendarBean { Stringday[]; intyear=2005,month=0;...

weixin_34327223的博客 169

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

日历代码(微信小程序)

wxml代码:` &lt;!--wxml--&gt; &lt;!--日历,记录女性月经周期--&gt; &lt;view class="calendar"&gt; &lt;!--年份和月份--&gt; &lt;view class="flex calendar-choose"&gt; &lt;!--图标--&gt; &lt;view class="pr

Miss Stone的博客 3680

小程序 房租水电费记录管理_5款时间管理微信小程序,个个都暗藏惊喜

大家精心挑选了一批手机必备小程序,有实用高效的小工具,也有好玩有趣的小惊喜,总之就是体验感一级棒!赶紧来看看吧!01、番茄闹钟一款有助于改善时间管理的微信小程序,可以用来记录在某件事上耗费的时间,也可以用来实践最近比较流行的“番茄工作法”从而大大提高工作效率。小程序可提供工作、学习、思考、写作、运动、阅读等共计六种模式,并且每一项都能提供详细的数据统计。另外小程序的背景音我也很喜欢,比如淅淅沥沥的...

weixin_34340606的博客 2091

写一个java程序的分析思路,很适合新手

 使用Java写一个日历小程序-思路  先显示一下结果:<img onclick="function onclick(){get_larger(this)}" src="http://img.ddvip.com/2009_02_16/1234772470_ddvip_5566.jpeg" alt="用Java写一个日历小程序-思路" />  基本功能: 

841

Java学习笔记——Java基础

Java基础 方法的重载 重载就是在一个类中,有相同的函数名称,但形参不同的函数 重载的规则: 方法名称必须相同 参数列表必须不同(如个数不同,类型不同,排列不同等) 方法的返回类型可以相同也可以不相同 仅仅返回类型不同不足以成为方法重载 public class Demo02 { public static void main(String[] args) { int max=max(10,10); //方法调用 double large=max(20.4,25.9

Echo_Wish 249

【作业潜伏记之年后惊魂】

摘要:本文介绍了一个名为"蓁心相伴"的寒假作业打卡小程序,采用微信小程序云开发技术,帮助家长和孩子管理寒假作业。系统包含家长端和孩子端,支持任务创建、多种打卡方式、积分激励和称号升级等功能。技术架构采用微信原生框架+云开发,包含用户认证、任务管理、打卡审核等模块,通过轮询机制实现实时更新。小程序设计注重数据安全和性能优化,提供完整的寒假作业管理解决方案,让家长和孩子共同参与学习过程,避免开学前的"作业惊魂"。(149字)

472

教你如何写一个符合自己需求的小程序日历组件

很多时候,我们生活中会有各种打卡的情况,比如 keep 的运动打卡、单词的学习打卡和各种签到打卡或者酒店的入住时间选择,这时候就需要我们书写一个日历组件来处理我们这种需求。但是更多时候,我们都是网上找一个插件直接套用了,有没有想过自己实现一下呢?如果有,但是感觉不太会的话,接下来跟着我一起实现符合自己需求的日历吧。

Noah_ZX的博客 4791

不知道有哪些日历小程序的,看这里!

最近很多小伙伴都在问我哪些天气小程序是比较好用的,还有不知道有哪些日历小程序的,看这里啦! 一、天天预约日历 天天预约日历简单的来说就是一个备忘录,您只需要在上面挑选一个日期,选择好时间,填上您那天想要做的事情,按下确定就可以了,然后到了您设定好日期的那天那个时间,天天预约日历小程序就会提醒您该做这件事情了。比如您在2019.06.09这个日期要出门旅游,您需要乘坐当天11:30的高铁出发,那...

ahfangming的专栏 2509

小程序---小程序实现日历打卡功能

打卡日历页面存在展示35个或42个日期数据的情况,35个或42个日期数据=当前显示月所有日期数据+上月残余尾部日期+下月残余头部日期。 通过数据库查询当前已打卡的数据,已打卡的数据需要设置打卡按钮禁用标志。打卡按钮禁用的情况(1)页面初始化时,未点击任何日期(2)当前点击的日期在今天之后(3)当前日期在今天之前但已打卡。 点击打卡,记录打卡日期并保存至数据库。

maidu_xbd的博客 1万+

微信小程序日历的实现

微信小程序日历的实现,含demo演示和源码地址

一只前端汪的分享 2万+

小程序打卡日历

小程序日历打卡

开发路上的AZhe 2365
上一篇: java基础中的小细节,值得一看
下一篇: 扫雷小程序(非界面)
让程序飞
博客等级 码龄10年 8831粉丝 99原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

让程序飞

您的鼓励将是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值