自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lele_pipi

生命不息,奋斗不止!

  • 博客(95)
  • 资源 (1)
  • 收藏
  • 关注

原创 Flink1.11 只写到kafka的第一个分区

采用以下代码出现Flink写到kafka第一个分区的现象:speStream.addSink(new FlinkKafkaProducer011(kafkaTopicName,new SimpleStringSchema(), props));出现原因:调用了以下的构造函数:Flink创建KafkaProducer时,如果未传partitioner,则使用默认的 FlinkFixedPartitioner。FlinkFixedPartitioner:1、Flink的分区数大于.

2021-01-25 17:07:00 813

原创 《深度工作》读后感

枯燥乏味,生硬无趣——这是看这本书的第一印象。我是一个慢斯条理的人。不可否认的是,这本书讲到的很多场景正是我目前所面对的。高质量工作的产出=时间*专注度,平时打鸡血的时候只知道要比别人多花时间,在别人休息的时候学习,却忽略了专注度这个因素。或许可以尝试深度工作来改变一下……深度工作:在无干扰的状态下专注进行职业活动,使个人的认知能力达到极限。这种努力能够创造新价值,提升技能,而且难以复制。...

2020-05-07 23:46:02 545

原创 ubuntu17.10 navicat乱码

运行./start_navicat 后,navicat乱码,将start_navicat文件中的export LANG="en_US.UTF-8" 改为 zh_CN.UTF-8结果还是出现方块等符号工具->选项->字体  选AR PL UKai CN ,被我瞎点到了,没有这个字体就试试其他的

2017-12-25 20:55:19 545

转载 php判断终端是微信,ios等类型

(function ($) { $('.download').on('click', function () { <?php if ( is_weixin() ){ $theUrl = URL_DOWNLOAD_MYAPP;//跳转到下载地址 }else if (is_apple()){

2016-10-27 16:55:44 1064 1

转载 php中memcache的使用整理

启动memcache /usr/local/bin/memcached -p 11211 -m 64 -u root -d -d:以守护进程方式启动。如果该参数没有指定,当按ctrl+c命令结束,memcache自动关闭 -m:分配给memcache使用的最大内存数 单位是m,默认是64m -u: 指定运行memcache的用户 -l: 指定监听的ip地址 -p: 指定监听

2016-10-19 11:04:31 344

原创 php stdClass转化为数组

$response->getBody()为stdClass类型(查看类型用gettype(变量))$result = json_decode($response->getBody(),true);此时$result为数组类型

2016-10-18 13:16:42 681

原创 Sequel Pro导入.sql文件

Sequel Pro导入.sql文件出现错误可以用phpstrom打开,修改它的编码为Mac版的LF-Unix and OS X(\n),然后再用Sequel Pro import即可。

2016-09-24 15:29:53 4500

翻译 MAMP PRO(Mac) 下安装memcache

按照网上的教程,并不能顺利地安装下来,整合了几篇文章,并附上图片参考:https://www.douban.com/note/337110939/http://www.cnblogs.com/shengshuai/p/3696466.html1: Memcached 推荐用  homebrew 安装。http://brew.sh/2: 安装memcache ,bre

2016-09-05 17:47:15 3651 4

原创 链表尾部增加结点,打印结点,删除结点

#include #include #include using namespace std;struct ListNode{ int m_nValue; ListNode* m_pNext;};void addNode(ListNode **head,int value){ ListNode* pNew=new ListNode(); pNew->m

2016-07-23 15:06:08 322

原创 复选框(JCheckBox)

复选框(JCheckBox)的应用import java.awt.*;import javax.swing.*;class Favorite extends JPanel{ JCheckBox sport, computer, music, read; Favorite(){ sport = new JCheckBox("运动"); computer = new JChec

2016-01-10 21:01:30 674 1

原创 ButtonGroup & JRadioButton(单选框)

关于ButtonGroup和JRadioButton的应用import java.awt.*;import javax.swing.*;public class JRadioButtonTest extends ButtonGroup{ JRadioButtonTest(){ JFrame f = new JFrame("单选框示例");//创建一个JFrame的对象 C

2016-01-10 20:40:17 4971

原创 java jar文件为什么双击没反应

将META-INF文件中的MANIFEST.MF文件用txt打开里面有Manifest-Version: 1.0加上Main-Class: 类名(有包名时加上包名.类名)例如:Main-Class: line

2016-01-08 21:01:07 1737

原创 poj2823-单调队列

#include#include#include#include#define M 1000005using namespace std;int head,rear,n,a[M],q[M],k,mi[M],ma[M];void in_queue(int i){ while(head<=rear&&a[i]<=a[ q[rear] ])//入队,删除队尾元素中比它大的

2015-07-23 11:01:58 305

原创 poj1410判断线段与矩形是否相交(判断线段相交)

IntersectionDescriptionYou are to write a program that has to decide whether a given line segment intersects a given rectangle. An example: line: start point: (4,9) end point: (11,2) rec

2015-07-07 09:58:38 981

原创 poj2298-Toy Storage-判断点在直线的哪侧

Toy StorageDescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unfortun

2015-07-02 19:52:28 402

原创 poj3304-Segments-判断直线和线段是否相交

SegmentsDescriptionGiven n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments

2015-07-02 19:41:36 317

原创 计算几何基本知识整理

一、计算几何向量:A(x1,y1)  B(x2,y2)  C(x3,y3)  D(x4,y4)向量叉乘:叉积的几何意义:1:其模的结果是a和b为相邻边形成平行四边形的面积。2:结果有正有负,有sin(a,b)可知和其夹角有关,夹角大于180°为负值。3:叉积不满足交换律应用:1:通过结果的正负判断两矢量之间的顺逆时针关系若 a x

2015-07-02 19:25:22 447

原创 poj1006-生理周期-中国剩余定理

生理周期Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同一天。对于每个周期,我们会给出从当前年份的第一

2015-06-21 19:52:26 495

原创 hdu-1429-胜利大逃亡(续)-bfs+状态压缩

胜利大逃亡(续)Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相

2015-06-01 12:14:01 1244

原创 hdu1195-Open the Lock-双向&&单向bfs

Open the LockProblem DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add

2015-05-29 16:37:18 304

原创 hdu-1518-Square-深搜+剪枝(同hdu1455)

SquareProblem DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number

2015-05-28 15:26:05 453

原创 hdu-1455-Sticks-深搜+剪枝

SticksProblem DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he f

2015-05-28 08:41:42 358

原创 hdu-1142-A Walk Through the Forest-最短路+记忆化搜索

A Walk Through the ForestProblem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to

2015-05-26 16:16:58 333

原创 hdu-1078-FatMouse and Cheese-记忆化搜索

FatMouse and CheeseProblem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p <

2015-05-25 21:24:26 283

原创 poj-3254-状态压缩入门-Corn Fields

Corn FieldsDescriptionFarmer John has purchased a lush new rectangular pasture composed of M byN (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a

2015-01-30 16:59:20 356

原创 hdu-2639-01背包变形之求第k优解-Bone Collector II

Bone Collector IIProblem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it

2015-01-28 12:28:18 348

原创 POJ-2184-01背包变形-Cow Exhibition

Cow ExhibitionDescription"Fat and docile, big and dumb, they look so stupid, they aren't muchfun..."- Cows with Guns by Dana LyonsThe cows want to prove to the public that they are b

2015-01-28 08:46:58 477

原创 hdu-2955-01背包-Robberies

RobberiesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13554    Accepted Submission(s): 4989Problem DescriptionThe aspiring Roy th

2015-01-26 19:19:37 348

转载 0-1背包问题详解(转自背包问题九讲)

P01: 01背包问题题目有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。基本思路这是最基础的背包问题,特点是:每种物品仅有一件,每个物品最多只能放一次,可以选择放或不放。用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是:f[i][v]=max

2015-01-26 16:44:30 488

原创 nyoj-16-动态规划之最长路-嵌套矩形

矩形嵌套描述    有n个矩形,每个矩形可以用a,b来描述,表示长和宽。矩形X(a,b)可以嵌套在矩形Y(c,d)中当且仅当a输入    第一行是一个正正数N(0    每组测试数据的第一行是一个正正数n,表示该组测试数据中含有矩形的个数(n    随后的n行,每行有两个数a,b(0输出    每组测试数据都输出一个数,表示最多符合条件的矩形数目,每组输

2015-01-26 10:16:55 402

原创 hdu-1176-免费馅饼-动态规划

免费馅饼Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,

2015-01-25 19:13:10 346

原创 hdu-1003-动态规划-求连续子序列最大和问题

Max SumProblem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 +

2015-01-25 15:40:02 347

原创 hdu-3394-无向图的双连通分量

RailwayProblem DescriptionThere are some locations in a park, and some of them are connected by roads. The park manger needs to build some railways along the roads, and he would like to arrange

2015-01-24 09:50:29 615

原创 POJ-3352-无向图的割顶和桥-求边-双连通分量

Road ConstructionDescriptionIt's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tropical islan

2015-01-23 11:19:12 455

原创 二分图的最大独立集-poj-2771

Guardian of DecencyDescriptionFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he is afraid that some of them might become

2015-01-19 17:08:44 380

原创 关于图论的一些名词解释

关于图论的一些名词解释二分图:二分图又称二部图,是图论中的一种特殊模型。设G=(V,E)是一个无向图,如果顶点V可以分割为两个互不相交的子集(A,B),并且图中的每条边(i,j)所关联的两个顶点i和j分别属于这两个不同的顶点集(iin A, j in B), 则称图G是二分图。匹配:(两两没有公共点的边集)给定一个二分图,在G的一个子图G’中,如果G’的边集中的任意两条边都

2015-01-18 20:23:24 2017

原创 hdu-1350-最小路径覆盖(二分图)

Taxi Cab SchemeProblem DescriptionRunning a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers callin

2015-01-18 19:56:52 418

原创 二分图最大匹配-增广路-hdu2063-过山车

过山车DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow

2015-01-17 19:47:45 915

原创 hdu1269-图论-Tarjan-迷宫城堡

迷宫城堡Problem Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N Input输入包含多组数据,输入的第一行有两个数:N和M,接下来的M行每行有两个数a和b,表示了一条通道可以从A房间来到B房间。文件最后以两个0结束。 Output对于输入的每组数据,如果任意两个房间都是相互连接的,输出"Yes"

2015-01-16 18:00:53 374

原创 最小生成树-hdu1233-还是畅通工程

还是畅通工程Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N (

2015-01-15 21:03:37 305

java标准化考试系统

内容: 本系统可以进行任何标准化考试,具有选择试题,查看得分、考试计时等功能。 设计要求: 1.用户可以选择一套标准化考试试题。 2.每套试题的考试用时由试题文件(.txt)给出。 3.开始读取试题后,计时器开始计时,用户提交答案后,可以读取下一道题目。 4.一个提示栏显示所剩余的考试时间,当规定时间用尽后,用户将不能再读取任何题目。 5.为了增加模拟考试练习的灵活性,用户也可以选择暂停计时。 6.用户答完一个题目后,可以查看该题目的正确答案和目前的分数。

2016-04-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除