上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 68 下一页
摘要: 答案是D。 在JavaScript中,2^53 是最大的值,没有比这更大的值了。所以 2^53 + 1 == 2^53,所以这个循环无法终止,会一直执行。 阅读全文
posted @ 2019-04-20 14:38 anobscureretreat 阅读(2808) 评论(0) 推荐(0)
摘要: 答案是A。 上面的代码与下面这段代码是等价的 阅读全文
posted @ 2019-04-20 14:36 anobscureretreat 阅读(172) 评论(0) 推荐(0)
摘要: 例子: reducer 函数接收4个参数: 您的 reducer 函数的返回值分配给累计器,该返回值在数组的每个迭代中被记住,并最后成为最终的单个结果值。 例子 数组里所有值的和 函数表示伐: 你也可以写成箭头函数的形式: 累加对象数组里的值 要累加对象数组中包含的值,必须提供初始值,以便各个ite 阅读全文
posted @ 2019-04-20 13:27 anobscureretreat 阅读(185) 评论(0) 推荐(0)
摘要: 语法: 返回值 例子: 例子: 以下例子均返回15 以下例子均返回 NaN 以下例子均返回 -15 下例中全部返回 4 下面的例子返回 224 一个更严格的解析函数 阅读全文
posted @ 2019-04-20 02:12 anobscureretreat 阅读(272) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-20 01:57 anobscureretreat 阅读(245) 评论(0) 推荐(0)
摘要: 字母排序 数字排序 阅读全文
posted @ 2019-04-20 01:56 anobscureretreat 阅读(582) 评论(0) 推荐(0)
摘要: test.py 输出: 参考: https://blog.csdn.net/qq_31331027/article/details/80518348 阅读全文
posted @ 2019-04-20 01:55 anobscureretreat 阅读(5493) 评论(0) 推荐(2)
摘要: json:是一种数据格式,是纯字符串。可以被解析成Python的dict或者其他形式。 dict:是一个完整的数据结构,是对Hash Table这一数据结构的一种实现,是一套从存储到提取都封装好了的方案。它使用内置的哈希函数来规划key对应value的存储位置,从而获得O(1)的数据读取速度。 字典 阅读全文
posted @ 2019-04-19 16:26 anobscureretreat 阅读(264) 评论(0) 推荐(0)
摘要: 报错如下: 原因: 手动启动的脚本文件引用的topic类型文件,和系统引用的不是同一个,导致MD5值不匹配 脚本文件: 引用的类型 目录结构 参考: https://github.com/RobotWebTools/rosbridge_suite/issues/138 https://github. 阅读全文
posted @ 2019-04-19 16:16 anobscureretreat 阅读(3193) 评论(0) 推荐(0)
摘要: 输出: demo2 输出 阅读全文
posted @ 2019-04-19 12:56 anobscureretreat 阅读(19911) 评论(0) 推荐(1)
摘要: python2 #coding=utf-8 class CustomError(Exception): def __init__(self,ErrorInfo): self.errorinfo=ErrorInfo def __str__(self): return self.errorinfo if __name__ == '__main__... 阅读全文
posted @ 2019-04-19 00:05 anobscureretreat 阅读(181) 评论(0) 推荐(0)
摘要: 1.打开设置界面 2.设置属性 如图: 注释: 阅读全文
posted @ 2019-04-18 23:23 anobscureretreat 阅读(213) 评论(0) 推荐(0)
摘要: tab对于需要 共享 的代码而言是灾难。 pyhton对这点的明确要求是不要混合使用4个空格和tab键. 只使用二者之一,都是没有问题的.如果一个python代码已经完成的部分,都是使用的4个空格.那么这个时候,就不可以插入tab键,而必须使用空格. 不同的平台对tab展开空格的个数的显示效果并不相 阅读全文
posted @ 2019-04-18 22:36 anobscureretreat 阅读(918) 评论(0) 推荐(0)
摘要: sudo service ssh restart 阅读全文
posted @ 2019-04-18 22:27 anobscureretreat 阅读(903) 评论(0) 推荐(0)
摘要: 1. 数组中添加map 2. 数组遍历输出 3. 类似字典(map)遍历 4. 字典声明时赋值 demo2 5. 字典里value为数组, 数组内为字典 阅读全文
posted @ 2019-04-18 22:25 anobscureretreat 阅读(5197) 评论(0) 推荐(0)
摘要: $(function() { // Hide the label at start $('#progress_bar .ui-progress .ui-label').hide(); // Set initial value $('#progress_bar .ui-progress').css(' 阅读全文
posted @ 2019-04-18 13:56 anobscureretreat 阅读(96) 评论(0) 推荐(0)
摘要: if($('#progress_bar').is(":visible")){ $('#progress_bar').hide(); } 阅读全文
posted @ 2019-04-18 13:55 anobscureretreat 阅读(1054) 评论(0) 推荐(0)
摘要: scp免密操作 2.1服务器(本机)从目标服务器上传/下载文件或者文件夹 2.2生成秘钥 本机执行:ssh-keygen -t rsa 遇到提示,直接回车就OK,秘钥生成在用户的根目录的.ssh目录下。比如小白用户的/home/xiaobai/.ssh目录下 2.3 复制/home/xiaobai/ 阅读全文
posted @ 2019-04-16 17:01 anobscureretreat 阅读(563) 评论(0) 推荐(0)
摘要: 链接: https://pan.baidu.com/s/1ZACwJZ_x2ZBziqPlm17z6w 提取码: 3w9m 阅读全文
posted @ 2019-04-16 16:35 anobscureretreat 阅读(206) 评论(0) 推荐(0)
摘要: 证书不匹配问题 1.对于python自带的 urllib库 解决办法 2. 对于requests 库,解决办法 阅读全文
posted @ 2019-04-16 16:15 anobscureretreat 阅读(782) 评论(0) 推荐(0)
摘要: Linux下的串口调试工具——Xgcom xgcom的下载网址:https://code.google.com/archive/p/xgcom/downloads (1)安装必须的库 (2)下载xgcom源码包 (3)编译安装xgcom (4)启动xgcom 使用的时候,点击左上角configura 阅读全文
posted @ 2019-04-16 11:26 anobscureretreat 阅读(2288) 评论(0) 推荐(0)
摘要: 一.安装,首先下载这个软件,终端和软件中心均可下载,终端下载命令: 即可快速搞定安装问题。 软件中心: 由于我已经通过终端安装成功,所以软件中心搜索到后显示的是已经安装好的状态。 二.配置, 1. root权限打开软件 通过win+tab组合件调出软件快速搜索栏,输入cutecom即可找到刚刚安装好 阅读全文
posted @ 2019-04-16 11:18 anobscureretreat 阅读(1307) 评论(0) 推荐(0)
摘要: 因为现在电脑基本不配备串行接口,所以,usb转串口成为硬件调试时的必然选择。目前知道的,PL2303的驱动是有的,在dev下的名称是ttyUSB0 默认情况下ubuntu已经安装了USB转串口驱动(pl2303)。 1、# lsmod | grep usbserial 如果有usbserial,说明 阅读全文
posted @ 2019-04-15 18:37 anobscureretreat 阅读(1171) 评论(0) 推荐(0)
摘要: 链接:https://pan.baidu.com/s/10lPUEpFPZU76HRbJfbZ2ZA 提取码:r2go 阅读全文
posted @ 2019-04-15 18:29 anobscureretreat 阅读(265) 评论(0) 推荐(0)
摘要: 参考: https://blog.csdn.net/beking17113/article/details/83213071 阅读全文
posted @ 2019-04-15 18:24 anobscureretreat 阅读(3559) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- import serial #打开串口 serialPort="COM3" #串口 baudRate=9600 #波特率 ser=serial.Serial(serialPort,baudRate,timeout=0.5) print("参数设置:串口={{}} ,波特率={{}}".format(serialPort,baudRate)) ... 阅读全文
posted @ 2019-04-15 18:05 anobscureretreat 阅读(4319) 评论(0) 推荐(0)
摘要: .zip 和 .rar 是Windows下常用的压缩文件,在Ubuntu中如何解压. 【解压.zip文件】 Ubuntu中貌似已经安装了unzip软件,解压命令如下: 如果没安装unzip的话,可以通过如下命令安装: 【解压.rar文件】 #安装unrar软件# #卸载unrar软件# #解压.ra 阅读全文
posted @ 2019-04-15 17:40 anobscureretreat 阅读(2301) 评论(0) 推荐(0)
摘要: def input_password(): # 1. 提示用户输入密码 pwd = input("请输入密码:") # 2. 判断密码长度,如果长度 >= 8,返回用户输入的密码 if len(pwd) >= 8: return pwd # 3. 密码长度不够,需要抛出异常 # 1> 创建异常对象 - 使用异常的错误信息字符串... 阅读全文
posted @ 2019-04-15 11:11 anobscureretreat 阅读(227) 评论(0) 推荐(0)
摘要: class CustomError(Exception): def __init__(self,ErrorInfo): super().__init__(self) #初始化父类 self.errorinfo=ErrorInfo def __str__(self): return self.errorinfo if _... 阅读全文
posted @ 2019-04-15 10:56 anobscureretreat 阅读(355) 评论(0) 推荐(0)
摘要: test.py 阅读全文
posted @ 2019-04-10 19:34 anobscureretreat 阅读(6710) 评论(0) 推荐(0)
摘要: #当前文件的路径 pwd = os.getcwd() #当前文件的父路径 father_path=os.path.abspath(os.path.dirname(pwd)+os.path.sep+".") #当前文件的前两级目录 grader_father=os.path.abspath(os.path.dirname(pwd)+os.path.sep+"..") 阅读全文
posted @ 2019-04-10 19:24 anobscureretreat 阅读(572) 评论(0) 推荐(0)
摘要: import os import tarfile def make_targz_one_by_one(output_filename, source_dir): tar = tarfile.open(output_filename,"w:gz") for root,dir,files in os.walk(source_dir): for file in f... 阅读全文
posted @ 2019-04-10 17:32 anobscureretreat 阅读(492) 评论(0) 推荐(0)
摘要: 参考:http://docs.python-requests.org/en/master/user/quickstart/#make-a-request 阅读全文
posted @ 2019-04-10 17:03 anobscureretreat 阅读(500) 评论(0) 推荐(0)
摘要: xml中 android:ems属性 ,作为EditText 默认生成 的属性,其含义是需要编辑的 字符串长度 。 设置为10时,最多编辑 10个em ,一个em单位是 两个inch ,但是随着自动调整,在Android中 em代表‘M’的数量 。 但是 EditText的属性 ,只有在 andro 阅读全文
posted @ 2019-04-10 09:45 anobscureretreat 阅读(1539) 评论(0) 推荐(0)
摘要: 通常访问者的IP就在其中,所以我们可以用下列方法获取用户的真实IP: #X-Forwarded-For:简称XFF头,它代表客户端,也就是HTTP的请求端真实的IP,只有在通过了HTTP 代理或者负载均衡服务器时才会添加该项。 def get_ip(request): x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR'... 阅读全文
posted @ 2019-04-04 18:37 anobscureretreat 阅读(3649) 评论(2) 推荐(0)
摘要: 今天,在执行curl时,突然发现这个报错,问题是之前完全没有出现过这样的情况。 [root@localhost ~]# curl www.baidu.comcurl: (6) Could not resolve host: www.baidu.com; 未知的错误上网了解了一下,都说是DNS的问题, 阅读全文
posted @ 2019-04-04 13:35 anobscureretreat 阅读(6610) 评论(0) 推荐(0)
摘要: 或者 1、 下载后安装office安装完office后,千万不要打开office软件……下一步使用激活补丁进行破解。 2、打开破解软件 (近期优化,解决了部分电脑升级过程崩溃的问题) 3、右键下载的破解软件,并点击"打开 " 4、打开软件后点击“好” 5、出现钥匙图标,双击"打开" 6、点击打开 7 阅读全文
posted @ 2019-04-03 17:05 anobscureretreat 阅读(11075) 评论(1) 推荐(0)
摘要: https://blog.csdn.net/github_39688629/article/details/77790541 阅读全文
posted @ 2019-04-01 12:28 anobscureretreat 阅读(153) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/mrzhao_perfectcode/article/details/81289578 阅读全文
posted @ 2019-04-01 12:26 anobscureretreat 阅读(1211) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-04-01 00:02 anobscureretreat 阅读(141) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 68 下一页