1、 #include<stdio.h>#include<stdlib.h>#include<getch.h> int main(int argc,const char* argv[]){ char map[8][8] = { {0,0,3,3,3,3,0,0}, {0,0,3,5,5,3,0,0} ...
分类:
其他好文 时间:
2020-07-14 00:25:43
阅读次数:
65
为什么要用工厂? 用工厂的主要目的是把对象的创建和使用分离,这比较符合单一职责原则,工厂负责创建产品,调用者负责使用产品,如果调用者既需要负责创建产品又需要负责使用产品,那么耦合性会比较高。 以一个常见的登录功能为例: class HibernateUserDao { public void get ...
分类:
其他好文 时间:
2020-07-13 23:11:59
阅读次数:
113
https://blog.csdn.net/cdlwhm1217096231/article/details/95060636?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-13.no ...
分类:
其他好文 时间:
2020-07-13 18:50:08
阅读次数:
82
String str3 = "helloworld"; System.out.println(str3.substring(3)); System.out.println(str3.substring(2, 8)); String[] arr = str3.split("ow"); for (Str ...
分类:
其他好文 时间:
2020-07-13 18:43:15
阅读次数:
62
作为18c的新特性,其实在oracle 12.2 引入了Scalable Sequences作为一个隐藏特性,为了改善在高并发系统中,特别是使用seq作为index,大量插入记录导致index的争用,oracle自己实现了以前我们需要人工去自定义seq的方式(instance+sid+seq的类似算 ...
分类:
其他好文 时间:
2020-07-13 15:29:24
阅读次数:
65
摘要: 本文介绍了分布式框架的简单实现,说明了自己的设计思路,以及RPC的一些具体细节。在文末,贴出一些关于rpc的资料。 0x00:什么是RPC wiki给出的定义如下:In distributed computing, a remote procedure call (RPC) is when ...
分类:
其他好文 时间:
2020-07-13 13:47:27
阅读次数:
71
ResponseError: OOM command not allowed when used memory > 'maxmemory'. redis内存不足,需要修改配置 redis.conf, 修改其中的配置项: maxmemory maxmemory-policy Could not con ...
分类:
其他好文 时间:
2020-07-13 11:35:15
阅读次数:
91
Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Input: nums ...
分类:
其他好文 时间:
2020-07-13 09:57:03
阅读次数:
63
一、监控CPU和内存的日志工具的使用 1、阿里云提供了一个监控CPU和内存的脚本,因free版本不同的原因,脚本中的内容有做细微的修改,脚本内容如下: #!/bin/bash #When the free memory very less ,this script to collect CPU/me ...
分类:
系统相关 时间:
2020-07-12 20:48:34
阅读次数:
115
Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each ...
分类:
其他好文 时间:
2020-07-12 18:52:52
阅读次数:
63