Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color ...
分类:
其他好文 时间:
2018-06-08 14:30:30
阅读次数:
143
题目链接: https://www.luogu.org/problemnew/show/P1462 思路: 又是一道水题,很明显二分+最短路 而且这道题数据非常水,spfa有个小错误居然拿了91分还比正解快 我们二分金钱数,节点权值大于二分值的都不能走。二分中跑spfa,如果不能走到终点,即dis[ ...
分类:
其他好文 时间:
2018-06-08 14:22:30
阅读次数:
145
在页面中 对某一数值进行保留n位小数的操作JSTL的formatNumber 标签进行数值的四舍五入时,发现它竟然使用的是"4舍6入5奇偶"的算法. 要实现"四舍五入"的算法,只需要在原有值的基础上再加一个比要保留的小数位数多的较小的值:保留两位小数如下<fmt:formatNumber patte ...
分类:
其他好文 时间:
2018-06-08 14:10:56
阅读次数:
237
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate ...
分类:
其他好文 时间:
2018-06-08 14:08:55
阅读次数:
166
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number ...
分类:
其他好文 时间:
2018-06-08 00:49:05
阅读次数:
143
一、迭代器 它是一个带状态的对象,他能在你调用next()方法的时候返回容器中的下一个值,任何实现了__iter__和__next__()方法的对象都是迭代器,__iter__返回迭代器自身,__next__返回容器中的下一个值,如果容器中没有更多元素了,则抛出StopIteration异常,至于它 ...
分类:
编程语言 时间:
2018-06-07 23:08:31
阅读次数:
353
实现一个整数加法计算器(多个数相加):如:content = input("请输入内容:") 用户输入:5+9+6 +12+ 13,然后进行分割再进行计算。升级:用户输入不规范时如:5,5++,5=,jjjj,j+%+^,+6+9+k时让用户重新输入. while 1: content = inpu... ...
分类:
其他好文 时间:
2018-06-07 23:01:34
阅读次数:
401
int类型的变量存储值从-2147483648到2147483647 unsigned int类型的变量存储值从0到4294967295 short类型的变量存储值从-32768到32767 unsigned short类型的变量存储值从0到65535 char类型的变量存储值从-128到127un ...
分类:
编程语言 时间:
2018-06-06 23:41:36
阅读次数:
243
不得不吐槽一下,微信支付真坑,相比之下支付宝的支付开发就简单多了 直接上代码, 1、工具类PayCommonUtil 2、MD5Util(可以根据自己使用的jdk版本进行编写) 3、接下来是调用,这里只贴核心部分代码 最后要说的是千万要注意微信的参数大小写问题,一个接口一个样 条码支付很简单,下载d ...
分类:
微信 时间:
2018-06-06 15:21:52
阅读次数:
238