You are given annxn2D matrix representing an
image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?思路:先将矩阵转置,然后将第一列与最后...
分类:
其他好文 时间:
2014-05-14 03:09:35
阅读次数:
225
c++ 中的template和c#的什么有点相似?先看下定义方式:template T
myFunction(T param1,T param2...){ T result= param1; // do something return
result; ...
分类:
编程语言 时间:
2014-05-14 03:05:27
阅读次数:
332
Person's solution 是用来一种基于软件的解决关键区域问题的算法(critical-section).
它并非完美的,有可能不正确地工作。而且是限制解决两个进程同步的问题。
但是它很简单,很原始,学习起来也是很轻松的。
代码如下:
do {
flag[i] = true;
turn = j;
while (flag[j] && turn == j...
分类:
编程语言 时间:
2014-05-13 08:01:01
阅读次数:
407
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3768
Continuous Login
Time Limit: 2 Seconds Memory Limit: 131072 KB Special Judge
Pierre is recently obsessed...
分类:
其他好文 时间:
2014-05-13 07:28:07
阅读次数:
412
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Palindrome Number
Total Accepted: 12165 Total
Submissions: 41736
Determine whether an integer is a palindrome. Do this wit...
分类:
其他好文 时间:
2014-05-13 05:28:07
阅读次数:
253
此脚本可以做一个定时的检测,超出设定的值,即往邮箱发送警告脚本用到bc,sendmail,163邮箱,yuminstallbc#!/bin/bash
#SystemMonitoringScript
while[1]
do
#本机需开启postfix或sendmail服务。
#报警邮件地址设置
MAILFROM=root@localhost
MAILTO=your_mail@163.com
#设置..
分类:
系统相关 时间:
2014-05-13 05:05:29
阅读次数:
649
#!/bin/bash
#checkmysqlslavestatus
USER="check"
PSW="***"
RUNTIME=3600
ADDR="192.168.*.*"
declare-aslave_is
forIPin$ADDR
do
slave_is=($(/usr/local/mysql/bin/mysql-h$IP-u${USER}-p${PSW}-e"showslavestatus\G"|grepRunning|awk‘{print$2}‘))
if["${slave_is[0]}"="Y..
分类:
数据库 时间:
2014-05-13 04:33:44
阅读次数:
374
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151
For each list of words, output a line with each word reversed without changing the order of the words.
This problem contains multi...
分类:
其他好文 时间:
2014-05-11 22:20:43
阅读次数:
443
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1109
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean...
分类:
其他好文 时间:
2014-05-11 20:57:36
阅读次数:
400
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2724
Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something h...