- 博客(51)
- 资源 (3)
- 收藏
- 关注
原创 Java中用StreamTokenizer与Scanner读取数据
BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));S
2014-09-27 21:28:19 2133
原创 UVa279 - Spin(递推)
Spin A disk can be rotated between horizontal and vertical only if it is positioned over theindentation marked `0'and the disk on its right is vertical . The right-mostdisk can alw
2014-09-27 21:09:55 762
原创 网络编程学习笔记(recvfrom和sendto函数)
#include ssize_t recvfrom(int sockfd, void *buff, size_t nbytes, int flags, struct sockaddr *from, socklen_t *a
2014-09-27 17:02:58 1611
原创 linux下截屏工具
如果linux安装了gnome,那么系统自带了一款截屏软件 gnome-screenshot,使用起来很方便,功能齐备,支持命令行。简单介绍如下。 功能对屏幕,窗口,或自定义的区域进行截图。选项-w 抓取当前活动窗口-a 抓取自定义的区域-b 包含窗口的边框-B 去除边框-d N
2014-09-26 21:16:23 616
原创 网络编程学习笔记(getsockopt和setsockopt函数)
其原型为:#include int getsockopt(int sockfd, i
2014-09-26 20:51:06 1118
原创 Ubuntu14.04安装QQ2013
1------wineQQ基本上是和windows下QQ 是同步的。功能相当齐全。当然我是建议你安装这个类型的。 下载地址: http://www.longene.org/download/WineQQ2013-20131120-Longene.deb 这只是我编辑此文章的时候最新版本,如果你自己想获取最新版本,可以在此可以下载到最新版本的wineqq版本:下载地址为: h
2014-09-25 21:40:30 824
原创 网络编程学习笔记(TCP回射服务器程序修订版)
服务器端:#include #include #include #include #include #include #include #include #include #include #define SIN_PORT 9999#define BUFLEN 256void str_echo(int fd);void sig_child(int signo)
2014-09-25 19:56:15 881
原创 网络编程学习笔记(批量输入)
服务器端:#include #include #include #include #include #include #include #include #include #include #define SIN_PORT 9999#define BUFLEN 256void str_echo(int fd);void sig_child(int signo)
2014-09-24 21:58:49 825
原创 网络编程学习笔记(SIGPIPE信号触发)
服务端代码:#include #include #include #include #include #include #include #include #include #include #define SIN_PORT 9999#define BUFLEN 256void str_echo(int fd);void sig_child(int signo)
2014-09-23 20:01:03 1561
原创 网络编程中的注意问题
Socket和accept,成功返回非0,失败返回-1Bind,connect,listen,成功为0,失败返回-11、 客户端正常终止客户端发送FIN, 服务器端状态close_wait,客户端状态fin_wait_2,收到服务器端的FIN,发送ACK,进入time_wait状态并发式服务器中,收到一个连接请求,fork一个进程来处理,当客户端结束后,子进程结束,发送
2014-09-22 19:47:09 1211
原创 Ubuntu14.04安装中文输入法
一,安装fcitx,这么好的软件,ubuntu软件中心肯定是找得到的,但还是命令来得快一些吧。sudo apt-get install fcitx-table-wbpy是不是很好记的样子,wb五笔py拼音,谁还记不住的,告诉我——今天晚饭别吃了!然后相关的依赖库和框架都会自动安装上。
2014-09-21 21:08:07 705
转载 如何摆脱穷打工的命?
很多人都喜欢抱怨,觉得这个世道不好。但现实是,在同样世道不好的情况下,为什么有的人成功,而你却碌碌无为?差距在哪里?怪世道不好吗?还是怪自己没本事?这话可能很多人不爱听。但是一个无法辩驳的事实是:你要是有本事,为什么月薪只有2、3K或者3、4K?事实胜于雄辩。所以,如果看到这里还想抱怨的人,那么,也请你趁早离开。抱怨永远解决不了问题。同样是打工,为什么你一个月只有2、3
2014-09-17 23:09:24 1505
原创 UVa10620 - A Flea on a Chessboard(模拟问题)
An infinite chessboard is obtained by extending a finite chessboard to the right and up infinitely. Each square of the chessboard is either black or white with the side of S milimiters, 0 S x, y)
2014-09-17 19:54:18 747
原创 UVa688 Mobile Phone Coverage(扫描线法)
#include #include #include using namespace std;const int N = 110;struct Rect{ double x1, x2, y1, y2;};Rect rect[N];int n;int cas = 1;bool input(){ scanf("%d", &n); if (n
2014-09-17 09:53:34 1373
原创 H264解码的学习笔记
解码图片由三部分组成:1个luma采样数组,2个chroma采样数组Chroma FormatChromaFormatFactormonochrome14:2:01.54:2:224:4:43在monochrome采样情
2014-09-16 21:24:08 1544
原创 UVa944 - Happy Numbers(动态规划)
Let the sum of the squares of the digits of a positive integer s0 be represented by s1. In a similar way,let the sum of the squares of the digits of s1 be represented by s2, and so on. If si = 1 for
2014-09-16 19:59:04 847
原创 UVa852 - Deciding victory in Go(DFS,种子填充法)
The history of Go stretches back some 3000 years and the rules have remained essentially unchanged throughout this very long period. The game probably originated in China or the Himalayas. In the Far
2014-09-15 15:58:23 1228
原创 cin.ignore的用法
basic_istream& ignore( std::streamsize count = 1, int_type delim = Traits::eof() );从输入流中取出并先放
2014-09-14 19:43:19 1919
原创 UVa11646 - Athletics Track(水题)
London Olympics is approachingvery shortly – in just 3 years. Three years might not sound as that small atime to say ‘just’, but it is indeed for those who have to organize the competition.There are s
2014-09-14 10:27:02 1165
原创 UVa10371 - Time Zones(时区转换)
Prior to the late nineteenth century, time keeping was a purely localphenomenon. Each town would set their clocks to noon when the sun reachedits zenith each day. A clockmaker or town clock would be t
2014-09-14 10:13:37 1487 1
原创 UVa12696 - Cabin Baggage(水题)
Cabin baggage (also called carry on or hand baggage) is a bag that a passenger is allowed to bringinto an aircraft. For safety purpose, cabin baggage must not be too heavy or too big. Every airline
2014-09-13 20:40:46 885
原创 UVa11105 - Semi-prime H-numbers(sieve的思想)
This problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do only a bit of that.An H-number is a positive number which
2014-09-13 20:00:52 756
原创 UVa11858 - Frosh Week(树状数组求逆序数)
During Frosh Week, students play various fun games to get to know eachother and compete against other teams. In one such game, all the froshon a team stand in a line, and are then asked to arrange the
2014-09-13 11:52:27 1072
原创 UVa11858 - Frosh Week(归并排序求逆序数)
During Frosh Week, students play various fun games to get to know each other and compete against other teams. In one such game, all the frosh on a team stand in a line, and are then asked to arrange t
2014-09-13 00:37:59 839
原创 UVa11287 - Pseudoprime Numbers(欧拉筛选法、快速求幂法)
Fermat's theorem states that for any prime number p and for any integer a > 1, ap == a (mod p). That is, if we raise a to the pth power and divide by p, the remainder isa. Some (but no
2014-09-12 09:18:07 861
原创 UVa10326 - The Polynomial Equation
The ProblemA Polynomial equation of degree n is defined as follows : C + Sum (Ci*x^i) = 0. for i=1 to n. A polynomial equation of n degree can have at most n distinct roo
2014-09-12 00:00:24 1078
原创 UVa12049 - Just Prune The List
You are given two list of integers. You can remove any number of elements from any of them. You have to ensure that after removing some elements both of the list will contain same elements, but not ne
2014-09-11 22:35:24 803
原创 UVa12614 - Earn For Future
In a lazy afternoon the great Froogrammer came to realize that, to make his future plans successful he needs a lot of money. To make some quick cash he decided to go to the casino to play a game. The
2014-09-11 21:57:38 602
原创 UVa11553 - Grid Game
Alice and Bob both have lots of candies but want more. They decide to play the following turn-based game.They fill an n x n grid M with random integers. Alice begins the game by crossing off an
2014-09-11 21:09:44 768
原创 UVa1237 - Expert Enough?(枚举)
Auto-mobile Charting & Manufacturing (ACM) is a company that specializes in manufacturing automobile spare parts. Being one of the leading automotive companies in the world, ACM are sure to keep up th
2014-09-11 20:31:30 819
Ubuntu Linux实用学习教程.pdf
2009-09-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人