Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each elemen ...
分类:
其他好文 时间:
2016-07-24 07:01:39
阅读次数:
159
由于微信和QQ都已经更新了Blink内核,已经全面支持flex布局了,除了个别国产浏览器,基本上可以放心使用flex了,写了一个简单的flex的布局框架,只要设置相应的属性即可。 下面是基本的使用介绍 注意,设为Flex布局以后,子元素的float、clear和vertical-align属性将失效 ...
分类:
其他好文 时间:
2016-07-24 07:03:16
阅读次数:
302
使用51开发板编写的流水灯测试程序,主要用于学习。 ...
分类:
其他好文 时间:
2016-07-24 07:02:22
阅读次数:
140
12. Integer to Roman Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Hide Tags Math String ...
分类:
其他好文 时间:
2016-07-24 07:01:32
阅读次数:
182
Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloon ...
分类:
其他好文 时间:
2016-07-24 07:01:22
阅读次数:
160
首先复习一下quicksort. 先理解partition函数,就是选序列的最后一个数作为pivot,比它小的排到它左边,比它大的在它右边,它在中间。但是它左右的部分并没有排序。 返回值是这个pivot所在的位置,pivot所在位置就是它最终的位置,也就是说比如index是5,说明它就是第6大的数。 ...
分类:
其他好文 时间:
2016-07-24 07:01:32
阅读次数:
86
三类止痛药有哪些不同的用法? 牙痛、胃痛 、头痛等疼痛情况时有发生,用药物止痛是最常见的办法。但有些人对止痛药服用和分类产生了不少误区,甚至有些人担心药物副作用和成瘾性,即使有疼痛也不吃药解决问题。其实,从治疗作用分来,止痛药可分为三类,只要遵循医嘱,就可有效应对疼痛。 单纯止痛药 扑热息痛常用于一 ...
分类:
其他好文 时间:
2016-07-24 07:02:08
阅读次数:
217
0 预期效果 http://bbs.lanny.com/thread-1-1-1.html < 网址更优雅:nginx rewrite 1,配置文件 discuz rewrite代码 ...
分类:
其他好文 时间:
2016-07-24 07:00:18
阅读次数:
140
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all mee ...
分类:
其他好文 时间:
2016-07-24 07:01:11
阅读次数:
127
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s ...
分类:
其他好文 时间:
2016-07-24 07:00:54
阅读次数:
115
In React, components manage their own state. In this lesson, we'll walk through building a component which manages it's own state as well as using Tex ...
分类:
其他好文 时间:
2016-07-24 07:00:00
阅读次数:
178
1,查软件 rpm -qa|egrep "sudo|rsyslog" 2,编辑sudoers echo "Defaults logfile=/var/log/sudo.log">>/etc/sudoers tail -1 /etc/sudoers visudo -c 3,编辑rsyslog并重启服务 ...
分类:
其他好文 时间:
2016-07-24 07:01:32
阅读次数:
154
题目链接 题意:有许多party在同一天举行,每个party有开始时间与截止时间,爱玩的女主要在一天中参加尽量多的party,而且每个party待的时长不小于半个小时,求女主最多能够参加的party数量。 1 #include<stdio.h> 2 #include<string.h> 3 #inc ...
分类:
其他好文 时间:
2016-07-24 07:01:00
阅读次数:
173
题意概述: 有一个正整数$N$满足$C$个条件,每个条件都形如“它除以$X$的余数在集合$\{Y_1, Y_2, ..., Y_k\}$中”,所有条件中的$X$两两互质, 你的任务是找出最小的S个解。 数据范围: $1\leq C\leq9, 1 \leq S \leq 10, X \geq 2, ...
分类:
其他好文 时间:
2016-07-24 06:57:56
阅读次数:
169
题目给定n和d,都是10的9次方以内,求1到n里面有几个数最大因数是d?1000000组数据。解:求出d的满足p[i]*d<n的最小质因数是第几个质数。即为答案。 ...
分类:
其他好文 时间:
2016-07-24 07:00:28
阅读次数:
138
某次搞定一传销资金盘程序,看了算法,解密如上。 ...
分类:
其他好文 时间:
2016-07-24 06:58:21
阅读次数:
463
1.简介 分布式场景下的各个进程间的协调运作离不开zookeeper, zookeeper已经是大数据领域提供分布式协调服务的事实标准。 本文只介绍zookeeper的安装方法。 2. 节点规划如下: 3.目录规划 上述中: 1.软链接形式有利于后续版本升级后不会影响到环境变量等参数的设定。 2.配 ...
分类:
其他好文 时间:
2016-07-24 06:57:07
阅读次数:
154