自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 资源 (3)
  • 收藏
  • 关注

原创 python 备忘 (二)

1.字符串格式化 和r定义的字符串有format 和%两种格式化print("name:{name}".format(name="harryhare"))print(&qu

2018-05-31 20:32:02 141

原创 python 的正则

# -*- coding: utf-8 -*-import re# match: 从字符串开始进行匹配x=re.match(r"(\d)\d*","123 1234 2345")print(type(x))print(x.group()) # 123print(x.groups()) # ()匹配的内容 ('1',)p=

2018-05-30 18:12:14 112

原创 python 装饰函数

修饰函数的简单例子# # 错误写法# def warp(fun):# print("***")# fun()# print("***")## @warp# def myprint():# print(&a

2018-05-30 14:24:42 407

原创 python 函数相关

转自:https://www.cnblogs.com/AlwaysWIN/p/6202320.htmlfrom functools import reducefoo = [2, 18, 9, 22, 17, 24, 8, 12, 27]print (list(filter(lambda x: x % 3 == 0, foo)))#[18, 9, 24, 12, 27]print (...

2018-05-30 03:39:04 230

转载 mac docker

下载地址 https://store.docker.com/editions/community/docker-ce-desktop-mac文档 https://docs.docker.com/docker-for-mac/

2018-05-28 14:03:06 320

转载 电信光猫的信道说明

转自:http://www.sohu.com/a/231920030_609710 其中第一个通道是你不能删除的,电信远程管理通道,传说中的TR069通道,但是也有破解,可以删除,但是建议不要删除,因为以后你要开通新业务,比如提升速率之类的,还需要此通道远程下发数据,删除此通道会造成电信管理不到你的MODEM,无法完成远程下发数据。VOIP-R-VID-42,是你的语音通道,删除此通道,你语音就...

2018-05-27 02:07:01 15382

转载 git push时不输入密码

方法一:存储用户名密码git config credential.helper store方法二:配置ssh key参考:https://www.zhihu.com/question/31836445

2018-05-25 00:48:50 1315

转载 js cookie

其实就是对document.cookie 的字符串操作参考 1.http://www.w3school.com.cn/js/js_cookies.asp 2.https://www.cnblogs.com/endv/p/8089506.html

2018-05-24 21:20:25 101

原创 XMLHttpRequest 发 Post 请求

0. 使用XMLHttpRequest时,直接在send 函数中写字符串,和 使用formData是不用的function send(userid,name,node,href,asyn) { var xmlhttp=new XMLHttpRequest(); var url=url_ban; ////直接send字符串或者json串 //var conte...

2018-05-24 21:04:20 8403 1

转载 perl

1.consoleperl -de1https://stackoverflow.com/questions/73667/how-can-i-start-an-interactive-console-for-perl2.perl 语言基础 http://www.runoob.com/perl/perl-tutorial.htmlplayground http://www.ru...

2018-05-24 13:58:39 171

转载 post 后紧跟刷新网页时,如何在浏览器F12中看到post

window.addEventListener("beforeunload", function() { debugger; }, false)https://gist.github.com/InstanceOfMichael/f6a509b84fe82a718816

2018-05-24 03:16:06 8159 1

转载 debconf

https://blog.csdn.net/fickyou/article/details/50960444

2018-05-22 13:29:39 1569

转载 docker run, cmd entrypoint 区别

http://blog.163.com/digoal@126/blog/static/163877040201410411715832/

2018-05-22 13:27:14 773

转载 python 的内置函数

1.__init__()和__new__() 初始化 https://www.cnblogs.com/qlshine/p/6049457.html 2.__name__ 函数名 https://www.cnblogs.com/superxuezhazha/p/5793536.html 3.__call__() 对象本身作为函数 https://www.cnblogs.com/superx...

2018-05-22 01:33:18 150

转载 python 中文

文件第一行或者第二行加入:#-*-coding:utf-8 -*-或者:#-*-coding:utf-8 -*-参考: https://www.cnblogs.com/KarryWang/p/3260858.html

2018-05-22 01:15:00 144

原创 go io

https://studygolang.com/articles/2073

2018-05-20 23:53:06 294

转载 go 调试

1.gdb https://studygolang.com/articles/2914 (没有看)2.ide https://blog.csdn.net/freshfox/article/details/78458621

2018-05-20 21:45:43 635

转载 python plot 柱状图

1.plot https://www.cnblogs.com/liutongqing/p/6985805.html 2.柱状图 http://www.jb51.net/article/130622.htm

2018-05-20 19:56:01 705

原创 python 读文件的字符编码问题

参考:https://blog.csdn.net/zhangyunfei_happy/article/details/47169939 关键点在于r 打开时,encode 要直接作为参数 如果用其他的encode 方式,那么打开文件时需要用rb#方法一file=open('xxx.csv','r',encoding='UTF-8')#方法二file=codecs.open('xxx....

2018-05-20 19:47:55 168

转载 mac pip

https://pip.readthedocs.io/en/stable/installing/ https://www.zhihu.com/question/50470150?sort=created

2018-05-18 16:09:59 382

原创 shell运行时间

当然是用time 了不过想到一个无聊的写法t0=`date +%s` && sleep 10 && t1=`date +%s` && echo $((t1-t0))

2018-05-17 16:43:51 1349

原创 mongo 备忘

选择列 https://stackoverflow.com/questions/31116528/select-column-from-mongodb-in-golang-using-mgo2.

2018-05-17 12:40:07 192

原创 go 备忘

http://www.jb51.net/article/56837.htm总结一下就是 make 仅用于在slice map chan new 用在struct make 指定长度,和reserve 的内存,返回slice map chan类型 new 返回指针

2018-05-17 11:33:32 185

原创 go 类型转换

https://www.linuxidc.com/Linux/2014-02/96095.htm和c++不同的地方在于指针是无法强制转换的,除非用unsafe 这篇中有个类型强转后,访问私有成员的例子func typeTest() { var x int=10 var px *int=&x fmt.Println(px) var y int3...

2018-05-17 11:18:55 977

原创 go map slice 做参数

参考: https://www.cnblogs.com/snowInPluto/p/7477365.htmlfunc maptest1(m map[string]string){ m["1"]="111"}func maptest2(m *map[string]string){ (*m)["2"]=&quo

2018-05-17 10:37:47 802

转载 go 时间相关

https://studygolang.com/articles/8919

2018-05-17 10:20:27 458

转载 golang 异常处理

占位

2018-05-16 01:30:03 965

转载 golang 内存

占位

2018-05-16 01:29:28 354

原创 golang routine context chan select

占位

2018-05-16 01:28:09 243

转载 golang interface 和 reflect

占坑

2018-05-14 10:12:36 215

转载 nightly、aurora、beta、stable、RC

Nightly Build 也叫Daily Build 每日构建 每日构建是连续集成的一个最佳实践,它要求每天至少构建软件一次.因为对于许多大型项目来说,每次构建花掉的时间可能高达几个小时,在白天进行构建可能会消耗 过多的计算机资源,对开发造成一定的影响,所以许多大型项目的每日构建是在夜间无人工作或者人比较少的时候进行的。 cyanogenmod 在发布几个nightly 版本后 就...

2018-05-14 09:58:49 1781

转载 mongo

”queryPlanner”, “executionStats” ”allPlansExecution” 默认是第一个 具体执行的数据,需要用第二个参数参考: https://blog.csdn.net/qq_17475155/article/details/53876834...

2018-05-10 15:13:38 192

《深入理解计算系统》 第二版的习题答案 CSAPP instructor's solution manual 2ed

CSAPP《深入理解计算系统》 第二版的习题答案 Computer Systems A Programmer’s Perspective instructor's solution manual 2ed

2022-07-12

打豆豆单机练习版(极简陋,谨慎下载)

//打豆豆单机练习版(极简陋,谨慎下载) //如有问题请联系我harryhare@163.com //关闭时请先关闭命令行窗口

2011-10-16

自然数阶幻方构造 c语言

//幻方构造 //奇数阶采用lembere构造法 //单偶阶采用Ralphstrachey构造法 //双偶阶采用杨辉构造法 //c语言

2009-06-25

空空如也

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

TA关注的人

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