[Angular] Updating and resetting FormGroups and FormControls

If you want to reset or just update field value, you can do:reset: reset({key: value, k2:v2});update:   1. patchValue({k: v}); update part of for
3次阅读

ORACLE中的字符串替换 replce、regexp_replace 和 translate

一、语法 replace(str_source,str1,str2)  把 str_source 中 str1 字符串替换为 str2 字符串,当 str2 为 null 或'' 时,与下个作用相同 replace(str_source,str1)  
3次阅读

BZOJ 4758 Subsequence Reversal

神思路orzorzorzorzorzorz首先可以这么想:对一个子序列翻转即是相当于对i1<i2<....<ik<jk<jk-1<....j1,swap(i,j)。然后dp[i][j][k][m]表示对于区间i,j,它前面的最大值是k,它后面的最小值是m,的答案。
3次阅读

[LeetCode] Convert BST to Greater Tree 将二叉搜索树BST转为较大树

 Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum o
7次阅读

[Angular] Reactive Form -- FormControl & formControlName, FormGroup, formGroup & formGroupName

First time dealing with Reactive form might be a little bit hard to understand. I have used Angular-formly for AngularJS bofore, what it does is
3次阅读

BZOJ 1419 Red is good

期望dp。定义状态一般都是倒着来?。。。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#define maxn 5050#define eps 1e-7usi
3次阅读

BZOJ 3329 Xorequ

x^2x=3x,x+2x=3x。而异或是不进位的加法。所以x+2x不能进位。也就是说x中没有相邻的两个1。对于第一问可以数位dp,对第二问可以矩阵快速幂。#include<iostream>#include<cstdio>#include<cstring>#inc
3次阅读

PCL Save VTK File With Texture Coordinates 使用PCL库来保存带纹理坐标的VTK文件

 我之前有一篇博客Convert PLY to VTK Using PCL 1.6.0 or PCL 1.8.0 使用PCL库将PLY格式转为VTK格式展示了如何将PLY格式文件转化为VTK格式的文件,在文章的最后提到了VTK文件保存纹理的两种方式,第一种是需要有texture的图片,然后
9次阅读

Qt的4个图像类QImage/QPixmap/QBitmap/QPicture 转

Qt的4个图像类QImage/QPixmap/QBitmap/QPicture 转(一)QPixmap和QImage的区别http://www.thisisqt.com/forum/viewthread.php?tid=267 QPixmap是专门为绘图而生,当需要绘制图片时你需要使用QP
5次阅读

[Recompose] When nesting affects Style

In CSS we use the descendant selector to style elements based on their nesting. Thankfully in React we don't need to consider this most of the time be
4次阅读