- python是什么意思中文-在python中%是什么意思
编程大乐趣
Python中%有两种:1、数值运算:%代表取模,返回除法的余数。如:>>>7%212、%操作符(字符串格式化,stringformatting),说明如下:%[(name)][flags][width].[precision]typecode(name)为命名flags可以有+,-,''或0。+表示右对齐。-表示左对齐。''为一个空格,表示在正数的左侧填充一个空格,从而与负数对齐。0表示使用0填
- 番茄西红柿叶子病害分类数据集12882张11类别
futureflsl
数据集分类数据挖掘人工智能
数据集类型:图像分类用,不可用于目标检测无标注文件数据集格式:仅仅包含jpg图片,每个类别文件夹下面存放着对应图片图片数量(jpg文件个数):12882分类类别数:11类别名称:["Bacterial_Spot_Bacteria","Early_Blight_Fungus","Healthy","Late_Blight_Water_Mold","Leaf_Mold_Fungus","Powdery
- 2019-10-24
柒月的可可
今日上班无事,人又懒怠动,不知道如何打发这个下午,终于打开了。我大概是把当日记来写的。重庆的天气骤然凉了。早上出门的时候,满地都是落叶,脚踩上去,却是刚下过雨,叶子已润掉,走不出声响。白天在办公室不见天日,对温度也无甚感觉,晚上一个人回到家,屋子里窗户都开着,被冷风吹了一天,一迈进屋,便觉冷气森然。将近二十度的天气,竟要裹着毯子才觉温暖。再过一周,就到十一月。扛过十一月,就可以开暖气了。然而我真的
- 2024.8.22 Python,链表两数之和,链表快速反转,二叉树的深度,二叉树前中后序遍历,N叉树递归遍历,翻转二叉树
RaidenQ
python链表开发语言
1.链表两数之和输入:l1=[2,4,3],l2=[5,6,4]输出:[7,0,8]解释:342+465=807.示例2:输入:l1=[0],l2=[0]输出:[0]示例3:输入:l1=[9,9,9,9,9,9,9],l2=[9,9,9,9]输出:[8,9,9,9,0,0,0,1]昨天的这个题,用自己的办法写的麻烦的要死,然后刚才一看chat归类的办法,感觉自己像个智障。classListNode
- C语言代码练习(第十九天)
小小框架
C语言C语言重点练习c语言
今日练习:52、有一个已经排好序的数组,要求输入一个数后,按原来排序的规律将它插入数组中53、输出"魔方阵"。所谓魔方阵是指它的每一行,每一列和对角线之和均相等。54、找出一个二维数组中的鞍点,即该位置上的元素在该行上最大、在该列上最小。也可能没有鞍点。有一个已经排好序的数组,要求输入一个数后,按原来排序的规律将它插入数组中运行代码intmain(){intarr[11]={1,3,9,12,15
- 《 C++ 修炼全景指南:十 》自平衡的艺术:深入了解 AVL 树的核心原理与实现
Lenyiin
C++修炼全景指南技术指南c++数据结构stl
摘要本文深入探讨了AVL树(自平衡二叉搜索树)的概念、特点以及实现细节。我们首先介绍了AVL树的基本原理,并详细分析了其四种旋转操作,包括左旋、右旋、左右双旋和右左双旋,阐述了它们在保持树平衡中的重要作用。接着,本文从头到尾详细描述了AVL树的插入、删除和查找操作,配合完整的代码实现和详尽的注释,使读者能够全面理解这些操作的执行过程。此外,我们还提供了AVL树的遍历方法,包括中序、前序和后序遍历,
- leetcode刷题day19|二叉树Part07(235. 二叉搜索树的最近公共祖先、701.二叉搜索树中的插入操作、450.删除二叉搜索树中的节点)
小冉在学习
leetcode算法数据结构
235.二叉搜索树的最近公共祖先思路:二叉搜索树首先考虑中序遍历。根据二叉搜索树的特性,如果p,q分别在中间节点的左右两边,该中间节点一定是最近公共祖先,如果在同一侧,则递归这一侧即可。递归三部曲:1、传入参数:根节点,p,q,返回节点。2、终止条件:因为p,q一定存在,所以不会遍历到树的最底层,因此可以不写终止条件3、递归逻辑:如果p,q均小于root的值,递归调用左子树;如果p,q均大于roo
- 【86】喜欢“折腾”的余老师
亲亲鱼老师
“我们的进度会比其他班级慢一点,因为我们的实践作业会多一些,希望你们能够明白老师要求做的一切……第三单元学习写观察日记,为了学生体验感再强一些,我让孩子们种植大蒜,每天再写一篇观察日记。原本想着连续让孩子们观察六天就好,结果是六天结束了,孩子们因各种各样的原因,小蒜苗的生长各不相同,关键是真正长出绿色叶子的没几个,于是决定再继续观察几天……要问我为什么喜欢如此折腾?我想我能给的答案一定是为了所有的
- 前端CSS面试常见题
剑亦未配妥
前端面试前端css面试
边界塌陷盒模型有两种:W3C盒模型和IE盒模型,区别在于宽度是否包含边框定义:同时给兄弟/父子盒模型设置上下边距,理论上边距值是两者之和,实际上不是注意:浮动和定位不会产生边界塌陷;只有块级元素垂直方向才会产生margin合并margin计算方案margin同为正负:取绝对值大的值一正一负:求和父子元素边界塌陷解决父元素可以通过调整padding处理;设置overflowhidden,触发BFC子
- 闲适.诗意
飘雪的天堂
文/雪儿一个人的衰老是从丢失诗意开始的。当我们对清风明月不再心动,对一蔬一饭不再热爱,对一朝一暮不再珍重,在失去诗意的一刹那,人,便老了…秋将尽了。走上田野,一片萧条景象。许久不出来走路了,中午的阳光也不再热烈,只需秋风微微一吹,枯黄的叶子便从树上晃晃悠悠地飘下来。小河边的芦苇,轻摇着白色的羽毛,菖蒲围着河岸,吻水低语,与落叶诉说着秋天的故事。今年秋季由于雨水过多,大多田地被淹,转眼就要入冬,现在
- 2003-7-13-先胜“李一季”-(让左车马-黑列手炮)
夏目青樱
2003-7-13-【虎滩四战之三】先胜“李一季”-(让左车马-黑列手炮)1.炮二平五炮2平52.马二进三马8进73.兵三进一炮8进44.车一进一炮8平75.相三进一马2进36.兵七进一车1平27.炮八平七卒5进18.车一平四马3进5?9.车四进二炮7平510.车四平五车2进7?!11.炮五平八卒5进1?12.车五平八马5进413.炮七平五炮5进514.相七进五马4进515.车八平六车9平816.
- 鱼那么信任水, 水却煮了鱼
醉沐青年
鱼那么信任水,水却煮了鱼。叶子那么信任风,风却吹落了叶。人心的冷暖,总是一直变幻。熟悉的陌生了,陌生的走远了。人与人之间,全靠一颗心,情与情之间,全凭一寸真。落叶知秋,落难知友!人生不易,且行且珍惜。人生是一个过程,像朝阳至日暮,又好像春花、夏夜、秋日、冬雪,一年四季的轮换。如果把短短几十年的人生分为两部分,那就是上半场和下半场。人生的上半场讲“升”:升学历升职位升业绩升财富比上升!而下半场却讲“
- 凌乱的季节在成都+花卉素描
浮萍叶儿
成都的春天短的厉害,没有享受过几天春风拂面就着急的进入了炎炎夏日。在这个凌乱的季节,人们的穿衣也是不知所措的。在大街上,有的人穿着针织衫,有人穿着短袖,有人穿着小皮鞋,有人穿着凉拖。春天离开成都也就意味着夏日的狂风暴雨即将来临,犹记得雨中行人被吹翻在地,被风雨拖着滑行,记得雨中荷花娇艳欲滴,记得乌云翻滚遮盖天幕,记得都江堰的水翻腾不息。成都又迎来了这个有个性的季节!线稿线稿叶子明暗关系图片发自Ap
- 苔花如米小,也学牡丹开2023-05-09
金声说今事
抱孩子在楼下的空地处玩,凳子后面是一排修剪整齐的绿色灌木,一年四季都绿油油的嗡嗡嗡嗡嗡嗡,坐下没一会就发现灌木丛中有好多蜜蜂咋回事呢蜜蜂在绿叶中找什么,难道是谁漏了这么多蜜蜂在这,看看也没发现什么呀不理它,继续逗女儿玩,蜜蜂越来越多,在绿叶间上下穿梭,为啥这么多蜜蜂呢,还是按捺不住好奇心凑近去看,平平常常的绿叶子,没啥特别的呀,那为啥会有这么多的蜜蜂呢?我就不信了,顺着蜜蜂飞行的方向,盯着其中一只
- 多表查询_关联查询
活跃家族
sql
innerjoin:通常关联项on后面的是主外键,两个表都有的才显示leftjoin:左连,select*fromSleftjoinBons.字段=B.字段,一定会将左边表的数据全部查询出来rightjoin:select*fromSrightjoinBons.字段=B.字段一定会将右边表的数据全部查询出来索引:增加查询效率,数据量很大的时候,提高查询速度,当给表加索引之后,重新插入数据,就会让索
- 二胎(二)
梦中雅致
今天宝宝三十周了,还有十周你就要出来了,也许会提前,妈妈和家人都很期待。到了孕晚期,睡觉是个问题,左睡右睡都不对,自己睡的不舒服,自己舒服了,宝宝不舒服,睡着了怕把宝宝压着了,一晚上还要起来上厕所两次,感觉一晚上就是半梦半醒中。每天早上起来的第一件事就是感觉宝宝的胎动,如果没动心里就发慌。最近宝宝的胎动有些跟大宝不一样,偶尔会抖动一下,像手机震动一下,不知道咋回事?在网上查了一下,好多有这种情况,
- 坤燕亲子日记第1063之和孩子讲述妈妈小时候的故事
坤燕_634c
坤燕亲子日记第1063之和孩子讲述妈妈小时候的故事亲子共读记录之小猪2101天共读时间:睡前共读时长:50分钟共读书目:中国历史5数字家园英文动画片猜猜我有多爱你亲子共读记录之阳阳12年+201天诗一首道德经第47章睡前聊天早上读诗,中午读史,晚上读经,我真是太幸福了,托两个孩子的福得以重新上一次学,读一读诗歌,讲一讲历史,还能读经。中午读史时,阳走开了会儿,我还是继续读,小猪说,先别读,等姐姐来
- 0053/1000 天才少年 画圣拉斐尔
坚持坚持再坚持00
1.首先带你看看拉斐尔,“三杰”中最年轻的一位。他可是个不折不扣的“少年天才”。为什么这么说?拉斐尔曾经在当时的名家佩鲁吉诺门下学画,经过短短几年的学习就青出于蓝,他在21岁时画的《圣母的婚礼》,就已经超越了老师。左:拉斐尔《圣母的婚礼》右:佩鲁吉诺《圣母的婚礼》2.拉斐尔在艺术史上留下的最杰出的形象,就是圣母。之前很多画作,都把圣母作为一个宗教象征,表现得在受苦受难。拉斐尔却把圣母拉回了人间,画
- C++[USACO06NOV] Fence Repair G合并果子
龙眠客
[USACO06NOV]FenceRepairG合并果子题目描述在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成一堆。每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过n-1n−1次合并之后,就只剩下一堆了。多多在合并果子时总共消耗的体力等于每次合并所耗体力之和。因为还要花大力气把这些果子搬回
- 20220505成就感日志125/365
kidII
奋斗是人生的底色,你会经历很多人事物,学会更多的东西。从学习上掌握技能,从学习上享受生活,即便是辛苦也没有关系,生活没有不辛苦的,但是要辛苦的有意义。与其说平凡的过一辈子,不如吃苦耐劳,选择自己喜欢的生活,一点点的付出,积累很多的经验,未来才会有希望。虽然我们渴望成就感,但也需要平衡生活,让自己越来越幸福。1.【日思】:今日最重要的一件事情。调整(训练4h,4.2k+卡片笔记写作法5h+粥左罗直播
- leecode100题-双指针-三数之和
JianminZheng
C++学习笔记算法
给你一个整数数组nums,判断是否存在三元组[nums[i],nums[j],nums[k]]满足i!=j、i!=k且j!=k,同时还满足nums[i]+nums[j]+nums[k]==0。请你返回所有和为0且不重复的三元组。答案中不可以包含重复的三元组。示例1:输入:nums=[-1,0,1,2,-1,-4]输出:[[-1,-1,2],[-1,0,1]]解释:nums[0]+nums[1]+n
- 养鱼开缸记录2 水草和鱼食到了
林璃Lily
4月7日晚上冒雨拿了4家的快递,水草和鱼饲料等一些养鱼备用品到了。水草包括大叶水榕、铁皇冠,还有一棵浮萍:圆心萍。水草今晚花了很多时间清洗水草,以及和卖家沟通:因为叶片压断了很多,几乎没什么叶子了,而且铁皇冠很矮小,不符合描述。断叶清洗了三遍还比较多。买的是根部包裹在一坨水草泥里面的坨草,但是可能只是加了个重物底座,至少水榕是直接绑在底座外面的,卖家也承认了。水草号称13厘米高的铁皇冠草,只有最长
- 44:5月份要做的5件事
任正飞人性营销
2018.5.1日日更第44天说过的放假三天认真看书的,然而左推右推的,东忙西忙的,最后就剩下今天晚饭后才开始拿起书本看看,一看一发不可收拾,一直到了12点,不忍睡觉,最终连日更也没完成!据说犹太人一年平均看65本书,也就是一个月平均5-6本左右,而中国人一年也看不了5本书,不说别人,想想自己也确实是如此!可能在过去的几年,每年平均2本书有没有?(平时阅读的文章除外)难怪每每下笔,都词穷,更没建立
- 来猜谜语啦13120
今思迟
【每日释谜一选】13113谜面:二三好友俱英豪(贺铸词句)谜底:交结五都雄释谜byz:会意法“二三”之和是“五”;好友:结交的好朋友,扣“交结”;“俱”扣“都”;“英豪”,英雄豪杰,扣“雄”。组成贺铸的《六州歌头·少年侠气》中的诗句——“交结五都雄”得底。【今思迟】制谜条数已达:13120每日增加五谜,你可直接拉到最后阅读。13081谜面:十有八九爱西湖(字)13082谜面:转宫刑之耻成史家之绝(
- 【数据结构和算法实践-树-LeetCode113-路径总和Ⅱ】
NeVeRMoRE_2024
数据结构与算法实践数据结构算法leetcodeb树
数据结构和算法实践-树-LeetCode113-路径总和Ⅱ题目MyThought代码示例JAVA-8题目给你二叉树的根节点root和一个整数目标和targetSum,找出所有从根节点到叶子节点路径总和等于给定目标和的路径。叶子节点是指没有子节点的节点输入:root=[5,4,8,11,null,13,4,7,2,null,null,5,1],targetSum=22输出:[[5,4,11,2],[
- 2022-07-15
大亲亲
做个女人好难,首先是孩子,不知道别人家的娃是什么样的,反正我的娃和我相处时,最难得是写作业,但凡写作业就是非逼我出手不可,我肯定是想让他臣服,乖乖听话去写作业,但是他写作业的前戏特别多,左摸摸右看看,超级不情不愿的开始动笔,一旦动了笔,就身上虱子就开始飞扬,抓耳扰腮。做一件事情的时候,他的身体不停的动,这是什么原因呢?比如他再背乘法口诀,手就在柜子上摸来摸去,脚踢打打,嘴巴还是在说乘法口诀的内容,
- 看见,看不见
郝志阳
我们终将浑然难分,像水溶于水中。我一直想写点什么来表达一下这20天的经历,算是突破了自己,可以放空去做一件事,这20天见过了很多人,也经历了一些事,我始终认为,人在底层生存线挣扎,最可怕的是无意识,活着就是为了生计,一个月2500块的工资第一年一直到第三年,从未改变过。累,身体累到腿根本抬不起来,紧绷的神经一刻都不敢松弛,这也许就是穷忙吧。就像叶子从痛苦的蜷缩中要用力舒展一样,人也要从不假思索的蒙
- 【十一】【SQL】外连接(左外连接,右外连接)
妖精七七_
数据库SQL数据库sql
数据库中的外连接(OuterJoin)用于连接两个表,并包括两个表中的匹配行以及左表(LEFTJOIN)或右表(RIGHTJOIN)中未匹配的行。外连接分为两种主要类型:左外连接(LEFTOUTERJOIN):返回左表(FROM子句中第一个表)的所有行,即使在右表中没有匹配的行。如果右表中没有匹配的行,则结果集中右表的部分将包含NULL值。右外连接(RIGHTOUTERJOIN):返回右表(JOI
- 《出苍茫》 三六二 上古暴龙
佛朗西斯_阿道克
“我在光明城西门的主力损失过半,你终于要出手了。希望你不要让我失望。”海德伯格牢牢的看着塞丹,在自己的心里说道。塞丹整了整自己的魔法长袍,将帽子拉了拉,将自己的脸罩得更加严实,然后他的手中凭空幻化出一支一人多高的魔法杖。这根魔法杖是用白骨制成的,在魔法杖的顶端是一个人类的骷髅,在骷髅的两个眼眶里镶嵌着两枚红色的宝石。这让本就很诡异的骷髅看起来更加的狰狞可怖。塞丹一抖袍袖,露出了自己瘦骨嶙峋的枯槁左
- 2023-05-08
悟空金月饺子
恢复跑步一直想恢复跑步,锻炼一下气力,减掉一些体重。天气终于好起来了,果然第一天跑步,身体就各种抱怨。特别是跑到3公里的时候,左胸开始针扎一样的疼。跑着跑着就舒服了,最后两公里还是格外享受的。跑完出些汗,神清气爽。计算又是一个小问题,卡住了好久,快2周了。感觉到了冲关的阶段,需要百分百的专注,用我最最愚蠢的专注。侦查五一结束最后和月月看了一场话剧,儿艺的“侦查”。儿艺是在南锣鼓巷附近的菊儿胡同。南
- mongodb3.03开启认证
21jhf
mongodb
下载了最新mongodb3.03版本,当使用--auth 参数命令行开启mongodb用户认证时遇到很多问题,现总结如下:
(百度上搜到的基本都是老版本的,看到db.addUser的就是,请忽略)
Windows下我做了一个bat文件,用来启动mongodb,命令行如下:
mongod --dbpath db\data --port 27017 --directoryperdb --logp
- 【Spark103】Task not serializable
bit1129
Serializable
Task not serializable是Spark开发过程最令人头疼的问题之一,这里记录下出现这个问题的两个实例,一个是自己遇到的,另一个是stackoverflow上看到。等有时间了再仔细探究出现Task not serialiazable的各种原因以及出现问题后如何快速定位问题的所在,至少目前阶段碰到此类问题,没有什么章法
1.
package spark.exampl
- 你所熟知的 LRU(最近最少使用)
dalan_123
java
关于LRU这个名词在很多地方或听说,或使用,接下来看下lru缓存回收的实现
1、大体的想法
a、查询出最近最晚使用的项
b、给最近的使用的项做标记
通过使用链表就可以完成这两个操作,关于最近最少使用的项只需要返回链表的尾部;标记最近使用的项,只需要将该项移除并放置到头部,那么难点就出现 你如何能够快速在链表定位对应的该项?
这时候多
- Javascript 跨域
周凡杨
JavaScriptjsonp跨域cross-domain
 
- linux下安装apache服务器
g21121
apache
安装apache
下载windows版本apache,下载地址:http://httpd.apache.org/download.cgi
1.windows下安装apache
Windows下安装apache比较简单,注意选择路径和端口即可,这里就不再赘述了。 2.linux下安装apache:
下载之后上传到linux的相关目录,这里指定为/home/apach
- FineReport的JS编辑框和URL地址栏语法简介
老A不折腾
finereportweb报表报表软件语法总结
JS编辑框:
1.FineReport的js。
作为一款BS产品,browser端的JavaScript是必不可少的。
FineReport中的js是已经调用了finereport.js的。
大家知道,预览报表时,报表servlet会将cpt模板转为html,在这个html的head头部中会引入FineReport的js,这个finereport.js中包含了许多内置的fun
- 根据STATUS信息对MySQL进行优化
墙头上一根草
status
mysql 查看当前正在执行的操作,即正在执行的sql语句的方法为:
show processlist 命令
mysql> show global status;可以列出MySQL服务器运行各种状态值,我个人较喜欢的用法是show status like '查询值%';一、慢查询mysql> show variab
- 我的spring学习笔记7-Spring的Bean配置文件给Bean定义别名
aijuans
Spring 3
本文介绍如何给Spring的Bean配置文件的Bean定义别名?
原始的
<bean id="business" class="onlyfun.caterpillar.device.Business">
<property name="writer">
<ref b
- 高性能mysql 之 性能剖析
annan211
性能mysqlmysql 性能剖析剖析
1 定义性能优化
mysql服务器性能,此处定义为 响应时间。
在解释性能优化之前,先来消除一个误解,很多人认为,性能优化就是降低cpu的利用率或者减少对资源的使用。
这是一个陷阱。
资源时用来消耗并用来工作的,所以有时候消耗更多的资源能够加快查询速度,保持cpu忙绿,这是必要的。很多时候发现
编译进了新版本的InnoDB之后,cpu利用率上升的很厉害,这并不
- 主外键和索引唯一性约束
百合不是茶
索引唯一性约束主外键约束联机删除
目标;第一步;创建两张表 用户表和文章表
第二步;发表文章
1,建表;
---用户表 BlogUsers
--userID唯一的
--userName
--pwd
--sex
create
- 线程的调度
bijian1013
java多线程thread线程的调度java多线程
1. Java提供一个线程调度程序来监控程序中启动后进入可运行状态的所有线程。线程调度程序按照线程的优先级决定应调度哪些线程来执行。
2. 多数线程的调度是抢占式的(即我想中断程序运行就中断,不需要和将被中断的程序协商)
a) 
- 查看日志常用命令
bijian1013
linux命令unix
一.日志查找方法,可以用通配符查某台主机上的所有服务器grep "关键字" /wls/applogs/custom-*/error.log
二.查看日志常用命令1.grep '关键字' error.log:在error.log中搜索'关键字'2.grep -C10 '关键字' error.log:显示关键字前后10行记录3.grep '关键字' error.l
- 【持久化框架MyBatis3一】MyBatis版HelloWorld
bit1129
helloworld
MyBatis这个系列的文章,主要参考《Java Persistence with MyBatis 3》。
样例数据
本文以MySQL数据库为例,建立一个STUDENTS表,插入两条数据,然后进行单表的增删改查
CREATE TABLE STUDENTS
(
stud_id int(11) NOT NULL AUTO_INCREMENT,
- 【Hadoop十五】Hadoop Counter
bit1129
hadoop
1. 只有Map任务的Map Reduce Job
File System Counters
FILE: Number of bytes read=3629530
FILE: Number of bytes written=98312
FILE: Number of read operations=0
FILE: Number of lar
- 解决Tomcat数据连接池无法释放
ronin47
tomcat 连接池 优化
近段时间,公司的检测中心报表系统(SMC)的开发人员时不时找到我,说用户老是出现无法登录的情况。前些日子因为手头上 有Jboss集群的测试工作,发现用户不能登录时,都是在Tomcat中将这个项目Reload一下就好了,不过只是治标而已,因为大概几个小时之后又会 再次出现无法登录的情况。
今天上午,开发人员小毛又找到我,要我协助将这个问题根治一下,拖太久用户难保不投诉。
简单分析了一
- java-75-二叉树两结点的最低共同父结点
bylijinnan
java
import java.util.LinkedList;
import java.util.List;
import ljn.help.*;
public class BTreeLowestParentOfTwoNodes {
public static void main(String[] args) {
/*
* node data is stored in
- 行业垂直搜索引擎网页抓取项目
carlwu
LuceneNutchHeritrixSolr
公司有一个搜索引擎项目,希望各路高人有空来帮忙指导,谢谢!
这是详细需求:
(1) 通过提供的网站地址(大概100-200个网站),网页抓取程序能不断抓取网页和其它类型的文件(如Excel、PDF、Word、ppt及zip类型),并且程序能够根据事先提供的规则,过滤掉不相干的下载内容。
(2) 程序能够搜索这些抓取的内容,并能对这些抓取文件按照油田名进行分类,然后放到服务器不同的目录中。
- [通讯与服务]在总带宽资源没有大幅增加之前,不适宜大幅度降低资费
comsci
资源
降低通讯服务资费,就意味着有更多的用户进入,就意味着通讯服务提供商要接待和服务更多的用户,在总体运维成本没有由于技术升级而大幅下降的情况下,这种降低资费的行为将导致每个用户的平均带宽不断下降,而享受到的服务质量也在下降,这对用户和服务商都是不利的。。。。。。。。
&nbs
- Java时区转换及时间格式
Cwind
java
本文介绍Java API 中 Date, Calendar, TimeZone和DateFormat的使用,以及不同时区时间相互转化的方法和原理。
问题描述:
向处于不同时区的服务器发请求时需要考虑时区转换的问题。譬如,服务器位于东八区(北京时间,GMT+8:00),而身处东四区的用户想要查询当天的销售记录。则需把东四区的“今天”这个时间范围转换为服务器所在时区的时间范围。
- readonly,只读,不可用
dashuaifu
jsjspdisablereadOnlyreadOnly
readOnly 和 readonly 不同,在做js开发时一定要注意函数大小写和jsp黄线的警告!!!我就经历过这么一件事:
使用readOnly在某些浏览器或同一浏览器不同版本有的可以实现“只读”功能,有的就不行,而且函数readOnly有黄线警告!!!就这样被折磨了不短时间!!!(期间使用过disable函数,但是发现disable函数之后后台接收不到前台的的数据!!!)
- LABjs、RequireJS、SeaJS 介绍
dcj3sjt126com
jsWeb
LABjs 的核心是 LAB(Loading and Blocking):Loading 指异步并行加载,Blocking 是指同步等待执行。LABjs 通过优雅的语法(script 和 wait)实现了这两大特性,核心价值是性能优化。LABjs 是一个文件加载器。RequireJS 和 SeaJS 则是模块加载器,倡导的是一种模块化开发理念,核心价值是让 JavaScript 的模块化开发变得更
- [应用结构]入口脚本
dcj3sjt126com
PHPyii2
入口脚本
入口脚本是应用启动流程中的第一环,一个应用(不管是网页应用还是控制台应用)只有一个入口脚本。终端用户的请求通过入口脚本实例化应用并将将请求转发到应用。
Web 应用的入口脚本必须放在终端用户能够访问的目录下,通常命名为 index.php,也可以使用 Web 服务器能定位到的其他名称。
控制台应用的入口脚本一般在应用根目录下命名为 yii(后缀为.php),该文
- haoop shell命令
eksliang
hadoophadoop shell
cat
chgrp
chmod
chown
copyFromLocal
copyToLocal
cp
du
dus
expunge
get
getmerge
ls
lsr
mkdir
movefromLocal
mv
put
rm
rmr
setrep
stat
tail
test
text
- MultiStateView不同的状态下显示不同的界面
gundumw100
android
只要将指定的view放在该控件里面,可以该view在不同的状态下显示不同的界面,这对ListView很有用,比如加载界面,空白界面,错误界面。而且这些见面由你指定布局,非常灵活。
PS:ListView虽然可以设置一个EmptyView,但使用起来不方便,不灵活,有点累赘。
<com.kennyc.view.MultiStateView xmlns:android=&qu
- jQuery实现页面内锚点平滑跳转
ini
JavaScripthtmljqueryhtml5css
平时我们做导航滚动到内容都是通过锚点来做,刷的一下就直接跳到内容了,没有一丝的滚动效果,而且 url 链接最后会有“小尾巴”,就像#keleyi,今天我就介绍一款 jquery 做的滚动的特效,既可以设置滚动速度,又可以在 url 链接上没有“小尾巴”。
效果体验:http://keleyi.com/keleyi/phtml/jqtexiao/37.htmHTML文件代码:
&
- kafka offset迁移
kane_xie
kafka
在早前的kafka版本中(0.8.0),offset是被存储在zookeeper中的。
到当前版本(0.8.2)为止,kafka同时支持offset存储在zookeeper和offset manager(broker)中。
从官方的说明来看,未来offset的zookeeper存储将会被弃用。因此现有的基于kafka的项目如果今后计划保持更新的话,可以考虑在合适
- android > 搭建 cordova 环境
mft8899
android
1 , 安装 node.js
http://nodejs.org
node -v 查看版本
2, 安装 npm
可以先从 https://github.com/isaacs/npm/tags 下载 源码 解压到
- java封装的比较器,比较是否全相同,获取不同字段名字
qifeifei
非常实用的java比较器,贴上代码:
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
i
- 记录一些函数用法
.Aky.
位运算PHP数据库函数IP
高手们照旧忽略。
想弄个全天朝IP段数据库,找了个今天最新更新的国内所有运营商IP段,copy到文件,用文件函数,字符串函数把玩下。分割出startIp和endIp这样格式写入.txt文件,直接用phpmyadmin导入.csv文件的形式导入。(生命在于折腾,也许你们觉得我傻X,直接下载人家弄好的导入不就可以,做自己的菜鸟,让别人去说吧)
当然用到了ip2long()函数把字符串转为整型数
- sublime text 3 rust
wudixiaotie
Sublime Text
1.sublime text 3 => install package => Rust
2.cd ~/.config/sublime-text-3/Packages
3.mkdir rust
4.git clone https://github.com/sp0/rust-style
5.cd rust-style
6.cargo build --release
7.ctrl