- 博客(27)
- 资源 (7)
- 收藏
- 关注
原创 2014 跌跌撞撞
又是一年,想起上次做总结还是在大学毕业的时候,那时候是感概万千,给自己定了N多目标,转眼一年半过去了,回想起当初的目标,有几个是真真切切实现了的。这一年,过的还算充实,去年的这个时候,刚上完专业课,被boss叫来跟师兄的毕设,那是自己第一次接触科研这个东西,以前我总觉得搞科研是一个很神圣的事情,可是就这样糊里糊涂的开始了,说实话当时跟着三个师兄一起,还是有些兴趣的,两个人搞hadoop调度(关
2014-12-31 21:44:24 839
原创 Add Two Numbers leetcode
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link
2014-12-31 19:45:36 756
原创 多线程的一些面试题目及其解答
1、线程的基本概念、线程的基本状态及状态之间的关系? 线程又称轻量级进程,线程是进程中某个单一顺序的控制流,是程序执行流的最小单位。线程由线程ID、当前指令指针、寄存器集合和堆栈组成。线程是进程的一个实体,通常一个进程都拥有若干个线程,是被系统调度和分配的基本单位,线程与同一进程中的其他线程共享进程的全部资源。线程有五种基本状态:新生状态,就绪状态,运行状态,阻塞状态,死亡状态。状态间关
2014-12-30 14:28:25 1412 2
原创 Insertion Sort List leetcode
连用插入排序法将链表排序为了方便,只定义一个头节点。思路:定义头结点 result 令 result->next =head , 然后将链表中的值一一取出来,然后插入到合适的位置 插入之前要先断开链表 新链表刚开始只有一个元素 head令p=head->next p往后遍历, 将p的值插入到合适的新链表中
2014-12-29 22:19:25 741
原创 Intersection of Two Linked Lists leetcode
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘
2014-12-29 21:42:33 835
原创 spring 事务传播行为和事务隔离级别
1、Spring声明式事务声明式事务(declarative transaction management)是Spring提供的对程序事务管理的方式之一。Spring的声明式事务顾名思义就是采用声明的方式来处理事务。这里所说的声明,就是指在配置文件中申明。用在Spring配置文件中声明式的处理事务来代替代码式的处理事务。这样的好处是,事务管理不侵入开发的组件,具体来说,业务逻辑
2014-12-29 20:30:56 13689 2
原创 HttpServletResponse和HttpServletRequest详解
HttpServletResponse,HttpServletRequest详解1、相关的接口HttpServletRequestHttpServletRequest接口最常用的方法就是获得请求中的参数,这些参数一般是客户端表单中的数据。同时,HttpServletRequest接口可以获取由客户端传送的名称,也可以获取产生请求并且接收请求的服务器端主机名及IP地址
2014-12-29 15:58:49 7871
原创 HttpServletRequest中getAttribute()和getParameter()的区别
HttpServletRequest中getAttribute()和getParameter()的区别1、获取的来源不同HttpServletRequest类有setAttribute()方法,而 没有setParameter()方法 get/setParameter是在对你的页面中的表单元素进行操作,获取的是这个表单元素中的值,是某个表单提交过去的数据比如常见的获取POS
2014-12-29 15:42:00 12907 1
原创 Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?题目的意思是判断链表中有没有环思路:定义两个指针,一个慢指针,一个快指针,慢指针一次走两步,快指针一次走一步,如果有环,那么慢、快指针一
2014-12-26 20:01:45 691
原创 Merge k Sorted Lists leetcode
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.题目的意思是将k个有序链表合并成一个有序链表思路:利用归并排序,图解如下:只不过在k链表合并中,图中的10 4 6 等元素变为了链表,需要 mergeTwoList(A,
2014-12-26 09:56:17 782
原创 Merge Two Sorted Lists leetcode
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.题目意思为合并两个链表,不能用额外的空间(新链由两个链拼接而成)思路:比较简单,直接定义两个指针,分别
2014-12-25 21:51:37 828
原创 Partition List leetcode
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of
2014-12-25 21:37:02 827
原创 Remove Duplicates from Sorted List II leetcode
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->1-
2014-12-24 21:00:03 770
原创 kettle 4.4源码分析之Transformation
1.1. 相关类和接口1.1.1. JobEntryTrans实现了JobEntryInterface的execute()方法,被job执行。由JobEntryTrans实例化Trans,并执行。1.1.2. TransGraph当点击trans面板的run时,由TransGraph实例化Trans,并执行。Trans主要成员有:private TransMeta tran
2014-12-23 10:42:25 2773
原创 Remove Duplicates from Sorted List leetcode
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.题目意思为删除链表中重复的元素思路:
2014-12-22 21:48:14 777
原创 Remove Nth Node From End of List leetcode
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the
2014-12-19 20:13:46 721
原创 kettle(PDI)简介
最近项目需要,开始接触kettle。Kettle 的主作者是 Matt ,他在 2003 年就开始了这个项目,在 PDI 的代码里就可以看到最早的日期大概在2003年4月。 从版本2.2开始, Kettle 项目进入了开源领域,并遵守 LGPL 协议。在 2006年 Kettle 加入了开源的 BI 组织 Pentaho, 正式命名为PDI, 加入Pentaho 后Kettle 的发展越来
2014-12-19 10:03:02 4822
原创 Reorder List leetcod
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it to
2014-12-17 22:00:27 1053
原创 如何更好的理解和使用Github
刚在知乎上面看到了一个对Github使用通俗易懂的解释:你也许不懂如何造一辆凯迪拉克,但你可以驾驶凯迪拉克。你也许不懂Evernote是用什么技术做出来的,但你也可以使用Evernote。你也许不懂Git,但你可以使用Github。作为想要1小时学会大体使用Github的刚刚学习前端10天的技术盲,我是这样做的:了解Github的基本功能:也就是为什么用Gith
2014-12-16 09:48:38 2378
原创 Reverse Linked List II leetcode
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the
2014-12-16 09:26:13 910
原创 Reverse Nodes in k-Group leetcode
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is
2014-12-15 21:40:31 713
原创 Sort List leetcode
实现单链表排序 时间复杂度要求为 nlogn 由于是单链表,用快速排序无法往前面遍历(双向链表可以考虑),这里我们用到归并排序代码如下:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(in
2014-12-10 22:10:08 850
原创 Substring with Concatenation of All Words leetcode
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without
2014-12-09 22:06:29 746
原创 Minimum Window Substring leetcode
Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T =
2014-12-08 21:50:53 952
转载 数据交换工具Kettle
网上搜集了一些关于开源数据交换工具Kattle的文章,特收藏如下:文章一:ETL和Kettle简介ETL即数据抽取(Extract)、转换(Transform)、装载(Load)的过程。它是构建数据仓库的重要环节。数据仓库是面向主题的、集成的、稳定的且随时间不断变化的数据集合,用以支持经营管理中的决策制定过程。数据仓库系统中有可能存在着大量的噪声数据,引
2014-12-07 11:19:07 5312
原创 Longest Substring Without Repeating Characters 字符串中最长的无重复子串长度
Longest Substring Without Repeating Characters
2014-12-04 20:49:30 1491
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人