- 博客(24)
- 资源 (18)
- 收藏
- 关注
原创 双系统安装centos后无法引导win7
1.进入root账户 2.运行命令编辑引导文件$vim /boot/grub2/grub.cfg3.在文件空白出添加处以下代码menuentry 'Windows 7' { insmod part_msdos insmod ntfs insmod ntldr set root=(hd0,1) chainloader +1 boot}4.重启计算机
2016-09-16 13:21:30
1893
原创 在win环境下利用secureCRT连接Linux服务器
在同事那里看来一个比putty更好用的远程连接工具secureCRT,不仅可在win环境下连接Linux服务器,还支持文件的传输。1. 上传文件只需在命令行下使用: rz下载文件只需在命令行下使用:sz为防止数据中断,传输大文件时使用以下命令:rz–beysz–bey2. 但是在此环境使用vim时,语法不会高亮显示,需在Options->Session Option...
2016-08-12 18:57:03
413
原创 编写字符设备驱动实现内核态与用户态通信
本次主要实现的是通过编写字符设备,实现从用户态获得只有内核太才有权限访问的进程段地址(比如代码段,其他同理)初稿主要代码如下:firstdriver.c/*字符注册模块实现如下*/#include<linux/slab.h>#include<linux/module.h>#include<linux/init.h>#include&l...
2015-11-01 22:20:04
1321
原创 编写内核模块输出代码段的地址空间
#include<linux/sched.h>#include<linux/pid.h>#include<linux/slab.h>#include<linux/module.h>#include<linux/kernel.h>static int pidnum = 1;//将之前后台运行的进程的pid通过此模块参数传给模块...
2015-10-27 23:06:03
1183
原创 Permutations
Permutations Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [
2015-08-01 14:35:12
416
原创 Path Sum
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 th
2015-07-31 20:48:37
380
原创 Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key.Th
2015-07-31 16:11:13
312
原创 Min Stack
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
2015-07-30 22:33:28
337
原创 Symmetric Tree
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 / \ / \
2015-07-30 21:35:44
380
原创 Climbing Stairs
Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
2015-07-29 22:00:36
328
原创 Factorial Trailing Zeroes
Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.思路:有多少个2与5相乘,就有多少个0,由于2远多于5,就是算有多
2015-07-27 19:28:00
292
原创 Container With Most Water
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 o
2015-07-27 17:05:27
327
原创 一周知识点总结20150726
2015-7-221.printf 内部的表达式从右开始向左计算;2.左移,右移运算符的优先级低于+ ,-。3.判断X是不是2的N次方的最快的方法是就让X减1后与X本身做与运算。4.对a和b做与运算就相当于求 他两个公共部分的一半,做异或运算就相当于求不同部分的和。5.定义宏,要把整体,变量,表达式都用括号括起来。6.任何不修改数据成员的函数都应该声明为const函数
2015-07-26 16:37:32
395
原创 1-9这9个数字组成并且都只出现一次 ,第一位能被1整除,前两位能被2整除
1-9这9个数字组成并且都只出现一次,这个九位数的第一位能被1整除,前两位能被2整除,前三位能被3整除...前九位能被9整除.解题需要注意的地方:1.设置全局数组实现回溯;2.在每一次调用里再次for循环,实现对每个位置每个数字的枚举。#include#includeusing namespace std;bool used[10];vector v;void dfs(i
2015-07-25 20:24:40
5711
原创 Integer to Roman
Integer to Roman Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.备注:只要弄明白roman numeral, 这个题不算难,自己出现的主要问题是在命名方面,注意:尽量少使用无法定义
2015-07-25 14:42:29
305
原创 螺旋队列
21 22 ...20 7 8 9 1019 6 1 2 1118 5 4 3 1217 16 15 14 13 看清以上数字排列的规律,设 1 点的坐标是 (0,0),x 方向向右为正,y 方向向下为正。例如,7 的坐标为 (-1,-1),2的坐标为 (0,1),3 的坐标为 (1,1)。编程实现输入任意一点坐标 (x,y),输
2015-07-25 10:06:36
312
原创 Two Sum
Two Sum 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
2015-07-24 20:35:18
289
原创 ZigZag Conversion
ZigZag Conversion 先写下感悟:1.编写此段程序的时候,for循环里忘记了对长度(k 2.用string编程比char数组实现来的简单。The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may
2015-07-24 16:48:59
431
原创 Linked List Cycle
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?采用快慢指针实现,快指针总会赶上慢指针。
2015-07-22 23:25:40
298
原创 Samba:您没有权限访问的问题
一直想了解下Samba,今天用windows下载了taglist,本来想省事,直接搭个Samba服务器从Windows上直接把taglist传过去不用下载了,结果却遇到一个小问题折腾了一个下午。遇到的问题事后发现是如此的简单,做的时候却折腾了良久。 按照网上说的关闭防火墙,selinux,然后重启了Samba,还是不行,修改host allow,设置种种smb.conf里的文件,最后...
2015-06-25 17:44:15
2133
转载 CentOS 6.5安装时版本的基本含义
Desktop :基本的桌面系统,包括常用的桌面软件,如文档查看工具。Minimal Desktop :基本的桌面系统,包含的软件更少。Minimal :基本的系统,不含有任何可选的软件包。Basic Server :安装的基本系统的平台支持,不包含桌面。Database Server :基本系统平台,加上MySQL和PostgreSQL数据库,无桌面。Web Server :基本系统平台,加
2015-04-19 19:43:36
403
原创 liunx下可以嵌套创建多少文件夹
liunx下可以嵌套创建多少文件夹?这是老师留给我们思考的一个作业,于是不停的mkdir,mkdir,最后发现非手工可为也。于是写了一个脚本文件去自动执行,代码如下: 1 #!/bin/bash //定义由bshell去执行 2 i=1 //初始化一个变量记录创建了多少文件,顺便用来做文件名,最后 i 即表示嵌套的数目 3 w
2015-04-19 19:41:39
810
原创 apue源文件的下载与使用
apue:UNIX环境高级编程(Advanced Programming in the UNIX Environment)当看这本书并试着编写程序时,发现里面的“apue.h”文件找不到,查阅发现,原来这是作者包含了自己写的一些函数,那怎么解决呢,如下:1.去http://www.apuebook.com/下载对应版本的源代码,解压;2.里面的 README 文件说,只需要把 Make
2015-04-16 17:12:46
490
原创 如何快速在线使用MSDN
很多小伙伴在自己的电脑上没有安装MSDN,可是去了微软的官方网站上怎么也找不到想要的函数,这里笔者告诉大家一种简单的查询方法:比如要查Sleep的用法,只需打开百度,然后在搜索框输入 “ Sleep site:microsoft.com"。搜索之后获得的第一条即为MSDN中你想要的信息。如下图:
2015-03-26 09:02:34
1234
1
eclipse properties editor 离线安装包
2018-01-17
SVN_book文档
2016-11-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人