leetcode核心思想:双指针,数字小的那个指针移动classSolution{public:intmaxArea(vector&height){intleft=0;intright=height.size()-1;intmaxArea=0;while(left
【写作日更挑战双18】早上起来得比较早
林兮云
说着昨晚应该早点睡,是比平时早了,不过也到了12点才睡觉,第二天也就是今天早上6点20多起的床,时间过得很快。当你发现自己有很多事情想要去做的时候,就会发现时间根本不够用。乌云就像一块移动的海绵,里面装满了水,并且还在不停地吸水,一旦吸得太多了,装不下了,就要释放出来,这应该就是“下雨”了,乌云可能一边吸一边放,如果一直不停地吸,就会一直不停地放,如果停止吸水,等承受不了的水放完了,自然雨就不下了
读书打卡83天《孩子:挑战》
青草萍
2021年4月20日#“王磊名班主任工作室”精进打卡#【打卡人】赵亚平【打卡始于】2020年1月28日【日精进打卡第83天】2021年4月20日【今日读书】书名:《孩子:挑战》第40—至63页作者:鲁道夫.德雷克斯薇姬.索尔兹版次:中国人民大学出版社【用时】三十分钟【读书感悟】1.孩子需要鼓励,就像植物需要水,没有鼓励孩子,性格就不能健康发展,孩子就没有归属感。鼓励孩子是一个持续的过程,重点在于给
2018-07-07
随月声
不偷懒,不钻空子,你少努力一点,结果就少一点。你亏待过程,成功也会亏待你。全力以赴奔跑的女孩,时光会心甘情愿输给她。日日亭亭,眼底未名水,胸中黄河月。
简九月的第188天日更|二宝米乐发烧了
简九月
昨天夜里,二宝开始发烧了,刚开始是37度多点,慢慢地长到38度。我喂了她点退烧药,好久才把烧退掉。一夜我又醒来好多次,看看她是否发烧。早上六点多再次起烧了,有给她喝了退烧药,烧退了后二宝睡着了。我一上午在学校担心的不得了,害怕她又起烧,还好一上午没有发烧。下午一直是38度以下,小青给她喝了好多水,烧也退了下来,可是,现在又起烧了……38.2度,喝了药之后,睡也睡不好,我就一直抱着,还没放下。这是二
2023-04-02
649339e68ace
桃花一瓣一瓣,拾起,地上被雨水打湿的桃花,我眼前就会浮现出那年的往事……我看着手中的桃花,已经被雨水打的708落,桃花上有点点蜜水,我想他是不是在另一个地方也看着树上的桃花呢?那年春天,我在上学的路上看到一路都是他话说我们俩站在一个桃花树底下,看着白色和粉色的桃花,桃花芳香四溢,一阵微风吹过,有几片花瓣落在地上,又被风刮到半空中,美极了,当时桃花不想再这样落在地上,满是泥水,他也同样没有离开,貌似
谜之梦境
晴雨风
昨晚做了个奇怪的梦好多好多人,一眼望不到头的那种。前后左右都是人,我被簇拥在其中慢慢向前走。一直走到一个好像下山的台阶处,台阶左右和向下无限延伸。每个台阶一上隔几米就有一个人站在那里,他们在有节奏的一起鼓掌。我的心情好激动,这么盛大的场面难得一见。随着欢呼在掌声中的人群向台阶下面走去,远处有一条大河,很宽,各种鲜艳的绿色知是水还是什么。会随着风一漾一漾的。在最前面的人已经到了河里,他们依旧向前走。
2019-12-24
云叶子2020
金针菇、黄甜椒、葱段、蒜蓉、生抽、香醋、香油、蜂蜜(糖)。做法:1、水烧开,先放入金针菇、黄甜椒丝烫30秒,最后加入葱丝拌匀,捞出;2、将捞出的1料放入冰水里浸泡半分钟;3、1.5勺生抽、1勺香醋、小半勺蜂蜜(糖)和蒜蓉充分拌匀成湿料,将2料捞出,轻轻挤干水分放入拌匀;4、上桌前滴几滴香油即可。贴心提示:1、金针菇非常细嫩,在水里汆烫的时间最好不要超过30秒,否则口感太老,咀嚼的时候会塞牙;2、汆
来时空 去时空 如是万般皆空
一航文学与艺术
关注一航文学与艺术每一天都与众不同更漏子文/宁静致远(阑珊)北风寒,梅蕊落,陌上花开花落。观世间,月儿圆,来回皆是缘。来时空,去时空,如是万般皆空。花儿落,水东流,落花人长留。2018.2.4给我一支笔文/宁静致远(阑珊)给我一支笔绘一幅水墨丹青绿水青山给我一支笔写一曲岁月如歌曲水流觞给我一支笔写下风花雪月前世今生给我一支笔写下灿烂的诗篇吟古诵今2018.2.3游无为寺随笔文/宁静致远光阴一去不复
向着明亮那方12.7
向着明亮那方的我们
【水晶泥的妙用】在地上捡到一滩水晶泥,本想扔进垃圾桶,发现水晶泥上附着了些许蓝色钢笔墨水。我脑洞大开,水晶泥可不可以用来处理钢笔墨渍呢?正好垃圾桶那面瓷砖墙上有蓝色钢笔水痕迹,我用水晶泥沾了沾墨迹,很轻易地把墨色粘了下来,好干净。【长跑报名】我让同学们自愿报名参加冬季长跑比赛,课间将名字报给班长。班长把名字统计在本子上,把本子拿来给我看:“老师,我晚上回去给你做张电子表,发给你。”看来班长又学了新
闲适.诗意
飘雪的天堂
文/雪儿一个人的衰老是从丢失诗意开始的。当我们对清风明月不再心动,对一蔬一饭不再热爱,对一朝一暮不再珍重,在失去诗意的一刹那,人,便老了…秋将尽了。走上田野,一片萧条景象。许久不出来走路了,中午的阳光也不再热烈,只需秋风微微一吹,枯黄的叶子便从树上晃晃悠悠地飘下来。小河边的芦苇,轻摇着白色的羽毛,菖蒲围着河岸,吻水低语,与落叶诉说着秋天的故事。今年秋季由于雨水过多,大多田地被淹,转眼就要入冬,现在
2022-03-23
13_yD
下雨天让人心神不宁。走在路上,打着伞。用双手对抗风的力量,不止是风,还有伞本身的野性。一手抓着手机,一手抓着伞,伞柄压在颈上,硌得大脑缺氧。风在转,人在转,伞在转。看不见头顶的天,只看见伞,和骨上的水,一起转。昏天黑地,脚底没有地,只有无边无际的泥潭,散发着腐烂的气息,下面是一具具尸体,学着我们的步伐,行走在空无一人的路上。头发夹在钢铁之间,快乐地尖叫,钢铁尽情地肆虐,鞭打我的灵魂。灵魂被抛尸在荒
虞美人.燕新
竹兰答水
虞美人.燕新文/竹兰答水春情未了梨花到,树树皆晗笑。竹檐低处燕逡巡,候鸟回迁只认故家门。雏心系挂倾巢病,郁郁都虚境。为伊翻作卷帘人,带雨一枝叠压海棠新图片发自App
成语故事分享-曹冲称象(每天一则睡前故事,与孩子一起成长)
成语故事分享
【成语】曹冲称象【拼音】cáochōngchēngxiàng【英语】CaoChongWeighstheElephant【近义词】聪明伶俐、机智过人【类似成语】孔融让梨、名落孙山、毛遂自荐【解释】原指称赞曹冲幼时过人的智慧。年龄不在大小,关键是遇事要善于观察,开动脑筋想办法,小孩也能办大事。【出处】《三国志》:时孙权曾致巨象,太祖欲知其斤重,访之群下,咸莫能出其理。冲曰:“置象大船之上,而刻其水痕所
鱼那么信任水, 水却煮了鱼
醉沐青年
鱼那么信任水,水却煮了鱼。叶子那么信任风,风却吹落了叶。人心的冷暖,总是一直变幻。熟悉的陌生了,陌生的走远了。人与人之间,全靠一颗心,情与情之间,全凭一寸真。落叶知秋,落难知友!人生不易,且行且珍惜。人生是一个过程,像朝阳至日暮,又好像春花、夏夜、秋日、冬雪,一年四季的轮换。如果把短短几十年的人生分为两部分,那就是上半场和下半场。人生的上半场讲“升”:升学历升职位升业绩升财富比上升!而下半场却讲“
Nginx负载均衡
510888780
nginx应用服务器
Nginx负载均衡一些基础知识:
nginx 的 upstream目前支持 4 种方式的分配
1)、轮询(默认)
每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。
2)、weight
指定轮询几率,weight和访问比率成正比
RedHat 6.4 安装 rabbitmq
bylijinnan
erlangrabbitmqredhat
在 linux 下安装软件就是折腾,首先是测试机不能上外网要找运维开通,开通后发现测试机的 yum 不能使用于是又要配置 yum 源,最后安装 rabbitmq 时也尝试了两种方法最后才安装成功
机器版本:
[root@redhat1 rabbitmq]# lsb_release
LSB Version: :base-4.0-amd64:base-4.0-noarch:core
FilenameUtils工具类
eksliang
FilenameUtilscommon-io
转载请出自出处:http://eksliang.iteye.com/blog/2217081 一、概述
这是一个Java操作文件的常用库,是Apache对java的IO包的封装,这里面有两个非常核心的类FilenameUtils跟FileUtils,其中FilenameUtils是对文件名操作的封装;FileUtils是文件封装,开发中对文件的操作,几乎都可以在这个框架里面找到。 非常的好用。
xml文件解析SAX
不懂事的小屁孩
xml
xml文件解析:xml文件解析有四种方式,
1.DOM生成和解析XML文档(SAX是基于事件流的解析)
2.SAX生成和解析XML文档(基于XML文档树结构的解析)
3.DOM4J生成和解析XML文档
4.JDOM生成和解析XML
本文章用第一种方法进行解析,使用android常用的DefaultHandler
import org.xml.sax.Attributes;
通过定时任务执行mysql的定期删除和新建分区,此处是按日分区
酷的飞上天空
mysql
使用python脚本作为命令脚本,linux的定时任务来每天定时执行
#!/usr/bin/python
# -*- coding: utf8 -*-
import pymysql
import datetime
import calendar
#要分区的表
table_name = 'my_table'
#连接数据库的信息
host,user,passwd,db =
如何搭建数据湖架构?听听专家的意见
蓝儿唯美
架构
Edo Interactive在几年前遇到一个大问题:公司使用交易数据来帮助零售商和餐馆进行个性化促销,但其数据仓库没有足够时间去处理所有的信用卡和借记卡交易数据
“我们要花费27小时来处理每日的数据量,”Edo主管基础设施和信息系统的高级副总裁Tim Garnto说道:“所以在2013年,我们放弃了现有的基于PostgreSQL的关系型数据库系统,使用了Hadoop集群作为公司的数
spring学习——控制反转与依赖注入
a-john
spring
控制反转(Inversion of Control,英文缩写为IoC)是一个重要的面向对象编程的法则来削减计算机程序的耦合问题,也是轻量级的Spring框架的核心。 控制反转一般分为两种类型,依赖注入(Dependency Injection,简称DI)和依赖查找(Dependency Lookup)。依赖注入应用比较广泛。
用spool+unixshell生成文本文件的方法
aijuans
xshell
例如我们把scott.dept表生成文本文件的语句写成dept.sql,内容如下:
set pages 50000;
set lines 200;
set trims on;
set heading off;
spool /oracle_backup/log/test/dept.lst;
select deptno||','||dname||','||loc
1、基础--名词解析(OOA/OOD/OOP)
asia007
学习基础知识
OOA:Object-Oriented Analysis(面向对象分析方法)
是在一个系统的开发过程中进行了系统业务调查以后,按照面向对象的思想来分析问题。OOA与结构化分析有较大的区别。OOA所强调的是在系统调查资料的基础上,针对OO方法所需要的素材进行的归类分析和整理,而不是对管理业务现状和方法的分析。
OOA(面向对象的分析)模型由5个层次(主题层、对象类层、结构层、属性层和服务层)
浅谈java转成json编码格式技术
百合不是茶
json编码java转成json编码
json编码;是一个轻量级的数据存储和传输的语言
在java中需要引入json相关的包,引包方式在工程的lib下就可以了
JSON与JAVA数据的转换(JSON 即 JavaScript Object Natation,它是一种轻量级的数据交换格式,非
常适合于服务器与 JavaScript 之间的数据的交
web.xml之Spring配置(基于Spring+Struts+Ibatis)
bijian1013
javaweb.xmlSSIspring配置
指定Spring配置文件位置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring-dao-bean.xml,/WEB-INF/spring-resources.xml,
/WEB-INF/
Installing SonarQube(Fail to download libraries from server)
sunjing
InstallSonar
1. Download and unzip the SonarQube distribution
2. Starting the Web Server
The default port is "9000" and the context path is "/". These values can be changed in &l
【MongoDB学习笔记十一】Mongo副本集基本的增删查
bit1129
mongodb
一、创建复本集
假设mongod,mongo已经配置在系统路径变量上,启动三个命令行窗口,分别执行如下命令:
mongod --port 27017 --dbpath data1 --replSet rs0
mongod --port 27018 --dbpath data2 --replSet rs0
mongod --port 27019 -
Anychart图表系列二之执行Flash和HTML5渲染
白糖_
Flash
今天介绍Anychart的Flash和HTML5渲染功能
HTML5
Anychart从6.0第一个版本起,已经逐渐开始支持各种图的HTML5渲染效果了,也就是说即使你没有安装Flash插件,只要浏览器支持HTML5,也能看到Anychart的图形(不过这些是需要做一些配置的)。
这里要提醒下大家,Anychart6.0版本对HTML5的支持还不算很成熟,目前还处于
Laravel版本更新异常4.2.8-> 4.2.9 Declaration of ... CompilerEngine ... should be compa
bozch
laravel
昨天在为了把laravel升级到最新的版本,突然之间就出现了如下错误:
ErrorException thrown with message "Declaration of Illuminate\View\Engines\CompilerEngine::handleViewException() should be compatible with Illuminate\View\Eng
编程之美-NIM游戏分析-石头总数为奇数时如何保证先动手者必胜
bylijinnan
编程之美
import java.util.Arrays;
import java.util.Random;
public class Nim {
/**编程之美 NIM游戏分析
问题:
有N块石头和两个玩家A和B,玩家A先将石头随机分成若干堆,然后按照BABA...的顺序不断轮流取石头,
能将剩下的石头一次取光的玩家获胜,每次取石头时,每个玩家只能从若干堆石头中任选一堆,
lunce创建索引及简单查询
chengxuyuancsdn
查询创建索引lunce
import java.io.File;
import java.io.IOException;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Docume
[IT与投资]坚持独立自主的研究核心技术
comsci
it
和别人合作开发某项产品....如果互相之间的技术水平不同,那么这种合作很难进行,一般都会成为强者控制弱者的方法和手段.....
所以弱者,在遇到技术难题的时候,最好不要一开始就去寻求强者的帮助,因为在我们这颗星球上,生物都有一种控制其
flashback transaction闪回事务查询
daizj
oraclesql闪回事务
闪回事务查询有别于闪回查询的特点有以下3个:
(1)其正常工作不但需要利用撤销数据,还需要事先启用最小补充日志。
(2)返回的结果不是以前的“旧”数据,而是能够将当前数据修改为以前的样子的撤销SQL(Undo SQL)语句。
(3)集中地在名为flashback_transaction_query表上查询,而不是在各个表上通过“as of”或“vers
Java I/O之FilenameFilter类列举出指定路径下某个扩展名的文件
游其是你
FilenameFilter
这是一个FilenameFilter类用法的例子,实现的列举出“c:\\folder“路径下所有以“.jpg”扩展名的文件。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
C语言学习五函数,函数的前置声明以及如何在软件开发中合理的设计函数来解决实际问题
dcj3sjt126com
c
# include <stdio.h>
int f(void) //括号中的void表示该函数不能接受数据,int表示返回的类型为int类型
{
return 10; //向主调函数返回10
}
void g(void) //函数名前面的void表示该函数没有返回值
{
//return 10; //error 与第8行行首的void相矛盾
}
in
今天在测试环境使用yum安装,遇到一个问题: Error: Cannot retrieve metalink for repository: epel. Pl
dcj3sjt126com
centos
今天在测试环境使用yum安装,遇到一个问题:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
处理很简单,修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。即可。
&n
单例模式
shuizhaosi888
单例模式
单例模式 懒汉式
public class RunMain {
/**
* 私有构造
*/
private RunMain() {
}
/**
* 内部类,用于占位,只有
*/
private static class SingletonRunMain {
priv
Spring Security(09)——Filter
234390216
Spring Security
Filter
目录
1.1 Filter顺序
1.2 添加Filter到FilterChain
1.3 DelegatingFilterProxy
1.4 FilterChainProxy
1.5
公司项目NODEJS实践0.1
逐行分析JS源代码
mongodbnginxubuntunodejs
一、前言
前端如何独立用nodeJs实现一个简单的注册、登录功能,是不是只用nodejs+sql就可以了?其实是可以实现,但离实际应用还有距离,那要怎么做才是实际可用的。
网上有很多nod
java.lang.Math
liuhaibo_ljf
javaMathlang
System.out.println(Math.PI);
System.out.println(Math.abs(1.2));
System.out.println(Math.abs(1.2));
System.out.println(Math.abs(1));
System.out.println(Math.abs(111111111));
System.out.println(Mat
linux下时间同步
nonobaba
ntp
今天在linux下做hbase集群的时候,发现hmaster启动成功了,但是用hbase命令进入shell的时候报了一个错误 PleaseHoldException: Master is initializing,查看了日志,大致意思是说master和slave时间不同步,没办法,只好找一种手动同步一下,后来发现一共部署了10来台机器,手动同步偏差又比较大,所以还是从网上找现成的解决方
ZooKeeper3.4.6的集群部署
roadrunners
zookeeper集群部署
ZooKeeper是Apache的一个开源项目,在分布式服务中应用比较广泛。它主要用来解决分布式应用中经常遇到的一些数据管理问题,如:统一命名服务、状态同步、集群管理、配置文件管理、同步锁、队列等。这里主要讲集群中ZooKeeper的部署。
1、准备工作
我们准备3台机器做ZooKeeper集群,分别在3台机器上创建ZooKeeper需要的目录。
数据存储目录
Java高效读取大文件
tomcat_oracle
java
读取文件行的标准方式是在内存中读取,Guava 和Apache Commons IO都提供了如下所示快速读取文件行的方法: Files.readLines(new File(path), Charsets.UTF_8); FileUtils.readLines(new File(path)); 这种方法带来的问题是文件的所有行都被存放在内存中,当文件足够大时很快就会导致
微信支付api返回的xml转换为Map的方法
xu3508620
xmlmap微信api
举例如下:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<return_msg><![CDATA[OK]]></return_msg>
<appid><