Problem DescriptionA number sequence is defined
as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given
A, B, and n, you are t...
分类:
其他好文 时间:
2014-05-16 00:34:50
阅读次数:
354
批量添加用户#!/bin/bashi=1while [ $i -le 20 ]do
useradd stu$i echo "123456" | passwd --stdin stu$i &> /dev/null
i=$(($i+1))done# 删除用户#!/bin/bash# 批...
分类:
其他好文 时间:
2014-05-15 21:11:33
阅读次数:
218
A linked list is given such that each node
contains an additional random pointer which could point to any node in the list
or null.Return a deep copy ...
分类:
其他好文 时间:
2014-05-15 21:00:06
阅读次数:
325
Sourceforge创建svn
现在项目开发都需要一个团队的协作,svn是非常棒的一个工具。但许多个人开发者都没有专门服务器搭建svn。sourceforge提供了一个很好地工具。
创建流程:
1.注册sourceforge账号
2.点击网页右上角Me中的profile
2.1选择Addproject
2.2填写项目名称等信息(默认,后面可以改)
3.添加用户权限
3.1点击项目名,进入,点击Admin
3.2点击左侧User Permissions,添加用户及其权限
4.在svn上就可以创建提交...
分类:
其他好文 时间:
2014-05-15 19:50:40
阅读次数:
231
#!/bin/bash
#
Count=0
forUserNamein$@;do
ifid$UserName&>/dev/null;then
echo"$UserNameexists."
else
useradd$UserName
echo"Add$UserNamesuccessfully."
Count=$[$Count+1]
fi
done
echo"Add$Countnewusers."
分类:
其他好文 时间:
2014-05-15 18:52:21
阅读次数:
214
FreeBSD删除文件缓存,在负载方面FreeBSD比CentOS好很多很多。#!/bin/sh
if[!-s/tmp/dir.dat];then
find/home/www/web/cache-typed>/tmp/dir.dat
fi
mkdir/var/tmpdir
DIRS=`cat/tmp/dir.dat`
foriin$DIRS
do
load=$(top-n1|awk-F‘[.]+‘‘/averages/{print$6}‘)
#rsync--delet..
分类:
其他好文 时间:
2014-05-15 18:51:06
阅读次数:
314
1、gem安装出现下面错误
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https...
分类:
其他好文 时间:
2014-05-15 18:19:48
阅读次数:
304
介绍EditText颤抖的动画效果
Animation1.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except...
分类:
其他好文 时间:
2014-05-15 18:12:00
阅读次数:
345
echocli.c
#include
#include
#include
#include
#include
#include
#include
#include
#define ERR_EXIT(m) do { perror(m); exi...
分类:
其他好文 时间:
2014-05-15 18:10:50
阅读次数:
240
今天在做Android电子词典的时候,数据库打不开,报错为:Could not open
the database in read/write mode。后来才发现犯了一个低级错误,没有设置权限。添加权限即可:希望大家不要犯这种白痴错误。
分类:
数据库 时间:
2014-05-15 17:22:42
阅读次数:
386