摘要:
外部引入库 在命令行中 pip install 要安装的库 pip uninstall 要卸载的库 pip list 查看安装了那些库 在代码中引入 import 要引入的库 字符串替换 replace() a='abcdefg' c=a.replace('bcd','oku') #将a字符串中的b 阅读全文
摘要:
const http = require('http') const https = require('https') const querystring=require('querystring') //url字符串格式化模块 简单的服务器接口示例 const http = require('ht 阅读全文
摘要:
npm -v 查看npm版本 npm version 查看所有模块的版本 npm search 包名 搜索 包 npm install或i 包名 安装 包 npm remove或r 包名 删除 包 npm install 包名 --save 安装包并添加到依赖中,新版nodejs不加--save也会 阅读全文
摘要:
module.js(要暴露的数据) 1、var a='dwadasd' exports.a=a exports.add=function(a ,b){ return a+b } 2、 module.exports={ //效果一样,不能同时使用,如果同时使用module.exports会覆盖expo 阅读全文
摘要:
在NuGet程序包中安装MySql.Data 引入命名空间 using MySql.Data.MySqlClient; using System.Configuration; 在App.config中配置(方便更改连接) <connectionStrings> <add name ="connStr 阅读全文
摘要:
左关联(只要主表有的数据都会展示出来) select * from tb_user u(主表) left join tb_class c (从表)on u.id=c.id; 通过id把两个表id相同的数据连接起来 中关联(后表没有的数据不会展示出来) select * from tb_user u 阅读全文
摘要:
select * from 表名; 查询该表下所有数据 select * from 表名 where 条件; 查询满足某条件的数据 select * from tb_user where id>2; 模糊查询 like (_(占位符)、%(通配符)) select * from tb_user wh 阅读全文
摘要:
新增数据 语法 insert into 表名 (字段名1,字段名2,...) values (值1,值2,...) insert into tb_user (id,`name`) values (1,"张三"); 非空列必须填写,如不填写则会报错 简写(values要写入所有字段,如少一个则报错) 阅读全文
摘要:
创建数据库 create database 数据库名; use 数据库名; 使用数据库 show databases; 展示所有的数据库 创建表## create table 表名 (字段名 类型(长度) <约束,默认值,注释>) 约束 ##非空 NOT NULL 不能为空 ##非负 UNSIGNE 阅读全文
摘要:
ArrayList(频繁拆装箱等原因,消耗性能,不建议使用) 需引入的命名空间 using System.Collections; 使用 ArrayList arrayList = new ArrayList(); arrayList.Add("abc"); //将数据新增到集合结尾处 arrayL 阅读全文