<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sipherhern的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sipherhern</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sipherhern]]></copyright><item><title><![CDATA[Oracle安装以及连接plsql过程的注意事项]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/54093370</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/54093370</guid><author>sipherhern</author><pubDate>Thu, 05 Jan 2017 15:07:34 +0800</pubDate><description><![CDATA[1首先，一定要用32位的Oracle，因为plsql只有32位的，正常情况下无法直接连接64位的Oracle。否则后面会很麻烦。 2按百度文库的方法安装好32位Oracle后，要设置环境变量 
ORACLE_HOME 和 TNS_ADMIN3打开plsql，先不登陆，然后菜单栏-工具-首选项，填写主目录名和OCI库。完成后重启程序可以去看下 帮助-支持信息中的tnsnames.ora文件等等，然后数]]></description><category></category></item><item><title><![CDATA[Oracle错误记录]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/54093286</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/54093286</guid><author>sipherhern</author><pubDate>Thu, 05 Jan 2017 15:00:35 +0800</pubDate><description><![CDATA[※ OracleServiceOrcl服务消失处理方案在某次卸载了Oracle64位并重装了32位以后，在【服务】出找不到OracleServiceOrcl服务，只有剩下几个TNS监听服务。
解决方法： 用管理员权限打开cmd，并执行如下命令
 oradim -NEW -SID orcl -STARTMODE manual -PFILE "D:\app\jay\product\11.2.0\dbho]]></description><category></category></item><item><title><![CDATA[CentOS 配置SSH免密码登陆]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/53018521</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/53018521</guid><author>sipherhern</author><pubDate>Thu, 03 Nov 2016 09:54:44 +0800</pubDate><description><![CDATA[客户机配置 
1.查看~/.ssh文件夹,若已经存在有公钥文件(id_rsa.pub),私钥文件(id_rsa),则可以跳过客户端配置.2.生成密钥文件. 
$ ssh-keygen  
然后一路回车. 
然后~/.ssh下会生成id_rsa.pub和id_rsa, 其中id_rsa文件起到唯一标识你的客户机的作用. 
注意:不要改这两个文件的文件名,ssh登陆时会读取id_rsa文件.服务器配置]]></description><category></category></item><item><title><![CDATA[centos]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/52945825</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/52945825</guid><author>sipherhern</author><pubDate>Thu, 27 Oct 2016 16:03:50 +0800</pubDate><description><![CDATA[yum出现Could not retrieve mirrorlist解决方法
http://jingyan.baidu.com/article/6c67b1d6f492d62786bb1e45.html]]></description><category></category></item><item><title><![CDATA[最长问题记录]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/52513461</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/52513461</guid><author>sipherhern</author><pubDate>Mon, 12 Sep 2016 14:49:47 +0800</pubDate><description><![CDATA[1、最长回文字符串 
例子：如”isabba” 、”abcbaXXab” 这样子的字符串，部分是回文的，求出最长的回文部分。解法一思路： 
穷尽字符串。将字符串拆分成子字符串，然后对子字符串进行回文判断，并记录其长度。 public static void main(String[] args){
        String str = "isabbaXXab";
        int len]]></description><category></category></item><item><title><![CDATA[实现一堆栈，要求三个操作，Pop，Push,GetMaxValue，时间均为O(1)]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/52187803</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/52187803</guid><author>sipherhern</author><pubDate>Thu, 11 Aug 2016 23:56:57 +0800</pubDate><description><![CDATA[问题描述
扩展stack的实现，完成正常的push，pop操作，新增访问最小（或最大）元素的接口Min（），使得push，pop，Min的时间复杂度都是O(1)。
问题分析
拿到这道题，我们最先的思考往往是，设计一个算法从栈中拿到最小值，所以开始考虑任何可以用来实现该功能的排序和查找算法。假设栈中有n个元素，一切排序和查找都不可能实现O(1)的时间复杂度找到最小值。再看题目，既然是扩展stack的实]]></description><category></category></item><item><title><![CDATA[用O(1)的时间复杂度删除单链表中的某个节点]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/52187783</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/52187783</guid><author>sipherhern</author><pubDate>Thu, 11 Aug 2016 23:52:41 +0800</pubDate><description><![CDATA[给定链表的头指针和一个结点指针，在O(1)时间删除该结点。链表结点的定义如下：/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode(int x) { val = x; }
 * }
 */函数的声明如下：voi]]></description><category></category></item><item><title><![CDATA[349. Intersection of Two Arrays]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/52023984</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/52023984</guid><author>sipherhern</author><pubDate>Mon, 25 Jul 2016 15:11:44 +0800</pubDate><description><![CDATA[两个数组，找出重复的元素，思路：先让两个数组排序，然后用两个指针分别来移动数组。 
当数组有相同的元素时，就一直向前移动，直到和后面的元素不一样。当两个数组都停下来时，进行比较。 
如果Apublic class Solution {
  public int[] intersection(int[] nums1, int[] nums2) {
        int m = nums1.lengt]]></description><category></category></item><item><title><![CDATA[常用sql功能]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51980502</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51980502</guid><author>sipherhern</author><pubDate>Thu, 21 Jul 2016 10:50:00 +0800</pubDate><description><![CDATA[横纵表互转
select n.name,
sum(case course when '语文' then grade else 0 end) as 语文,
sum(case course when '数学' then grade else 0 end) as 数学,
sum(case course when '英语' then grade else 0 end) as 英语
from diy.new_]]></description><category></category></item><item><title><![CDATA[Ioc容器]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51959419</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51959419</guid><author>sipherhern</author><pubDate>Tue, 19 Jul 2016 20:49:40 +0800</pubDate><description><![CDATA[IOC容器是什么？  
  （转http://www.cnblogs.com/lihuiyy/archive/2012/05/22/2512712.html）
Spring的IoC容器就是一个实现了BeanFactory接口的可实例化类。事实上，Spring提供了两种不同的容器：一种是最基本的BeanFactory，另一种是扩展的ApplicationContext。BeanFactory 仅提供了]]></description><category></category></item><item><title><![CDATA[Leetcode上List问题的总结（持续更新）]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51823265</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51823265</guid><author>sipherhern</author><pubDate>Mon, 04 Jul 2016 19:50:37 +0800</pubDate><description><![CDATA[———-检测链表是否有环，并返回环开始的节点 
题目142. Linked List Cycle II 
    Given a linked list, return the node where the cycle begins. If there is no cycle, return null. 解法：参考了leetcode的某个大神的解法。通过快慢指针。假设快指针的速度为2S,慢指针的速度]]></description><category></category></item><item><title><![CDATA[安装完Hadoop之后，命令行输入hadoop却找不到命令的解决方法]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51713052</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51713052</guid><author>sipherhern</author><pubDate>Sun, 19 Jun 2016 17:07:31 +0800</pubDate><description><![CDATA[大多数原因是没有配置环境变量解决方法 
1. cd /etc/profile 
2. 把这三条加到proflie文件的最后export JAVA_HOME=XXXX(在安装了jdk的前提下，echo $JAVA_HOME可以查看得到)
export HADOOP_HOME=XXX（hadoop的安装路径）
export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$]]></description><category></category></item><item><title><![CDATA[Unable to load native-hadoop library for your platform... using builtin-]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51707596</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51707596</guid><author>sipherhern</author><pubDate>Sat, 18 Jun 2016 22:49:06 +0800</pubDate><description><![CDATA[亲测有效！！ 
方法： 
一，通常编译好的hadoop库是在lib中，如果你不想编译，可以用lib/native里面的预编译库，然后把native的库移动到lib文件夹中。cp hadoop-2.6.0/lib/native/* hadoop-2.6.0/lib/二，加入系统变量export HADOOP_COMMON_LIB_NATIVE_DIR=/home/administrator/work/]]></description><category></category></item><item><title><![CDATA[ubuntu下NTFS分区无法访问的问题]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51472677</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51472677</guid><author>sipherhern</author><pubDate>Sat, 21 May 2016 22:15:28 +0800</pubDate><description><![CDATA[解决方法： 
sudo ntfsfix /dev/sda5 如果这个磁盘可以正常挂载，说明问题已经解决了，其他磁盘在重启后也可以挂载了网上查找资料得出的结论：可能由于Windows 未被正常关闭产生了错误，导致系统误以为存在临时缓存文件，禁止访问所致。其他磁盘可以解决，但是在修复sda1的时候，因为win10高级休眠，修复失败了。解决方法是关闭快速启动。关闭办法是控制面板，在电源管理中，选择关闭盖子]]></description><category></category></item><item><title><![CDATA[PL/SQL TNS 12170 连接超时]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51417852</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51417852</guid><author>sipherhern</author><pubDate>Sun, 15 May 2016 17:05:26 +0800</pubDate><description><![CDATA[PL/SQL 如果在登陆时出现这样的问题,该如何解决呢？ 
         首先，打开PL/SQL，菜单栏 – 帮助 – 支持信息 
         查看oracle信息能不能找到tnsfile，如果找不到，在工具 – 首选项  这里固定oracle的位置。 
         如果能找到，就打开这个目录的tnsname.oRA文件，修改里面的HOST IP。 注意，如果出现连接超时的情况，很可]]></description><category></category></item><item><title><![CDATA[ORACLE用SYS登录报ORA-28009：connection as SYS should be as SYSDBA OR SYSOPER解决方法]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51366222</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51366222</guid><author>sipherhern</author><pubDate>Tue, 10 May 2016 20:16:25 +0800</pubDate><description><![CDATA[使用sqlplus登录时，为何第一次会报错，第二次不会呢？ 
正常输入用户名的口令，就会报错，因为SYS是在数据库之外的超级管理员，所以我们在登录的时候 
要在输入口令：口令+as sysdba(比如：123456 as sysdba)]]></description><category></category></item><item><title><![CDATA[LeetCode Swap Nodes in Pairs]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51339917</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51339917</guid><author>sipherhern</author><pubDate>Sat, 07 May 2016 20:45:34 +0800</pubDate><description><![CDATA[递归实现：(思路非常清晰) public ListNode swapPairs(ListNode head) {
     if(head == null || head.next == null){
         return head;
     }
     ListNode second = head.next; 
     ListNode third = second.next;]]></description><category></category></item><item><title><![CDATA[螺旋矩阵 -- 腾讯16春招笔试题目]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51289733</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51289733</guid><author>sipherhern</author><pubDate>Sun, 01 May 2016 10:47:45 +0800</pubDate><description><![CDATA[解题思路：解螺旋矩阵的最重要的地方是要知道矩阵的个数，看下图： 
 
 
如果是n 是奇数，则中间只有一个数，不是一个矩阵，如果n 是偶数，则中间是一个矩阵，总的矩阵个数为n/2，后面的任务就是从外向里遍历每一个矩阵。int m = 0;
for (int k = 0; k < n/2; ++ k) { //n/2矩阵个数
    for (int i = 0; i <= n-1-k; ++ i)]]></description><category></category></item><item><title><![CDATA[LeetCode 102. Binary Tree Level Order Traversal]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51201281</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51201281</guid><author>sipherhern</author><pubDate>Wed, 20 Apr 2016 15:35:08 +0800</pubDate><description><![CDATA[思路：这道题目感觉有点难度。题目的意思是将每一层的节点都放到一个list中，最后返回一个list  public List<List<Integer>> levelOrder(TreeNode root) {
        List<List<Integer>> answerList = new LinkedList<List<Integer>>();
        // nodeList用来记]]></description><category></category></item><item><title><![CDATA[n&(n-1) 的作用记录]]></title><link>https://blog.youkuaiyun.com/sipherhern/article/details/51193525</link><guid>https://blog.youkuaiyun.com/sipherhern/article/details/51193525</guid><author>sipherhern</author><pubDate>Tue, 19 Apr 2016 20:06:30 +0800</pubDate><description><![CDATA[n&(n-1)作用：将n的二进制表示中的最低位为1的改为0。 
应用： 
1. 求某一个数的二进制表示中1的个数 
while (n >0 ) { 
      count ++; 
      n &= (n-1); 
}
判断一个数是否是2的方幂 
n > 0 && ((n & (n - 1)) == 0 )]]></description><category></category></item></channel></rss>