码迷,mamicode.com
首页 >  
搜索关键字:reference value    ( 43034个结果
【STL基础】list
list构造函数://default:list l; //空的list//fill:list l(n); //n个元素, 元素默认初始化list l(n, value); //n个元素值为value//range:list l(fir...
分类:其他好文   时间:2014-05-23 09:49:56    阅读次数:314
Digital Roots,函数
Digital Roots 时间限制: 1 Sec  内存限制: 128 MB 提交: 91  解决: 29 [提交][状态][论坛] 题目描述 The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single d...
分类:其他好文   时间:2014-05-22 13:01:21    阅读次数:223
STM8S AD转换
//不说那么多了,直接上程序 void ADC1_DeInit(void) { ADC1->CSR = ADC1_CSR_RESET_VALUE; ADC1->CR1 = ADC1_CR1_RESET_VALUE; ADC1->CR2 = ADC1_CR2_RESET_VALUE; ADC1->CR3 = ADC1_CR3_RESET_VALUE; ...
分类:其他好文   时间:2014-05-22 11:21:55    阅读次数:226
LeetCode: Search in Rotated Sorted Array [032]
【题目】 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no du...
分类:其他好文   时间:2014-05-22 10:43:12    阅读次数:310
二进制查找树转换为双向链表
完全按照海涛哥剑指offer里边的递归思路来写的,基本一样,仅作学习验证,努力锻炼,努力学习!code如下: //Change a BSTree to a sorted double linklist struct BSTreeNode { int value; BSTreeNode *left; BSTreeNode *right; }head; //Create a node of...
分类:其他好文   时间:2014-05-22 10:23:27    阅读次数:237
C经典之10-输出控制符---ShinePans
#include #include #include //system(); 这个指令需要用到此头文件 #include //toupper要用到 void main() { float value = 1.23456; printf("%8.1f\n", value); printf("%8.3f\n", value); printf("%8.5f\n", value)...
分类:其他好文   时间:2014-05-22 09:18:08    阅读次数:257
【LeetCode】LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if t...
分类:其他好文   时间:2014-05-22 07:25:32    阅读次数:254
System V信号量(1)
信号量和P、V原语由Dijkstra(迪杰斯特拉)提出 信号量 互斥:P、V在同一个进程中 同步:P、V在不同进程中 信号量值含义 S>0:S表示可用资源的个数 S=0:表示无可用资源,无等待进程 S 信号量 struct semaphore { int value; pointer_PCB queue; } P原语 P(s) ...
分类:其他好文   时间:2014-05-22 07:01:59    阅读次数:319
ThinkPHP源码阅读2-----C函数配置文件详解
ThinkPHP的配置非常灵活,可自定义加载.大概看了一下,一共有这几个地方会加载配置文件,方便以后的读取/** *获取和设置配置参数支持批量定义 * *@paramstring|array$name *配置变量 *@parammixed$value *配置值 *@returnmixed */ functionC($name=null,$value=null){ static$_con..
分类:Web程序   时间:2014-05-20 20:13:46    阅读次数:347
HashSet内对象无法remove.
1.HashSet内的对象无法remove:在Java中HashSet的底层的实现是通过Map来实现,将要保存的对象的hashcode值作为Key,使用一个dummy作为Value.在对象被放入Set之后,如果有操作改变影响该对象的hashcode的变量,会造成该对象无法被remove,因为remove时是通过hashcode来查找Set内的..
分类:其他好文   时间:2014-05-20 19:57:22    阅读次数:294
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!