8.1、8.2这一章不咋会啊。。istream &read(istream &is){ int a; auto old_state=is.rdstate(); is.clear(); is>>a; is.setstate(old_state); return is...
分类:
编程语言 时间:
2014-08-26 15:20:56
阅读次数:
207
StringBuilder 没有提供clear或empty方法。清空有3种方法:1)新生成一个,旧的由系统自己主动回收2)使用delete3)使用setLength将三种方法循环1000万次,代码:1.public class sbbm {2.3. static String a;4. static...
分类:
编程语言 时间:
2014-08-26 15:08:36
阅读次数:
184
BFC(Block Formatting Context),简单讲,它是提供了一个独立布局的环境,每个BFC都遵守同一套布局规则。例如,在同一个BFC内,盒子会一个挨着一个的排,相邻盒子的间距是由margin决定且垂直方向的margin会重叠。而float和clear float也只对同一个BFC内...
分类:
Web程序 时间:
2014-08-26 00:15:15
阅读次数:
323
什么是BFC? BFC(Block Formatting Context),简单讲,它是提供了一个独立布局的环境,每个BFC都遵守同一套布局规则。例如,在同一个BFC内,盒子会一个挨着一个的排,相邻盒子的间距是由margin决定且垂直方向的margin会重叠。而float和clear float也....
分类:
其他好文 时间:
2014-08-25 16:56:24
阅读次数:
308
一、编写vector.pkg
class vector {
TOLUA_TEMPLATE_BIND(T, string, CCSprite*) // 添加我们想要的容器类型
void clear();
int size() const;
const T& operator[](int index) const;
T& operator[](i...
分类:
其他好文 时间:
2014-08-25 15:04:54
阅读次数:
1517
clc;
clear all;
addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm');
Image=imread('4.jpg');
Image=double(Image);
Image_inverse=255-Image;
[row,col,layer]=size(Image);
Imag...
分类:
其他好文 时间:
2014-08-25 15:03:04
阅读次数:
219
//宠物AI流程1.刚开始添加宠物Monster被动State:EnumMonster被NULLMonsterStat:EnumPet跟随2.附近有怪物就改成攻击模式(相关的收尾工作)void PetObj::cancle_follow(){ m_trace_line.clear(); ...
分类:
其他好文 时间:
2014-08-25 01:09:13
阅读次数:
192
class Solution {private: vector nodes;public: void recoverTree(TreeNode *root) { nodes.clear(); dfs(root); // 1 5 3 4 2 6 7...
分类:
其他好文 时间:
2014-08-25 01:07:23
阅读次数:
329
Recently, I study the package net/url of Golang.I was puzzled about the escape and unescape of url string.then I find a clear and accurate answer at:h...
分类:
其他好文 时间:
2014-08-24 23:48:33
阅读次数:
289
Apache服务启动报错[root@localhost]#servicehttpdstarthttpd:Syntaxerroronline162of/etc/httpd.conf/httpd.conf:Cannotloadmodules/mod_dir.sointoserver:/usr/local/apache2/modules/mod_dir.so:undefinedsymbol:apr_array_clear解决办法:将./configure选项的--with-apr替..
分类:
其他好文 时间:
2014-08-22 18:12:00
阅读次数:
187