摘要: 一般公司都用Linux来搭建服务器,Linux安装软件时能够用yum安装依赖包是一件非常简单而幸福的事情,因为你只需一个简单的安装命令yum install []即可安装相应的软件,yum工具会自动的从网上yum源中下载相应的依赖包,并以正确的依赖关系一个个安装依赖包。下面简单介绍一下CentOS下 阅读全文
posted @ 2019-04-02 23:57 故人叹 阅读(20170) 评论(0) 推荐(1)
摘要: 查看: 看到的是全部都安装好的; 版本为1.2.3,现在要升级为1.2.11 卸载 下面是安装 下载 ,我下载的是zlib 1.2.11.tar.gz 配置 make 检查,要全部为yes 安装 在 这一步,由于要把 安装到 路径下,所以可能需要 权限。 安装成功后,可以在 下找到 。 是一个静态库 阅读全文
posted @ 2019-04-02 23:50 故人叹 阅读(593) 评论(0) 推荐(0)
摘要: 命令行 输入 输入 命令后可以看到系统的一些分辨率的列表, 和当前系统屏幕的分辨率信息,可以通过命令的 相应参数对系统分辨率的一些设置操作。 阅读全文
posted @ 2019-04-02 23:43 故人叹 阅读(612) 评论(0) 推荐(0)
摘要: 安装中文语言支持 然后启动中文你语言输入法 阅读全文
posted @ 2019-04-02 23:43 故人叹 阅读(217) 评论(0) 推荐(0)
摘要: CentOS 6.5 安装图形界面 安装的时候没有安装图像界面。安装步骤如下: 由字符界面切换到图形界面可用两种简单方法实现: 1. 在字符界面输入 或`init 5` 。 2. 通过编辑/etc/inittab文件实现默认进入图形界面。 把其中的 中的 改为 ,这样以后系统启动后将直接进入 文本模 阅读全文
posted @ 2019-04-02 23:42 故人叹 阅读(677) 评论(0) 推荐(0)
摘要: 找不到满足游戏需求的版本(从版本:)找不到匹配的版本 最近在Ubuntu16.04上安装Python3.6之后,使用pip命令出现了问题,提示说找不到ssl模块,出现错误如下: 安装Python3.6的操作如下: 1.wget获取安装包: 2.解压安装包: 3.检查安装平台属性,系统是否有编译时所需 阅读全文
posted @ 2019-04-02 23:37 故人叹 阅读(2026) 评论(0) 推荐(0)
摘要: linux Centos7下安装python3及pip3 先去python官网下载python3安装包 执行命令: 安装zlib devel包(后面安装pip需要用到,这里先下载,后面就不用重复编译) 解压命令: 将解压文件移动到 目录下 执行命令: 在 目录下创建 目录 转到解压文件夹下 配置安装 阅读全文
posted @ 2019-04-02 23:33 故人叹 阅读(439) 评论(0) 推荐(0)
摘要: 一、为什么需要垃圾回收 如果不进行垃圾回收,内存迟早都会被消耗空,因为我们在不断的分配内存空间而不进行回收。除非内存无限大,我们可以任性的分配而不回收,但是事实并非如此。所以,垃圾回收是必须的。 二、哪些内存需要回收? 哪些内存需要回收是垃圾回收机制第一个要考虑的问题,所谓“要回收的垃圾”无非就是那 阅读全文
posted @ 2019-04-02 22:59 故人叹 阅读(132) 评论(0) 推荐(0)
摘要: Java对象及其引用 关于对象与引用之间的一些基本概念。 初学Java时,在很长一段时间里,总觉得基本概念很模糊。后来才知道,在许多Java书中,把对象和对象的引用混为一谈。可是,如果我分不清对象与对象引用, 那实在没法很好地理解下面的面向对象技术。把自己的一点认识写下来,或许能让初学Java的朋友 阅读全文
posted @ 2019-04-02 22:54 故人叹 阅读(97) 评论(0) 推荐(0)
摘要: Description Given a string[] lines, each line will have an ip address , find the ip address with the highest frequency. The given data only has one IP 阅读全文
posted @ 2019-04-02 22:50 故人叹 阅读(414) 评论(0) 推荐(0)
摘要: 485. Generate ArrayList with Given Size Description Generate an arrayList with given size, initialize the array list with numbers from 1 to size. Exam 阅读全文
posted @ 2019-04-02 22:49 故人叹 阅读(174) 评论(0) 推荐(0)
摘要: Description Find the maximum node in a binary tree, return the node. Example Given a binary tree: return the node with value . 阅读全文
posted @ 2019-04-02 22:49 故人叹 阅读(145) 评论(0) 推荐(0)
摘要: Sort Integers Description Given an integer array, sort it in ascending order. Use selection sort, bubble sort, insertion sort or any algorithm. Exampl 阅读全文
posted @ 2019-04-02 22:48 故人叹 阅读(124) 评论(0) 推荐(0)
摘要: Description Given two integers a and b, an operator, choices: +, , , / Calculate . Example 阅读全文
posted @ 2019-04-02 22:48 故人叹 阅读(226) 评论(0) 推荐(0)
摘要: Convert Linked List to Array List Description Convert a linked list to an array list. 将一个链表转换为一个数组。 Example Given , return . 阅读全文
posted @ 2019-04-02 22:48 故人叹 阅读(461) 评论(0) 推荐(0)
摘要: 描述 实现一个矩阵类Rectangle,包含如下的一些成员变量与函数: 1. 两个共有的成员变量 width 和 height 分别代表宽度和高度。 2. 一个构造函数,接受2个参数 width 和 height 来设定矩阵的宽度和高度。 3. 一个成员函数 getArea,返回这个矩阵的面积。 样 阅读全文
posted @ 2019-04-02 22:47 故人叹 阅读(206) 评论(0) 推荐(0)
摘要: Reference Description Implement the class ReferenceManager. Include the following two methods: 1. . This would just copy the value from parameter obj 阅读全文
posted @ 2019-04-02 22:47 故人叹 阅读(233) 评论(0) 推荐(0)
摘要: 449. Char to Integer Description Convert a char to an integer. You can assume the char is in ASCII code (See Definition, so the value of the char shou 阅读全文
posted @ 2019-04-02 22:46 故人叹 阅读(202) 评论(0) 推荐(0)
摘要: 描述 Given a string, convert it to an integer. You may assume the string is a valid integer number that can be presented by a signed 32bit integer ( 231 阅读全文
posted @ 2019-04-02 22:45 故人叹 阅读(129) 评论(0) 推荐(0)
摘要: Description Given 3 integers, return the max of them. Example Given num1 = 1, num2 = 9, num3 = 0, return . 阅读全文
posted @ 2019-04-02 22:45 故人叹 阅读(185) 评论(0) 推荐(0)
摘要: 描述 查找斐波纳契数列中第 N 个数. 所谓的斐波纳契数列是指: 前2个数是 0 和 1 。 第 i 个数是第 i 1 个数和第i 2 个数的和。 斐波纳契数列的前10个数字是: public class Solution { / @param n: an integer @return: an i 阅读全文
posted @ 2019-04-02 22:45 故人叹 阅读(112) 评论(0) 推荐(0)
摘要: Description Find a node with given value in a linked list. Return null if not exists. Have you met this question in a real interview? Example Given an 阅读全文
posted @ 2019-04-02 22:44 故人叹 阅读(201) 评论(0) 推荐(0)
摘要: Middle of Linked List Description Find the middle node of a linked list. Example Given , return the node with value 2. Given , return the node with va 阅读全文
posted @ 2019-04-02 22:44 故人叹 阅读(236) 评论(0) 推荐(0)
摘要: Max of Array public class Solution { / @param A: An integer @return: a float number / public float maxOfArray(float[] A) { // write your code here flo 阅读全文
posted @ 2019-04-02 21:57 故人叹 阅读(124) 评论(0) 推荐(0)
摘要: Description Implement a class , including the following attributes and methods: 1. A private attribute of type string. 2. A setter method which expect 阅读全文
posted @ 2019-04-02 21:57 故人叹 阅读(229) 评论(0) 推荐(0)
摘要: 描述 将一个字符由小写字母转换为大写字母 样例 阅读全文
posted @ 2019-04-02 21:56 故人叹 阅读(129) 评论(0) 推荐(0)
摘要: 146. Lowercase to Uppercase II 阅读全文
posted @ 2019-04-02 21:56 故人叹 阅读(115) 评论(0) 推荐(0)
摘要: 描述 反转一个只有3位数的整数。 你可以假设输入一定是一个只有三位数的整数,这个整数大于等于100,小于1000。 [ ] 您在真实的面试中是否遇到过这个题? 样例 123 反转之后是 321。 900 反转之后是 9。 阅读全文
posted @ 2019-04-02 21:55 故人叹 阅读(114) 评论(0) 推荐(0)
摘要: 描述 给定一个字符串target和字符串数组s,按在s中的原次序输出s中所有包含target的字符串(即满足target为s[i]的一个子序列) s.length result = new ArrayList(s.length); for (String str : s) { if (isSubse 阅读全文
posted @ 2019-04-02 21:51 故人叹 阅读(135) 评论(0) 推荐(0)
摘要: 描述 小明是一个销售员,客人在他的地方买了东西,付给了小明一定面值的钱之后,小明需要把多余的钱退给客人。客人付给了小明n,小明的东西的售价为m,小明能退回给客人的面额只能为[100,50,20,10,5,2,1]的组合。现在小明想要使纸币数量之和最小,请返回这个最小值。 1 阅读全文
posted @ 2019-04-02 21:50 故人叹 阅读(126) 评论(0) 推荐(0)
摘要: 描述 给定一个列表funds表示投资人每次的投资额。现在有三个公司A, B, C,它们的初始资金分别为a,b,c。投资人每次投资时会对当前资金最少的公司进行投资(当有多个公司资金相同时,投资人会对编号最小的公司进行投资)。返回A, B, C三家公司最后的资金。 1 阅读全文
posted @ 2019-04-02 21:50 故人叹 阅读(117) 评论(0) 推荐(0)
摘要: 描述 给定句子S,其由用空格分隔的单词组成。 每个单词仅包含小写和大写字母。 我们想将句子转换为“Goat Latin”(一种类似于Pig Latin的伪造语言)。 Goat Latin的规则如下: 如果一个单词以元音(a,e,i,o或u)开头,则在单词的末尾附加“ma”。 例如,“apple”这个 阅读全文
posted @ 2019-04-02 21:49 故人叹 阅读(191) 评论(0) 推荐(0)
摘要: Description Given two sets , , output the size of the union, intersection, and difference of and The size of set does not exceed 1e6 The value in the 阅读全文
posted @ 2019-04-02 21:49 故人叹 阅读(211) 评论(0) 推荐(0)
摘要: 描述 给定一个单词,你需要判断其中大写字母的使用是否正确。 当下列情况之一成立时,我们将单词中大写字母的用法定义为正确: 这个单词中的所有字母都是大写字母,如“USA”。 这个单词中的所有字母都不是大写字母,如“leetcode”。 如果它有多个字母,例如“Google”,那么这个单词中的第一个字母 阅读全文
posted @ 2019-04-02 21:48 故人叹 阅读(253) 评论(0) 推荐(0)
摘要: 1320. 包含重复值么 1320. Contains Duplicate 描述 给定一个整数数组,查找数组是否包含任何重复项。 如果数组中某个值至少出现两次,则函数应返回true,如果每个元素都是不同的,则返回false。 样例 给定nums = ,返回 。 阅读全文
posted @ 2019-04-02 21:48 故人叹 阅读(88) 评论(0) 推荐(0)
摘要: 1332. Number of 1 Bits Description Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hammin 阅读全文
posted @ 2019-04-02 21:48 故人叹 阅读(401) 评论(0) 推荐(0)
摘要: 描述 “托普利兹矩阵”是指如果从左上角到右下角的同一条主斜线上每个元素都相等的矩阵. 给定一个M x N矩阵,判断是否为“托普利兹矩阵”. 1. matrix 是一个二维整数数组. 2. matrix 的行列范围都为 [1, 20]. 3. matrix[i][j] 的整数取值范围为[0, 99]. 阅读全文
posted @ 2019-04-02 21:47 故人叹 阅读(632) 评论(0) 推荐(0)
摘要: 描述 最初,机器人位于(0, 0)处。 给定一系列动作,判断该机器人的移动轨迹是否是一个环,这意味着它最终会回到原来的位置。 移动的顺序由字符串表示。 每个动作都由一个字符表示。 有效的机器人移动是R(右),L(左),U(上)和D(下)。 输出应该为true或false,表示机器人是否回到原点。 您 阅读全文
posted @ 2019-04-02 21:47 故人叹 阅读(229) 评论(0) 推荐(0)
摘要: 描述 给出两个二叉树,并想象当你把其中一个覆盖另一个时,两棵树的一些节点重叠,而其他节点则不重叠。 您需要将它们合并到一个新的二叉树中。 合并规则是,如果两个节点重叠,则将节点值加起来作为合并节点的新值。 否则,非空节点将用作新树的节点。 合并过程必须从两个树的根节点开始。 您在真实的面试中是否遇到 阅读全文
posted @ 2019-04-02 21:47 故人叹 阅读(706) 评论(0) 推荐(0)
摘要: 描述 给定字符串J代表是珠宝的石头类型,而S代表你拥有的石头.S中的每个字符都是你拥有的一个石头. 你想知道你的石头有多少是珠宝. J中的字母一定不同,J和S中的字符都是字母。 字母区分大小写,因此"a"和"A"是不同的类型. S和J由字母组成且长度最大为50. J中字符各不相同. 您在真实的面试中 阅读全文
posted @ 2019-04-02 21:46 故人叹 阅读(109) 评论(0) 推荐(0)
摘要: 描述 把字符串 中的字符从左到右写入行中。 每行最大宽度度为100,如果往后新写一个字符导致该行宽度超过100,则写入下一行。 注意:一个字符的宽度不为1!给定一个数组 ,其中 是字符a的宽度, 是字符b的宽度,..., 是字符'z'的宽度。 问:把 全部写完,至少需要多少行?最后一行用去的宽度是多 阅读全文
posted @ 2019-04-02 21:46 故人叹 阅读(147) 评论(0) 推荐(0)
摘要: Description Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example E 阅读全文
posted @ 2019-04-02 21:46 故人叹 阅读(98) 评论(0) 推荐(0)
摘要: 描述 Given two numbers, number a and number b. Find the greatest common divisor of the given two numbers. In mathematics, the greatest common divisor (g 阅读全文
posted @ 2019-04-02 21:45 故人叹 阅读(184) 评论(0) 推荐(0)
摘要: 描述 给一个转换规则来转换数字n: n是奇数,n = 3n + 1 n是偶数,n = n / 2 经过若干次转换后,n会变成1。 现在给一个n,输出它转换到1需要的次数。 1 1; }else { n = 3 n + 1; } res++; } return res; } } ``` 阅读全文
posted @ 2019-04-02 21:45 故人叹 阅读(202) 评论(0) 推荐(0)
摘要: 描述 给出一棵二叉树,返回其节点值的前序遍历。 您在真实的面试中是否遇到过这个题? 样例 给出一棵二叉树 {1, ,2,3}, 返回 . 阅读全文
posted @ 2019-04-02 21:44 故人叹 阅读(115) 评论(0) 推荐(0)
摘要: 描述 给出三个整数 a, b, c, 如果它们可以构成三角形,返回 true. 三角形的定义 (Wikipedia) 样例 public class Solution { / @param a: a integer represent the length of one edge @param b: 阅读全文
posted @ 2019-04-02 21:44 故人叹 阅读(130) 评论(0) 推荐(0)
摘要: 描述 两个整数的Hamming距离是对应比特位不同的个数。 给定两个整数x和y,计算两者的Hamming距离。 0 ≤ x, y 1; y = y 1; } return res; } } ``` 阅读全文
posted @ 2019-04-02 21:44 故人叹 阅读(202) 评论(0) 推荐(0)
摘要: 描述 给定一个排序数组和一个目标值,如果在数组中找到目标值则返回索引。如果没有,返回到它将会被按顺序插入的位置。 你可以假设在数组中无重复元素。 您在真实的面试中是否遇到过这个题? 样例 挑战 O(log(n)) time 阅读全文
posted @ 2019-04-02 21:43 故人叹 阅读(125) 评论(0) 推荐(0)
摘要: 描述 合并两个排序的整数数组A和B变成一个新的数组。 你可以假设A具有足够的空间(A数组的大小大于或等于m+n)去添加B中的元素。 您在真实的面试中是否遇到过这个题? 样例 给出 A = , B = 合并之后 A 将变成 public class Solution { / @param A: sor 阅读全文
posted @ 2019-04-02 21:43 故人叹 阅读(111) 评论(0) 推荐(0)
摘要: 描述 给一个整数数组,找到两个数使得他们的和等于一个给定的数 target。 你需要实现的函数twoSum需要返回这两个数的下标, 并且第一个下标小于第二个下标。注意这里下标的范围是 0 到 n 1。 你可以假设只有一组答案。 您在真实的面试中是否遇到过这个题? 样例 给出 numbers = , 阅读全文
posted @ 2019-04-02 21:42 故人叹 阅读(117) 评论(0) 推荐(0)
摘要: Description Given a rotated sorted array, recover it to sorted array in place. Clarification What is rotated array? For example, the orginal array is 阅读全文
posted @ 2019-04-02 21:42 故人叹 阅读(104) 评论(0) 推荐(0)
摘要: Description Reverse a linked list. Example For linked list , the reversed linked list is 阅读全文
posted @ 2019-04-02 21:41 故人叹 阅读(77) 评论(0) 推荐(0)
摘要: 描述 Given a non overlapping interval list which is sorted by start point. Insert a new interval into it, make sure the list is still in order and non o 阅读全文
posted @ 2019-04-02 21:41 故人叹 阅读(68) 评论(0) 推荐(0)
摘要: Description Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row 阅读全文
posted @ 2019-04-02 21:41 故人叹 阅读(116) 评论(0) 推荐(0)
摘要: Description For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time complexity. If the ta 阅读全文
posted @ 2019-04-02 21:40 故人叹 阅读(90) 评论(0) 推荐(0)
摘要: 13. Implement strStr() Description For a given source string and a target string, you should output the first index(from 0) of target string in source 阅读全文
posted @ 2019-04-02 21:40 故人叹 阅读(143) 评论(0) 推荐(0)
摘要: Description Given number n. Print number from 1 to n. But: when number is divided by 3, print "fizz". when number is divided by 5, print "buzz". when 阅读全文
posted @ 2019-04-02 21:39 故人叹 阅读(149) 评论(0) 推荐(0)
摘要: 8. Rotate String Description Given a string and an offset, rotate string by offset. (rotate from left to right) Example Given . Challenge Rotate in pl 阅读全文
posted @ 2019-04-02 21:39 故人叹 阅读(99) 评论(0) 推荐(0)
摘要: 6. Merge Two Sorted Arrays Description Merge two given sorted integer array A and B into a new sorted integer array. Example Challenge How can you opt 阅读全文
posted @ 2019-04-02 21:39 故人叹 阅读(79) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 21:38 故人叹 阅读(1) 评论(0) 推荐(0)
摘要: 2. Trailing Zeros Description Write an algorithm which computes the number of trailing zeros in n factorial. Example Challenge O(log N) time 阅读全文
posted @ 2019-04-02 21:38 故人叹 阅读(95) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 20:08 故人叹 阅读(1) 评论(0) 推荐(0)
摘要: 1、延迟加载: load是true而get是false,意思就是 load采用的是延迟加载的方式 而get不是,也就是说get()采用立即加载方式,而load()采用延迟加载;,hibernate思想是 既然这个方法支持延迟加载 他就认为这个对象一定在数据库存在 2、load方法的加载过程: 例如: 阅读全文
posted @ 2019-04-02 20:06 故人叹 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 20:04 故人叹 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 20:03 故人叹 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 19:59 故人叹 阅读(0) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 19:58 故人叹 阅读(0) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 19:53 故人叹 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-04-02 19:51 故人叹 阅读(0) 评论(0) 推荐(0)