today

HDU Today HDU - 2112

匿名 (未验证) 提交于 2019-12-02 22:59:29
用的map映射为整数,后面就和普通的最短路一样的,注意头文件。 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <stack> #include <queue> #include <map> using namespace std ; #define inf 10000000 int a [ 505 ][ 505 ], book [ 505 ], dis [ 505 ]; int n , m ; char b [ 35 ], c [ 35 ]; int flag ; void init () { n = 0 ; flag = 0 ; memset ( book , 0 , sizeof ( book )); for ( int i = 0 ; i <= 155 ; i ++){ for ( int j = 0 ; j <= 155 ; j ++){ a [ i ][ j ]= inf ; } } map < string , int > station ; station . clear (); scanf ( "%s%s" , b , c ); if ( strcmp ( b , c )== 0 ){ flag = 1 ;

Sparksql 日期加减函数

独自空忆成欢 提交于 2019-12-02 10:55:15
spark sql 日期加减,date_sub,date_addval dateDF=spark.range(10) .withColumn("today",current_date()) .withColumn("now",current_timestamp()) dateDF.createOrReplaceTempView("dateTable") dateDF.printSchema() dateDF.select(date_sub(col("today"),5),date_add(col("today"),5)).show(1) spark.sql("select date_sub(today,5),date_add(today,5) from dateTable").show(1) 来源: https://www.cnblogs.com/ssqq5200936/p/11742290.html

javaSpring学习总结day_01

蹲街弑〆低调 提交于 2019-12-01 12:47:19
本文章用于总结自己学习知识,有不足或错误之处清谅解。 bean.xml 文件的读取方式:   ClassPathXmlApplicationContext: 它是只能加载类路径下的配置文件 推荐    1.加载配置文件:      ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");    2.根据bean的id获取对象      ICustomerService cs1 = (ICustomerService) ac.getBean("customerService");   FileSystemXmlApplicationContext: 它是可以加载磁盘任意位置的配置文件 Bean创建的两种规则:   BeanFactory: 提供的是一种延迟加载思想来创建bean对象。即:bean对象什么时候用,什么时候创建   ApplicationContext: 提供的是一种立即加载思想来创建bean对象。即:只要一解析完配置文件,就创建bean对象       1.获取容器      ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");      2.根据bean的id获取对象  

按系统日期生成目录

99封情书 提交于 2019-12-01 08:26:50
# more PMFileCreat.sh #!/bin/bash today=$(date '+%Y%m%d') mkdir /opt/$today #ls -lrt /opt/dayFiles/PM*|tail -6|awk '{print $9}'|xargs -i cp {} ./$today/ cd /opt/dayFiles/ ls -lrt PM*|tail -6|awk '{print $9}'|xargs -i cp {} /opt/$today/ 来源: https://www.cnblogs.com/leisurelyRD/p/11673013.html

wdatepicker默认时间为当前时间

不打扰是莪最后的温柔 提交于 2019-12-01 01:42:53
$(document).ready(function() { alert(today()); document.getElementById( "serviceTime" ).value = today(); }); function today(){ var today= new Date(); var h=today.getFullYear(); var m=today.getMonth()+1; var d=today.getDate(); var hh=today.getHours(); var mm=today.getMinutes(); var ss=today.getSeconds(); m= m<10? "0" +m:m; d= d<10? "0" +d:d; hh = hh < 10 ? "0" + hh:hh; mm = mm < 10 ? "0" + mm:mm; ss = ss < 10 ? "0" + ss:ss; return h+ "-" +m+ "-" +d+ " " +hh+ ":" +mm+ ":" +ss; } 来源: https://www.cnblogs.com/wylngg/p/11646356.html

1891-2100年php日历代码

…衆ロ難τιáo~ 提交于 2019-11-30 03:26:12
<?php /* * 1891-2100年 农历 节气 节日 */ header("Content-Type:text/html;charset=utf-8"); class Lunar { var $MIN_YEAR = 1891; var $MAX_YEAR = 2100; var $lunarInfo = array( array(0,2,9,21936),array(6,1,30,9656),array(0,2,17,9584),array(0,2,6,21168),array(5,1,26,43344),array(0,2,13,59728), array(0,2,2,27296),array(3,1,22,44368),array(0,2,10,43856),array(8,1,30,19304),array(0,2,19,19168),array(0,2,8,42352), array(5,1,29,21096),array(0,2,16,53856),array(0,2,4,55632),array(4,1,25,27304),array(0,2,13,22176),array(0,2,2,39632), array(2,1,22,19176),array(0,2,10,19168),array(6,1,30,42200),array(0,2,18,42192)