自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

uj_mosquito的专栏

菜鸟一枚

  • 博客(51)
  • 资源 (6)
  • 收藏
  • 关注

原创 Container With Most Water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin

2014-12-31 18:01:04 445

原创 Add Two Numbers

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 10:18:59 511

原创 Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2014-12-30 09:54:56 565

原创 Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 注:包含了171E

2014-12-29 16:07:49 576

原创 Excel Sheet Column Number

Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...

2014-12-29 15:02:58 380

原创 Single Number II

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

2014-12-29 11:35:08 346

原创 Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1",

2014-12-26 11:15:58 461

原创 Reverse Words in a String

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitutes

2014-12-26 10:28:14 708

原创 apt-get Unable to fetch some archives的解决方法

报错:E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.19-10ubuntu2.2_amd64.deb  Could not resolve 'archive.ubuntu.com'E: Failed to fetch http://archive.ubuntu.co

2014-12-25 17:01:14 18314 3

原创 CephFS环境搭建(二)

《CephFS环境搭建(一)》介绍了如何简单搭建一个单Mon,MDS的Cephfs并导出使用,这里深入一步建立三个池,SSD和SATA分开存放在不同的池,建立多Mon,多MDS,结合纠删码,cache分层,建立一个比较健全的cephfs。

2014-12-25 13:58:19 4008 1

原创 Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the larges

2014-12-25 13:19:29 473

原创 常用的shell命令(陆续更新)

1、获取管道前面的返回值 echo ${PIPESTATUS[0]}e.g.root@node2:~# date1 | echo 22No command 'date1' found, did you mean: Command 'date' from package 'coreutils' (main)date1: command not foundroot@node2

2014-12-24 14:28:09 993

原创 Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [

2014-12-22 19:04:54 399

原创 Single Number

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 using ext

2014-12-19 17:13:34 521

原创 Reorder List

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-19 16:50:24 481

原创 Find Peak Element

A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, in

2014-12-19 14:55:48 475

原创 Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti

2014-12-19 10:30:06 525

原创 Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio

2014-12-19 10:08:56 490

原创 Compare Version Numbers

Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assume that the version strings are non-empty and co

2014-12-18 18:58:37 658

原创 Ceph多Mon 多mds

1、当前状态2、在172.10.2.172(node2)再添加一个mon(mon.node2)ssh node2vim /etc/ceph/ceph.conf   添加mon.node2的相关配置ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.cl

2014-12-17 17:15:24 4080 2

原创 Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum

2014-12-17 12:38:50 494

原创 Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node./** * Definition for binary tree *

2014-12-17 09:56:59 374

原创 Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15,7},

2014-12-17 09:29:17 477

原创 Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the following

2014-12-16 21:40:05 533

原创 Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 /

2014-12-16 20:48:50 448

原创 Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.#include#

2014-12-16 18:03:13 373

原创 Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node./** * Definition for binary tree

2014-12-15 19:41:22 359

原创 Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.#include#include#includechar *longestCommonPrefix(char *strs[],int n){ int i,j,k; char *res=(

2014-12-15 19:32:11 523

原创 String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2014-12-15 17:41:01 474

原创 Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.思路:想办法把第一个和最后一个数字剥离出来比较#includeint isPalindrome(int x){ int d=x/10,i=1; int begin=0,end=0; if(x<0) return 0

2014-12-15 16:29:57 451

原创 Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get

2014-12-15 15:39:45 578

原创 Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] ha

2014-12-12 17:09:10 534

原创 Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999罗马数字计数方法:基本字符IVXLCDM相应的阿拉

2014-12-12 16:03:09 483

原创 Pascal's TriangleII

溢出了,还是要用加的,不能用阶乘……Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extr

2014-12-12 14:17:42 392

原创 ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2014-12-12 13:50:35 486

原创 Longest Substring Without Repeating Characters

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 3. Fo

2014-12-11 20:25:04 529

原创 Ceph配置参数(三)

Ceph配置参数(一)Ceph配置参数(二)8、MONITOR CONFIG REFERENCEhttp://ceph.com/docs/master/rados/configuration/mon-config-ref/        客户端在读写数据前,都比去和monitor取得联系,获得cluster map,结合CRUSH算法计算得到对象的位置。(1

2014-12-11 19:25:39 4312 1

原创 Ceph配置参数(二)

Ceph配置参数(一)6、KEYVALUESTORE CONFIG REFERENCEhttp://ceph.com/docs/master/rados/configuration/keyvaluestore-config-ref/KeyValueStore is an alternative OSD backend compared to FileStore. Curre

2014-12-11 09:02:54 5874

原创 Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]#include#includeint **g

2014-12-09 19:22:57 483

原创 Ceph配置参数(一)

1、POOL, PG AND CRUSH CONFIG REFERENCEhttp://docs.ceph.com/docs/master/rados/configuration/pool-pg-config-ref/所属配置段:【global】格式:osd pool default pg num = 250每个存储池最大pg数:mon max pool pg num同一个

2014-12-09 18:49:25 10442 1

apache-tomcat-6.0.18.exe

Apache Tomcat is an implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process

2012-01-09

Migrating Enterprise Storage Applications to the Cloud

Cloud computing has emerged as a model for hosting computing infrastructure and outsourcing management of that infrastructure. It offers the promise of simplified provisioning and management, lower costs, and access to resources that scale up and down with demand. Cloud computing has seen growing use for Web site hosting, large batch processing jobs, and similar tasks. Despite potential advantages, however, cloud computing is not much used for enterprise applications such as backup, shared file systems, and other internal systems. Many challenges need to be overcome to make cloud suitable for these applications, among them cost, performance, security, and interface mismatch.

2012-01-09

分布式网络存储Distributed File Systems--Concepts and Examples.PDF

The purpose of a distributed file system (DFS) is to allow users of physically distributed computers to share data and storage resources by using a common file system. A typical configuration for a DFS is a collection of workstations and mainframes connected by a local area network (LAN). A DFS is implemented as part of the operating system of each of the connected computers. This paper establishes a viewpoint that emphasizes the dispersed structure and decentralization of both data and control in the design of such systems. It defines the concepts of transparency, fault tolerance, and scalability and discusses them in the context of DFSs. The paper claims that the principle of distributed operation is fundamental for a fault tolerant and scalable DFS design. It also presents alternatives for the semantics of sharing and methods for providing access to remote files. A survey of contemporary UNIX@-based systems, namely, UNIX United, Locus, Sprite, Sun’s Network File System, and ITC’s Andrew, illustrates the concepts and demonstrates various implementations and design alternatives. Based on the assessment of these systems, the paper makes the point that a departure from the approach of extending centralized file systems over a communication network is necessary to accomplish sound distributed file system design. Categories and Subject Descriptors: C

2010-04-12

嵌入式系统linux下触摸屏实验报告

嵌入式实验报告,内容是在linux下完成触摸式手机的功能触摸屏工作原理、ADS7843模/数转换芯片

2009-08-29

空空如也

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

TA关注的人

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