摘要:
源代码 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
办公魔盒
阅读(607)
评论(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
办公魔盒
阅读(1282)
评论(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
办公魔盒
阅读(746)
评论(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
办公魔盒
阅读(383)
评论(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
办公魔盒
阅读(355)
评论(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
办公魔盒
阅读(231)
评论(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
办公魔盒
阅读(453)
评论(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
办公魔盒
阅读(1095)
评论(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
办公魔盒
阅读(159)
评论(0)
推荐(0)
摘要:
源代码 /** * 验证码 */ public function getCode($num = "4", $w = "80", $h = "26") { $str = Array(); //用来存储随机码 $vcode = ""; $string = "ABCDEFGHIJKLMNPQRSTUVWX 阅读全文
posted @ 2020-07-18 17:25
办公魔盒
阅读(154)
评论(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
办公魔盒
阅读(135)
评论(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
办公魔盒
阅读(325)
评论(0)
推荐(0)
摘要:
源代码 /** * 计算两个时间戳之间相差的日时分秒 * @param $begin_time 开始时间戳 * @param $end_time 结束时间戳 * @return array */ function timediff($begin_time,$end_time) { if($begin 阅读全文
posted @ 2020-07-18 17:22
办公魔盒
阅读(2147)
评论(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
办公魔盒
阅读(396)
评论(0)
推荐(0)
摘要:
源代码 //判断是否是微信浏览器 function isWeixin() { if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) { return true; } else { return false; } } 阅读全文
posted @ 2020-07-18 17:20
办公魔盒
阅读(398)
评论(0)
推荐(0)
摘要:
源代码 设置脚本运行时间 ini_set('max_execution_time', '0');//永久 阅读全文
posted @ 2020-07-18 17:19
办公魔盒
阅读(161)
评论(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
办公魔盒
阅读(109)
评论(0)
推荐(0)
摘要:
源代码 $link='http://www.baidu.com?article_id=123'; //app内链接 返回article_id 和article_anew_id function convertUrlQuery($query) { $queryParts = explode('&', 阅读全文
posted @ 2020-07-18 17:15
办公魔盒
阅读(297)
评论(0)
推荐(0)
摘要:
源代码 post请求json中文字符被转码 //强制不转码 json_encode($json,JSON_UNESCAPED_UNICODE) 阅读全文
posted @ 2020-07-18 17:14
办公魔盒
阅读(732)
评论(0)
推荐(0)
摘要:
源代码 /** * 检查ip是否在允许范围 * @param $host_ip * @return bool */ private function checkIP($host_ip){ $alip = '192.1.*.*'; $start_ip = $alip; foreach ($alip a 阅读全文
posted @ 2020-07-18 17:13
办公魔盒
阅读(308)
评论(0)
推荐(0)
摘要:
php 图片合成 public function shareimg() { $id = $_POST['uid']; //二维码图片 $qrodeimg = $this->getWxappQrCode($id); //背景图片 $bannerimg = ROOT_PATH . '/public/wx 阅读全文
posted @ 2020-07-18 17:12
办公魔盒
阅读(206)
评论(0)
推荐(0)
摘要:
源代码 $z = date('Y-m'); $a = date('Y-m', strtotime('-12 months')); $begin = new DateTime($a); $end = new DateTime($z); $end = $end->modify('+1 month'); 阅读全文
posted @ 2020-07-18 17:11
办公魔盒
阅读(1064)
评论(0)
推荐(0)
摘要:
源代码 Hmac加密 private function computeSignature($accessSecret, $canonicalString) { $s = hash_hmac('sha256', $canonicalString, $accessSecret, true); retur 阅读全文
posted @ 2020-07-18 17:10
办公魔盒
阅读(247)
评论(0)
推荐(0)
摘要:
源代码 /** * post请求 * @param $url * @param $postdata * @return mixed */ function get_component($url,$postdata){ $ch = curl_init(); //用curl发送数据给api curl_s 阅读全文
posted @ 2020-07-18 17:08
办公魔盒
阅读(212)
评论(0)
推荐(0)
摘要:
源代码 /** * 百度地图经纬度转腾讯地图经纬度 * @param $lat * @param $lon * @return string */ public function map_bd2tx($lat, $lon) { $tx_lat = 0; $tx_lon = 0; $x_pi = 3. 阅读全文
posted @ 2020-07-18 17:07
办公魔盒
阅读(422)
评论(0)
推荐(0)
摘要:
源代码 获取区域网IP地址 $host_name = exec("hostname"); $host_ip = gethostbyname($host_name); //获取本机的局域网IP echo $host_ip; 阅读全文
posted @ 2020-07-18 17:06
办公魔盒
阅读(240)
评论(0)
推荐(0)
摘要:
源代码 excel导出 include_once '../../../lib/phpexcel/phpexcel.class.php'; $objPHPExcel = new \PHPExcel(); $objWriter =new \PHPExcel_Writer_Excel2007($objPH 阅读全文
posted @ 2020-07-18 17:05
办公魔盒
阅读(188)
评论(0)
推荐(0)
摘要:
源代码 /** * 下载远程图片保存到本地 * @access public * @return array * @params string $url 远程图片地址 * @params string $save_dir 需要保存的地址 * @params string $filename 保存文件 阅读全文
posted @ 2020-07-18 17:04
办公魔盒
阅读(226)
评论(0)
推荐(0)
摘要:
源代码 function downVideo($url,$filePath) { //初始化 $curl = curl_init(); //设置抓取的url curl_setopt($curl, CURLOPT_URL, $url); //打开文件描述符 $fp = fopen ($filePath 阅读全文
posted @ 2020-07-18 17:03
办公魔盒
阅读(695)
评论(0)
推荐(0)
摘要:
源代码 //get请求获取body体 function curl_get_with_body($url, $range) { $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETUR 阅读全文
posted @ 2020-07-18 17:02
办公魔盒
阅读(690)
评论(0)
推荐(0)
摘要:
源代码 $fileName = ROOT_PATH.'/public/export/d58c42391a0cc5419a34c2a5eca19409abc904af954e0327561cbd1cee18ee20.html'; //得到文件名 header( "Content-Disposition 阅读全文
posted @ 2020-07-18 17:01
办公魔盒
阅读(127)
评论(0)
推荐(0)
摘要:
源代码 public function upload3() { $pid = $_SESSION['cmpid']; $allow_type = array('jpg', 'jpeg', 'gif', 'png'); //定义允许上传的类型 $file = $this->loadModel('bus 阅读全文
posted @ 2020-07-18 17:00
办公魔盒
阅读(127)
评论(0)
推荐(0)
摘要:
源代码 去除Bom头 /** * 去掉UTF-8 Bom头。 * Remove UTF-8 Bom. * * @param string $string * @access public * @return string */ public static function removeUTF8Bom 阅读全文
posted @ 2020-07-18 16:59
办公魔盒
阅读(196)
评论(0)
推荐(0)
摘要:
源代码 Dim clb As BClipboard,dystr As String ''必须先检测has否则程序崩溃 If clb.HasText Then dystr = clb.getText End If 阅读全文
posted @ 2020-07-18 16:58
办公魔盒
阅读(507)
评论(0)
推荐(0)
摘要:
源代码 public function upload2(){ $pid = $_SESSION['cmpid']; $model='communication'; $categpry='img'; if (preg_match('/^(data:\s*image\/(\w+);base64,)/', 阅读全文
posted @ 2020-07-18 16:57
办公魔盒
阅读(567)
评论(0)
推荐(0)
摘要:
方法 获取wifi网络列表: netsh.exe wlan show profile 获取指定wifi名的信息包括密码: netsh.exe wlan show profile wifi名称 key=clear 阅读全文
posted @ 2020-07-18 16:56
办公魔盒
阅读(292)
评论(0)
推荐(0)
摘要:
源代码 Sub DisableStrictMode '关闭严格模式 Dim jo As JavaObject jo.InitializeStatic("android.os.Build.VERSION") If jo.GetField("SDK_INT") > 9 Then Dim policy A 阅读全文
posted @ 2020-07-18 16:52
办公魔盒
阅读(380)
评论(0)
推荐(0)
摘要:
添加权限 AddPermission(android.permission.ACCESS_NETWORK_STATE) 源代码 Sub tf_vpn() As Boolean Try Dim p As Phone,tf As Boolean=False If p.SdkVersion >= 21 T 阅读全文
posted @ 2020-07-18 16:50
办公魔盒
阅读(3)
评论(0)
推荐(0)
摘要:
本类模块是用于excel的VBA链接MYSQL的帮助类 在使用该类模块前请先安装mysql 8.0 数据库驱动 MySQL 8.0: Connector/ODBC 类模块代码 Dim strcn As String Dim cn As New ADODB.Connection '构造函数 Priva 阅读全文
posted @ 2020-07-18 16:31
办公魔盒
阅读(211)
评论(0)
推荐(0)

浙公网安备 33010602011771号