自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 hdfs中将文件夹下所有.bz2文件进行解压并且合并,然后传到本地

hadoop fs -getmerge file/* output

2015-08-20 16:33:05 1197

原创 欢迎使用优快云-markdown编辑器

Python Hadoop:Mapreducer java.lang.RuntimeException: Error in configuring object 或者 PipeMapRed.waitOutputThreads(): subprocess failed with code 2解决方案: hadoop jar ../hadoop-0.20.0/contrib/streaming/ha

2015-08-20 11:05:34 460

原创 C# 内存泄漏怎么办?

资料参考: C#内存释放  点击打开链接http://www.cnblogs.com/smartsensor/archive/2011/04/28/2031882.html                     VS2012自带的 性能分析 工具使用实例  点击打开链接 http://www.cnblogs.com/aarond/archive/2013/04/19/performance-

2014-12-22 15:33:00 769

转载 Python random模块

random是用于生成随机数的,我们可以利用它随机生成数字或者选择字符串。random.random()    用于生成一个随机浮点数:range[0.0,1.0)12import randomrandom.random()  #输出 0.5487876445645461

2014-09-06 20:05:35 502

原创 scrapy + selenium 爬取js生成的网页元素

1、安装scrapy:   详情请参考http://blog.youkuaiyun.com/wukaibo1986/article/details/8167590

2014-09-05 22:08:48 4294

原创 c#基础

1、Dictionary键值添加      如果value为Listlei'xin

2014-08-29 10:00:15 563

原创 一、基本模块python,Numpy, PIL, Opencv的安装(computer vision with python)

1、从网站下载NumPy的Windows安装程序:           http://sourceforge.net/projects/numpy/files/

2014-07-05 20:32:49 1131

原创 Longest Substring Without Repeating Characters(LeetCode)

问题:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is

2014-06-29 15:16:56 627

原创 Interleaving String(Leetcode)

class Solution {public: bool isInterleave(string s1, string s2, string s3) { //理解了,动态规划问题,假设s3的第i+j个元素为s1的i个和s2的j个构成,那么有 // f(i,j) = f(i-1,j)&&(s1(i-1)==s3(i+j-1)) || f(i,j-1)&

2014-06-28 20:12:09 495

原创 linux下make出错

错误一:/usr/include/pngconf.h:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token/usr/include/libpng12/pngconf.h:337: error: expected '=', ',', ';', 'asm' or '__attribute__'

2014-04-17 10:12:36 2480

转载 如何写Makefile

概述——什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和 professional的程序员,makefile还是要懂。这就好像现在有这么多的HTML的编辑器,但如果你想成为一个专业人士,你还是要了解 HTML的标识的含义。特别在Unix下的软件编译,你就不能不自己写makefile了,会不会

2014-03-31 10:41:16 511

转载 Matlab 图像小波变换

二维小波变换和一维小波变换十分类似,下面直接通过例子说明。1. 读入原始图像并显示I_noise = imread( 'coins.png');figure, imshow(I_noise);title( '原始图像' );图像小波变换" title="Matlab 图像小波变换" style="margin:0px;

2014-03-30 17:11:24 9806 1

转载 Sublime Text2 使用教程

代码编辑器或者文本编辑器,对于程序员来说,就像剑与战士一样,谁都想拥有一把可以随心驾驭且锋利无比的宝剑,而每一位程序员,同样会去追求最适合自己的强大、灵活的编辑器,相信你和我一样,都不会例外。我用过的编辑器不少,真不少~ 但却没有哪款让我特别心仪的,直到我遇到了 Sublime Text 2 !如果说“神器”是我能给予一款软件最高的评价,那么我很乐意为它封上这么一个称号。它小巧绿色且速度非

2014-03-30 14:17:50 962

原创 Single Number (LeetCode)

题目:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us

2014-03-28 23:06:04 560

原创 Linked List Cycle II (LeetCode)

题目: Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?思路:    定义两个指针:fast和slow, f

2014-03-27 15:24:25 555

原创 Insertion Sort List (LeetCode)

题目:Sort a linked list using insertion sort.解释:C++ 解答:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x)

2014-03-20 13:59:29 662

原创 Sort List (LeetCode)

题目:Sort a linked list in O(n log n) time using constant space complexity.C++解答:思路:利用归并排序,时间复杂度满足要求。#includeusing namespace std;struct ListNode { int val; ListNode *next; L

2014-03-17 17:14:54 483

原创 Reverse Integer (LeetCode)

题目:everse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask

2014-03-15 16:25:53 569

原创 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

2014-03-15 15:33:35 632

原创 排序(快排, 计数排序)

1. 快排#includeusing namespace std;void swap(int *p, int *q){ int temp = *p; *p = *q; *q = temp;}int PARTITION(int A[], int p, int q){ int i=p-1; int r = A[q]; for(int j = p; j <= q-1;j

2014-03-13 14:35:21 832

原创 Two Sum (LeetCode)

题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the ta

2014-03-12 17:27:24 646

原创 const_iterator与const iterator

vector :: const_iterator        表明这个迭代器它自身的值可以更改(可以指向其他的元素),但是不能通过对它解引用来改变它所指向的元素的值。   如果传递过来的是一个const类型的容器,那么只能使用const_iterator来进行遍历const vector::iterator      表明这个迭代器本身就是一个const类型的,当声明该类型的迭代器时,必须要同时

2014-03-10 14:23:05 682

原创 Reverse Words in a String (LeetCode)

题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clarification:What constitutes a word?A sequence of

2014-03-08 12:32:02 969

原创 结构体类型(一般方式和位域存储方式)的sizeof

结构体在内存中的存放是按照字节对齐来实现存放的什么是对齐,以及为什么要对齐:     现代计算机中内存空间都是按照byte划分的,从理论上讲似乎对任何类型的变量的访问可以从任何地址开始,但实际情况是在访问特定变量的时候经常在特定的内存地址访问,这就需要各类型数据按照一定的规则在空间上排列,而不是顺序的一个接一个的排放,这就是对齐。 对齐的作用和原因:    各个硬件平台对存

2014-03-06 19:18:09 1223

原创 c++中sizeof的用法

1) 作用:sizeof计算数据(包括数组、变量、类型、结构体等)所占内存空间,用字节数表示。2) sizeof有三种用法形式,( sizeof操作符,对变量或对象可以不加括号,但若是类型,须加括号),如下:    1) sizeof( object ); //  对象     2) sizeof( type_name ); // 类型     3) sizeof object

2014-03-05 20:07:22 1314

原创 C# 接口---构建可枚举类型 14/02/26

个人C#学习笔记:using System;using System.Collections;   using System.Collections.Generic;using System.Linq;using System.Text;namespace MySpace{    interface Car    {        string Na

2014-02-26 12:17:55 799

空空如也

空空如也

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

TA关注的人

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