04 2021 档案

摘要:navigator = {} window = {} !function(a, b) { "object" == typeof exports && "undefined" != typeof module ? b(exports) : "function" == typeof define && 阅读全文
posted @ 2021-04-24 12:00 程序员陈师兄cxycsx 阅读(132) 评论(0) 推荐(0) 编辑
摘要:百度网盘倍速播放代码 videojs.getPlayers("video-player").html5player.tech_.setPlaybackRate(1.5) 阅读全文
posted @ 2021-04-23 16:57 程序员陈师兄cxycsx 阅读(30) 评论(0) 推荐(0) 编辑
摘要:import requests from lxml import etree import re import csv from concurrent.futures import ThreadPoolExecutor def getOnePageData(url, writer): resp = 阅读全文
posted @ 2021-04-16 17:36 程序员陈师兄cxycsx 阅读(77) 评论(0) 推荐(0) 编辑
摘要:from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor # 线程池 # def target(url): # print(url) # def main(): # # 创建线程池 # with ThreadPool 阅读全文
posted @ 2021-04-16 16:17 程序员陈师兄cxycsx 阅读(45) 评论(0) 推荐(0) 编辑
摘要:from multiprocessing import Process # 方式一 # def sub_process(): # for i in range(11): # print(i) # def main(): # p = Process(target=sub_process) # p.st 阅读全文
posted @ 2021-04-16 15:57 程序员陈师兄cxycsx 阅读(73) 评论(0) 推荐(0) 编辑
摘要:from threading import Thread # 方式一 # def sub_thread(): # for i in range(11): # print(i) # def main(): # t = Thread(target=sub_thread) # t.start() # fo 阅读全文
posted @ 2021-04-16 15:40 程序员陈师兄cxycsx 阅读(47) 评论(0) 推荐(0) 编辑
摘要:public class HelloWorld{ public static void main (String args[]){ // 斐波那契数列 // 0 1 1 2 3 5 8 13 // 0 1 2 3 4 5 6 int res = fib(5); System.out.println( 阅读全文
posted @ 2021-04-13 21:30 程序员陈师兄cxycsx 阅读(28) 评论(0) 推荐(0) 编辑
摘要:// 1.Java方法 public static void main (String args[]){ int res = sum(1, 2); // int res = HelloWorld.sum(1, 2); System.out.println(res); } // 求和 public s 阅读全文
posted @ 2021-04-13 19:41 程序员陈师兄cxycsx 阅读(35) 评论(0) 推荐(0) 编辑
摘要:// 接受用户键盘输入 import java.util.Scanner; Scanner sc = new Scanner(System.in); String str = sc.next(); int num = sc.nextInt(); System.out.println(num); 阅读全文
posted @ 2021-04-13 11:49 程序员陈师兄cxycsx 阅读(87) 评论(0) 推荐(0) 编辑
摘要:// 选择结构 int score = 90; if (score > 90) { System.out.println("通过"); } else { System.out.println("pass"); } int score = 90; if (score > 90) { System.ou 阅读全文
posted @ 2021-04-13 11:48 程序员陈师兄cxycsx 阅读(34) 评论(0) 推荐(0) 编辑
摘要:// 加载模板引擎 const template = require('art-template') var tempStr = 'my name is {{username}}' var res = template.render(tempStr, { username: 'xyz' }) con 阅读全文
posted @ 2021-04-10 22:12 程序员陈师兄cxycsx 阅读(87) 评论(0) 推荐(0) 编辑
摘要:1.安装art-template模板引擎 npm install art-template 2.模板引擎的使用 <script src='node_modules/art-template/lib/template-web.js'></script> <script type='text/templ 阅读全文
posted @ 2021-04-10 21:57 程序员陈师兄cxycsx 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1.算术运算符 + - * / % ++ -- int i = 10; int j = 3; int k; System.out.println(i + j); // 13 System.out.println(i - j); // 7 System.out.println(i * j); // 3 阅读全文
posted @ 2021-04-10 20:01 程序员陈师兄cxycsx 阅读(32) 评论(0) 推荐(0) 编辑
摘要:1.Java标识符命名规则 由字母、数字、下划线、$、不能以数字开头、严格区分大小写 2.Java命名规范 类名、接口名 UserLogin 变量、方法名 getData 常量 CONFIG 3.变量 变量包含三部分: 数据类型、变量名、值 int age = 18; 变量需声明赋值才能访问 4.变 阅读全文
posted @ 2021-04-10 17:14 程序员陈师兄cxycsx 阅读(34) 评论(0) 推荐(0) 编辑
摘要:6.数据类型 基本数据类型 int float boolean char 引用数据类型 类 接口 数组 字符串 7.数据类型内存 byte 1 short 2 int 4 long 8 float 4 double 8 boolean 1 char 2 8、字符表 'A' -> 65 'a' -> 阅读全文
posted @ 2021-04-10 17:13 程序员陈师兄cxycsx 阅读(28) 评论(0) 推荐(0) 编辑
摘要:数据类型转换 转换规则: 1.除boolean类型外, 剩余7种类型都可以互相转换 2.不同的数据类型做运算, 先转换为大容量的数据类型再做运算 3.小容量 -> 大容量 byte -> short -> int -> long -> float -> double char -> short 和 阅读全文
posted @ 2021-04-10 17:11 程序员陈师兄cxycsx 阅读(24) 评论(0) 推荐(0) 编辑
摘要:小程序反编译教程 1.准备工具 MT管理器 VMOS Pro node环境搭建:https://nodejs.org/zh-cn/ 2.小程序包 找到.wxapkg小程序包(大小为2M以下) 文件路径如下: /data/data/com.tencent.mm/MicroMsg/微信号id文件夹/ap 阅读全文
posted @ 2021-04-10 11:28 程序员陈师兄cxycsx 阅读(1102) 评论(0) 推荐(0) 编辑
摘要:<swiper class='swiper' autoplay indicator-dots circular indicator-color='#fff' indicator-active-color='red' interval="3000" duration="100" style="heig 阅读全文
posted @ 2021-04-07 22:06 程序员陈师兄cxycsx 阅读(47) 评论(0) 推荐(0) 编辑
摘要:"tabBar": { "color": "#8a8a8a", "selectedColor": "#1AAD16", "backgroundColor": "#fff", "borderStyle": "white", "list": [ { "pagePath": "pages/index/in 阅读全文
posted @ 2021-04-07 21:00 程序员陈师兄cxycsx 阅读(106) 评论(0) 推荐(0) 编辑
摘要:1.阿里巴巴矢量字体图标库 地址:https://www.iconfont.cn/ 2.选择图标 → 添加至项目 → Font class → 在线链接 - 复制样式 3.css样式引用 @import "./styles/iconfont.wxss"; 阅读全文
posted @ 2021-04-07 20:34 程序员陈师兄cxycsx 阅读(58) 评论(0) 推荐(0) 编辑
摘要:// 加载网络请求模块 const http = require('http'); const fs = require('fs'); webRoot = 'C:/Users/gmbjzg/Desktop/JS/www' // 1.创建Web服务器 const cs = http.createSer 阅读全文
posted @ 2021-04-07 19:29 程序员陈师兄cxycsx 阅读(102) 评论(0) 推荐(0) 编辑
摘要:js如果一行代码以( [ ```开头需要补; 示例代码如下: ;(function say(){ console.log("hello world") })() 阅读全文
posted @ 2021-04-07 16:37 程序员陈师兄cxycsx 阅读(44) 评论(0) 推荐(0) 编辑
摘要:方法一 1.使用任意一款压缩软件压缩成zip或rar格式 2.cmd打开终端,执行下面这行命令 copy /b 美女.jpg + 小视频.zip target.jpg 说明:copy /b 图片 + 压缩文件 图片 3.删除后缀名,用解压软件解压 方法二 python代码 import os def 阅读全文
posted @ 2021-04-07 10:59 程序员陈师兄cxycsx 阅读(91) 评论(0) 推荐(0) 编辑
摘要:1.一个类会生成一个字节码文件 2.public class 类名必须与java源文件名字一致 3.每一个class类都可以定义一个main方法 阅读全文
posted @ 2021-04-06 22:44 程序员陈师兄cxycsx 阅读(226) 评论(0) 推荐(0) 编辑
摘要:1.什么是JDK? JDK是Java开发工具包 2.Java三大版本 JavaSE(标准版) JavaEE(企业版) JavaME(微型版) 3.Java语言特性 Java没有指针的概念, 没有多继承, 底层是C++实现的, 垃圾自动回收机制。 跨平台, 一次编译, 到处运行。 4.Java的加载与 阅读全文
posted @ 2021-04-06 20:33 程序员陈师兄cxycsx 阅读(111) 评论(0) 推荐(0) 编辑
摘要:// 加载网络请求模块 const http = require('http'); const fs = require('fs'); // 1.创建Web服务器 const cs = http.createServer(); // 2.监听请求 cs.on('request', (request, 阅读全文
posted @ 2021-04-06 17:11 程序员陈师兄cxycsx 阅读(54) 评论(0) 推荐(0) 编辑
摘要:1.核心模块 如:http、fs 2.第三方模块 如:request-promise 3.用户自定义模块 阅读全文
posted @ 2021-04-06 15:54 程序员陈师兄cxycsx 阅读(33) 评论(0) 推荐(0) 编辑
摘要:// 加载文件模块 const fs = require('fs'); // 文件读取 fs.readFile('demo.txt', (error, data) => { console.log(error); // data是一个Buffer实例对象 console.log(data insta 阅读全文
posted @ 2021-04-06 14:25 程序员陈师兄cxycsx 阅读(58) 评论(0) 推荐(0) 编辑
摘要:request-promise第三方模块目录结构 ─node_modules ├─bluebird │ └─js │ ├─browser │ └─release ├─lodash │ └─fp ├─psl │ ├─data │ └─dist ├─punycode ├─request-promise 阅读全文
posted @ 2021-04-05 23:44 程序员陈师兄cxycsx 阅读(789) 评论(0) 推荐(0) 编辑
摘要:1.demo模块 let a = 1; let b = 7; // 对象导出的两种方式 // module.exports = { // a: a, // b: b // } exports exports.a = a; exports.b = b; 2.index.js const demo = 阅读全文
posted @ 2021-04-05 23:03 程序员陈师兄cxycsx 阅读(51) 评论(0) 推荐(0) 编辑
摘要:// 类的定义 class User{ constructor(){ this.name = 'xyz' this.age = 18 } } // 实例化对象 var u = new User('') console.log(u) 阅读全文
posted @ 2021-04-05 22:39 程序员陈师兄cxycsx 阅读(176) 评论(0) 推荐(0) 编辑
摘要:项目结构 Client │ ├─components │ │ └─goods │ └─pages │ └─index └─Cloud └─getClassComents └─node_modules 1.新建云函数,安装第三方模块 npm install request-promise 2.云函数 阅读全文
posted @ 2021-04-05 21:48 程序员陈师兄cxycsx 阅读(100) 评论(0) 推荐(0) 编辑
摘要:// index.wxml <view bindtap="upLoadFile"> 文件上传 </view> // index.js // 文件上传 upLoadFile(res){ // 选择文件 wx.chooseImage({ count: 0, success: (res) => { // 阅读全文
posted @ 2021-04-05 20:38 程序员陈师兄cxycsx 阅读(132) 评论(0) 推荐(0) 编辑
摘要:// index.wxml <form bindsubmit="onSubmit"> <input type="text" placeholder="请输入账号" name="username"/> <input type="text" placeholder="请输入密码" name="passw 阅读全文
posted @ 2021-04-05 20:23 程序员陈师兄cxycsx 阅读(413) 评论(0) 推荐(0) 编辑
摘要:小程序端 app.js // 云环境初始化 wx.cloud.init({ env: "xylz-9nirz", traceUser: true }) index.js // 获取数据库数据 const db = wx.cloud.database(); db.collection('article 阅读全文
posted @ 2021-04-05 20:11 程序员陈师兄cxycsx 阅读(266) 评论(0) 推荐(0) 编辑
摘要:示例代码如下 wx.request({ url: '', data: {}, method: "GET", success: function(res){ console.log(res) }, fail: function(err){ console.log(err) } }) 阅读全文
posted @ 2021-04-05 18:10 程序员陈师兄cxycsx 阅读(342) 评论(0) 推荐(0) 编辑
摘要:微信小程序 1.目录结构 app.js │ app.json │ app.wxss │ project.config.json │ sitemap.json │ ├─components │ └─goods │ goods.js │ goods.json │ goods.wxml │ goods.w 阅读全文
posted @ 2021-04-05 17:57 程序员陈师兄cxycsx 阅读(70) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: 1.分支结构 int score = 90; if(score >= 90){ System.out.println("good"); } if(score >= 90){ System.out.println("good"); }else{ System.out.println(" 阅读全文
posted @ 2021-04-04 22:06 程序员陈师兄cxycsx 阅读(31) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: int a = 10; int b = 5; int max = a > b ? a : b; System.out.println(max); 阅读全文
posted @ 2021-04-04 21:40 程序员陈师兄cxycsx 阅读(234) 评论(0) 推荐(0) 编辑
摘要:1.天气:https://tianqiapi.com/ 阅读全文
posted @ 2021-04-04 20:45 程序员陈师兄cxycsx 阅读(31) 评论(0) 推荐(0) 编辑
摘要:解法1 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: dit = {} for i in range(len(nums)): other = target - nums[i] if other 阅读全文
posted @ 2021-04-04 11:14 程序员陈师兄cxycsx 阅读(26) 评论(0) 推荐(0) 编辑
摘要:示例代码如下 1.{{}} <div id="app">{{a + b}}</div> 2.v-once <span v-once>{{message}}</span> 3.v-html 以html格式解析数据 <span v-html="url"></span> 4.v-text <span v- 阅读全文
posted @ 2021-04-03 16:30 程序员陈师兄cxycsx 阅读(87) 评论(0) 推荐(0) 编辑
摘要:同属于一个包下函数不能重名 多个go文件的编译 go build hello.go utils.go # 编译 go run hello.go utils.go # 编译并执行 阅读全文
posted @ 2021-04-03 13:36 程序员陈师兄cxycsx 阅读(35) 评论(0) 推荐(0) 编辑
摘要:示例代码如下 // 主函数 func main(){ res := sum(10) fmt.Println(res) } // 递归实现数字累加 func sum(num int) int { if num == 1 { return 1 } res := num + sum(num - 1) re 阅读全文
posted @ 2021-04-03 13:07 程序员陈师兄cxycsx 阅读(51) 评论(0) 推荐(0) 编辑
摘要:示例代码如下 func main(){ f := outter() fmt.Println(f()) // 1 fmt.Println(f()) // 2 fmt.Println(f()) // 3 } // 闭包 func outter() func() int { n1 := 0 f := fu 阅读全文
posted @ 2021-04-03 12:31 程序员陈师兄cxycsx 阅读(33) 评论(0) 推荐(0) 编辑
摘要:示例代码如下 func main(){ // 匿名函数 n1 := 9 f := func () { n1++ } f() fmt.Println(n1) // 10 } 阅读全文
posted @ 2021-04-03 12:24 程序员陈师兄cxycsx 阅读(44) 评论(0) 推荐(0) 编辑
摘要:// 表明这个go文件属于main包, 每个文件都属于一个包 package main // 导入标准输入输出包 import ( "fmt" // "unsafe" ) // 给函数起别名 type SUM func(int, int) (int) // 主函数 func main(){ // f 阅读全文
posted @ 2021-04-03 11:25 程序员陈师兄cxycsx 阅读(93) 评论(0) 推荐(0) 编辑
摘要:函数的参数传递是值传递 // 表明这个go文件属于main包, 每个文件都属于一个包 package main // 导入标准输入输出包 import ( "fmt" // "unsafe" ) // 主函数 func main(){ var res int a := 1 b := 2 fmt.Pr 阅读全文
posted @ 2021-04-03 10:39 程序员陈师兄cxycsx 阅读(70) 评论(0) 推荐(0) 编辑
摘要:博客地址:https://www.liaoxuefeng.com/ 阅读全文
posted @ 2021-04-02 21:12 程序员陈师兄cxycsx 阅读(125) 评论(0) 推荐(0) 编辑
摘要:1.版本控制 本地版本控制 集中版本控制 (SVN) 分布式版本控制 (Git) 本地版本控制 集中版本控制 分布式版本控制 2.Git环境搭建 1.下载安装Git 官网:https://git-scm.com/ 淘宝镜像:https://npm.taobao.org/mirrors/git-for 阅读全文
posted @ 2021-04-02 20:54 程序员陈师兄cxycsx 阅读(139) 评论(0) 推荐(0) 编辑
摘要:网址:https://npm.taobao.org/mirrors/ 阅读全文
posted @ 2021-04-02 19:43 程序员陈师兄cxycsx 阅读(50) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: import java.util.Scanner; public class HelloWorld{ public static void main (String args[]){ // 创建Scnner对象 Scanner sc = new Scanner(System.in); 阅读全文
posted @ 2021-04-02 17:32 程序员陈师兄cxycsx 阅读(215) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: public class HelloWorld{ public static void main (String args[]){ int a = 6; int b = 5; int c = 8; // int temp = a > b ? a : b; // int max = t 阅读全文
posted @ 2021-04-02 17:30 程序员陈师兄cxycsx 阅读(41) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: int a = 5; int b = 5; String s = a == b ? "equal" : "not equal"; System.out.println(s); 阅读全文
posted @ 2021-04-02 17:22 程序员陈师兄cxycsx 阅读(105) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: 解法1 int n1 = 2; int n2 = 4; int temp; temp = n1; n1 = n2; n2 = temp; System.out.println(n1); System.out.println(n2); 解法2 int n1 = 2; int n2 = 阅读全文
posted @ 2021-04-02 16:42 程序员陈师兄cxycsx 阅读(47) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: int n1 = 2; System.out.println(n1 << 3); 阅读全文
posted @ 2021-04-02 16:18 程序员陈师兄cxycsx 阅读(86) 评论(0) 推荐(0) 编辑
摘要:解法1 class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ index = 0 for i in ra 阅读全文
posted @ 2021-04-02 15:17 程序员陈师兄cxycsx 阅读(24) 评论(0) 推荐(0) 编辑
摘要:解法1 class Solution: def findMaxConsecutiveOnes(self, nums: List[int]) -> int: str_ = '' for item in nums: str_ += str(item) li = str_.split('0') max = 阅读全文
posted @ 2021-04-02 13:24 程序员陈师兄cxycsx 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1.算法引入 # 算法引入 # 题目 a + b + c = 1000, a^2 + b^2 = c^2, 求a, b, c # 方案1 for a in range(1001): for b in range(1001): c = 1000 - a - b if a**2 + b**2 == c* 阅读全文
posted @ 2021-04-02 12:17 程序员陈师兄cxycsx 阅读(43) 评论(0) 推荐(0) 编辑
摘要:运算符 字符串拼接 System.out.println("hell" + 'o'); // hello System.out.println('a' + 1 + "hello"); // 98hello 除法运算 丢弃小数,保留小数部分 int a = 3; int b = 2; int c = 阅读全文
posted @ 2021-04-02 11:11 程序员陈师兄cxycsx 阅读(33) 评论(0) 推荐(0) 编辑
摘要:1.下载安装易语言 2.第一个易语言程序 新建 > Windowns窗口程序 > 代码编写 阅读全文
posted @ 2021-04-02 10:18 程序员陈师兄cxycsx 阅读(922) 评论(0) 推荐(0) 编辑
摘要:1.网站运营需要解决的问题 大访问量 访问速度 大储存量 服务器监控 2.如何解决大访问量 负载均衡 Cisco 以太网通道 F5等负载均衡器 Windows NLB技术 Linux LVS技术 LVS F5负载均衡 冗余技术 Cisco HSRP热备份路由 Windows集群技术 Linux HA 阅读全文
posted @ 2021-04-01 16:50 程序员陈师兄cxycsx 阅读(85) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: // 表明这个go文件属于main包, 每个文件都属于一个包 package main // 导入标准输入输出包 import ( "fmt" // "unsafe" ) // 主函数 func main(){ // var res int // res = sum(1, 2) // 阅读全文
posted @ 2021-04-01 14:22 程序员陈师兄cxycsx 阅读(25) 评论(0) 推荐(0) 编辑
摘要:示例代码如下: // 表明这个go文件属于main包, 每个文件都属于一个包 package main // 导入标准输入输出包 import ( "fmt" // "unsafe" ) // 主函数 func main(){ // 流程控制 // if语句 // score := 70 // if 阅读全文
posted @ 2021-04-01 11:31 程序员陈师兄cxycsx 阅读(32) 评论(0) 推荐(0) 编辑