ref: https://stackoverflow.com/questions/29987716/cannot use gsl library on macos ld symbols not found for architecture x86 6 Indeed, as @trojanfoe an ...
分类:
系统相关 时间:
2019-10-28 19:11:42
阅读次数:
98
// $message['idcard'] 为数据库查出来的身份证号码,若位数不符合身份证位数则会显示“身份证位数不正常” <? echo strlen($message['idcard'])==15?substr_replace($message['idcard'],"****",8,5):(st ...
分类:
Web程序 时间:
2019-10-28 14:44:09
阅读次数:
249
%在Python里可以作为运算符,比如3%2=1,计算的是3除以2得到的余数。也可以有其他作用,此处不表。 如果想计算100*1%,直接编写代码 a=100*1% 会报错,可以改成 a=100*0.01。 格式转换参考: a = 100 b= '10%' c=float(b.replace('%', ...
分类:
其他好文 时间:
2019-10-28 13:06:57
阅读次数:
81
1、 模块化的方式封装 `model/model.js` ` 01 services.js` 2、 封装仿照 express 的路由 1、nodejs 万事万物皆为对象 构建一个app对象,可以再绑定属性和方法 2 仿照 express,封装路由 ``` 代码执行顺序: 从上到下 ``` 再次升级 ...
分类:
Web程序 时间:
2019-10-27 13:05:26
阅读次数:
121
字符串拼接实际场景:把列表中的数据拼接成一个字符串解决方案:使用str.join()方法>>>li=[‘cxk‘,‘cxk‘,‘kk‘,‘caibi‘]>>>‘‘.join([str(i)foriinli])‘cxkcxkkkcaibi‘推荐使用生成器表达式,如果列表很大,可以节省很多内存空间>>>‘‘.join(str(i)foriinli)
分类:
编程语言 时间:
2019-10-26 22:52:54
阅读次数:
106
1 import torch 2 import torch.nn.functional as F 3 4 5 # replace following class code with an easy sequential network 6 class Net(torch.nn.Module): 7 ... ...
分类:
其他好文 时间:
2019-10-26 15:39:54
阅读次数:
87
直接上代码: 引用:https://www.cnblogs.com/gopark/p/8857942.html ...
分类:
Web程序 时间:
2019-10-23 18:35:11
阅读次数:
145
public static void main(String[] args) { String str = "啊\r\n啊"; str = str.replaceAll("(\r\n|\n)", "<br/>"); System.out.println(str); } 亲测可用 ...
分类:
编程语言 时间:
2019-10-23 18:00:26
阅读次数:
449
def zipDir(dirpath, outFullName): """ 压缩指定文件夹 :param dirpath: 目标文件夹路径 :param outFullName: 压缩文件保存路径+xxxx.zip :return: 无 """ # time.sleep(50) zip = zipf ...
分类:
编程语言 时间:
2019-10-23 09:43:51
阅读次数:
96
/** * React v15.6.1 * * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license fou ...
分类:
其他好文 时间:
2019-10-22 23:40:29
阅读次数:
91