class Solution {public: int reverse(int x) { bool neg = x < 0; long long num = x; if (neg) num = -num; long long out = ...
分类:
其他好文 时间:
2014-06-25 18:24:01
阅读次数:
280
前两节我们介绍了vmrc sdk的基本用法。在前面的demo中,有一个关键的问题是,我们现在所作的工作都是基于局域网的,作为应用层面上,主机不会直接暴露给用户,而是通过一系列的web service服务分配内网主机资源。那么我们这里可以做的是公网私网端口映射。这里我们用一个port mapping来...
分类:
其他好文 时间:
2014-06-25 18:22:45
阅读次数:
313
http://blog.csdn.net/a3070173/archive/2008/11/20/3342062.aspxDislaceMapping其实就是在顶点着色器中对顶点进行置换偏移,经常用于水仿真流体绘制.顶点着色器:uniformfloatg_fScale; uniformsampler...
分类:
移动开发 时间:
2014-06-25 13:45:08
阅读次数:
282
原文 http://www.cnblogs.com/CGDeveloper/archive/2008/07/03/1234206.html如果物体表面细节很多,我们可以不断的精细化物体的几何数据,但是这样会产生大量的Lighting & Transformation等计算,为了实现丰富真实的物体表面...
分类:
移动开发 时间:
2014-06-25 13:43:39
阅读次数:
219
原文 http://www.azure.com.cn/default.asp?cat=11&page=2Parallax Mapping 就是通过高度图中的高度,对纹理坐标进行偏移,来视觉上欺骗观察者,产生很有凸凹感个幻觉。uniform vec3 fvLightPosition;uniform v...
分类:
移动开发 时间:
2014-06-25 13:40:31
阅读次数:
242
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-06-25 09:15:12
阅读次数:
362
关于STL容器,最了不起的一点是,它们会自动增长以便容纳下你放入其中的数据,只要没有超出它们的最大限制就可以。对于vector和string,增长过程是这样来实现的:每当需要更多空间时,就调用与realloc类似的操作。这一类似于realloc的操作分为4部分:
分配一块大小为当前容量的某个倍数的新内存。在大多数实现中,vector和string的容量每次以2的...
分类:
其他好文 时间:
2014-06-25 08:40:21
阅读次数:
287
题目
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return...
分类:
其他好文 时间:
2014-06-24 21:46:24
阅读次数:
249
【问题】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
【代码】
class Solution:
# @param s, a string
# @retu...
分类:
其他好文 时间:
2014-06-24 21:00:30
阅读次数:
168
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus poin...
分类:
其他好文 时间:
2014-06-24 20:16:39
阅读次数:
180