(1)阅读下面的程序,体会注释中的说明。
//例:使用成员函数、友元函数和一般函数的区别
#include
using namespace std;
class Time
{
public:
Time(int h,int m,int s):hour(h),minute(m),sec(s) {}
void display1(); //display1是成员函数...
分类:
其他好文 时间:
2015-04-22 09:35:02
阅读次数:
118
time_t timer; time(&timer); struct tm tm; localtime_s(&tm, &timer); int year = tm.tm_year + 1900; int month = tm.tm_mon + 1; int day = tm.tm_mday; str...
分类:
编程语言 时间:
2015-04-22 09:27:50
阅读次数:
130
wireshark在linux下也可以安装yuminstall-ywireshark抓包分析http请求:tshark-n-ta-Rhttp.request-Tfields-e"frame.time"-e"ip.src"-e"http.host"-e"http.request.method"-e"http.request.uri"
分类:
Web程序 时间:
2015-04-22 02:08:41
阅读次数:
795
思路是通过读取/proc/uptime获得系统启动时长。
使用命令cat /proc/uptime
通过man proc可以看到如下的信息:
/proc/uptime:This file contains two numbers: the uptime of the system (seconds), and the amount of time spent in idle process...
分类:
编程语言 时间:
2015-04-22 00:42:24
阅读次数:
163
物体延水平方向运动工程实现需注意:
- 摄像机的设置 Projection Orthographic
- Start() 和 Update()的执行顺序与执行次数
- 屏幕坐标与空间坐标的转换
- 关于Time.deltaTime
- x += v; v = -v;using UnityEngine;
using System.Collections;//匀速运动
public...
分类:
编程语言 时间:
2015-04-22 00:41:48
阅读次数:
163
find the first unique character in a string and you can just traverse this string only one time. if there is no such character, just return '#' and '#' will not appear in the string, else return the ...
分类:
其他好文 时间:
2015-04-21 22:53:16
阅读次数:
167
数塔
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 25898 Accepted Submission(s): 15621
Problem Description
在讲述DP算法的时候,一个经典的例子就是数塔问题,...
分类:
其他好文 时间:
2015-04-21 22:53:09
阅读次数:
134
Matrix
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 20138
Accepted: 7522
Description
Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] me...
分类:
编程语言 时间:
2015-04-21 22:53:02
阅读次数:
174
Problem 1567 - D - Sloth's Angry
Time Limit: 1000MS Memory Limit: 65536KB
Total Submit: 326 Accepted: 113 Special Judge: No
Description
A forest is full of sloths, they are so eager for tree leav...
分类:
其他好文 时间:
2015-04-21 22:52:15
阅读次数:
157
计算直线的交点数
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8578 Accepted Submission(s): 3857
Problem Description
平面上有n条直线,且无三线共点,问这些直线...
分类:
其他好文 时间:
2015-04-21 22:50:16
阅读次数:
216