微软近期Open的职位:Job title: Software Development EngineerLocation: Beijing, ChinaAre you a talented developer who is passionate about mobile devices and re...
分类:
其他好文 时间:
2014-06-28 22:35:21
阅读次数:
369
Every now and then, I come across various newbies Java developers who are found to get stuck with some of the following common exceptions where I need...
分类:
编程语言 时间:
2014-06-20 17:19:52
阅读次数:
325
公司师兄教的一种方法:
将如下脚本,加入到/etc/profile最后即可
PS1="`whoami`@`hostname`:"'[$PWD]'
history
USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`
if [ "$USER_IP" = "" ]
then
USER_IP=`...
分类:
其他好文 时间:
2014-06-17 18:43:29
阅读次数:
216
一.查看用户登录信息的命令1.w查看当前系统上登录的所有用户的信息2.who查看该shell终端下登录用户的详细信息3.whoami查看本shell终端下登陆的用户4.last查看历史的所有登录信息[root@primary_serverworkspace]#w
14:59:23up19days,5:35,1user,loadaverage:0.36,0.37,0.33
USER..
分类:
其他好文 时间:
2014-06-16 16:40:11
阅读次数:
589
又是一题快速排序的题目,活用快排求某个位置的数。
这次完善一下自己的基础,把快排代码规范化和增加一个random算法,进一步确保不会出现最坏情况。
思路和前一道题差不多,不过是求第k个数了,这里的第k个数是中序数。
花了点时候整理下代码,果然变得十分工整了。
#include
#include
#include
#include
using namespace std;
const...
分类:
其他好文 时间:
2014-06-15 16:21:17
阅读次数:
214
linux 下如何查看和踢除正在登陆的其它用户Posted on2011/09/01如何在linux下查看当前登录的用户,并且踢掉你认为应该踢掉的用户?请使用who这个命令来查看当前正在登录的用户[root@localhost http]# whoroot tty1 Apr 9 13:17http ...
分类:
系统相关 时间:
2014-06-15 11:32:52
阅读次数:
311
As an introduction this chapter is aimed at readers who are familiar with the Web, HTTP, and Apache, but are not security experts. It is not intended ...
分类:
其他好文 时间:
2014-06-15 06:46:21
阅读次数:
219
7.Occupant Use CasesThe main actor in a
multi-user chat environment is the occupant, who can be said to be located "in"
a multi-user chat room and to ...
分类:
其他好文 时间:
2014-06-11 10:13:56
阅读次数:
261
在linux中有时需要获得登录者的IP,这里有两种方法,先使用who am i 获取登录IP,然后截取字符串:
1、awk截取,sed替换
who am i | awk '{print $5}' | sed 's/(//g' | sed 's/)//g'
2、cut 截取
who am i|cut -d\( -f2|cut -d\) -f1
使用方法,若在脚本中如.bashrc中,可...
分类:
系统相关 时间:
2014-06-10 07:49:49
阅读次数:
320
给n个人的年龄大小关系,问最少分几组使每个组里面人的年龄不能直接或间接的比较。
每个联通块里的人都得分到不同的组,缩点后找最长的链即答案
tarjian缩点+dp找最长路
Grouping
Time Limit: 2 Seconds Memory Limit: 65536 KB
Suppose there are N people in ZJU, who...
分类:
其他好文 时间:
2014-06-08 09:44:30
阅读次数:
321