上一页 1 2 3 4 5 6 7 8 ··· 68 下一页
摘要: code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="ko" lan 阅读全文
posted @ 2020-12-24 00:17 anobscureretreat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: code from .models import UserProfile from django.contrib.auth.hashers import make_password user_profile = UserProfile() user_profile.username = userna 阅读全文
posted @ 2020-12-24 00:16 anobscureretreat 阅读(138) 评论(0) 推荐(0) 编辑
摘要: code 安装完成后可uwsgi --version查看版本, uwsgi --python-version还可以间接查看到python的版本。 阅读全文
posted @ 2020-12-24 00:14 anobscureretreat 阅读(1538) 评论(0) 推荐(0) 编辑
摘要: code { 'code': '10022200', 'msg': 'Success', 'buyer_logon_id': '155******51', 'buyer_pay_amount': '0.10', 'buyer_user_id': '208883212323143623772091', 阅读全文
posted @ 2020-12-24 00:13 anobscureretreat 阅读(210) 评论(0) 推荐(0) 编辑
摘要: #old /usr/bin/uwsgi -> /usr/local/python3/bin/uwsgi code #安装uwsgi 1069 wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz 1072 tar -xvf uwsgi 阅读全文
posted @ 2020-12-24 00:12 anobscureretreat 阅读(251) 评论(0) 推荐(0) 编辑
摘要: code */5 * * * * /usr/local/bin/python3.7 /root/ibook/check_is_still.py >> /root/log.log 2>&1 阅读全文
posted @ 2020-12-24 00:11 anobscureretreat 阅读(67) 评论(0) 推荐(0) 编辑
摘要: code /* 创建 XMLHttpRequest 对象 */ var xmlHttp; function GetXmlHttpObject(){ if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari 阅读全文
posted @ 2020-12-24 00:10 anobscureretreat 阅读(596) 评论(0) 推荐(0) 编辑
摘要: code $.get("/weather_code/", { city:"上海", time:"2019-04-05" }, function(result){ alert("返回数据: \n" + "reason:"+ result.reason +"\n"+"weather_name:"+ re 阅读全文
posted @ 2020-12-24 00:09 anobscureretreat 阅读(66) 评论(0) 推荐(0) 编辑
摘要: code $.ajax({ url: "/cal/", type: "post", data: { "n1":$("#num1").val(), "n2":$("#num2").val(), }, success:function (data) { console.log(data); $("#re 阅读全文
posted @ 2020-12-24 00:08 anobscureretreat 阅读(271) 评论(0) 推荐(0) 编辑
摘要: code pip3.7 install django-extensions pip3.7 install django-werkzeug-debugger-runserver pip3.7 install pyOpenSSL #制作ssl证书 openssl genrsa -des3 -passou 阅读全文
posted @ 2020-12-24 00:07 anobscureretreat 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 首先安装pyenv macname@MacdeMacBook-Pro Desktop % mkdir fish macname@MacdeMacBook-Pro Desktop % cd fish macname@MacdeMacBook-Pro fish % pip3 install pipenv 阅读全文
posted @ 2020-12-24 00:06 anobscureretreat 阅读(345) 评论(0) 推荐(0) 编辑
摘要: code import socket sk = socket.socket() sk.bind(("127.0.0.1", 8080)) sk.listen(5) while True: conn, addr = sk.accept() data = conn.recv(8096) conn.sen 阅读全文
posted @ 2020-12-24 00:02 anobscureretreat 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 图片 code <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>使用jQuery UI修饰title属性的气泡悬浮框(Tooltip) 阅读全文
posted @ 2020-12-24 00:01 anobscureretreat 阅读(2296) 评论(0) 推荐(0) 编辑
摘要: code <script type="text/javascript"> // 获取的是一个 如果要获取多个 // document.querySelectorAll(selector) document.querySelector("#btnJson").onclick = function () 阅读全文
posted @ 2020-12-23 23:58 anobscureretreat 阅读(150) 评论(0) 推荐(0) 编辑
摘要: code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <h1>Ajax 发送 get 请求</h1> <input type="button 阅读全文
posted @ 2020-12-23 23:55 anobscureretreat 阅读(101) 评论(0) 推荐(0) 编辑
摘要: get请求 $.ajax({ url:'test.php?type=1&id='+id, //url带参数 type:'GET', //请求方式 cache:false, //缓存 success: function(data){ //请求成功后返回数据data $('body').html(dat 阅读全文
posted @ 2020-12-23 23:54 anobscureretreat 阅读(116) 评论(0) 推荐(0) 编辑
摘要: code1 function (data) { data = data || {} $.ajax({ type: "POST", url: data.url, contentType: "application/json; charset=utf-8", data: JSON.stringify(d 阅读全文
posted @ 2020-12-23 23:52 anobscureretreat 阅读(324) 评论(0) 推荐(0) 编辑
摘要: code <!DOCTYPE HTML> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>Bootstrap 3 的多级下拉菜单示例</title> <script type="text/javascript" src="http:/ 阅读全文
posted @ 2020-12-23 23:51 anobscureretreat 阅读(1432) 评论(0) 推荐(0) 编辑
摘要: code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <iframe id="iframe" src="{{ book_url }}" frame 阅读全文
posted @ 2020-12-23 23:49 anobscureretreat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: code <!DOCTYPE html> <head> <meta charset="UTF-8"> <title>clipboard示例</title> <script src="clipboard.min.js"></script> </head> <body> <hr> <h2>从另外一个元素 阅读全文
posted @ 2020-12-23 23:47 anobscureretreat 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 想给form表单增加回车自动提交的功能 $('#password').keydown(function(event){ if (event.keyCode == 13) $('#login').click(); }); 然而,并没有达到预期的效果,而是自动刷新了表单,并将表单参数放在了url后面,如 阅读全文
posted @ 2020-12-23 23:45 anobscureretreat 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 在使用imgbox.js是出现的jquery版本不兼容问题,之后了解到jQuery.noConflict()的用法 jQuery.noConflict()的存在只有一个目的:它允许你在同一个页面加载多个jQuery实例,尤其是不同版本的jQuery。 code <link rel="styleshe 阅读全文
posted @ 2020-12-23 23:42 anobscureretreat 阅读(443) 评论(0) 推荐(0) 编辑
摘要: code <head> <title>JavaScript RSA Encryption</title> <meta charset="UTF-8"> <script src="{{ url_for('static',filename='js/jquery-1.8.3.min.js') }}"></ 阅读全文
posted @ 2020-12-23 23:41 anobscureretreat 阅读(368) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask,jsonify,render_template,make_response from flask_restful import Api, Resource,request from flask_restful import reqparse 阅读全文
posted @ 2020-12-23 23:38 anobscureretreat 阅读(1761) 评论(0) 推荐(0) 编辑
摘要: code $.ajax({ type: "POST", url: "/encrype", contentType: "application/json", data: JSON.stringify(json), /*传给后端的数据格式json*/ dataType: "json", /*后端返回的数 阅读全文
posted @ 2020-12-23 23:36 anobscureretreat 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 今天发现一个警告 Mixed Content: The page was loaded over HTTPS,blocked the content must be served over HTTPS.,。。 百度了一下含义是因为 是浏览器不允许在https页面里嵌入http的请求,现在高版本的浏览 阅读全文
posted @ 2020-12-23 23:34 anobscureretreat 阅读(434) 评论(0) 推荐(0) 编辑
摘要: JavaScript <script type="text/javascript"> $(function(){ function footerPosition(){ $("footer").removeClass("fixed-bottom"); //网页正文全文高度 var contentHei 阅读全文
posted @ 2020-12-23 23:32 anobscureretreat 阅读(156) 评论(0) 推荐(0) 编辑
摘要: MQTT协议是广泛应用的物联网协议,使用测试MQTT协议需要MQTT的代理。有两种方法使用MQTT服务, 一是租用现成的MQTT服务器,如阿里云,百度云,华为云等公用的云平台提供的MQTT服务, 使用公用的MQTT服务器的好处是省事,但如果仅仅用于测试学习还需要注册帐号,灵活性差些, 有的平台还需要 阅读全文
posted @ 2020-12-23 23:15 anobscureretreat 阅读(2159) 评论(0) 推荐(0) 编辑
摘要: 使用储存库安装 EMQ X 安装所需要的依赖包 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 使用以下命令设置稳定存储库,以 CentOS7 为例 sudo yum-config-manager --add-repo 阅读全文
posted @ 2020-12-23 23:09 anobscureretreat 阅读(965) 评论(0) 推荐(0) 编辑
摘要: code # -*- coding:utf-8 -*- from flask import Flask from flask import request import hashlib import time import re import xml.etree.ElementTree as ET 阅读全文
posted @ 2020-12-23 22:54 anobscureretreat 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 图片 test.py from flask import Flask,render_template,make_response from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name_ 阅读全文
posted @ 2020-12-23 22:50 anobscureretreat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: code import multiprocessing import time def foo(): print ('Starting function') time.sleep(0.1) print ('Finished function') if __name__ == '__main__': 阅读全文
posted @ 2020-12-23 22:44 anobscureretreat 阅读(155) 评论(0) 推荐(0) 编辑
摘要: server import socket import datetime s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind(('127.0.0.1',9999)) s.listen(1) starttime = None endtim 阅读全文
posted @ 2020-12-23 22:41 anobscureretreat 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: code import threading import time exitFlag = 0 class myThread (threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init 阅读全文
posted @ 2020-12-23 22:38 anobscureretreat 阅读(79) 评论(0) 推荐(0) 编辑
摘要: code.py import os import sys import time program = "python3" print("Process calling") arguments = ["xxxxxx.py"] os.execvp(program, (program,) + tuple( 阅读全文
posted @ 2020-12-23 22:37 anobscureretreat 阅读(154) 评论(0) 推荐(0) 编辑
摘要: code import multiprocessing import time def foo(): print ('Starting function') time.sleep(0.1) print ('Finished function') if __name__ == '__main__': 阅读全文
posted @ 2020-12-23 22:32 anobscureretreat 阅读(167) 评论(0) 推荐(0) 编辑
摘要: windows和linux路径斜杠不兼容问题 windows >>> import os >>> os.getcwd() 'C:\\Program Files (x86)\\python27' >>> os.path.join(os.getcwd(),"hello") 'C:\\Program Fi 阅读全文
posted @ 2020-12-23 22:30 anobscureretreat 阅读(562) 评论(0) 推荐(0) 编辑
摘要: code >>> >>> import datetime >>> i = datetime.datetime.now() >>> t="{}{}{}{}{}{}-{}".format(i.year,i.month,i.day,i.hour,i.minute,i.second,i.microsecon 阅读全文
posted @ 2020-12-23 22:28 anobscureretreat 阅读(1361) 评论(0) 推荐(0) 编辑
摘要: code f = open('a.txt', 'r') n = open('b.txt','w+') n.writelines(f.readlines()) n.close() f.close() code f = open("a.txt", 'w') f.write("写入一行新数据") f.fl 阅读全文
posted @ 2020-12-23 22:22 anobscureretreat 阅读(336) 评论(0) 推荐(0) 编辑
摘要: code # 文件上传 import flask, os, sys,time from flask import request interface_path = os.path.dirname(__file__) sys.path.insert(0, interface_path) #将当前文件的 阅读全文
posted @ 2020-12-23 22:20 anobscureretreat 阅读(1004) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 68 下一页