代码1: 划一个简单的x及y轴,标出原点O及坐标为(100,100)的A点。 import turtle turtle.goto(0,0) turtle.dot(20,"yellow") turtle.write("O", font=('Arial', 10, 'normal')) turtle.f ...
分类:
编程语言 时间:
2020-06-09 09:27:00
阅读次数:
82
JavaScript 使用了基于原型模式的 OOP 实现,一直以来,其封装性都不太友好
分类:
编程语言 时间:
2020-06-08 12:27:21
阅读次数:
53
C++ allows both static and dynamic type checking i.e. types are checked by the compiler. As we will be using the existing code therefore we don’t need ...
分类:
编程语言 时间:
2020-06-08 00:51:56
阅读次数:
59
4. Out of the following, which is not a member of the class?a) Static functionb) Friend functionc) Constant functiond) Virtual function A:Friend funct ...
分类:
编程语言 时间:
2020-06-08 00:17:46
阅读次数:
66
OOP七大原则 开闭原则: 对扩展开放, 对修改关闭 里氏替换原则: 继承必须确保所拥有的性质在子类中仍然成立 以来倒置原则: 面向接口编程, 不要面向实现编程 单一职责原则: 控制类的粒度大小, 将对象解耦, 提高其内聚性 接口隔离原则: 腰围各个类建立他们需要的专用接口 迪米特法则: 只与你直接 ...
分类:
其他好文 时间:
2020-06-07 19:43:45
阅读次数:
91
#include <stdio.h> int main() { int a = 0; loop: a++; printf("%d\n",a); if(a == 100) goto end; goto loop; end: return 0; } ...
分类:
编程语言 时间:
2020-06-07 18:01:02
阅读次数:
81
最近面试聚美优品以及睿沿科技都挂在一些开放性问题上,简单分享一下: (毕业面百度也是最后一面开放性问题挂了,感觉都喜欢问技术选型,大数据量储存检索解决方案) MQ 选型: ROCKETMQ整体架构: 负责消息储存的broker(包含topic,一个topic有多个队列), 负责消息投递的客户端,负责 ...
分类:
其他好文 时间:
2020-06-07 14:42:00
阅读次数:
82
IoC 和 AOP 被称为 Spring 两大基础模块,支撑着上层扩展的实现和运行。虽然 AOP 同样建立在 IoC 的实现基础之上,但是作为对 OOP(Object-Oriented Programing) 的补充,AOP(Aspect-Oriented Programming) 在程序设计领域拥 ...
分类:
编程语言 时间:
2020-06-07 01:01:18
阅读次数:
71
51构建乘积数组 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1]。不能使用除法。(注意:规定B[0] = A[1] * A[2] * ... * A[n-1], ...
分类:
其他好文 时间:
2020-06-05 14:55:19
阅读次数:
47
#!/bin/bash dir=/home/king while read line do my_dir="$dir/$line" if [ ! -d "$my_dir" ];then echo $my_dit mkdir $my_dir else echo "direc exist" fi { w ...
分类:
其他好文 时间:
2020-06-04 15:43:31
阅读次数:
118