内容来源于开发者社区。用到的代码如下:using UnityEngine;using
System.Collections;using System;public class ClockAnimator : MonoBehaviour{
private const float h...
分类:
其他好文 时间:
2014-05-24 00:47:44
阅读次数:
308
1. scoket函数中PF_INET
AF_INET区别在UNIX系列中,PF_INET表示poxis, BSD系列用AF_INET2. in_addr_t inet_addr(const char
*cp);入参是字符型ip,in_addr_t 为uint32_t3. if (setsockop...
分类:
系统相关 时间:
2014-05-24 00:20:02
阅读次数:
401
Robust regression(稳健回归) 语法 b=robustfit(X,y)
b=robustfit(X,y,wfun,tune) b=robustfit(X,y,wfun,tune,const)
[b,stats]=robustfit(...) 描述 b=robustfit(X...
分类:
其他好文 时间:
2014-05-23 12:29:59
阅读次数:
498
从C到C++ (3)一、 C++中增加了引用 1、引用是给某一个变量起别名。引用的一般格式:
类型 &引用名 = 变量名 定义引用时一定要初始化。在实际应用中,引用一般用作参数传递与返回值 2、const 引用 const
引用是指向const对象的应用 3、引用作为返回值 函...
分类:
编程语言 时间:
2014-05-23 11:49:25
阅读次数:
340
int sigsuspend(const sigset_t *mask);//挂起进程直至信号发生
man手册的解释:
sigsuspend() temporarily replaces the signal mask of the calling process with the mask given by mask and then suspends the proces...
分类:
其他好文 时间:
2014-05-22 13:41:23
阅读次数:
329
#include
void main(){
const int count = 5;//定义数量
struct student{
char name[80];
float math,eng;
float aver;
}stu[count],temp;
//输入
for (int i = 0; i
scanf("%s%f%f", stu[i].name, &stu[i].m...
分类:
编程语言 时间:
2014-05-22 11:21:15
阅读次数:
312
题意:推箱子的题目,求最短的路径,如果推的最短一样的话,就算上走的最短
思路:首先我们记录状态:箱子的位置和人的位置,我们先BFS箱子的最短,然后我们可以通过推的方向得到人的位置,然后再BFS人是否能到这里的最短路#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 50;
...
分类:
其他好文 时间:
2014-05-22 10:57:35
阅读次数:
292
题目链接:poj 2411 Mondriaan's Dream
题目大意:用1?2的木块填满n?m的矩阵有多少种方法。
解题思路:插头dp裸题。uva11270
#include
#include
typedef long long ll;
const int N = 13;
int n, m;
ll set, dp[N+5][(15];
void solve (int d,...
分类:
其他好文 时间:
2014-05-22 08:06:07
阅读次数:
177
1. string转const char* string s = "abc"; const
char* c_s = s.c_str();2. const char*转string 直接赋值即可 const char* c_s = "abc";
string s(c_s);3. string转char...
分类:
其他好文 时间:
2014-05-20 12:01:33
阅读次数:
178
#include #include //function: charTowchar
//purpose:char to WCHAR 、wchar_t、LPWSTR etc void charTowchar(const char *chr,
wchar_t *wchar, int size) { .....
分类:
其他好文 时间:
2014-05-20 11:37:00
阅读次数:
326