首页 > 其他
关于(void**)及其相关的理解
#define LOADBASSFUNCTION (f) *((void **)&f)=(void*)GetProcAddress (hBass,# f)这一句话使用*((void**)&f)的原因在于,转化目标为左值(即转化f为void*类型(*)的函数指针)。注意这里的(void**)强制类型转...
分类:其他   时间:2015-01-25 08:40:47    收藏:0  评论:0  赞:0  阅读:273
gcc常用参数列举
[参数详解]-c 只激活预处理,编译,和汇编,也就是他只把程序做成obj文件 例子用法: gcc -c hello.c 他将生成.o的obj文件-S 只激活预处理和编译,就是指把文件编译成为汇编代码。 例子用法 gcc -S hello.c 他将生成.s的汇编代码,你可以用文本编辑器...
分类:其他   时间:2015-01-25 08:40:37    收藏:0  评论:0  赞:0  阅读:198
Useful R functions
Random Samples and Permutationssample(x, size, replace = FALSE, prob = NULL) sample.int(n, size = n, replace = FALSE, prob = NULL)Samples in Normal Di...
分类:其他   时间:2015-01-25 08:40:27    收藏:0  评论:0  赞:0  阅读:219
面向对象设计原则
在使用面向对象的思想进行系统设计时,前人共总结出了7条原则,它们分别是:单一职责原则、开闭原则、里氏替换原则、依赖注入原则、接口分离原则、迪米特原则和优先使用组合而不是继承原则。1.单一职责原则(SRP) 单一职责原则的核心思想就是:系统中的每一个对象都应该只有一个单独的职责,而所有对象所关注的就....
分类:其他   时间:2015-01-25 08:40:17    收藏:0  评论:0  赞:0  阅读:285
gcc编译流程
gcc的编译流程分为四个步骤,分别为:预处理(Pre-Processing)编译(Compiling)汇编(Assembling)链接(Linking) 以hello.c为例子,在这四个步骤中可以设置选项分别生成hello.i, hello.s, hello.o以及最终的hello文件: he...
分类:其他   时间:2015-01-25 08:39:47    收藏:0  评论:0  赞:0  阅读:268
do..while(false)的用法总结
首先要注意:do..while(0)代表do里面的东西至少被执行一次,在这里仅仅执行一次。此种用法有三个用处:代替{}代码块,实现局部作用域。在某些宏定义时非常有用:#define f(x) do {\ some_code; some_code;} while(0)(while(0)...
分类:其他   时间:2015-01-25 08:39:37    收藏:0  评论:0  赞:0  阅读:355
【DFS】bzoj2079 [Poi2010]Guilds
对一棵树黑白染色一定符合题意。图一定有生成树。因此,仅有一个孤立节点的联通块不合题意。DFS。#includeusing namespace std;int n,m,en,x,y,v[1000001],first[500001],next[1000001],cnt;bool vis[500001];...
分类:其他   时间:2015-01-25 07:37:17    收藏:0  评论:0  赞:0  阅读:262
[LeetCode] Evaluate Reverse Polish Notation 计算逆波兰表达式
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他   时间:2015-01-25 07:37:07    收藏:0  评论:0  赞:0  阅读:183
【前缀和】【分类讨论】hdu5163 Taking Bus
#includeusing namespace std;int T,n,m,x,y;long long sum[100001],ans,d[100001];int main(){ scanf("%d",&T); for(;T;--T) { scanf("%d%d",&n,&m); f...
分类:其他   时间:2015-01-25 07:36:57    收藏:0  评论:0  赞:0  阅读:292
安装使用Redis
Redis最新版本是2.8.19cd/data/app_software/wgethttp://download.redis.io/releases/redis-2.8.19.tar.gztarzxvfredis-2.8.19.tar.gzmakemkdir-p/data/app_platform/redis/{bin,conf}cpsrc/redis-server/data/app_platform/redis/bin/cpsrc/redis-cli/data/app_platform/redis..
分类:其他   时间:2015-01-25 06:35:08    收藏:0  评论:0  赞:0  阅读:1343
OpenGL_ES-窗口环境
一:OpenGL_ES怎么和操作系统原生窗口联系的?        OpenGL_ES应用程序运行linux,windows,MacOS或其他操作系统上的,这些操作系统都有自己的窗口系统,这些窗口都有一些配置参数,比如当前画刷颜色,窗口尺寸,状态信息等,这叫做窗口环境,Windows上又叫设备环境,同样OpenGL_ES要向窗口绘制内容,也需要有一个和应用程序窗口环境相匹配的渲染环境,叫Op...
分类:其他   时间:2015-01-25 06:31:37    收藏:0  评论:0  赞:0  阅读:330
Infragistics 汉化
Infragistics 汉化实例:Infragistics.Shared.ResourceCustomizer rc=Infragistics.Win.UltraWinGrid.Resources.Customizer; rc.SetCustomizedString("Sum...
分类:其他   时间:2015-01-25 06:29:57    收藏:0  评论:0  赞:0  阅读:423
Longest Substring with At Most Two Distinct
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceba”,T is "ece" which ...
分类:其他   时间:2015-01-25 06:29:37    收藏:0  评论:0  赞:0  阅读:239
Matlab笔记之线性规划
LP(Linear programming,线性规划)是一种优化方法,在优化问题中目标函数和约束函数均为向量变量的线性函数,LP问题可描述为:min xs.t. A·x b Aeq·x=beq vlb x vub其中 ,...
分类:其他   时间:2015-01-25 06:29:27    收藏:0  评论:0  赞:0  阅读:357
百度地图_根据地图上标记位置获取街道信息,以及经纬度信息
Class:服务类/GeocoderClass:服务类/GeocoderResult百度地图Demo Class:服务类/GeocoderGeocoder()创建一个地址解析器的实例getLocation(point:Point, callback:function[, options: Locat...
分类:其他   时间:2015-01-25 06:29:07    收藏:0  评论:0  赞:0  阅读:218
poj 3259 Wormholes(spfa 判环)
#include#include#include#include#includeusing namespace std;#define INF 100000000int u[6000],v[6000],w[6000];int first[6000],next[6000];int coun[6000]...
分类:其他   时间:2015-01-25 06:28:07    收藏:0  评论:0  赞:0  阅读:280
hdu 1312 Red and Black(dfs)
#include#include#include#includeusing namespace std;char mat[50][50];int n,m;int ans;int op[4][2]={0,1,0,-1,1,0,-1,0};bool ok(int x,int y){ if(0<=x...
分类:其他   时间:2015-01-25 06:27:57    收藏:0  评论:0  赞:0  阅读:185
poj_2301_Building a Space Station_mst
Building a Space StationTime Limit:1000MSMemory Limit:30000KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionYou are a membe...
分类:其他   时间:2015-01-25 06:27:47    收藏:0  评论:0  赞:0  阅读:155
Direct3D 10学习笔记(一)——初始化
本篇将简单整理Direct3D 10的初始化,具体内容参照《Introductionto3DGameProgrammingwithDirectX 10》(中文版有汤毅翻译的电子书《DirectX 10 3D游戏编程入门》)。Direct3D 10的初始化可分为以下几个步骤:1.填充一个DXGI_SW...
分类:其他   时间:2015-01-25 06:26:57    收藏:0  评论:0  赞:0  阅读:425
Direct3D 10学习笔记(二)——计时器
本篇将简单整理Direct3D 10的计时器实现,具体内容参照《Introductionto3DGameProgrammingwithDirectX 10》(中文版有汤毅翻译的电子书《DirectX 10 3D游戏编程入门》)。1.高精度性能计数器Direct3D10使用高精度性能计数器(精度达微秒...
分类:其他   时间:2015-01-25 06:26:47    收藏:0  评论:0  赞:0  阅读:371
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!