#!/bin/bash
echo "IP:"
ifconfig |grep "inet addr"|grep -v 127.0.0.1|awk '{print $2}'|awk -F ':' '{print $2}'
echo "Product Name:"
dmidecode |grep Name
echo "CPU Info:"
dmidecode |grep -i cpu|grep -i v...
分类:
其他好文 时间:
2014-09-29 14:51:31
阅读次数:
199
最近做了一个分布式的测试系统,目前实现了主要的架构和MVP(minimum viable product)版本的基本功能。在架构设计、数据库设计、具体实现等方面,(算是目前我做的架构最复杂的测试系统)还是花了2-3周的时间,终...
分类:
数据库 时间:
2014-09-29 14:29:51
阅读次数:
282
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2014-09-29 03:53:16
阅读次数:
255
Description
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of ...
分类:
其他好文 时间:
2014-09-28 19:34:34
阅读次数:
417
题意:
给定n个点的带点权树。
下面n行给出每个点点权表示每个点买卖鸡腿的价格
下面n-1行给出树边
下面Q个操作
Q行
u, v, val
从u走到v,过程中可以买一个鸡腿,然后到后面卖掉,输出max(0, 最大的收益)
然后给[u,v]路径上点点权+=val
思路:
树链剖分裸题
屌丝题解:点击打开链接
#pragma comment(linker, "/STA...
分类:
其他好文 时间:
2014-09-28 18:19:26
阅读次数:
288
介绍基于Pub/Sub模式的Demo实现。功能很简单:
从消息发布端Pub发布一个消息事件OrderCompletedEvent,多个客户端(如SubA和SubB)订阅该事件OrderCompletedEvent。那么当Pub发布消息后,SubA和SubB就能够收到该消息OrderCompletedEvent。
SubA和SubB接收到消息后,根据需要进行一定的处理。然后他们都会发布一个WorkDoneEvent事件消息。这次服务端订阅WorkDoneEvent消息。当SubA和SubB发布WorkDo...
分类:
其他好文 时间:
2014-09-28 18:01:34
阅读次数:
200
新题。。。不过很简单。。半年才更新一个题。。。class Solution {public: int maxProduct(int arr[], int n) { int pmax = arr[0]; int pmin = arr[0]; int an...
分类:
其他好文 时间:
2014-09-28 13:25:52
阅读次数:
178
题目描述:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.解题方案:该题想不到其他好办法,唯有暴力破解,两点求斜率,如果斜率相同,意味着共线,然后求出最大...
分类:
其他好文 时间:
2014-09-28 10:50:31
阅读次数:
162
[leetcode] Latest added:2014-09-23Find the contiguous subarray within an array (containing at least one number) which has the largest product.For exam...
分类:
编程语言 时间:
2014-09-28 01:51:00
阅读次数:
499
The backlog has an effect on the maximum rate at which a server can accept new TCP connections on a socket. The rate is a function of both the backlog value and the time that connections stay on th...
分类:
其他好文 时间:
2014-09-28 00:32:21
阅读次数:
301