- 博客(25)
- 收藏
- 关注
原创 matalb基础
1、常用命令save mydata x y //保存工作区变量load mydata x y //加载工作区变量linespace(a,b,n); //生成一行n个元素的矩阵,第一个元素为a,第二个元素为b,自动计算间隔D = sub2ind(S,I,J); //计算矩阵S的I行J列的序号A(end,:) //end表示某一维的末尾reshape...
2019-03-13 21:25:11 224
原创 Cookie
1、工作流程浏览器访问服务器,服务器产生键值对的形式(cookie),通过响应(响应头 set-cookie)返回给浏览器,cookie保存在浏览器上,下次访问的服务器时候,根据一定的规则携带不同的cookie,通过请求(请求头 cookie)携带,服务器就可以拿到这些cookie访问某个路径下的资源,会把路上的经过的cookie全部带上一个路径不存在重名的cookie不同...
2019-03-12 13:24:49 99
原创 1、二维数组中的查找
题目描述在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。思路:对每一行的数组进行一次二分查找,遍历完,得到答案。用Arrays工具类的二分查找,如果没找到的话,返回的是-index-1,index是他应该插入的位置。import ja...
2019-03-11 15:09:28 124
原创 1025 PAT Ranking (25 分)(归并排序的思想)
1025PAT Ranking(25 分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several pl...
2019-03-11 14:09:54 284
原创 Request
1、请求行主要apirequest.getMethod(); //返回get或者post方法request.getRequestURI(); //返回请求的资源的动态的地址,http://localhost:8080/response/aarequest.getQueryString(); //返回请求的参数 filename=1.htmlrequest.ge...
2019-03-10 18:51:48 121
原创 Response
1、发送状态码(响应行)setStatus(int status);//200:ok 302:重定向 304:缓存 sendError(int sc);404 notfound 500内部错误2、响应头void addHeader(String name,String value); //可以追加属性void setHeader(String name,String val...
2019-03-10 09:58:42 137
原创 ServletContext
1、ServletContext是一个web项目不同servlet之间共享信息的一个类,可以往里存取数据,里面也记录着全局变量信息,也可以通过这个类获取web某个资源的绝对路径或者通过流的方式,拿到这个资源的输入流,其主要的api包括:getAttribute(String name);setAttribute(String name, object o);removeAttribute...
2019-03-10 04:49:33 117
原创 Servlet
1、servlet接口一共5个方法import java.io.IOException;import javax.servlet.Servlet;import javax.servlet.ServletConfig;import javax.servlet.ServletException;import javax.servlet.ServletRequest;import ja...
2019-03-09 16:32:18 91
原创 1022 Digital Library (30 分)(HashMap,TreeSet)
1022Digital Library(30 分)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assign...
2019-03-08 19:22:53 130
原创 redis在centos中的安装
redis在Linux上的安装1)安装redis编译的c环境,yum install gcc-c++2)将redis-2.6.16.tar.gz上传到Linux系统中3)解压到/usr/local下 tar -xvf redis-2.6.16.tar.gz -C /usr/local4)进入redis-2.6.16目录 使用make命令编译redis5)在redis-2.6.16目录...
2019-03-06 23:33:37 100
原创 centos6安装tomcat9
1、下载tomcat9,tar.gz压缩文件:https://tomcat.apache.org/download-90.cgi2、上传到linus,解压3、开放8080端口并在防火墙中更新/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT/etc/rc.d/init.d/iptables save4、在tomcat ...
2019-03-06 19:53:36 569
原创 CentOS6,安装mysql8
参考:https://blog.csdn.net/qq_32125629/article/details/806607371、卸载当前mysql版本2、在最新下载地址下载mysql8:https://dev.mysql.com/downloads/mysql/选择 RPM Bundle下载,上传到linux的usr文件夹下3、解压,按顺序安装4、开启服务service m...
2019-03-06 18:41:32 566
原创 CentOS 6, JDK11环境变量设置
cd /etc/profile#set java environment JAVA_HOME=/usr/local/jdk/ CLASSPATH=$JAVA_HOME/lib/ PATH=$PATH:$JAVA_HOME/bin export PATH JAVA_HOME CLASSPATH
2019-03-06 15:37:56 1167
原创 1021 Deepest Root (25 分)(DFS,BFS)
1021Deepest Root(25 分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a ...
2019-03-04 15:54:54 121
原创 1020 Tree Traversals (25 分)
1020Tree Traversals(25 分)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order ...
2019-03-03 21:40:18 186
原创 UDP/TCP/HTTP编程
1、UDP的receive和sendimport java.net.*;public class UdpSend{ public static void main(String [] args) throws Exception { DatagramSocket ds=new DatagramSocket(); String str="hello world"; Data...
2019-03-03 12:59:14 219
原创 二叉树的非递归前序,中序,和后序遍历
前序:void inorderTraversal(BinTree BT){ BinTree T BT; Stack S = CreatStack(MaxSize); while(T||isEmpty(S){ while(T) { push(S,T); printf("%d",T->Data);...
2019-03-01 21:48:34 98
原创 1147 Heaps (30 分)(最大堆的判断和二叉树的遍历)
1147Heaps(30 分)In computer science, aheapis a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater ...
2019-03-01 21:19:46 507
原创 1146 Topological Order (25 分)(拓扑排序)
1146Topological Order(25 分)This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are supp...
2019-03-01 17:08:14 168
原创 1145 Hashing - Average Search Time (25 分)(散列冲突检测)
1145Hashing - Average Search Time(25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer key...
2019-03-01 16:04:04 382
原创 1149 Dangerous Goods Packaging (25 分)(散列)
1149Dangerous Goods Packaging(25 分)When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious trou...
2019-03-01 13:15:33 239
原创 1148 Werewolf - Simple Version (暴力遍历)
1148Werewolf - Simple Version(20 分)Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: "Pla...
2019-03-01 13:09:37 185
原创 1150 Travelling Salesman Problem (图,set)
1150Travelling Salesman Problem(25 分)The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest poss...
2019-03-01 12:36:33 92
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人