12 2020 档案
摘要:js获取url let url = window.location.href; console.log(url) // 返回当前页面的路径和文件名,如:/testdemo/test.html let pathname = window.location.pathname; console.log(p
阅读全文
摘要:python使用uuid和guid 只需屏蔽128位int import uuid for i in range(100): print(uuid.uuid4().int & (1<<64)-1) 这些或多或少都是随机的,所以碰撞的可能性很小。 也许uid 1的前64位使用起来更安全。 import
阅读全文
摘要:基本用法 function mHttp() { alert(66) let httpRequest = new XMLHttpRequest();//第一步:创建需要的对象 {#httpRequest.open('POST', 'url', true); //第二步:打开连接/***发送json格式
阅读全文
摘要:基本操作 #!/usr/bin/env python # encoding: utf-8 """ @author: Irving Shi """ import base64 from pyDes import des, CBC, PAD_PKCS5 Des_Key = "_361Du$Z" Des_
阅读全文
摘要:1、wxPython 安装 1.1、Windows 和 macOS 平台安装: pip install -U wxPython 其中 install 是按照软件包,-U 是将指定软件包升级到最新版本。 1.2、Linux 平台下使用 pip 安装有点麻烦,例如在 Ubuntu 16.04 安装,打开
阅读全文
摘要:项目相关的快捷键 Ctrl + Shift + B = 生成项目 Ctrl + Alt + L = 显示 Solution Explorer(解决方案资源管理器) Shift + Alt+ C = 添加新类 Shift + Alt + A = 添加新项目到项目 编辑相关的键盘快捷键 Ctrl + E
阅读全文
摘要:flask-sqlacodegen 自动生成model 安装依赖 pip install pymssql pip install flask-sqlacodegen 自动生成model flask-sqlacodegen 是安装地址 mssql+pymssql://sa:123456@localho
阅读全文
摘要:JSON Schema入门 安装 pip install jsonschema JsonSchema官方文档入门文档入门文档生成Schema工具 1. JSON Schema简介 使用Json的好处(什么是Schema): 描述现有的数据格式 提供清晰的人工和机器可读文档 完整的数据结构,有利于自动
阅读全文
摘要:python中运行js代码 js2py 安装 pip install js2py js2py的简单用法 import js2py js = """ function add(a, b) { return a + b } """ add = js2py.eval_js(js) r = add(1, 2
阅读全文
摘要:python环境依赖 pip install PyExecJS pip install lxml pip install beautifulsoup4 pip install requests nodejs环境依赖 全局安装命令 npm install jsdom -g 或者 yarn add js
阅读全文
摘要:python 执行js代码 简单调用 import execjs execjs.eval("new Date") 返回值为: 2018-04-04T12:53:17.759Z execjs.eval("Date.now()") 返回值为:1522847001080 # 需要注意的是返回值是13位,
阅读全文
摘要:Windows + iis + python + django 1、 先下载iis 官网地址: https://www.iis.net/downloads 下载后安装iis 2、控制面板、 程序、 启动或关闭windows功能 把CGI勾上后 3、 运行控制面板、系统和安全、管理工具、interne
阅读全文