Souleigh ✨ Souleigh ✨
4年前
请纠正这5个PHP编码小陋习
在做过大量的代码审查后,我经常看到一些重复的错误,以下是纠正这些错误的方法。在循环之前测试数组是否为空$items;//...if(count($items)0){foreach($itemsas$item){//processon$item...
Stella981 Stella981
4年前
FastReport 自动换行与行高自适应及自动增加空行
设定后即可自动换行及行高自适应。版本号5.6.21、masterData:属性值:stretched 为True 2、Memo设定wordwrap为True,stretchMode:smMaxHeightFastReport自动增加空行1、在masterdata下增加child;2、在code编写如下代码varPa
Stella981 Stella981
4年前
GitHub重大更新
原文地址:https://zhuanlan.zhihu.com/p/138761471!(https://oscimg.oschina.net/oscnet/cd7a4a26166e4f9c858819069fac453c.jpg)Github最新推出的Codespaces可以实现基于VSCode的云端代码编译。现在,
Stella981 Stella981
4年前
Eclipse运行时参数
有时候在运行代码时,需要加上一些参数(jvm参数或者其他参数)。打开配置界面!eclipseparam1(http://static.oschina.net/uploads/img/201601/19152205_WtgV.png)(https://www.oschina.net/action/GoToLink?urlhttp%
Wesley13 Wesley13
4年前
MySQL 查询大于“时间字段”15分钟、1小时、1天的数据
以下代码中times为时间字段,类型为datetime1.查询大于times十五分钟的数据//大于号后面都是获取times十五分钟后的时间select\fromtablewherenow()SUBDATE(times,interval15minute);select\fromtablewherenow()S
Wesley13 Wesley13
4年前
H5图片压缩上传(单图和多图)
H5项目中要用到图片上传,团队成员没有找到解决方案。只能由自己在网上搜索整理一下,如下:直接看代码吧Html页:<!DOCTYPEhtml<htmllang"zhCN"<head<metacharset"utf8"<metahttpequiv"XUACompatibl
Stella981 Stella981
4年前
C调用read的乱码问题
发现自己真的被各种高级语言宠坏了。玩C还真的各种不懂的。问题例如下面的代码可以正确输出,但将retreadfile(fd,buf,len);换成readfile(fd,buf,len);输出就变乱码了。不懂啊。_(:з」∠)_include<stdio
Stella981 Stella981
4年前
Android下载repo文件报错
在执行curlhttps://dlssl.google.com/dl/googlesource/gitrepo/repo~/bin/repo下代码的时候,报以下错误curl:(7)couldn'tconnecttohost连续几天下载repo文件都这样,以为谷歌应该会修复这个问题,等了3天还是不能
Wesley13 Wesley13
4年前
PHP微信开发入门(一)
微信的接入在填写服务器URL时指向TOKEN验证的php文件,列如http://localhost/wlink.php验证示例代码<?php//如果接收到验证信息则调用valid()函数进行验证if(isset($_GET'echostr')){valid();}else
Stella981 Stella981
4年前
Spring Security使用详解8(配置多个HttpSecurity)
在之前的文章中我们都只配置一个HttpSecurity,如果业务比较复杂,我们也可以配置多个HttpSecurity,实现对WebSecurityConfigurerAdapter的多次扩展。八、配置多个HttpSecurity1、样例代码(1)配置多个HttpSecurity时,MultiHttpSecurity