现在位置: 首页 > Natultydennat发表的所有文章
  • 10月
  • 02日
综合 ⁄ 共 1525字 评论关闭
我的.vimrc文件: "explicitly get out of vi-compatible mode set nocompatible "don't use local version of .(g)vimrc, .exrc set noexrc "we plan to use a dark background set background=dark "set cpoptions=aABceFsmq "syntax highlighting on syntax on "load filetype plugins/indent setting filetype plugin indent on "always switch to the current file directory set autochdir "make backspace a more flexible set backspace=indent,eol,start "use mouse everywhere set mouse=a "don't make noise......
阅读全文
  • 08月
  • 29日
算法 ⁄ 共 1012字 评论关闭
题意:一个长为 N (1 <= N <= 100)的序列(1 <= ai <= 100),一次操作为删除 a[i] 和 a[i + 1],然后将它们的差(a[i] - a[i + 1])放入该位置,问 N - 1 次操作后得到 T (-10000 <= T <= 10000)的操作顺序是什么? 题目链接:http://poj.org/problem?id=1722 ——>>每次操作相当于给 a[i] 和 a[i + 1] 加括号做减法,那么把所有的括号去掉后就是对序列第一次做减法,后面或加法或减法。。 状态:dp[i][j] 表示前 i 个数的运算结果为 j 时最后一次的运算符号。。("+" 或 "-") 状态转移方程: dp[i + ......
阅读全文
  • 02月
  • 07日
综合 ⁄ 共 3300字 评论关闭
相同点:都可用于申请动态内存和释放内存 不同点: (1)操作对象有所不同。 malloc与free是C++/C 语言的标准库函数,new/delete 是C++的运算符。对于非内部数据类的对象而言,光用maloc/free 无法满足动态对象的要求。对象在创建的同时要自动执行构造函数, 对象消亡之前要自动执行析构函数。由于malloc/free 是库函数而不是运算符,不在编译器控制权限之内,不能够把执行构造函数和析构函数的任务强加malloc/free。 (2)用法上也有所不同。 函数malloc 的原型如下:void * malloc(size_t size); 用malloc 申请一块长度为len......
阅读全文
  • 04月
  • 27日
综合 ⁄ 共 15931字 评论关闭
By  John Charles Olamendy June 29, 2007 Introduction This article is intended to illustrate how to illustrate how to call Oracle stored procedures and functions from Microsoft.NET through the Microsoft.NET Oracle provider and its object model residing in the namespace System.Data.OracleClient. I will cover several possible scenarios with advanced examples. Executing a stored procedure Let's begin with definitions. A procedure is a module that performs one or more actions. A function is a......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 840字 评论关闭
名称:ps 使用权限:所有使用者 使用方式:ps [options] [--help] 说明:显示瞬间行程 (process) 的动态 参数: ps 的参数非常多, 在此仅列出几个常用的参数并大略介绍含义 -A 列出所有的行程 -w 显示加宽可以显示较多的资讯 -au 显示较详细的资讯 -aux 显示所有包含其他使用者的行程 au(x) 输出格式 : USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND USER: 行程拥有者 PID: pid %CPU: 占用的 CPU 使用率 %MEM: 占用的记忆体使用率 VSZ: 占用的虚拟记忆体大小 RSS: 占用的记忆体大小 TTY: 终端的次要装置号码 (minor ......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 720字 评论关闭
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 [3,2,1]. 思路:假设有集合[1,2,3],来一个4,则有集合[4,1,2,3]、[1,4,2,3]、[1,2,4,3]、[1,2,3,4]。故code如下: class Solution { public: vector<vector<int> > permute(vector<int> &num) { vector<vector<int> > aa,tmp; vector<int> a; aa.clear(); if(num.e......
阅读全文
  • 01月
  • 13日
综合 ⁄ 共 1778字 评论关闭
C. Pashmak and Buses time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently Pashmak has been employed in a transportation company. The company has k buses and has a contract with a school which has n students. The school planned to take the students to d different places for d days (each day in one place). Each day the company provides all the buses for the trip. Pashmak has to arrange the students in the buses. ......
阅读全文
  • 12月
  • 05日
综合 ⁄ 共 7311字 评论关闭
本文使用SAX来解析XML,在Android里面可以使用SAX和DOM两种方法来解析XML,DOM方法需要把整个XML文件读入内存再解析,比较消耗内存,而SAX基于事件驱动的处理方式,可以在各节点触发回调函数,不过SAX适合节点结构简单的XML文档,复杂的XML文档在后期的节点深度处理会有点麻烦。 本文要解析的test.xml文件如下: ? 1 2 3 4 5 6 7 8 <?xml version="1.0" encoding="utf-8"?> <test>     <title>testSAX</title>     <content aa="1" bb="2">         <name>hellogv&......
阅读全文
  • 11月
  • 25日
综合 ⁄ 共 6237字 评论关闭
在多线程的程序中,经常会出现两种情况: 一种情况:   应用程序中,线程把大部分的时间花费在等待状态,等待某个事件发生,然后才能给予响应                  这一般使用ThreadPool(线程池)来解决; 另一种情况:线程平时都处于休眠状态,只是周期性地被唤醒                  这一般使用Timer(定时器)来解决; ThreadPool类提供一个由系统维护的线程池(可以看作一个线程的容器),该容器需要 Windows 2000 以上系统支持,因为其中某些方法调用了只有高版本的Windows才有的API函数。 将线程安放在线程池里,需使用ThreadPoo......
阅读全文
  • 11月
  • 24日
综合 ⁄ 共 1095字 评论关闭
 vi /boot/grub2/grubenv # GRUB Environment Block #saved_entry=CentOS Linux (3.10.0-123.6.3.el7.x86_64) 7 (Core) saved_entry=CentOS Linux (3.10.0-123.6.3.el7.x86_64) 7 (Core) #############################################################################################################################################################################################################################################################################################################################......
阅读全文
    中国 [选择]      使用条款     dW 全部内容 -----------------   AIX and UNIX   Information management   Lotus   Rational   Tivoli   WebSphere -----------------   Grid computing   Java 技术   Linux   Open source   Security   SOA & Web services   Web development   XML ----------------- IBM 全部内容             首页      产品      服务与解决方案      支持与下载      个性化服务        developerWorks 中国 ......
阅读全文
  • 10月
  • 30日
综合 ⁄ 共 221字 评论关闭
linux设备驱动程序(第三版) 第二章 构造和运行模块 内核符号表        我们已经知道insmod如何通过公共的内核符号表来解析未定义的符号。公共内核符号表包含了全局内核项—函数和变量—的地址,在实现模块驱动程序时,需要用到这个地址。当加载一个模块的时候,这个模块所导出的任何符号都成为内核符号表的一部分。通常情况下,一个模块在实现自身功能的时候,不需要导出任何符号。但是,在任何时候,其他模块要使用到这个这个模块的符号,就需要导出被用到的符号。
阅读全文