SpringCloud Netflix笔记
微服务
微服务:解决接口越来越多,单体应用运行缓慢问题。
踩坑记录
找不到Mapper
*************************** |
原因是mybatis版本有问题!
<dependencyManagement> |
微服务:解决接口越来越多,单体应用运行缓慢问题。
*************************** |
原因是mybatis版本有问题!
<dependencyManagement> |
又开始了ICS之旅,这次又给自己下了一个难度,找到了汪亮老师讲解的ICS 5!
第一课的目标是修正一个register错误声明
:%s/163/tuna/g
非常爽!ccache
加速我的PAunion
和 struct
的区别?unioin
在同一个内存空间中存储不同的数据类型。struct
则是同时存储不同的数据类型。union
?阅读i386手册实现ALU中的各类运算,包括设置标志位
Name | Function |
---|---|
CF | Carry Flag ── Set on high-order bit carry or borrow; cleared otherwise. |
PF | Parity Flag ── Set if low-order eight bits of result contain an even number of 1 bits; cleared otherwise. |
ZF | Zero Flag ── Set if result is zero; cleared otherwise. |
SF | Sign Flag ── Set equal to high-order bit of result (0 is positive, 1 if negative). |
OF |
Overflow Flag ── Set if result is too large a positive number or too small a negative number (excluding sign-bit) to fit in destination operand; cleared otherwise. |
composer create-project topthink/think tp |
localhost/tp/public/
首页首页/index.php/index
controller下的Index类首页/index.php/index/?s=hello/value
调用controller下Index类的hello方法,并传入参数value(URL兼容模式)首页/index.php/hello_world
调用controller下HelloWorld类首页/index.php/group.blog
调用controller/group下的Blog类$data = array('a' => 1, 'b' => 2, 'c' => 3); |
在应用根目录下新建.env文件
APP_DEBUG = true |
$user = Db::connect('mysql')->table('tp_user')->select(); |
<?php |
Db::getLastSql();可以看上一条sql语句
Db::table('tableName')->where('fieldName', fieldValue)->find(); // 查询不到返回null |
Db::table('tableName')->select(); |
Db::name('tableName')->where('id', $id)->value('field'); |
Db::name('name')->column('fieldAsValue', 'fieldAsKey'); |
// strict 表示强行插入 |
Db::name('user')->insertAll($data); |
Db::name('user')->where('id', 232) |
// 根据主键删除多条数据 |
composer require topthink/think-view |
from pyecharts.charts import Bar |
标题 | Title | 标题 |
---|---|---|
左对齐 | Justify Align | 右对齐 |
Delete Line
Blod
Italic
Code
E=MC2
Link
public static void main(String[] args) { |
--- auto_detect: ture |
No Silver Bullet
By Brooks
[!NOTE]
Note that it is a note.
[!WARNING]
WARNING!
[!DANGER]
Notice the DANGER!
[!SUCCESS]
Now it is SUCCESS.
[!INFO]
Here is some INFO.
#走两次dp
如果只走一次,这题是非常经典的DP。但是要走两次,就变得非常有难度。
首先,可以简单地推广:要走两次,dp就存四个下标:
int[][][][] dp = new int[N][N][N][N]; |
我们只需要遍历所有可能,并且比较四种走法(同下、同右、一下一右),取最大值就可以了。
注意,一个数只能取一次,需要一个判断防止重复取数。
for (int i1 = 1; i1 < N; i1 += 1) { |
当然,4个循环时间复杂度太高了。我们可以用一个k == i1 + j1 == i2 + j2
来减少一重循环。
这个k利用得很巧妙,因为每次要么向下走,要么向右走,所以k-1 == i-1 + j == i + j-1
,全程使用k-1
就能代表所有情况。
pre_start_tag
void sum_max_sequence(void) |
#全排列
这题在给定的和不重复的情况下很简单:
nums[n]
。nums[0] + nums[1]
必然等于sums[0]
(最小值),nums[0] + nums[2]
必然等于sums[1]
(次小值), … , nums[n-2] + nums[n-1]
必然等于sums[lastIndex]
(最大值)。nums[0] = (sums[0] + sums[1] - sums[n-1]) / 2
,论证看下方:nums[n] = {a, b, c, d, e} 从小到大排列 |
nums[0]
,其他数字都可以用nums[i] = sums[i-1] - nums[0]
推出来但是给定的和重复的情况下,上面的第2条就不成立了。例如测试用例3:
一般教程会让我们配置JAVA_HOME
和JRE_HOME
,然后启动Tomcat;
然而,在JDK9以后,就不默认包含JRE了。
此时,我们使用命令
jlink --module-path jmods --add-modules java.desktop --output jre |
生成一个JRE后,启动Tomcat,就会报错:
WARNING: Unknown module: java.rmi specified to --add-opens |
这时候,只需要把jre文件和JRE_HOME
环境变量删除,Tomcat就能正常启动