自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 YII2.0创建模块

注册模块web.php生成模块[sup] [controllers] SubController.php Module.php访问路径hostname/sup/sub定义控制器类SubController.php <?php namespace app\modules\sup\controllers; use yii\web\Controller;...

2019-01-10 19:05:24 214

原创 Myslq查询表的字段数

select count(*) from information_schema.columns where table_schema=‘databasename’ and table_name=‘tablename’ ;

2019-01-03 10:47:38 185

原创 剑指Offer,给定前序与中序序列,还原二叉树。

最近在刷剑指offer上面的习题,但是发现好像目前网上用python写的比较详细的教程不多。所以写下这篇文章供大家参考,特别适用于python新手。如有好的提议,欢迎提出。# 题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。# 例如:前序遍历序列{1, 2, 4, 7, 3, 5, 6, 8}和中序遍历序列{4, 7, 2...

2018-11-12 21:59:22 588

原创 centos 安装python 相关准备

yum updateyum upgradeyum groupinstall “Development Tools”yum install python-develsudo yum install libffi-devel修改源以后:yum clean all

2018-11-11 11:48:20 187

转载 正割、余割、正弦、余弦、正切、余切之间的关系的公式 sec、csc与sin、cos、tan、cot之间的各种公式

1、倒数关系 tanα ·cotα=1 sinα ·cscα=1 cosα ·secα=1 2、商数关系 tanα=sinα/cosα cotα=cosα/sinα 3、平方关系 sinα²+cosα²=1 1+tanα²=secα² 1+cotα²=cscα² 4、求导关系 sec’=sectan tan’=sec^2 5、原函数 tan=(-ln|cos|)’ ...

2018-09-11 10:25:35 100729 1

原创 if __name__ == '__main__':在一个多进程python程序中的必要性

import multiprocessing, timedef test(i): while 1: print(i) time.sleep(.2)# if __name__ == '__main__': --- 去掉则会报错multiprocessing.Process(target=test, args=(1,)).start()multipr...

2018-09-02 21:54:19 2843

原创 What is socket.AF_INET and socket.SOCK_DGRAM? What do they do?

tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)What is socket.AF_INET and socket.SOCK_DGRAM? What do they do?AF_INET, where AF represents address family, is used to specif...

2018-09-02 19:22:37 816

转载 how to install node.js and npm on Ubuntu

To install Node.js, type the following command in your terminal:sudo apt-get install nodejsThen install the Node package manager, npm:sudo apt-get install npmCreate a symbolic link for node, a...

2018-08-30 23:38:03 154

原创 python tricks

A pitfall that may be encountered when removing an element from a list in a for loop in pythonexample:nums = [1, 2, 3, 4, 5]for i in nums: if i == 3: nums.remove(i) print(i)# re...

2018-08-13 13:06:23 283

原创 Linux vmWare setup notes for Ubuntu

Didirectional drag and drop, copy and paste sudo apt-get installopen-vm-tools sudo apt-get install open-vm*

2018-08-11 08:53:00 181

原创 Linux virtualbox setup notes

Linux setup notesThis command is used to solve the problem of no distutils when using pycharm in Ubuntu. sudo apt-get install python3-distutils

2018-08-10 18:32:15 153

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除