03 2018 档案
摘要:作为web的一部分,hhtp协议是一个非常常用也非常重要的协议了。HHTP是Hyper Text Transfer Protocol(超文本传输协议)的缩写,基于TCP/IP面向应用层的协议,如果是基于TLS或者SSL协议层的话,那就变成了我们常说HTTPS协议,关系如下。http默认端口为80端口
阅读全文
摘要:写了一批Lua脚本,要放到数据库里面,调用的时候进行计算,由于有太多lua脚本,就写了个程序来录入。 下面主要分三个部分: readToString,用作从lua脚本,也就是文件中读取script出来,传送一个参数就是文件夹的绝对路径。 writeToMYSQL主要进行数据库写的函数,main函数里
阅读全文
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or
阅读全文
摘要:首先我们先要知道servlet是什么,这有两种解释。一是目前大多数人所说的,一个实现了servlet接口的类就可以叫作servlet。二,servlet只是一个接口。那么看起来这两点都和servlet接口有关,那么我们知道弄清楚了servlet接口就好了。 查看servlet接口源码,会发现里面一共
阅读全文
摘要:session在服务端,cookie在客户端(也就是浏览器) 由于http协议是无状态的协议,所以在数据交换完毕后,C/S端的连接就会关闭。此时,服务器无法从连接上跟踪会话,而cookie可以跟踪会话,这就弥补了http无状态协议的不足。cookie保存在客户端,如果客户端的服务器禁用了cookie
阅读全文
摘要:Given a linked list, remove the nth node from the end of list and return its head. For example, Note: Given n will always be valid. Try to do this in
阅读全文
摘要:Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: 别人的
阅读全文
摘要:Hibernate,对于java来说很重要的一个东西,用于持久层。之前看了很多配置的,都不行,自己来写一个配置成功的。 环境:jdk1.8,eclipse-jee-oxygen,mysql-connector-java-5.1.46,hibernate 5.2. 首先要确保你的jdk,eclipse
阅读全文
摘要:Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho
阅读全文
摘要:题目:Write a function to find the longest common prefix string amongst an array of strings. 很简单的一个描述,最长公共前缀,首先想到的是用递归,既然是找公共前缀,那肯定要两个进行比较,所以把第一个和除了第一个之外
阅读全文
摘要:Establishing SSL connection without server's identity verification is not recommended. 出现这个错误的原因是因为mysql版本问题,不同的mysql对ssl使用情况不一样,尝试不采用ssl连接即可。操作方法如下。
阅读全文
摘要:因为要新建一个站,公司要把word表格的部分行列存到数据库中。之前用java操作过excel,本来打算用java从word表格中读取数据,再存到数据库中,结果因为权限不够,无法访问公司要写的那个数据库,跪了跪了。 但还是把java读取word中表格的方法写一下,先上代码。 首先肯定是io读取文档,利
阅读全文
摘要:一、memcached与redis的区别? 1.存储方式不同。memcached把数据全部存在内存之中,断电之后会挂掉,而redis虽然也用到了内存,但是会有部分数据存在硬盘中,保证数据持久性。 2.数据支持类型不同。memcached对数据支持比较简单,而redis支持数据类型较丰富,如strin
阅读全文
摘要:刚接触到Redis,首先对Redis有一个初步的了解。 开源,免费,遵守BSD协议,key-value数据库。 可以将内存中的数据保存在磁盘中,重启的时候可以再次加载使用。 多种key-value类型的数据。 主从模式的数据备份。 高性能读写。 redis所有操作都是原子性的,单个操作的原子性可以通
阅读全文
摘要:Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your
阅读全文
摘要:struts2是一个较为成熟的mvc框架,先看看怎么配置struts2并且产生helloworld页面。 首先从官网下载struts2,http://struts.apache.org/download.cgi,用2.5就可以,本文也是基于2.5说明的,其他版本配置的时候会略有不同。环境tomcat
阅读全文
摘要:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of
阅读全文
摘要:Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you
阅读全文
摘要:公司给的一个小的practice C# vs2017 Stage 1 (cmd)1. Parse the dll (reflection)2. Write all the public methods to a txt file (io) Stage 2 (cmd)1. Create a local
阅读全文
摘要:12.Integer to Roman Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 拿到题目,分析,比较简单,除掉相应的基数单位
阅读全文

浙公网安备 33010602011771号