本文介绍下js的OOP中的继承。 上图的要点为:Foo函数在创建时会自动生成内置属性prototype,而typeof Foo.prototype是object类型的。 上图的要点为:Foo.prototype内置两个属性,constructor和__proto__。 上图的要点为: 1.Stude ...
分类:
编程语言 时间:
2020-02-05 20:42:51
阅读次数:
89
Exporter.cpp文件中:导出shadowDepthMap: void FLightmassSolverExporter::ExportStaticShadowDepthMap(const FGuid& LightGuid, const FStaticShadowDepthMap& Stati ...
分类:
Web程序 时间:
2020-02-05 20:40:37
阅读次数:
144
常用技巧精选(一) 尺取法 POJ 2566 给出一个长度n(<=1e5)的数列,每个数的大小在-1e4-1e4之间,给出若干询问值,要求一段字串和,它的绝对值与询问值最接近 好题目。由于数列有正有负,所以不能直接二分或尺取。考虑对前缀和排序 得到一个新数列,此时新数列任意一段子串都对应原数列的一个 ...
分类:
其他好文 时间:
2020-02-05 20:05:46
阅读次数:
70
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2047 思路:先是列出了四个,但是没发现规律,然后开始画递归树,在其中找到了规律,算出递归式为f(n) = 2*[f(n-1)+f(n-2)] 递归树分析如下(有点潦草,看不懂可以留言,大致模型为嵌套): ...
分类:
编程语言 时间:
2020-02-04 20:18:33
阅读次数:
85
nil 标识符是不能比较的 package main import "fmt" func main() { fmt.Println(nil == nil) } .\nil.go:6:18: invalid operation: nil == nil (operator == not defined ...
分类:
编程语言 时间:
2020-02-04 18:41:08
阅读次数:
87
$f[i][k]$ 表示前 $i$ 个分成 $k$ 段,且最后一段以 $i$ 结尾的最小值 容易写出转移方程 $f[i][k] = \min \{f[j][k - 1] + calc(j+1,i)\}$ 因为具有决策单调性(打表 or 证明(不会)),就可以一种分治算法来优化 具体实现就是 $sol ...
分类:
其他好文 时间:
2020-02-04 18:32:36
阅读次数:
67
题目:https://vjudge.net/problem/UVA-232 分析:在输入的同时用序号对起始格标记,然后按照输出要求输出即可。(注意:本题最后一个样例末尾没有空行) 1 #include <stdio.h> 2 #include <string.h> 3 int main(void){ ...
分类:
其他好文 时间:
2020-02-04 15:47:18
阅读次数:
85
解决办法:关闭selinux [root@k8s-master ~]# docker push 10.0.0.10:5000/nginx The push refers to a repository [10.0.0.10:5000/nginx] 22439467ad99: Retrying in ...
分类:
Web程序 时间:
2020-02-04 15:41:17
阅读次数:
402
题目链接 1 #include <bits/stdc++.h> 2 # define LL long long 3 using namespace std; 4 5 const int maxn=5000+10; 6 int n; 7 LL dis[maxn]; 8 int complete[max ...
分类:
其他好文 时间:
2020-02-04 11:02:51
阅读次数:
120
//注意:排序的是满分解题数,而不是解题数。#include <cstdio>#include <cstring> #include <iostream> #include <algorithm> using namespace std; const int maxn = 200005; typed ...
分类:
其他好文 时间:
2020-02-04 10:37:01
阅读次数:
52