摘要: 源代码 Sub Macro1() ' ' Breaks worksheet and workbook structure passwords. Jason S ' probably originator of base code algorithm modified for coverage ' o 阅读全文
posted @ 2020-07-18 17:36 办公魔盒 阅读(605) 评论(0) 推荐(0)
摘要: 源代码 Public CNN As ADODB.Connection Sub 连接数据库() Dim DataSource As String DataSource = Chr(34) & "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS 阅读全文
posted @ 2020-07-18 17:35 办公魔盒 阅读(1275) 评论(0) 推荐(0)
摘要: 源代码 Private Const BITS_TO_A_BYTE = 8 Private Const BYTES_TO_A_WORD = 4 Private Const BITS_TO_A_WORD = 32 Private m_lOnBits(30) Private m_l2Power(30) P 阅读全文
posted @ 2020-07-18 17:34 办公魔盒 阅读(734) 评论(0) 推荐(0)
摘要: 源代码 Try Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal&"/保存目录/" ) i.SetType( "resource/folder" ) StartActivity(i) Catch 阅读全文
posted @ 2020-07-18 17:33 办公魔盒 阅读(378) 评论(0) 推荐(0)
摘要: 下载地址: pip install platformer -i https://pypi.douban.com/simple 源代码 #!/usr/bin/env python # -*- coding: UTF-8 -*- """ __author__='hzh' __time__= 2018/0 阅读全文
posted @ 2020-07-18 17:32 办公魔盒 阅读(353) 评论(0) 推荐(0)
摘要: 源代码 import socket # 套字节,获取IP #获取本机IP## def get_host_ip(): ip="" try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8.8.8.8', 80)) i 阅读全文
posted @ 2020-07-18 17:31 办公魔盒 阅读(228) 评论(0) 推荐(0)
摘要: 源代码 import pymysql #定义数据库连接类 class MysqlHelper(object): #定义空连接 conn = None #初始化变量及类 def __init__(self, host, username, password, db, charset='utf8', p 阅读全文
posted @ 2020-07-18 17:30 办公魔盒 阅读(450) 评论(0) 推荐(0)
摘要: 源代码 from fastapi import FastAPI from pydantic import BaseModel import uvicorn app = FastAPI() #实例化FastAPI class Item(BaseModel): name: str price: floa 阅读全文
posted @ 2020-07-18 17:29 办公魔盒 阅读(1083) 评论(0) 推荐(0)
摘要: 源代码 $proArr = array( array('id'=>1,'name'=>'特等奖','v'=>1), array('id'=>2,'name'=>'一等奖','v'=>222), array('id'=>3,'name'=>'二等奖','v'=>333), array('id'=>4, 阅读全文
posted @ 2020-07-18 17:28 办公魔盒 阅读(171) 评论(0) 推荐(0)
摘要: 源代码 import hashlib def strtomd5(md5_str): try: m_str = hashlib.md5() byt = md5_str.encode(encoding='utf-8') m_str.update(byt) str_md5 = m_str.hexdiges 阅读全文
posted @ 2020-07-18 17:26 办公魔盒 阅读(157) 评论(0) 推荐(0)
摘要: 源代码 /** * 验证码 */ public function getCode($num = "4", $w = "80", $h = "26") { $str = Array(); //用来存储随机码 $vcode = ""; $string = "ABCDEFGHIJKLMNPQRSTUVWX 阅读全文
posted @ 2020-07-18 17:25 办公魔盒 阅读(152) 评论(0) 推荐(0)
摘要: 源代码 public function moreimgupload() { $htmlfilename = 'files'; $new_folder='../../../www/data/upload/'; $allow_ext = array('jpg', 'jpeg', 'png', 'gif' 阅读全文
posted @ 2020-07-18 17:24 办公魔盒 阅读(134) 评论(0) 推荐(0)
摘要: 源代码 function get_curr_time_section() { $checkDayStr = date('Y-m-d ',time()); $timeBegin1 = strtotime($checkDayStr."09:00".":00"); $timeEnd1 = strtotim 阅读全文
posted @ 2020-07-18 17:23 办公魔盒 阅读(324) 评论(0) 推荐(0)
摘要: 源代码 /** * 计算两个时间戳之间相差的日时分秒 * @param $begin_time 开始时间戳 * @param $end_time 结束时间戳 * @return array */ function timediff($begin_time,$end_time) { if($begin 阅读全文
posted @ 2020-07-18 17:22 办公魔盒 阅读(2144) 评论(0) 推荐(0)
摘要: 源代码 判断时间 if(date('Y-m-d')==date('Y-m-d', strtotime($res[0]->createtime))){ $finance_day_num+=1; $finance_day_money+=$res[0]->payamount; } 阅读全文
posted @ 2020-07-18 17:21 办公魔盒 阅读(395) 评论(0) 推荐(0)
摘要: 源代码 //判断是否是微信浏览器 function isWeixin() { if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) { return true; } else { return false; } } 阅读全文
posted @ 2020-07-18 17:20 办公魔盒 阅读(395) 评论(0) 推荐(0)
摘要: 源代码 设置脚本运行时间 ini_set('max_execution_time', '0');//永久 阅读全文
posted @ 2020-07-18 17:19 办公魔盒 阅读(159) 评论(0) 推荐(0)
摘要: 源代码 /** * 缩放图片 * @param $filename 图片地址 * @param $per 缩放倍数 1.2 0.3 * @return string */ private function scaleImg($filename,$per){ $per_str=implode('_', 阅读全文
posted @ 2020-07-18 17:18 办公魔盒 阅读(125) 评论(0) 推荐(0)
摘要: 源代码 get请求 function mcurl_get($url) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); cur 阅读全文
posted @ 2020-07-18 17:17 办公魔盒 阅读(192) 评论(0) 推荐(0)
摘要: 相关方法 //判断某个字符是否在数组内 bool in_array ($needle,$array [,strict]) //例子: //分割字符串 preg_split(); //例子: $str='1,2,3,4'; preg_split('/,/',$str); //求数组交集,并集,差集 a 阅读全文
posted @ 2020-07-18 17:16 办公魔盒 阅读(108) 评论(0) 推荐(0)