积累-T
emmm,各种知识点都有吧,主要方便自己记
随机修改网页图标
<script>
var image=new Array(3);
image.length=3;
image[1]="__STATIC__/img/ico/Fate.ico";
image[2]="__STATIC__/img/ico/Rebirths.ico";
image[3]="__STATIC__/img/ico/Zoroastrianism.ico";
// console.log(image[Math.round(Math.random()*2)+1]);
icourl=image[Math.round(Math.random()*2)+1];
console.log(icourl);
document.write("<link rel='shortcut icon'"+" "+"href="+icourl);
</script>
php.ini命令执行函数
disable_functions =
解决post提交时variable type error: array问题
修改config文件default_return_type默认输出格式为json
关闭google自动翻译.hosts中添加
203.208.46.200 translate.googleapis.com
以防止某些页面动态效果或排版混乱
NationalSecurityAgency软件逆向工程(SRE)框架
https://github.com/NationalSecurityAgency/ghidra
xshell6免费授权
https://www.netsarang.com/zh/free-for-home-school/
WEB端 wss socket测试(直接在任意浏览器console中输入)
ws测试将wss改为ws,域名改为IP地址,端口改为start.php中配置的端口
(wss端口在wssserver.php中配置端口)
ws = new WebSocket("wss://test.wxschool.net:444");
ws.onopen = function() {
alert("连接成功");
ws.send('tom');
alert("给服务端发送一个字符串:tom");
};
ws.onmessage = function(e) {
alert("收到服务端的消息:" + e.data);
};
include IA_ROOT . "/framework/library/phpexcel/PHPExcel.php";
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator("ctos")
->setLastModifiedBy("ctos")
->setTitle("Office 2007 XLSX Test Document")
->setSubject("Office 2007 XLSX Test Document")
->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
->setKeywords("office 2007 openxml php")
->setCategory("Test result file"); //set width
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(30);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(30); $objPHPExcel->getActiveSheet()->getRowDimension('1')->setRowHeight(22); $objPHPExcel->getActiveSheet()->getRowDimension('2')->setRowHeight(20); //set font size bold
$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
$objPHPExcel->getActiveSheet()->getStyle('A2:J2')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle('A2:J2')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
$objPHPExcel->getActiveSheet()->getStyle('A2:J2')->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN); //
$objPHPExcel->getActiveSheet()->mergeCells('A1:J1'); $shopinfo = pdo_fetchall("SELECT `goods_name`, `goods_money`, `goods_num`, `appid`, `order_id`, `seller_name` FROM " . tablename('zh_jdgjb_nav')); for ($i = 0; $i < count($shopinfo) - 1; $i++) {
$objPHPExcel->getActiveSheet(0)->setCellValue('A' . ($i + 2), $shopinfo[$i]['goods_name']);
$objPHPExcel->getActiveSheet(0)->setCellValue('B' . ($i + 2), $shopinfo[$i]['goods_money']);
$objPHPExcel->getActiveSheet(0)->setCellValue('C' . ($i + 2), $shopinfo[$i]['goods_num']);
$objPHPExcel->getActiveSheet(0)->setCellValue('D' . ($i + 2), $shopinfo[$i]['appid']);
$objPHPExcel->getActiveSheet(0)->setCellValue('E' . ($i + 2), $shopinfo[$i]['order_id']);
$objPHPExcel->getActiveSheet(0)->setCellValue('F' . ($i + 2), $shopinfo[$i]['seller_name']);
} // Rename sheet
$objPHPExcel->getActiveSheet()->setTitle(date('YmdHis') . '商品数据'); // Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0); // Redirect output to a client’s web browser (Excel5)
ob_end_clean();//清除缓冲区,避免乱码
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="订单汇总表(' . date('Ymd-His') . ').xls"');
header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
修改PhpStorm右上角浏览器配置
PhpStudy配置Nginx
打开目录 nginx-conf
server { listen 80; server_name www.restfulapi.com/; //自己配置的虚拟域名 root "E:/phpstudy/WWW/restfulapi/restful"; //写到你指向的最终rewrite地址 location / { index index.html index.htm index.php; #autoindex on; if ($request_filename !~ (static|robots/.txt|index/.php.*)) { rewrite ^/(.*)$ /index.php?$1 last; break; }
} location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; } }
Nginx伪静态配置
在vhosts.conf相应的项目中添加
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
完整文件如下
server {
listen 80;
server_name li.com;
root "E:/CodeLib/PHPCode/li/public";
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
index index.php index.html;
error_page 400 /error/400.html;
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 500 /error/500.html;
error_page 501 /error/501.html;
error_page 502 /error/502.html;
error_page 503 /error/503.html;
error_page 504 /error/504.html;
error_page 505 /error/505.html;
error_page 506 /error/506.html;
error_page 507 /error/507.html;
error_page 509 /error/509.html;
error_page 510 /error/510.html;
include E:/CodeLib/PHPCode/li/public/nginx.htaccess;
autoindex off;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
阿里巴巴矢量图标库全选
var iconList = document.querySelectorAll('.icon-gouwuche1');
for (var i = 0; i < iconList.length; i++) {
iconList[i].click();
}
20191030
将积累的分类了下,后缀为T的属于积累项,有新东西及时记录
积累-T的更多相关文章
- 《Effective Java》学习笔记——积累和激励
从一个实际案例说起 国庆长假前一个礼拜,老大给我分配了这么一个bug,就是打印出来的报表数量为整数的,有的带小数位,有的不带,毫无规律. 根据短短的两个多月的工作经验以及猜测,最终把范围缩小到以下这段 ...
- 【知识积累】try-catch-finally+return总结
一.前言 对于找Java相关工作的读者而言,在笔试中肯定免不了遇到try-catch-finally + return的题型,需要面试这清楚返回值,这也是这篇博文产生的由来.本文将从字节码层面来解释为 ...
- 项目积累(三)CSS
公司不是专门做网站的,偶尔会接到客户让修改前端,有时候和让头疼,自己浏览器兼容问题处理不好. 慢慢积累吧. 先贴出来一些前端代码吧,如下: <div class="test" ...
- 【知识积累】SBT+Scala+MySQL的Demo
一.背景 由于项目需要,需要在Sbt+Scala项目中连接MySQL数据库.由于之前使用Maven+Java进行依赖管理偏多,在Sbt+Scala方面也在不断进行摸索,特此记录,作为小模块知识的积累. ...
- 积累一下SQL
开篇先自我检讨一下,写了博客几年以来首次试过连续两个月没出过博文,有客观也有主观原因,但是最近这年里博文数量也越来越少,博文的质量也每况日下.希望自己一直能坚持下来,多写写博文,这月尽量多写几篇来弥补 ...
- Oracle----SQL语句积累 (Oracle 导入 dmp文件)
Oracle----SQL语句积累 (Oracle 导入 dmp文件) Oracle SQL PL 导入dum文件 1.数据库DBA权限: 注意:这个是在cmd命令行中直接输入,不需要进入Oracl ...
- 记一些之前忘记积累的问题(fiddler 学习、XP系统不能上网、XP不能装fiddler、注册表快速找到)
记一些之前忘记积累的问题: fiddler学习:http://www.cnblogs.com/kingwolf_JavaScript/archive/2012/11/07/FiddlerUI.html ...
- python积累
python积累 一.逐渐积累 python逐渐积累 http://www.cnblogs.com/lx63blog/articles/6051526.html python积累_2 http://w ...
- 分享工作中遇到的问题积累经验 事务日志太大导致insert不进数据
分享工作中遇到的问题积累经验 事务日志太大导致insert不进数据 今天开发找我,说数据库insert不进数据,叫我看一下 他发了一个截图给我 然后我登录上服务器,发现了可疑的地方,而且这个数据库之前 ...
- 【知识积累】BufferedImage类实现图片的切分
一.引言 如何实现图片分割?若有园友用到这个模块,使用Java的BufferedImage类来实现,图片切分也可以作为一个小工具积累起来,以备不时之需. 二.代码清单 package com.lees ...
随机推荐
- 强大的Visual Studio插件CodeRush全新发布v19.2,助力VS开发
CodeRush是一个强大的Visual Studio .NET 插件,它利用整合技术,通过促进开发者和团队效率来提升开发者体验.CodeRush能帮助你以极高的效率创建和维护源代码.Consume- ...
- php类知识---最疯狂的魔术方法serialize,_sleep,__wakeup,unserialize,__autoload,__clone
serialize-----把实例化的对象写入文件 __sleep 调用serialize时触发 <?php class mycoach { public function __construc ...
- Python3-json3csv
import json import csv json_str = '[{"a":1,"b":"2","c":" ...
- css百分比值到底参考谁?
一.元素宽高设置百分比 (1)width / min-width / max-width 参考块级父元素的宽度 (2)height / min-height / max-height 参考块级父元素的 ...
- 开源的任务系统 TaskManager
Quartz.NET是一个开源的作业调度框架,是OpenSymphony 的 Quartz API的.NET移植,它用C#写成,可用于winform和asp.net应用中.它提供了巨大的灵活性而不牺牲 ...
- if语句分析
1.if语句的反汇编判断 if语句反汇编后的标志: 执行各类影响标志位的指令 jxx xxxx 如果遇到上面的指令,则很可能是if语句: 例如: 1.案例一 ...
- 【Python之路】特别篇--ECMA对象、DOM对象、BOM对象
ECMA对象 从传统意义上来说,ECMAScript 并不真正具有类.事实上,除了说明不存在类,在 ECMA-262 中根本没有出现“类”这个词. ECMAScript 定义了“对象定义”,逻辑上等价 ...
- luogu 5561 [Celeste-B]Mirror Magic 后缀数组+RMQ+multiset
思路肯定是没有问题,但是不知道为啥一直 TLE 两个点~ #include <bits/stdc++.h> #define N 2000006 #define setIO(s) freop ...
- VLC播放器:快捷键
造冰箱的大熊猫@cnblogs 2019/2/27 VLC播放器(VLC Media Player)快捷键汇总(在Ubuntu 16.04环境下测试) - 音量大/小:CTRL+上/下 - 静音开/ ...
- python数据分析-数据导入
1.导入CSV格式数据 import pandas data = pandas.read_csv("C:\\Users\\zhaosai\\Desktop\\进击的DBA\\谁说菜鸟不会数据 ...