- 博客(38)
- 收藏
- 关注
原创 索引类型和索引方法
MySQL:索引类型:FULLTEXT:全文NORMAL:标准SPATIAL:空间UNIQUE:唯一索引方法:BTREEHASHMSSQL:索引类型:Non-Clustered:Clustered:XML:Spatial:...
2019-06-13 21:00:14
1363
转载 MySQL进阶
交换表的两列:update table as a, table as b set a.f1=b.f2, a.f2=b.f1 where a.id=b.id;转移表:select * into T2 from T1把T1的表结构和数据导入到T2(未创建)中。setidentity_insertT3oninsertintoT3(id,f2,f3,....)sele...
2019-04-03 16:39:54
252
原创 大数据面试题
Java基础常见笔试题总结https://blog.youkuaiyun.com/qq_16633405/article/details/79211002史上最全Java面试题https://blog.youkuaiyun.com/linzhiqiang0316/article/details/80473906大数据面试题及答案-汇总版https://blog.youkuaiyun.com/albg_boy/article/...
2019-01-11 10:54:15
374
原创 通过单例模式(恶汉式 & 懒汉式)管理 SqlSessionFactory 对象
package mybatis.test;import java.io.IOException;import java.io.Reader;import org.apache.ibatis.io.Resources;import org.apache.ibatis.session.SqlSessionFactory;import org.apache.ibatis.session....
2018-09-15 20:59:47
764
原创 数组索引_deque_小米面试题
问题描述:一副牌面为从 1 到 n 的牌,每次从牌堆顶取一张放桌子上,再取一张牌放到堆底,直到手里没牌,最后桌子上的牌是从 1 到 n 有序,编写程序,输入 n,输出牌堆的顺序数组。程序如下:#include<iostream>#include<deque>using namespace std;int main(){ int n; int ...
2018-09-08 20:46:21
273
原创 单例设计模式
public class SingleInstance { /* * 恶汉式:开发中比较常用,没有线程安全问题 1.私有化构造函数,让外部不能直接创建对象 2.创建一个私有的静态的本类实例对象 3.提供一个公共的静态的返回值类型是本类的一个方法 private SingleInstance() { ...
2018-09-07 22:01:42
125
原创 Windows系统使用
在文件夹中时,在键盘输入字符会直接匹配焦点最近的文件夹或标准文件文件;Back Space :返回上一级;Enter :进入文件或者打开标准文件;.bat:Windows下的可执行文件后缀名;...
2018-09-04 21:13:42
226
原创 Web学习(Tomcat、JS、jQuery、Servlet、JSP、AJAX、JSON、Maven、Redis、Spring、SpringMVC、SpringBoot)
一、TomcatTomcat的默认端口:HTTP/1.1-8080、Tomcat admin port-8005、AJP/1.3-8009;(www-HTTP 协议的默认端口号:80)文件夹作用:bin:可执行文件;conf:配置文件,Tomcat 运行时的一些参数; server.xml:*非常重要的配置文件(端口号);lib:Tomcat 依赖第三方jar...
2018-09-04 21:09:52
247
原创 Linux系统使用
一,基本操作二,文件操作红色文件文表示该文件不可执行,改为可执行文件命令:chmod u + x / opt / softwares / *;文件在/ opt / softwares /目录下,该命令表示使该目录下的所有文件都改为可执行文件。解压命令:tar -zxf文件名解压到的路径(例如:tar -zxf jdk10.tar.gz .opt / modules /)删除文件夹:...
2018-09-04 20:49:20
151
原创 MySQL 基础知识大全
查看版本信息: 命令行连接MySql win+r : mysql -u root -p -> 输入密码 -> 进入数据库 远程连接数据库 win+r:mysql -h 远程数据库IP -u user_name -p password exit -> 退出 mysql的初始化,生成date文件夹并初始化密码 通过CMD进入MySQL安装...
2018-08-30 11:23:12
1300
原创 MySQL 删除外键约束
版本:Your MySQL connection id is 14Serverversion: 8.0.11 MySQL Community Server - GPL准备:create table orders(orders_id int primary key auto_increment,total int,count float,time time);create tab...
2018-08-27 22:51:36
4400
转载 JVM调优总结-Xms -Xmx -Xmn -Xss
JVM 应用服务器电信CMS 算法 堆大小设置JVM中最大堆大小有三方面限制:相关操作系统的数据模型(32-bt还是64位)限制;系统的可用虚拟内存限制;系统的可用物理内存限制.32位系统下,一般限制在1.5G~2G; 64为操作系统对内存无限制。我在Windows Server 2003系统,3.5G物理内存,JDK5.0下测试,最大可设置为1478m。典型设置: java -Xmx3...
2018-08-18 19:04:43
2896
原创 局部内部类访问的局部变量为什么必须是一个常量
因为局部内部类是相当于拷贝一份局部变量的值,如果局部变量的值可以随便的改变,那么可能会造成结果的不一致性,所以局部变量必须定义成常量。从生命周期上来看,内部类运行期间可能会使用局部变量的值的时间超过内部类的存在时间,若局部变量的值不是final类型,则会出现引用非法。(线程使用)初次接触,以后有更深的感悟再续上把。...
2018-08-06 20:09:30
892
转载 正则表达式
表达式全集 构造 匹配 字符 x 字符 x \\ 反斜线字符 \0n 带有八进制值 0 的字符 n (0 <= n <= 7) \0nn 带有八进制值 0 的字符 nn (0 <= n <= 7) \0mnn 带有八进...
2018-08-06 09:52:53
1020
原创 爬楼梯问题
问题描述:每次可以爬1个或2个台阶,问爬到第 n 个台阶,一共有多少种不同的方法?方法一:斐波那契数列;方法二:动态规划O(n);方法三:可以利用矩阵乘法的特性将时间复杂度优化到O(logN)。在线性代数中,斐波那契数列通项公式被表述成以下形式:优化:快速地求矩阵的n次方(1)利用二分的思想:假设要求矩阵的n次方为A(n),设i=n/2,若n%2==1,则 A(n)=A...
2018-08-02 19:26:14
707
原创 数学知识_斐波那契
一、1.Calculation 计算2.Application 应用3.Inspiration 灵感二、格式一:格式二:公式一:初等代数解法公式二:线性代数解法 公式三:组合数解法公式四:用计算机求解可通过编程观察斐波那契数列。分为两类问题,一种已知数列中的某一项,求序数。第二种是已知序数,求该项的值。可通过递归递推的算法解决此两个问题。...
2018-08-02 19:04:51
417
原创 不同文件夹(包)下的类调用
1.直接调用 导入需求包名,使用方式:类名.方法名(参数列表); package cn.edu360;import temporary.Max;public class packTest { public static void main(String[] args) { System.out.println(Max.max(3,8)); }}被调用的包;方法用 ...
2018-08-02 10:42:25
4682
原创 Algorithms_4th导包
1.在https://algs4.cs.princeton.edu/code/下载algs4.jar;2.在工程下新建文件夹 lib,导入algs4.jar;3.选中工程,ALT+ENTER,进入Java Build Path,在 Libraries -> Classpath -> Add JARs,选择 algs4.jar。4....
2018-08-01 18:46:19
259
翻译 小根堆 的调整算法
// 小根堆 的调整算法/*heap[]:存储堆的数组hlength:heap[]的节点数 */ //把节点 P 向下调整 void down(int p){int q=p*2;a=heap[p];while(q<=hlength){if(q<hlength&&heap[q]>heap[q+1])q++;if(heap[q]&g...
2018-05-08 19:59:09
2622
翻译 Argus_poj2051
/*ArgusTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11829 Accepted: 5782DescriptionA data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data...
2018-05-08 19:35:05
223
翻译 Team Queue_poj2259
/*Team QueueTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5712 Accepted: 1932DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Te...
2018-05-07 20:47:48
301
翻译 堆栈_Terrible Sets_poj8082
/*Terrible SetsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5448 Accepted: 2778Description紧贴 x 轴有一些互相挨着的矩形,给定每个矩形的长宽,求他们可以形成的最大矩形面积 Let N be the set of all natural numbers {0 , 1 , 2 , ...
2018-05-07 20:04:43
175
原创 sprintf&sscanf
#include<cstdio>#include<iostream>using namespace std; int main(){ int n,num; char s[11],str[11]; cin>>n>>s; sprintf(str,"%d",n); sscanf(s,"%d",&num); cout&l
2018-03-20 19:53:08
144
翻译 num2str&&str2num
#include<iostream>#include<cstring>#include<sstream>#include<string>using namespace std;string num2str(double i){ stringstream ss; ss<<i; return ss.str();}i...
2018-03-20 19:37:46
5698
原创 四平方和
#include #include int main(){ int a, b, c, n, flag = 0,t; double maxN, d; scanf("%d", &n); maxN = sqrt(n); t=maxN<1200?maxN:1200; for(a = 0; a < t; a ++) { for(b = a; b < t; b ++) {
2018-02-02 00:15:16
187
原创 数据结构_字典
def add(a, b): return a + bdef sub(a, b): return a - bdef demo_dict(): dicta={4:16,1:1,2:4,3:9} # dicta = {4: 16, 1: 1, 2: 4, 3: 9} print (1,dicta) print (2,dicta.keys()...
2018-01-25 15:10:01
436
原创 根据数据文件在窗口中动态路径绘制
#根据数据文件在窗口中动态路径绘制import turtledef main(): #设置窗口信息 turtle.title('数据驱动的动态路径绘制') turtle.setup(800,600,0,0) #设置画笔 pen=turtle.Turtle() pen.color("red") pen.width(5) pen.sh...
2018-01-05 11:40:37
607
原创 drawtree
# drawtree.py from turtle import Turtle, mainloop def tree(plist, l, a, f): """ plist is list of pens l is length of branch a is half of the angle between 2 branches f is factor by...
2018-01-05 10:49:26
1288
原创 python图形绘制
import turtledef drawSnake(rad,angle,len,nackrad): for i in range(len): turtle.circle(rad,angle)#rad:圆形轨迹半径的位置;angle:轨迹弧度值 turtle.circle(-rad,angle) turtle.circle(rad,angle...
2018-01-02 16:21:45
663
原创 多态
#include<iostream>using namespace std;class Base{ public: void fun1(){this->fun2();}//this是基类指针,fun2是虚函数,所以是多态 virtual void fun2(){cout<<"Base:fun2()"<<endl;} }; ...
2017-11-05 22:12:35
155
原创 继承时的内存问题
#include<iostream>using namespace std;class c{ private: int real,imag; public: int a,b;};class ss:c{ int aa;};int main(){ ss a; cout<<sizeof(a)<<...
2017-11-01 16:00:42
187
原创 继承的内存问题
#include<iostream>using namespace std;class c{ private: int real,imag; public: int a,b;};class ss:c{ int aa;};int main(){ ss a; cout<<sizeof(a)<<...
2017-11-01 15:59:28
139
转载 C语言基本数据类型
%d int %ld long int%c char%f float%lf double%x 十六进制输出int或者long int或者short int%o 八进制输出%s 字符串速查表:char -128 ~ +127 (1 Byte)short -32767 ~ + 32768 (2 Bytes)unsi
2017-03-12 19:28:07
212
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人