代码学习
wjd1994
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python170道面试题上
语言特性 1. 谈谈对 Python 和其他语言的区别 2. 简述解释型和编译型编程语言 3. Python 的解释器种类以及相关特点? 4. Python3 和 Python2 的区别? 5. Python3 和 Python2 中 int 和 long 区别? 6. xrange 和 range 的区别? 编码规范 7. 什么是 PEP8? 8. 了解 Python 之禅么? 9. 了解 Do...原创 2019-12-16 20:53:30 · 694 阅读 · 1 评论 -
数据绘图
import xlrd import os import csv import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import numpy as np class MTSPLOT(object): def __init__(self): self.dl_...原创 2019-11-04 19:40:58 · 294 阅读 · 0 评论 -
PYTHON 面试170道
语言特性 1. 谈谈对 Python 和其他语言的区别 2. 简述解释型和编译型编程语言 3. Python 的解释器种类以及相关特点? 4. Python3 和 Python2 的区别? 5. Python3 和 Python2 中 int 和 long 区别? 6. xrange 和 range 的区别? 编码规范 7. 什么是 PEP8? 8. 了解 Python 之禅么? 9. 了解 Do...原创 2019-10-28 11:11:41 · 616 阅读 · 0 评论 -
python实现对mongodb数据库的操作
一,通过pymongodb连接数据库 import pymongo settings = { "ip":"127.0.0.1", "port":27017, "user":"root", "password":"123456", "db_name":"admin@CPA_RF", "table_name":"testCollection", }...原创 2019-09-14 23:44:07 · 240 阅读 · 0 评论 -
python经典面试问题
1,is 和 ==的区别是什么? 2,range和xrange的区别是什么? 3,id函数有什么用? 4,python的pdb是什么原创 2019-03-24 23:57:29 · 429 阅读 · 0 评论 -
python2和python3并存下如何调用 pip3
命令如下:python3 -m pip install --upgrade pip --force-reinstall 比如需要安装 requests模块: python3 -m pip install requests原创 2019-03-02 15:27:47 · 357 阅读 · 0 评论 -
python 笔记
python: 交换 a,b = b,a 输出 print('data:{:12,.2f}'.format(data)) print(data1,data2,data3,sep = '|') print(data,end = ',') Lamda: hello = lambda:print('hello world') hello(); scores = [1,2,3,4] s...原创 2018-05-25 15:29:48 · 247 阅读 · 0 评论 -
浅谈C++中的拷贝构造函数与赋值函数
首先看段代码class A { public: A():data(0) { p = new int[2]; } A(const A &a) { data = a.data; p = new int[2]; for(int i = 0;i < 2;i++) *(p+i) = *(a.p+i); } ~A() { delete []p; } p...原创 2018-03-23 17:05:07 · 192 阅读 · 0 评论 -
C++学习笔记之线程:数据共享与竞争,线程死锁
首先我们给出一段代码#include <iostream> #include <thread> #include <mutex> #include <fstream> #include <string> using namespace std; class LogFile { public: LogFile() { data = ...原创 2018-03-22 16:24:51 · 284 阅读 · 0 评论 -
C++学习笔记之多态
1,面向对象三要素:封装,继承,多态2,什么是多态:使基类的指针指向子类的对象如:Animal *p1 = new Dog;此时析构函数一定要申明为virtual,否则在程序结束时不会调用子类的析构函数3,多态实现过程:子类重写父类的方法代码中向父类型变量发出消息(静态绑定——>在编译期进行)virtual 声明时构造函数不能为virtual运行时,根据变量实际引用的对象类型决定调用哪个方法...原创 2018-03-08 15:51:51 · 169 阅读 · 0 评论 -
C++ 链表操作
代码实现#include <iostream> using namespace std; struct node { int data; struct node *next; }; class LinkList { private: struct node *head; public: LinkList(){head = NULL;} ~LinkList(); bool I...原创 2018-02-28 16:45:10 · 248 阅读 · 0 评论
分享