- 121. 买卖股票的最佳时机
薄荷糖的味道_fb40
给定一个数组,它的第i个元素是一支给定股票第i天的价格。如果你最多只允许完成一笔交易(即买入和卖出一支股票),设计一个算法来计算你所能获取的最大利润。注意你不能在买入股票前卖出股票。示例1:输入:[7,1,5,3,6,4]输出:5解释:在第2天(股票价格=1)的时候买入,在第5天(股票价格=6)的时候卖出,最大利润=6-1=5。注意利润不能是7-1=6,因为卖出价格需要大于买入价格。示例2:输入:
- TextFiled 中输入金额
宁梓茞
要求:输入的金额不能超过六位,小数点后面只能输入两位小数如果textFIled中第一位输入的是0,后面必须输入小数点,否则禁止输入用到textfiled代理方法#pragmamark----textFiledDelegate-----(BOOL)textField:(UITextField*)textFieldshouldChangeCharactersInRange:(NSRange)range
- JAVA·一个简单的登录窗口
MortalTom
java开发语言学习
文章目录概要整体架构流程技术名词解释技术细节资源概要JavaSwing是Java基础类库的一部分,主要用于开发图形用户界面(GUI)程序整体架构流程新建项目,导入sql.jar包(链接放在了文末),编译项目并运行技术名词解释一、特点丰富的组件提供了多种可视化组件,如按钮(JButton)、文本框(JTextField)、标签(JLabel)、下拉列表(JComboBox)等,可以满足不同的界面设计
- 保证RTOS线程安全的常规操作
WittXie
单片机嵌入式硬件
线程安全定义原子操作:一种不可分割的操作,要么完全执行成功,要么完全不执行,不能被打断临界区:一段代码,这段代码需要在同一时间只允许一个线程执行互斥锁:一种用于保护共享资源的机制,确保同一时间只有一个线程可以访问特定资源应用裸机原子操作/临界区可以通过暂时关闭中断响应实现一般用不到互斥锁RTOS原子操作:暂时关闭中断响应+挂起所有应用(不建议,RTOS尽量不要开启中断,改为线程监听)临界区:挂起所
- 【面试】嵌入式面试常见题目收藏(超总结)_嵌入式面试题目及答案
2401_83641314
程序员嵌入式
16.死锁的4个必要条件答:1、互斥:某种资源一次只允许一个进程访问,即该资源一旦分配给某个进程,其他进程就不能再访问,直到该进程访问结束。2、占有且等待:一个进程本身占有资源(一种或多种),同时还有资源未得到满足,正在等待其他进程释放该资源。3、不可抢占:别人已经占有了某项资源,你不能因为自己也需要该资源,就去把别人的资源抢过来。4、循环等待:存在一个进程链,使得每个进程都占有下一个进程所需的至
- Python二级系列(一):将整数转化为二进制、八进制和十六进制(大写)
shadowtalon
Python二级Pythonpython
num=eval(input('请输入数字:'))print('对应的二进制数:{0:b}\n八进制数:{0:o}\n十六进制数:{0:X}'.format(num))
- 流量牵引技术与传统防火墙的区别
666IDCaaa
ddos
在网络安全领域,流量牵引技术和传统防火墙都起着重要的作用,但它们在很多方面存在着明显的区别。一、工作原理不同传统防火墙主要是通过设置访问控制规则来过滤网络流量。它基于预先设定的策略,对进入和离开网络的数据包进行检查,根据源地址、目的地址、端口号等信息决定是否允许数据包通过。例如,企业可以设置防火墙规则,只允许特定IP地址的设备访问内部网络资源,或者禁止某些端口的流量进入,以防止潜在的攻击。而流量牵
- 点对点协议PPP和CSMA/CD协议的区别
一只嵌入式爱好者
计算机网络
一般网民常见的ppp协议应该叫PPPoE,即是PPPoverEthernet,由于有验证身份的功能,所以可以用来在你家的路由器上向运营商认证你家宽带账号密码。CSMA/CD是一个二层协议,主要应用在半双工的以太网线路中控制数据冲突。因为半双工的以太网本身同时只允许一个方向传输数据,所以为了防止双方某个时刻同时传输数据导致的冲突,就引入了csma/cd协议。个人理解,有不对的地方欢迎指正PPP协议是
- 栈区-----顺序栈------队列
(笑)z
数据结构
栈栈(Stack)是一种遵循后进先出(LIFO,LastInFirstOut)原则的有序集合。这种数据结构只允许在栈顶进行添加(push)或删除(pop)元素的操作。换句话说,最新添加的元素会被最先移除。栈的这种特性使得它在多种编程和应用场景中非常有用,比如函数调用、括号匹配、表达式求值、页面访问历史等。只允许从一端进行数据的插入和删除的线性存储结构顺序栈:类似数组满增栈,满减栈,空增栈,空减栈空
- 连通无向图一般中心的算法及其matlab程序详解
夏天天天天天天天#
图论算法matlab图论
#################本文为学习《图论算法及其MATLAB实现》的学习笔记#################若服务点只允许取在各顶点上,而服务对象却取在各顶点及各边(或弧)上的点,则在所有顶点中选定一个顶点作为图的一般中心其条件是该点离它本身的最远服务对象(包括顶点及各边(或弧)上的点)的距离达到极小值。寻找无向图的一般中心对解决网络最佳服务点确定的问题是十分有效的,使得服务对象的范围
- pandas loc与iloc的区别
authorized_keys
数据处理pythonpandaslociloc
目录一、二者的特点二、官网原文三、例子——总有一款适合你一、二者的特点loc可用“字符”、“整数”、“布尔值”作为索引,也就是标签索引注意:此处的“整数”将被解释为index的一个label而不是index的位置iloc只允许“整数”作为索引,也就是位置索引,和列表索引类似,里面只能是数字注意:此处的“整数”将被解释为index的位置,前闭后开其中,loc是指location的意思,iloc中的i
- websocket
aabbccQBB
websocket网络协议网络
1、概念是一种在单个TCP连接上进行全双工通信的协议。websocket使得客户端和服务器之间的数据交换变得更加简单,允许服务端主动向客户端推送数据。在WebSocketAPI中,浏览器和服务器只需要完成一次握手,两者之间就直接可以创建持久性的连接,并进行双向数据传输。单工通信:数据传输只允许在一个方向上传输,只能一方发送数据,另一方接收数据并发送。半双工:数据传输允许两个方向上的传输,但在同一时
- 【C++】std::forward_list
data_structure_wr
C++语言windows
std::forward_list:std::forward_list是C++标准库中的一个单向链表容器。与std::list相比,std::forward_list只允许单向遍历,即只能从前往后访问元素。它的实现比std::list更轻量,因此在内存和性能方面通常更优,但缺少双向访问的能力。特性单向链表:std::forward_list只包含指向下一个元素的指针,不包含指向前一个元素的指针。非
- “蓝桉已遇释槐鸟,不爱万物唯爱你。”
Venni
有这么一种树名叫蓝桉,有毒且霸道,会杀死身边的全部植物,但只允许一种鸟栖息在上面,那种鸟的名字就叫红嘴蓝鹊,别称长山鹊,亦为释槐鸟。所以就有着我的温柔和爱,只是对你一个人,我不爱这世间万物,我只爱你。蓝桉的花语也是非常特别的,花语就是孤独和寂寞,它还有另外一个花语为霸道,我的温柔,只对你一人。这句“蓝桉已遇释槐鸟”是一个表白小套路,即“蓝桉已遇释槐鸟下一句是什么,去搜,那是我想对你说的话”。“蓝桉
- [918]python使用yaml模块
周小董
Python前行者
yaml文件介绍yaml是一个专门用来写配置文件的语言。1.yaml文件规则区分大小写;使用缩进表示层级关系;缩进时不允许使用Tab键,只允许使用空格;缩进的空格数目不固定,只需要相同层级的元素左侧对齐;文件中的字符串不需要使用引号标注,但若字符串包含有特殊字符则需用引号标注;#表示注释,从这个字符一直到行尾,都会被解析器忽略,这个和python的注释一样2.yaml文件数据结构对象:键值对的集合
- Flutter TextField - onChanged 值不会实时更新
小f要努力啦
Flutterflutter
问题:今天用Flutter模拟一个登录注册,在判断账号和密码的时候发现即使TextField写了onChanged,绑定的值却不会实时更新。随便打几个字也不会显示不符合账号设定的条件,从print也看出来和输入框绑定的变量的值一直没有更新解决方法:在onChange下再加上setState函数,就可以实现实时更新了child:TextField(onChanged:(value){setState
- 消失的双屿港
北方竹子
明朝的时候,实行禁海政策,以嘉靖时期最为严厉。巨额暴利的海外贸易刺激着葡萄牙商人纷纷出海,开拓海外市场。他们知道中国需求量高,而中国的茶叶和瓷器又是他们极青睐的,因此非常想来中国做买卖。明朝政策只允许各藩国朝贡贸易,而朝廷朝贡的名单上没有葡萄牙,就不允许他们来。葡萄牙人就在西沙群岛找了个岛屿落脚,偷偷和明朝的走私商人做买卖。后来,那个落脚点被明朝的广州官员知道了,派出水师驱离了。葡萄牙人不甘心,就
- 享受一个人的美好,终究容不下两个人的甜蜜
白入心
图片发自App单枪匹马闯荡江湖,经历风吹雨打,日晒雨淋,人情冷暖自知而不能让另外一个人走进自己的世界。天空之眼,不容许多姿多彩,所以只能单着!享受一个人的自由自在的生活,所以拼命排斥外人的空间。我在挤兑别人的包容,只允许一个人的小宇宙爆发。这就是一条荔枝的蛀虫,活生生的苟延残喘于嫩肉的内核,一点一滴的把自身腐蚀。享受短暂的快乐,所以忍受被抛弃的心酸。这是家庭教育的悲哀,活生生的把有知觉的正常需求变
- 绿皮书:日落之后只允许白人在城内活动
三山不移
(转自vx公众号“随写集”:“日落之后只允许白人在城内会活动”)绿皮书,一本提供给黑人旅行的书。那本书里,详细列举了在美国的南部,黑人能够住的地方。南北战争,是一场资本家与奴隶制的战争,而处于战争中心的黑人,他们没有发言权。而这本绿皮书,是美国黑人与白人和谐的平衡点,但那也是对种族歧视的最佳讽刺。然而在1962年,普通白人托尼·维勒朗格和黑人钢琴家唐·雪利成为了朋友。唐要南下巡回为富人演奏三重奏,
- switch case 语句(详细)
微微的猪食小窝
1024程序员节java面试开发语言
switch介绍switchcase语句判断一个变量与一系列值中某个值是否相等,每个值称为一个分支。switch语句是非常的基础的知识,掌握起来也不难掌握,语法比较简单。但大部分人基本是知其然,不知其所以然。譬如早期JDK只允许switch的表达式的值int及int类型以下的基本类型,后期的JDK却允许匹配比较字符串、枚举类型语法switchcase语句语法格式如下:switch(expressi
- Vue中使用pdfJs预览PDF、图片
viceen
vue3+ts-运维vue项目-运维vue.jshtmlhtml5
Vue中使用pdfJs预览PDF、图片pdf.js是一个使用HTML5构建的可移植文档格式库。它可以帮助我们在浏览器中构建pdf文档,实现在线查看pdf文件的功能。实现步骤如下:1.下载pdfJs到本地(官网下载地址),放到项目根目录下的静态资源目录static文件夹内,将文件命名为pdfJs。如下图使用iframe打开或者需要注意的是:file参数中默认只允许传简单路径比如:http://www
- Day05for和while
PythonLi
1.如果是不断的获取序列中的元素,直接使用for循环2.如果循环次数确定,最好也使用for循环3.死循环和循环次数不确定的时候最好使用while循环。练习:随机产生一个数字(0,100),不断的输入数字,直到输入的数字和产生的随机数相同为止如果猜错了提示大了或者小importrandom产生一个随机数number=random.randint(0,100)返回从键盘接受到的数据(输入的时候以回车结
- 2023年1月7日读书笔记
龙套哥萨克海龙
今日阅读1小时,总计2193小时,第2124日阅读《晚期帝制中国的科举文化史》和明清中国同样宗奉朱子之学的朝鲜王朝,虽然也有科举制度,但因为它的科举考试只允许两班士人参与,以李、权、尹、洪、金为首的两班士人家族通过科举垄断了上层权力,这导致了朝鲜精英阶层的意识形态结构极其牢固(朝鲜王朝时期,中进士100人以上的38个家族垄断了7502个进士,即三分之二以上。朝鲜两班对朱子之学的极端捍卫,在很大程度
- Element ui input 限制只能输入数字,且只能有两位小数
我家媳妇儿萌哒哒
elementUIuivue.jsjavascript
%//elementuiinput限制只能输入数字,且只能有两位小数handleInput(value){value=value.replace(/[^\-\d.]/g,"")//将非数字和点以外的字符替换成空.replace(/^\./g,"")//验证第一个字符是数字而不是点.replace(/\.{2,}/g,".")//出现多个点时只保留第一个.replace(/(-)\./g,"$1")
- iPhone的安全模式如何操作
黑龙江亿林等级保护测评
iphone安全ios
iPhone安全模式的进入方法简介iPhone的安全模式是一个特殊的系统状态,主要用于在设备出现问题时进行故障排除。在此模式下,第三方应用程序和服务通常会被禁用,只允许系统自带的应用运行,从而帮助用户定位和解决问题。以下是详细的进入方法。进入安全模式的操作步骤关闭iPhone:首先确保iPhone完全关闭。同时按住电源键和音量增大键:在开机过程中,不要放开这两个键。出现白苹果后操作:在屏幕上出现白
- JAVA制作的简易计算器——傻瓜计算器
咱是地球人
编程JAVA学习
用JAVA编写的傻瓜计算器作用:1.可以实现加法、减法、乘法、除法简单运算且是单一运算,不可混合使用。2.CE为清除键3.没有小数点O(∩_∩)O思路:创建JFrame窗口,设置标题,创建JButton,创建文本框JTextField用作显示。先定义各种按钮类型,用作成员。定义窗口方法对窗口进行设置。定义按钮事件方法,每个按钮的每次点下在文本框都会进行打印。以运算符为界限对字符串进行分割,并把分割
- iOS输入框过滤表情,处理自带键盘无法输入
山有木枝壮
本片分两部分1、使用正则表达式过滤表情2、处理苹果自带键盘无法输入汉字问题先记录下,后面完善:overridefuncviewDidAppear(_animated:Bool){super.viewDidAppear(animated)NotificationCenter.default.addObserver(self,selector:#selector(self.textFieldEditC
- CAD |2、常用命令及快捷键
squirrel快乐敲码
笔记
Esc:取消选中Ctrl+z返回命令选中时从左往右需全部选中,从右往左只需要触及到线即可选中直线:l多段线:pl构造线:xl圆:c-直接输入数字是半径/再输入d再输入数字时就变半径了圆弧:a矩形:rec/再输入d为长度正多边形:pol移动:m旋转:ro复制:co偏移:o-输入偏移距离-选择对象只能选择一个-结束esc或者空格镜像:mi阵列:ar删除:e修剪:tr测量:di缩放:sc延伸:ex拉伸:
- 数据结构 栈 队列
懂linux吗
数据结构开发语言linux
系统栈:保护局部变量函数的形参和返回值函数的调用关系(保护现场,恢复现场操作,遵循先进后出,后进先出)数据结构栈(顺序栈,链式栈):同样遵遵循先进后出,后进先出原则只允许从一端进行数据的插入和删除的线性存储结构数据的插入--->入栈数据的删除----->出栈顺序栈:空/满增栈空/满减栈满栈空栈:栈顶所在位置是否存有元素增栈减栈:用栈顶的增长方向区分(移动方向)增栈:从内存低地址向高地址移动减栈:从
- 线程间的同步和互斥
m0_47211698
线程多线程编程语言c语言
部分基本概念1.互斥和同步互斥:就是同一时间段内只允许一个线程访问临界资源;同步:就是在互斥的基础上,增加了顺序;总之,同步和互斥就是确保线程在访问变量的存储内容时候,不会访问到无效的值。a.什么时候不需要同步?(1)原子操作(2)全局共享变量仅仅可读(3)变量私有b.了解下什么叫做增量操作?(1)数据从内存单元读入寄存器(2)寄存器内对变量进行增量操作(3)把新的值写回内存单元下面将介绍几种常见
- Java实现的简单双向Map,支持重复Value
superlxw1234
java双向map
关键字:Java双向Map、DualHashBidiMap
有个需求,需要根据即时修改Map结构中的Value值,比如,将Map中所有value=V1的记录改成value=V2,key保持不变。
数据量比较大,遍历Map性能太差,这就需要根据Value先找到Key,然后去修改。
即:既要根据Key找Value,又要根据Value
- PL/SQL触发器基础及例子
百合不是茶
oracle数据库触发器PL/SQL编程
触发器的简介;
触发器的定义就是说某个条件成立的时候,触发器里面所定义的语句就会被自动的执行。因此触发器不需要人为的去调用,也不能调用。触发器和过程函数类似 过程函数必须要调用,
一个表中最多只能有12个触发器类型的,触发器和过程函数相似 触发器不需要调用直接执行,
触发时间:指明触发器何时执行,该值可取:
before:表示在数据库动作之前触发
- [时空与探索]穿越时空的一些问题
comsci
问题
我们还没有进行过任何数学形式上的证明,仅仅是一个猜想.....
这个猜想就是; 任何有质量的物体(哪怕只有一微克)都不可能穿越时空,该物体强行穿越时空的时候,物体的质量会与时空粒子产生反应,物体会变成暗物质,也就是说,任何物体穿越时空会变成暗物质..(暗物质就我的理
- easy ui datagrid上移下移一行
商人shang
js上移下移easyuidatagrid
/**
* 向上移动一行
*
* @param dg
* @param row
*/
function moveupRow(dg, row) {
var datagrid = $(dg);
var index = datagrid.datagrid("getRowIndex", row);
if (isFirstRow(dg, row)) {
- Java反射
oloz
反射
本人菜鸟,今天恰好有时间,写写博客,总结复习一下java反射方面的知识,欢迎大家探讨交流学习指教
首先看看java中的Class
package demo;
public class ClassTest {
/*先了解java中的Class*/
public static void main(String[] args) {
//任何一个类都
- springMVC 使用JSR-303 Validation验证
杨白白
springmvc
JSR-303是一个数据验证的规范,但是spring并没有对其进行实现,Hibernate Validator是实现了这一规范的,通过此这个实现来讲SpringMVC对JSR-303的支持。
JSR-303的校验是基于注解的,首先要把这些注解标记在需要验证的实体类的属性上或是其对应的get方法上。
登录需要验证类
public class Login {
@NotEmpty
- log4j
香水浓
log4j
log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, HTML, DATABASE
#log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, ROLLINGFILE, HTML
#console
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4
- 使用ajax和history.pushState无刷新改变页面URL
agevs
jquery框架Ajaxhtml5chrome
表现
如果你使用chrome或者firefox等浏览器访问本博客、github.com、plus.google.com等网站时,细心的你会发现页面之间的点击是通过ajax异步请求的,同时页面的URL发生了了改变。并且能够很好的支持浏览器前进和后退。
是什么有这么强大的功能呢?
HTML5里引用了新的API,history.pushState和history.replaceState,就是通过
- centos中文乱码
AILIKES
centosOSssh
一、CentOS系统访问 g.cn ,发现中文乱码。
于是用以前的方式:yum -y install fonts-chinese
CentOS系统安装后,还是不能显示中文字体。我使用 gedit 编辑源码,其中文注释也为乱码。
后来,终于找到以下方法可以解决,需要两个中文支持的包:
fonts-chinese-3.02-12.
- 触发器
baalwolf
触发器
触发器(trigger):监视某种情况,并触发某种操作。
触发器创建语法四要素:1.监视地点(table) 2.监视事件(insert/update/delete) 3.触发时间(after/before) 4.触发事件(insert/update/delete)
语法:
create trigger triggerName
after/before 
- JS正则表达式的i m g
bijian1013
JavaScript正则表达式
g:表示全局(global)模式,即模式将被应用于所有字符串,而非在发现第一个匹配项时立即停止。 i:表示不区分大小写(case-insensitive)模式,即在确定匹配项时忽略模式与字符串的大小写。 m:表示
- HTML5模式和Hashbang模式
bijian1013
JavaScriptAngularJSHashbang模式HTML5模式
我们可以用$locationProvider来配置$location服务(可以采用注入的方式,就像AngularJS中其他所有东西一样)。这里provider的两个参数很有意思,介绍如下。
html5Mode
一个布尔值,标识$location服务是否运行在HTML5模式下。
ha
- [Maven学习笔记六]Maven生命周期
bit1129
maven
从mvn test的输出开始说起
当我们在user-core中执行mvn test时,执行的输出如下:
/software/devsoftware/jdk1.7.0_55/bin/java -Dmaven.home=/software/devsoftware/apache-maven-3.2.1 -Dclassworlds.conf=/software/devs
- 【Hadoop七】基于Yarn的Hadoop Map Reduce容错
bit1129
hadoop
运行于Yarn的Map Reduce作业,可能发生失败的点包括
Task Failure
Application Master Failure
Node Manager Failure
Resource Manager Failure
1. Task Failure
任务执行过程中产生的异常和JVM的意外终止会汇报给Application Master。僵死的任务也会被A
- 记一次数据推送的异常解决端口解决
ronin47
记一次数据推送的异常解决
需求:从db获取数据然后推送到B
程序开发完成,上jboss,刚开始报了很多错,逐一解决,可最后显示连接不到数据库。机房的同事说可以ping 通。
自已画了个图,逐一排除,把linux 防火墙 和 setenforce 设置最低。
service iptables stop
- 巧用视错觉-UI更有趣
brotherlamp
UIui视频ui教程ui自学ui资料
我们每个人在生活中都曾感受过视错觉(optical illusion)的魅力。
视错觉现象是双眼跟我们开的一个玩笑,而我们往往还心甘情愿地接受我们看到的假象。其实不止如此,视觉错现象的背后还有一个重要的科学原理——格式塔原理。
格式塔原理解释了人们如何以视觉方式感觉物体,以及图像的结构,视角,大小等要素是如何影响我们的视觉的。
在下面这篇文章中,我们首先会简单介绍一下格式塔原理中的基本概念,
- 线段树-poj1177-N个矩形求边长(离散化+扫描线)
bylijinnan
数据结构算法线段树
package com.ljn.base;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;
/**
* POJ 1177 (线段树+离散化+扫描线),题目链接为http://poj.org/problem?id=1177
- HTTP协议详解
chicony
http协议
引言
- Scala设计模式
chenchao051
设计模式scala
Scala设计模式
我的话: 在国外网站上看到一篇文章,里面详细描述了很多设计模式,并且用Java及Scala两种语言描述,清晰的让我们看到各种常规的设计模式,在Scala中是如何在语言特性层面直接支持的。基于文章很nice,我利用今天的空闲时间将其翻译,希望大家能一起学习,讨论。翻译
- 安装mysql
daizj
mysql安装
安装mysql
(1)删除linux上已经安装的mysql相关库信息。rpm -e xxxxxxx --nodeps (强制删除)
执行命令rpm -qa |grep mysql 检查是否删除干净
(2)执行命令 rpm -i MySQL-server-5.5.31-2.el
- HTTP状态码大全
dcj3sjt126com
http状态码
完整的 HTTP 1.1规范说明书来自于RFC 2616,你可以在http://www.talentdigger.cn/home/link.php?url=d3d3LnJmYy1lZGl0b3Iub3JnLw%3D%3D在线查阅。HTTP 1.1的状态码被标记为新特性,因为许多浏览器只支持 HTTP 1.0。你应只把状态码发送给支持 HTTP 1.1的客户端,支持协议版本可以通过调用request
- asihttprequest上传图片
dcj3sjt126com
ASIHTTPRequest
NSURL *url =@"yourURL";
ASIFormDataRequest*currentRequest =[ASIFormDataRequest requestWithURL:url];
[currentRequest setPostFormat:ASIMultipartFormDataPostFormat];[currentRequest se
- C语言中,关键字static的作用
e200702084
C++cC#
在C语言中,关键字static有三个明显的作用:
1)在函数体,局部的static变量。生存期为程序的整个生命周期,(它存活多长时间);作用域却在函数体内(它在什么地方能被访问(空间))。
一个被声明为静态的变量在这一函数被调用过程中维持其值不变。因为它分配在静态存储区,函数调用结束后并不释放单元,但是在其它的作用域的无法访问。当再次调用这个函数时,这个局部的静态变量还存活,而且用在它的访
- win7/8使用curl
geeksun
win7
1. WIN7/8下要使用curl,需要下载curl-7.20.0-win64-ssl-sspi.zip和Win64OpenSSL_Light-1_0_2d.exe。 下载地址:
http://curl.haxx.se/download.html 请选择不带SSL的版本,否则还需要安装SSL的支持包 2. 可以给Windows增加c
- Creating a Shared Repository; Users Sharing The Repository
hongtoushizi
git
转载自:
http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/ Commands discussed in this section:
git init –bare
git clone
git remote
git pull
git p
- Java实现字符串反转的8种或9种方法
Josh_Persistence
异或反转递归反转二分交换反转java字符串反转栈反转
注:对于第7种使用异或的方式来实现字符串的反转,如果不太看得明白的,可以参照另一篇博客:
http://josh-persistence.iteye.com/blog/2205768
/**
*
*/
package com.wsheng.aggregator.algorithm.string;
import java.util.Stack;
/**
- 代码实现任意容量倒水问题
home198979
PHP算法倒水
形象化设计模式实战 HELLO!架构 redis命令源码解析
倒水问题:有两个杯子,一个A升,一个B升,水有无限多,现要求利用这两杯子装C
- Druid datasource
zhb8015
druid
推荐大家使用数据库连接池 DruidDataSource. http://code.alibabatech.com/wiki/display/Druid/DruidDataSource DruidDataSource经过阿里巴巴数百个应用一年多生产环境运行验证,稳定可靠。 它最重要的特点是:监控、扩展和性能。 下载和Maven配置看这里: http
- 两种启动监听器ApplicationListener和ServletContextListener
spjich
javaspring框架
引言:有时候需要在项目初始化的时候进行一系列工作,比如初始化一个线程池,初始化配置文件,初始化缓存等等,这时候就需要用到启动监听器,下面分别介绍一下两种常用的项目启动监听器
ServletContextListener
特点: 依赖于sevlet容器,需要配置web.xml
使用方法:
public class StartListener implements
- JavaScript Rounding Methods of the Math object
何不笑
JavaScriptMath
The next group of methods has to do with rounding decimal values into integers. Three methods — Math.ceil(), Math.floor(), and Math.round() — handle rounding in differen