自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(107)
  • 资源 (1)
  • 收藏
  • 关注

原创 YII2框架 根据同一字段不同值进行正倒序排序ORDERBY

公司有一个老项目是用YII2框架的,新收到一个需求根据状态来进行正序 倒序排序。 ->orderBy('status ASC' ) ->addOrderBy('(case when status = 0 then play_time end) ASC') ->addOrderBy('(case when status = 1 then play_time end) DESC')就是先根据状态排序,排序后再按

2022-01-17 15:05:45 835

原创 夜神模拟器安装证书后无效问题解决

昨天突然想着抓点东西,就麻溜下载了夜神模拟器,charles,准备开始抓包。突然发现,模拟器装完了证书,也一直报证书有问题,根本没有办法抓包。为什么呢?即使按照其它教程的安装证书,也只是把证书安装到了用户下面,然而安卓高版本(7.0)之后呢,app可以只信任指定证书和系统内置的证书,后续用户安装的证书是不生效的。也就是后面怎么装都没用的,只能想办法装到系统内部。第一步,准备pem证书。1.需要用到 准备抓包软件保存的charles.cer2.由于证书格式转换需要...

2021-11-11 14:53:39 10182 11

原创 YII2使用时出现The file or directory to be published does not exist

公司有一个老项目是YII2的。因为要装markdown编辑器,好不容易找到一个合适的装上后。一直报上述错误。主要是找不到 bower/editor.md因为新版本拉下来会是在 bower-asset/editor.md。网上各种升级fxp/composer-asset-plugin, 可实际情况是fxp/composer-asset-plugin 这个插件照旧不更新了。特别是composer 升级到2.0+后,这个插件根本没法用了。我试过各种回退composer版本,升级插件,...

2021-11-03 17:48:20 612

原创 JMeter 无法保存,无法加入JAR包,窗口报这个错误class com.github.weisj.darklaf.ui.filechooser

主要就是外观有问题,也没看出啥问题,反正换了外观就好了

2021-04-13 17:17:22 1352 3

原创 nginx配置修改使404,500,502等nginx错误输出前端可识别json

现在的项目都是前后端分离的,前端并不能识别nginx报错,导致前端错误信息显示异常。因此最近去改了一下nginx配置。之前都是配置为跳转错误页的,但这次的需求是nginx返回前端可识别JSON。一开始还懵了一下,其实很简单就是错误信息返回json 文件就可以。{ "status": true, "code": 404, "message": "错误404,网络崩溃了,亲,请联系客服"}返回的json文件内容可以同上,具体参数按照项目来。 error_pag.

2020-12-15 09:35:52 1870

转载 PHP如何通过依赖注入实现IOC

前言好的设计会提高程序的可复用性和可维护性,也间接的提高了开发人员的生产力。今天,我们就来说一下在很多框架中都使用的依赖注入。概念要搞清楚什么是依赖注入如何依赖注入,首先我们要明确一些概念。IOC (Inversion of Control) 控制反转:遵循依赖倒置原则的一种代码设计方案,依赖的创建 (控制) 由主动变为被动 (反转)。DI (Dependency Injection) 依赖注入:控制反转的一种具体实现方法。通过参数的方式从外部传入依赖,将依赖的创建由主动变为被动 (

2020-10-28 00:46:34 180

原创 unity常用API(一)

unity自带的一些函数Awake:始终在任何 Start 函数之前并在实例化预制件之后调用此函数。(如果游戏对象在启动期间处于非活动状态,则在激活之后才会调用 Awake。) Start:不是很紧急的初始化,一般放在Start里面来做。仅在Update函数第一次被调用前调用 Reset:调用 Reset 可以在脚本首次附加到对象时以及使用Reset命令时初始化脚本的属性 Update:每帧调用一次 Update。这是用于帧更新的主要函数。 FixedUpdate..

2020-10-09 16:42:17 384

转载 Unity键位输入及Input类

一、Unity的基本输入事件(最常用):1 . 获得键盘Input.GetKey(KeyCode.A)Input.GetKeyDown(KeyCode.A)Input.GetKeyUp(KeyCode.A)2.获得鼠标信息Input.mousePosition // 鼠标位置Input.GetMouseButton 获取按钮3.轴输入Input.GetAxis 获取轴根据坐标轴名称返回虚拟坐标系中的值。 使用控制器和键盘输入时此值范围在-1到1之...

2020-09-29 11:33:01 1622

原创 unity3d-Game object with animator is inactive

今天发现一个问题,项目里面的警告无限增加。一开始以为是Game object 被我隐藏了,打断了动画播放问题,搞了很久。最后原因竟然是配表中的动画名字和美术给的动画名字不一样,但是由于动画是基础动画,还是能照常播放。把错误的动画名字改回来就好了...

2020-09-18 16:47:51 3166 1

原创 wampserver3.17 mysql 服务没启动,橙色不变绿的问题

很久没动过这个wampserver的环境了,最近电脑坏了一次,全部格了一遍,因此重新安装这些环境系统。下了一个3.17的wampserver,中间缺了好几个dll,但是我没在意。缺了就去下载补上不就好了嘛!反正它报缺少哪一个我就下哪一个,看起来流程一切正常。最后却发现wampserver 一直是橙色的。一开始以为tomcat 冲突,80,3306端口被占用,系统环境变量问题,配置问题,找了一圈,怎么都没办法弄。最后决定重装这个软件,我目前认为是装wampserver的时候,由..

2020-07-13 11:15:57 1420

原创 laravel 不使用匿名函数 实现where or 和count sum等功能

laravel查询构建器 功能非常强大,想要多功能,多参数查询问题的时候,之前一直没特别好的方法。每次只能使用匿名函数,增加到where 里面,或者使用原生的写法。今天记录一种,以后可以常用的查询语句。 $condition=[]; array_push($condition,['created_time','>',$start]); array_push($condition,['created_time','<',$end]);.

2020-06-15 17:04:17 373

转载 PHP银行卡账号格式验证

public function checkbank($no=""){ if(empty($no)) return false; $arr_no = str_split($no); $last_n = $arr_no[count($arr_no)-1]; krsort($arr_no); $i = 1; $total = 0; foreach ($arr_no as $n){ if($i%2==0){ $ix = $n*2; if($ix>=10){ $nx = .

2020-06-09 16:56:37 525

原创 头条小程序,小游戏头像授权报错

近段时间在做头条小游戏。但是因为头条授权问题被打回来好几次,因为本地各种手机,各种井软件测试都没问题。头条审核还是能出现问题,授权之后还是拿不到头像。不过从这里发现了一个问题,明明昵称都获取到了,头像还是没有获取到,那问题大概率在图片和地址问题上。因为自己公司的测试机都没问题,只能不断提审测试问题所在。问题所在:最后得出结论,就是因为头条系的产品太多了,各种头像存在不同...

2020-05-06 16:29:29 963

原创 linux 配置环境错误 ls vi等所有基础命令都失效

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin命令行中输入这个 可以救命

2020-03-06 15:00:48 385 2

原创 docker 安装 falcon 监控系统出现的常见问题汇总

由于我用的是windows系统,模拟跑falcon 监控系统,出现了一些在linux系统mac上不会出现的一些报错。前面一步一步按照docker安装是没问题的。全部安装完成应该是5个容器。第一个问题falcon组件起不来这个原因是关闭mysql docker之后,这个mysql 表就没了,需要重新导入。 cd /tmp && \...

2020-03-05 11:23:27 394

原创 jmeter 传参给后台一直失败问题(新手)

刚接触测试这块,自己鼓捣了一下jmeter。中间卡在传参这边挺长时间的,准备记录下来,给自己做个记录。jmeter 传参一直失败有可能是这几个问题,或以下某个问题导致的。一,没有增加,HTTP信息头部管理器增加了头部管理器之后,Content-Type没有写成JSON传参。(具体需要传什么,需要自己根据业务写)二,参数没有对应后面传参的具体格式是否和前面头部管理器...

2020-01-07 10:44:38 2067

原创 leetcode House Robber 房子抢劫犯

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house...

2019-12-31 14:42:03 169

原创 leetcode Move Zeroes

Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,12]Output: [1,3,12,0,0]Note:You m...

2019-12-30 17:36:57 97

原创 typescript TS 错误码大全

code 类型 英文描述 中文描述1002 错误 Unterminated string literal. 未终止的字符串文本。1003 错误 Identifier expected. 应为标识符。1005 错误 '{0}' expected. 应为“{0}”。1006 错误 A file cannot h...

2019-11-18 15:41:37 44915

原创 linux 查看端口

1.查找被占用的端口netstat-tln netstat-tln|grep8080netstat -tln 查看端口使用情况,而netstat -tln | grep 8080则是只查看端口8080的使用情况2.查看端口属于哪个程序?端口被哪个进程占用lsof-i:8060COMMAND PID USER FD TYPE DEV...

2019-10-21 10:41:00 742

转载 《转载》-Laya性能优化精选内容整理

第一是性能统计工具,这是LayaAir引擎内置的性能统计工具,在代码加入Laya.Stat.show();引擎内置的性能统计工具打开这个工具后,可以用于观察性能,除了FPS越高越好外,其它的值越低越好。这里尤其要关注DrawCall数量,这是重要的优化指标,尽量要控制在100以下。第二是DebugPanel调试工具,这也是LayaAir引擎自带的调试工具,类似DIV调试窗口,可审查...

2019-09-27 15:36:58 820

原创 leetcode 杨辉三角取某一行

Given a non-negativeindexkwherek≤33, return thekthindex row of the Pascal's triangle.Note that the row index starts from0.In Pascal's triangle, each number is the sum of the two numbers ...

2019-09-03 16:28:48 293

原创 leetcode 输出 杨辉三角形 或者 帕斯卡三角形

Given a non-negative integernumRows, generate the firstnumRowsof Pascal's triangle.In Pascal's triangle, each number is the sum of the two numbers directly above it.Example:Input: 5Output:...

2019-09-03 16:01:42 201

原创 leetcode 不存在的数字 Missing Number

Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Input: [3,0,1]Output: 2Example 2:Input: [9,6,4,2,3,5,7,0,1]O...

2019-09-03 11:28:43 1316

原创 leetcode 数组中唯一值 Single Number

Given anon-emptyarray of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us...

2019-09-03 11:05:25 147

原创 leetcode Symmetric Tree 镜面对称二叉树

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree[1,2,2,3,4,4,3]is symmetric: 1 / \ 2 2 / \ / \3 4 4 3...

2019-08-20 17:47:19 171

原创 leetcode Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear onlyonce.Example 1:Input: 1->1->2Output: 1->2Example 2:Input: 1->1->2->3->3Output: 1-...

2019-08-20 16:54:11 91

原创 leetcode 二叉树是否平衡 Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tree in which the depth of the two subtrees ofeverynode never diff...

2019-08-18 16:33:34 86

原创 leetcode 二叉树最深深度

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note:A leaf is a node with no childre...

2019-08-16 14:37:52 126

原创 leetcode 二叉树最低深度

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.Note:A leaf is a node with no childre...

2019-08-16 14:29:30 95

原创 leetcode Count and Say

The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211is read off as"one 1"or11.11is read off ...

2019-08-14 16:27:56 112

原创 request failed status:0 LAYA网络请求报错

这个报错原先一直以为是服务端报错,我在服务端找半天没有,发现是LAYA网络请求就没发送出来。前面提到,服务器在完成请求之后会在 XMLHttpRequest 的 onreadystatechange 属性中查找要调用的方法。这是真的,但还不完整。事实上,每当 HTTP 就绪状态改变时它都会调用该方法。这意味着什么呢?首先必须理解 HTTP 就绪状态。HTTP 就绪状态表示请求的状态或情...

2019-08-14 11:37:25 4706

转载 Unity3d 粒子系统属性面板介绍

2019-08-08 15:35:23 1126

原创 leetcode 爬楼梯 Climbing Stairs

You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note:Givennwill be a positive...

2019-07-31 18:12:30 130

原创 leetcode 获取平方根 sqrt($x)

Implementint sqrt(int x).Compute and return the square root ofx, wherexis guaranteed to be a non-negative integer.Since the return typeis an integer, the decimal digits are truncated and only...

2019-07-30 15:56:30 286

原创 leetcode Maximum Subarray 加最大的子序串

Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Explanati...

2019-07-26 16:20:30 107

原创 leetcode 数组加int

989.Add to Array-Form of IntegerEasy14127FavoriteShareFor a non-negative integerX, thearray-form ofXis an array of its digits in left to right order. For example, ifX = 1231, then the arr...

2019-07-24 17:55:35 182

原创 leetcode 66. Plus One 加一 数字相加

Given anon-emptyarray of digitsrepresenting a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each element...

2019-07-24 17:11:05 116

原创 leetcode 二进制加法

Given two binary strings, return their sum (also a binary string).The input strings are bothnon-emptyand contains only characters1or0.Example 1:Input: a = "11", b = "1"Output: "100"Exam...

2019-07-24 15:34:15 199

原创 leetcode Implement strStr() 字符串是否存在

Return the index of the first occurrence of needle in haystack, or-1if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Example 2:Input: haystack...

2019-07-15 16:09:50 133

10年东三省建模比赛题目

10年东三省建模比赛题目

2013-05-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除