码迷,mamicode.com
首页 > 其他好文
UVa1395图论之最小生成树
//除了套模版之外还有新的思想在其中:枚举。 #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define input freopen("input.txt...
分类:其他好文   时间:2015-01-04 17:17:35    阅读次数:198
图像锐化与直方图均衡化
图像锐化与直方图均衡化...
分类:其他好文   时间:2015-01-04 17:16:53    阅读次数:580
第十一章 重构和测试函数式程序
第十一章重构和测试函数式程序   本章介绍 ■重构函数式程序 ■使用不变性推理代码 ■为 F# 程序写单元测试 ■使用延迟值缓存结果   这本书的主题之一就是,函数编程理如何使解代码更容易理解,只需要通过阅读就可以;特别是在需要修改陌生程序,或者通过组合现有函数实现行为,或者重构现有的代码时,尤为重要。函数式编程更容易重构,缘于清晰度和模块化:可以改善代码,并且有信心这种改变不会破...
分类:其他好文   时间:2015-01-04 17:15:20    阅读次数:136
Best Time to Buy and Sell Stock III
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may ...
分类:其他好文   时间:2015-01-04 17:14:20    阅读次数:130
文件映射IO(mmap-mprotect-msync-munmap)函数
本文介绍在POSIX环境使用文件映射IO操作的方法,文件映射IO又被称为存储映射IO,对于普通文件而言,很多时候它是高效的,它实际减少了数据的复制;同时它也可以用于特殊的地方,用于进程之间的通信,共享内存的一种方式。 我们能够把一个文件想象成一块连续的数据,从纯粹的数据角度来看,任何普通文件都可以这么理解。文件映射实际上是把文件的这块数据与我们程序里的一块内存对应上了,使用我们操...
分类:其他好文   时间:2015-01-04 17:15:31    阅读次数:229
向升序单向链表中插入一个节点
#include "OJ.h" /* 功能: 输入一个升序单向链表和一个链表节点,向单向链表中按升序插入这个节点。 输入为空指针的情况视为异常,另外不考虑节点值相等的情况。 输入: ListNode* pListHead 单向链表 ListNode* pInsertNode 新插入节点 输出: ListNode* pListHead 单向链表 返回: 正常...
分类:其他好文   时间:2015-01-04 17:15:13    阅读次数:155
[LeetCode]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 largest ...
分类:其他好文   时间:2015-01-04 17:13:57    阅读次数:158
matplotlib 画图 条形图
#绘制条形图 import numpy as np import matplotlib.pyplot as plt y=[] plt.figure(1) width=1 for i in range(len(y)): plt.figure(1) plt.bar(i*width,y[i],width) plt.xlabel("X") plt.ylabel("Y") plt.show(...
分类:其他好文   时间:2015-01-04 17:13:16    阅读次数:169
matplotlib 画图 散列图
4.绘制散列图 import matplotlib.pyplot as plt import numpy as np import random plt.figure(figsize=(8,4)) x=np.random.random(100) y=np.random.random(100) plt.scatter(x,y,s=x*1000,c=y,marker=(5,1),alpha=0.8,l...
分类:其他好文   时间:2015-01-04 17:11:18    阅读次数:253
matplotlib 画图 三维图
#绘制三维图 import numpy as np import mpl_toolkits.mplot3d import matplotlib.pyplot as plt x,y=np.mgrid[-2:2:20j,-2:2:20j] z=x*np.exp(-x**2-y**2) ax=plt.subplot(111,projection='3d') ax.plot_surface(x,y,z,r...
分类:其他好文   时间:2015-01-04 17:10:27    阅读次数:258
关于邮政与高校合作管理的一些个人想法
1、通过为学生提供实习机会的方式达成与高校的合作,选拔优秀的学生,到邮政内参加实习; 2、提供软件开发、软件测试、文档编写等岗位实习,不断选拔有能力的学生; 3、软件开发实习周期为一个项目完成周期,软件测试以及文档编写实习周期为一个月或更长; 4、对参加实习的学生进行不断地培训学习; 5、实习完成后选择优秀学生就业,一般学生可以通过实习时学到的技术继续找工作! 自己的一点瞎扯意见,不至于...
分类:其他好文   时间:2015-01-04 17:12:45    阅读次数:197
【甘道夫】HBase随机宕机事件处理 & JVM GC回顾
一、引言 本文记录了困扰团队两周的HBase随机宕机事件的解决方案,并回顾了JVM GC调优基础知识,供各位参考。 欢迎转载,请注明出处: 二、实验环境 16台虚拟机,每台4G内存,1核CPU,400G硬盘 Ubu...
分类:其他好文   时间:2015-01-04 17:09:55    阅读次数:313
IAR——Unable to open file 'lnk51ew_cc2530b.xcl'
1、Project->Option->Linker->Config 2、勾选Linker configuration file下面的Overridefault,并且选择$TOOLKIT_DIR$\config\devices\Texas Instruments\lnk51ew_cc2530F256.xcl...
分类:其他好文   时间:2015-01-04 17:09:02    阅读次数:394
九度1156:谁是你的潜在朋友
http://ac.jobdu.com/problem.php?pid=1156 题目1156:谁是你的潜在朋友 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:3990 解决:1837 题目描述:     “臭味相投”——这是我们描述朋友时喜欢用的词汇。两个人是朋友通常意味着他们存在着许多共同的兴趣。然而作为一个宅男,...
分类:其他好文   时间:2015-01-04 17:09:08    阅读次数:153
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], [...
分类:其他好文   时间:2015-01-04 17:09:16    阅读次数:125
HDU3336(KMP)
#include #include #include using namespace std; const int maxn = 1e6+7; int s[maxn];//文本串 char p[2000010];//匹配串 int next[2000010];//匹配串的next数组 void GetNext(int n) { int pLen = n; next[0]...
分类:其他好文   时间:2015-01-04 17:07:23    阅读次数:135
C8051F850 ADC Polling Example
有项目需要用到Silabs 的C8051F850. 其实最主要是看中了价格,以及其工作温度。因此需要开始学习这颗片子。如下是最简单的ADC例程: 对系统时钟进行初始化,对IO进行初始化等。P1.0为LED输出,P1.2为ADC输入。ADC采用VDD和GND为参考源。并使用Polling的方式,而不是中断的方式。 void C8051F850_IO_Initial(void) { //D...
分类:其他好文   时间:2015-01-04 17:07:05    阅读次数:245
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!