- 关于提高复杂业务逻辑代码可读性的思考
编程经验分享
开发经验java数据库开发语言
目录前言需求场景常规写法拆分方法领域对象总结前言实际工作中大部分时间都是在写业务逻辑,一般都是三层架构,表示层(Controller)接收客户端请求,并对入参做检验,业务逻辑层(Service)负责处理业务逻辑,一般开发都是在这一层中写具体的业务逻辑。数据访问层(Dao)是直接和数据库交互的,用于查数据给业务逻辑层,或者是将业务逻辑层处理后的数据写入数据库。简单的增删改查接口不用多说,基本上写好一
- 为了那一个约定
王书朋
我和我的学生说好了,不管遇到什么,都要一起努力,这是我们刚遇见时留下的记忆,到现在刚好一年过去。在本周一,我做了一个简单的询问,想看一看经过一个漫长的假期,还有几个人记得努力,所以我一个人一个人的问下去。我所问的内容,就是你有没有记日记和进行课外阅读,两个班将近一百名学生,在我没有要求的情况下。主要是上个学期我们遇到了特殊情况,还没来得及做出要求,就已经进入了假期,因此阴差阳错,为我制造了检验学生
- Golang Channel
PandaSkr
golang
Channel解析1.Channel源码分析1.1Channel数据结构typehchanstruct{qcountuint//channel的元素数量dataqsizuint//channel循环队列长度bufunsafe.Pointer//指向循环队列的指针elemsizeuint16//元素大小closeduint32//channel是否关闭0-未关闭elemtype*_type//元素类
- 11 数组——88. 合并两个有序数组 ★★
趣学算法
力扣经典刷题100例算法数据结构leetcode数组合并有序数组
11数组88.合并两个有序数组给你两个按非递减顺序排列的整数数组nums1和nums2,另有两个整数m和n,分别表示nums1和nums2中的元素数目。请你合并nums2到nums1中,使合并后的数组同样按非递减顺序排列。注意:最终,合并后数组不应由函数返回,而是存储在数组nums1中。为了应对这种情况,nums1的初始长度为m+n,其中前m个元素表示应合并的元素,后n个元素为0,应忽略。nums
- 练就理论联系实际的真功夫
TBC
理论联系实际是中国共产党的三大作风之一,理论从实际中来,要到实际中去。理论不是唯一的真理,理论要在现实中接受实践的检验,才能更好地指导实践,理论脱离实际就会变成一种僵硬的教条,茶杯硬套锅盖,风马牛不相及。理论从实际中来,并接受实践的检验。理论是一种经验总结,是我们的指导手册,引导我们的方向盘,它能指引我们在贯彻落实工作中少走弯路。理论是前人阶段性工作的经验总结,它使得我们能站在“巨人的肩膀”上更为
- 晨语问安2022年1月3日
求索大伟
『晨语问安1.3』实践出真知,实践是检验真理的。实践,毋庸置疑是检验能力、验证自我最有力的工具,而恰恰实践或称为行动,却是自身前行的最大的弱项,借用最亲近的人说我的一句话“不会用剩余生命陪我慢慢变好”,由此可见,执行力在我身上是何其弱小。同时,这与自己一直标榜积极向上的精神状态南辕北辙,越走越远。问题清楚呈现,改变刻不容缓,重点在于执行,绝非和风细雨,而应立竿见影,更要坚持不懈。早安,开心一天。[
- 制衣厂的故事13
记忆里的角落
我们的主任是一位胖美人,她别的本事没有,就会在我们面前摆官腔架子。“L码的衣服是谁验的,这么一大块脏污都没看加啊?你们验货闭着眼吗?”没说我们眼瞎不是她厚道,而是我们跟她斗争得来的结果,嗯,还算满意。她拿着一件衣服,站在包装车间跟我们车间相连的门边上对着我们高声喊,板娘就在她身后的包装车间陪着客户检验货。我们心里别提有多反感这种拿腔捏调,还没等有人回答,啪唧,衣服老远扔过来落在小刘前面。我使了个眼
- C# Tuple、ValueTuple
語衣
C#知识补充c#
栏目总目录TupleTuple是C#4.0引入的一个新特性,主要用于存储一个固定数量的元素序列,且这些元素可以具有不同的类型。Tuple是一种轻量级的数据结构,非常适合用于临时存储数据,而无需定义完整的类或结构体。优点简便性:可以快速创建一个包含多个不同类型数据的对象,而无需定义新的类或结构体。灵活性:元素数量和类型在编译时确定,但可以在不同上下文中重复使用不同元素的Tuple。缺点性能:作为引用
- LeetCode移除元素
山雀~
LeetCode合集leetcode算法职场和发展
题目描述给你一个数组nums和一个值val,你需要原地移除所有数值等于val的元素。元素的顺序可能发生改变。然后返回nums中与val不同的元素的数量。假设nums中不等于val的元素数量为k,要通过此题,您需要执行以下操作:更改nums数组,使nums的前k个元素包含不等于val的元素。nums的其余元素和nums的大小并不重要。返回k。解题思路通过遍历数组,将不等于val的元素复制到数组的前面
- Python二级系列(四):键盘输入两个整数,最小值和最大值,按要求输出两个整数之间的所有素数
shadowtalon
Python二级Pythonpython
素数又称质数,是指除了1和它本身以外不能被其他整数整除的数。lower=int(input("输入区间最小值:"))upper=int(input("输入区间最大值:"))fornuminrange(lower+1,upper):ifnum>1:foriinrange(2,num):if(num%i)==0:breakelse:print(num)
- 2022-03-28打开格局,勇敢背黑锅
心源之园
在例会上,老板批评了我和另外一个部门的负责人,原因是我们给客户的报价是在询价的一周后才给出。老板希望是24小时内给出报价。让我们两个部门反思检讨。经过几天的内心挣扎和思想斗争,最终我还是给老板写了深刻检讨的邮件,承认主要责任,并提出了几项优化部门间合作流程的方案计划。美国作家菲茨杰拉德说:检验一流智力的标准,就是看你能不能在头脑中同时存在两种相反的想法,还维持正常行事的能力。我觉得这也可以用于评判
- 食品检验师职业资格试题附答案
安建资小栗子
其他
1、酸碱指示剂的变色原理是(C)。(A)随pH改变,指示剂离解常数改变,发生色变(B)随pH改变,指示剂结构发生改变,引起色变(C)随pH改变,指示剂起化学反应,引起色变:(D)随pH改变,指示剂发生物理化学反应,引起色变2、下列哪种微生物具有典型细胞核结构(C)。(A)沙门氏菌(B)桔青霉菌(C)葡萄球菌(D)大肠杆菌3、两种生物生活在一起,互相依赖,互相利用的这种关系称为(A)。(A)共生(B
- python卡方检验计算pvalue值_Python数据科学:卡方检验
CodeWhiz
之前已经介绍的变量分析:①相关分析:一个连续变量与一个连续变量间的关系。②双样本t检验:一个二分分类变量与一个连续变量间的关系。③方差分析:一个多分类分类变量与一个连续变量间的关系。本次介绍:卡方检验:一个二分分类变量或多分类分类变量与一个二分分类变量间的关系。如果其中一个变量的分布随着另一个变量的水平不同而发生变化时,那么两个分类变量就有关系。卡方检验并不能展现出两个分类变量相关性的强弱,只能展
- python 卡方检验_Python-卡方检验
cunzai1985
pythonnumpy数据分析机器学习数据挖掘
python卡方检验Python-卡方检验(Python-Chi-SquareTest)Chi-Squaretestisastatisticalmethodtodetermineiftwocategoricalvariableshaveasignificantcorrelationbetweenthem.Boththosevariablesshouldbefromsamepopulationand
- 【Python・统计学】威尔科克森符号秩检验/Wilcoxon signed-rank test(原理及代码)
TUTO_TUTO
统计学pythonpython学习笔记
前言自学笔记,分享给对统计学原理不太清楚但需要在论文中用到的小伙伴,欢迎大佬们补充或绕道。ps:本文不涉及公式讲解(文科生小白友好体质)~(部分定义等来源于知乎百度等)本文重点:威尔科克森符号秩检验(英文名:Wilcoxonsigned-ranktest)【1.简单原理和步骤】【2.应用条件】【3.数据实例以及Python代码】1.简单原理和步骤威尔科克森符号秩检验是一种非参数检验的方法,需要数据
- 【Python・统计学】Kruskal-Wallis检验/H检验(原理及代码)
TUTO_TUTO
python统计学python学习笔记
前言自学笔记,分享给对统计学原理不太清楚但需要在论文中用到的小伙伴,欢迎大佬们补充或绕道。ps:本文不涉及公式讲解(文科生小白友好体质)~(部分定义等来源于知乎百度等)本文重点:Kruskal-Wallis检验(Kruskal-Wallistest),也称H检验【1.定义和简单原理】【2.应用条件】【3.数据实例以及Python代码】【4.多重比较(例:Dunn检验)】1.定义和简单原理Krusk
- 【Python・统计学】单因素方差分析(简单原理及代码)
TUTO_TUTO
统计学pythonpython学习笔记
前言自学笔记,分享给对统计学原理不太清楚但需要在论文中用到的小伙伴,欢迎大佬们补充或绕道。ps:本文不涉及公式讲解(文科生小白友好体质)~本文重点:单因素方差分析(以下:方差分析)【1.方差分析简单原理和前提条件】【2.方差分析和t检验的区别】【3.方差分析代码(配对/独立+事后检验+效应量)】1.方差分析简单原理方差分析(ANOVA)又称“变异数分析”或“F检验”,是由罗纳德·费雪爵士发明的,用
- 【统计学】参数检验和非参数检验的区别和基本统计学
TUTO_TUTO
统计学pythonpython
前言自学笔记,分享给对统计学原理不太清楚但需要在论文中用到的小伙伴,欢迎大佬们补充或绕道。ps:本文不涉及公式讲解(文科生小白友好体质)~本文重点:参数检验和非参数检验的区别以及对应的常用统计学方法(这是需要根据自己的数据类型搞清楚用哪种统计学方法的关键)【1.参数检验】【2.非参数检验】【3.参数检验和非参数检验的区别】【4.常用统计学方法】1.什么是参数和参数检验参数(parameter)的概
- TCP和UDP的区别
life_binary
Linux网络编程
TCP和UDP都是传输层的协议TCP面向连接的、可靠地、数据流服务UDP无连接的、不可靠的、数据报服务那么为什么TCP可靠,为什么UDP不可靠呢?也就是是什么保证了TCP是可靠的呢?共有四点原因:1、TCP保证数据都能到达对端。是通过应答确认机制和超时重传机制来保证的。2、TCP保证数据有序。TCP的每一个报文段都有序号3、TCP保证数据不失真。TCP报头有16位的冗余检验码4、滑动窗口和拥塞控制
- Java后端面试高频问题:HashMap的底层原理
2401_84408267
程序员java面试开发语言
④如果该位置不为null,则判断key是否一样(hashCode和equals),如果一样则直接覆盖value⑤如果key不一样,则判断该元素是否为红黑树的节点,如果是,则直接在红黑树中插入键值对⑥如果不是红黑树的节点,则就是链表,遍历这个链表执行插入操作,如果遍历过程中若发现key已存在,直接覆盖value即可。如果链表的长度大于等于8且数组中元素数量大于等于阈值64,则将链表转化为红黑树,(先
- 【SWUST Online Judge】C语言《程序设计基础》作业三(1287、1288题)
保证安全,保证寿终正寝
算法c++数据结构
〇、前言学姐纯粹是为爱发电,整理不易。所以小可爱们动动小手,点个免费的赞吧~以防找不到本文,收藏本文也完全不吃亏哟~一、题目列表链接指路:1.1287:怎么借书2.1288:素数二、题目与题解(一)1287:怎么借书题目描述小明有n本书,他的好朋友小红、小新、小林想向小明借书,若每人只能借一本书,可以有多少种不同的借法?输入一个整数n,代表书的序号为1、2、……、n.输出用A,B,C分别代表三个好
- 《华为人力资源理论》读书笔记
龚_温暖的弦
整理一下目录主要选看了全员赋能,市场实践和检验,权益分配三部分全员赋能市场实践和检验权益分配
- 检验爱情其实不用去旅游,一起煮顿饭吃就知道了
书生的英雄联萌
大家好,又是我,我是书生。一个勤奋更新的书生~~~最近有2天没有更新了,前天是身体不舒服,躺了好久,连面试都没有去,可怜的我;然后昨天好了点,就跑去浪,浪完以后又跑回家,这回家的人群,真的可怕。搞到我还以为今天是中秋呢??然后退了晚点了两个小时的车票,晚上8点搭地铁+滴滴,终于回到我大南海,然后告诉我24才是中秋,那高速提前2天塞了?有人说,检验爱情吧,一起去趟旅游吧。不用看,肯定是某些旅游营销号
- 成为我自己—41生病的获益
心喜欢生0003
昨天晚上观摩精分咨询,我感受到了来访生病的获益。但我也感受到了咨询师的愤怒,我感觉咨询师有一点对这个公益咨询的愤怒,不知道是不是我的投射?但我又觉得这个愤怒是社会化的一部分,咨询最终是需要成长的,需要放进社会的大熔炉里检验。我觉察了一下自己的愤怒:这是我对父母的恨意。一直以来我都有勇气恨我的父亲,却一直没有勇气恨我的母亲,因为她为这个家庭付出了太多;可是这付出,也是命运的一部分啊。我一直记得八岁那
- C++ 非类型的模板参数
xupeng1644
C/C++
对于函数模板和类模板,模板参数并不局限于类型,普通值也可以作为模板参数。文章目录非类型的类模板参数非类型的函数模板参数非类型模板参数的限制总结非类型的类模板参数#includetemplateclassStack{private:intelems[MAXSIZE];//包含元素数组intnumElems;//元素的当前个数public:Stack();//构造函数voidpush(Tconst&)
- 03月26日长光培训嵌入式学习第四十七天课设第一天
长光培训_王任
早上接到钟老师的通知周日答辩!!这意味着终于到了对这几个月来学习成果的检验时刻。一周的时间完成智能家居嵌入式系统的开发,将课程所学内容进行融合和综合应用,也是对从理论到实践的一次能力提升之旅。今天主要的任务是明确自身要完成的功能,进行管脚及各种通信协议的统筹分配与全局规划,为后几天的编译做好准备工作。好的开头是成功的一半,对于准备工作一定要做到认真细致,只有这样才会让自己在后面几天中能够按照计划有
- 光明的前奏
坤哥1022
图片发自App早上十点来钟,应是大白天,没想到突然天气急转直下,乌云密布,大风吹得路旁的花花和树叶沙沙响,接着雨噼噼啪啪地下起来,犹如“世界末日”。路上行人匆匆赶路,狼狈而慌乱。怎么啦?是上天动怒了?谁做了坏事?该是上天的脾气来了,再不收手,将是更大的惩罚。大风劲吹,考验着花花的根基,清理着树上的枯枝和黄叶;检验着树枝的团结与坚强;锻炼着鸟儿的起飞反应。大雨鞭打着窗户,是给违法犯科者的警告,还是对
- OpenCV高阶操作
富士达幸运星
opencv人工智能计算机视觉
在图像处理与计算机视觉领域,OpenCV(OpenSourceComputerVisionLibrary)无疑是最为强大且广泛使用的工具之一。从基础的图像读取、1.图片的上下,采样下采样(Downsampling)下采样通常用于减小图像的尺寸,从而减少图像中的像素数。这个过程可以通过多种方法实现,但最常见的是通过图像金字塔中的pyrDown函数(在OpenCV中)或其他类似的滤波器(如平均池化、最
- 助梦语录句句入魂020
助梦飞飞
1.有些路,不走,不甘心,走了,满身伤痕,人生或许就这样吧,无论怎么选择都有遗憾,无论怎么精心策划,都抵不过命运的安排。2.人生本就是一场孤独的成长,没有多少人会陪你一直走到散场。时间检验了人性,验证了人心。它能告诉你什么样的东西是经久耐用的,什么样的人是可以历久弥新的。3.心不死,则道不生,心有一切有,心空一切空,心迷一切迷,心悟一切悟,心邪一切邪,心正一切正,心乱一切乱!一切为心造,无心自解脱
- 2022-11-03
平白书
一、每日感谢1、今天去体检,排队进医院的时候,结识了一位排在我后面的阿姨。阿姨68岁了,来做65岁以上福利体检。原本以为和不相熟的人没什么好说的,但不然,要看碰到的是谁。我和阿姨聊了二十分钟,许多观点不谋而合。像对检验数据的看法。我们提到是不是应该每年一次深度体检。阿姨说不用太看重检验数据的正常区间,其实每个人的情况都不一样,最重要是自己要感觉舒服。“参考数据范畴”仅仅是参考。再就是对死亡的看法。
- 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