Here

Learn Git and GitHub

限于喜欢 提交于 2020-04-27 04:14:03
Learn Git and GitHub without any code! Using the Hello World guide, you’ll start a branch, write comments, and open a pull request. Read the guide https://guides.github.com/activities/hello-world/ Hello World The Hello World project is a time-honored tradition in computer programming. It is a simple exercise that gets you started when learning something new. Let’s get started with GitHub! You’ll learn how to: Create and use a repository Start and manage a new branch Make changes to a file and push them to GitHub as commits Open and merge a pull request hello world项目是计算机编程中一个由来已久的传统。这是一个简单的练习

Python运算符-局部英文翻译版

ⅰ亾dé卋堺 提交于 2020-04-27 02:21:45
Operators (运算符) are the constructs which can manipulate the value of operands. Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and + is called operator. Types of Operator Python language supports the following types of operators. Arithmetic Operators(算术运算符) Comparison (Relational) Operators(比较运算符) Assignment Operators(赋值运算符) Logical Operators(逻辑运算符) Bitwise Operators(按位逻辑运算符) Membership Operators(成员运算符) Identity Operators(身份运算符) Let us have a look on all operators one by one. Python Arithmetic Operators Assume variable a holds 10 and variable b holds 20, then − 变量a是10

(转载)PyTorch代码规范最佳实践和样式指南

六月ゝ 毕业季﹏ 提交于 2020-04-26 23:43:17
A PyTorch Tools, best practices & Styleguide 中文版: PyTorch代码规范最佳实践和样式指南 This is not an official style guide for PyTorch. This document summarizes best practices from more than a year of experience with deep learning using the PyTorch framework. Note that the learnings we share come mostly from a research and startup perspective. This is an open project and other collaborators are highly welcomed to edit and improve the document. You will find three main parts of this doc. First, a quick recap of best practices in Python, followed by some tips and recommendations using PyTorch. Finally, we share

Linux之Shell脚本编程(二)

只愿长相守 提交于 2020-04-26 19:03:00
上节回顾    在 上一篇博文 中,主要介绍了Shell脚本编程的背景,怎样创建人生中第一个Shell脚本以及Shell变量等内容。接下来将接着介绍介绍Shell编程,主要是围绕着Shell运算、流程控制语句、自定义函数以及脚本调试等方面展开。 运算符   例:   num1=11   num2=22   sum=$num1+$num2   echo $sum   格式 :expr m + n 或$((m+n)) 注意expr运算符间要有空格   expr命令:对整数型变量进行算术运算 ( 注意:运算符前后必须要有空格)     expr 3 + 5     expr 3 – 5     echo `expr 10 / 3`     10/3的结果为3,因为是取整     expr 3 \* 10 # \ 是转义符      例:计算(2 +3 )×4 的值   1 .分步计算    S=`expr 2 + 3`    expr $S \* 4   2.一步完成计算    expr `expr 2 + 3` \* 4   S=`expr \`expr 2 + 3\` \* 4`   echo $S   或   echo $(((2 + 3) * 4))   $() 与${}的区别   $( )的用途和反引号``一样,用来表示优先执行的命令     eg:echo $(ls a

MySQL运行内存不足时应采取的措施

纵然是瞬间 提交于 2020-04-26 18:51:36
导读 排除故障指南:MySQL运行内存不足时应采取的措施? 原文出处 :《What To Do When MySQL Runs Out of Memory: Troubleshooting Guide》 https://www.percona.com/blog/2018/06/28/what-to-do-when-mysql-runs-out-of-memory-troubleshooting-guide/ 原文作者: Alexander Rubin 关键词: memory、memory leaks、Memory Usage、MySQL server memory usage、MySQL Troubleshooting、Troubleshooting MySQL、troubleshooting tips Troubleshooting crashes is never a fun task, especially if MySQL does not report the cause of the crash. For example, when MySQL runs out of memory. Peter Zaitsev wrote a blog post in 2012: Troubleshooting MySQL Memory Usage with a lots of

初探Vue3.0魅力

雨燕双飞 提交于 2020-04-26 15:23:59
B站 该教学视频资源 =》 传送门 李游Leo 老师的公开课 做的笔记 安装 npm 参考手顺 安装结果 安装cnpm手顺 clone 下来 vue创造者的 demo版本 gihub地址 : 传送门 依据 package.json 文件 ,cnpm i 下载 依赖 下记是老师的图 运行个dev Ctrl + C 停止 。。。。。。 运行个 serve 我应该 再去学学 英语 。。。。。。 => http://localhost:5000/ 使用作者提供的小例子 => https://github.com/vuejs/vue-next#status-beta here => https://github.com/vuejs/vue-next-webpack-preview 小例子 运行 vue 脚手架 (前面都是 浮云 ~~~) 安装一下 npm install -g @vue/cli vue -V 检查已经安装成功 创建项目 vue create vue-next-cli-demo (mac 是这个,但windows 并不是,没有窗口交互互动的,小坑坑~) 解决办法 1.winpty vue.cmd create 你的工程名(你滴名纸) 就和视频里面一样啦~~~ 创建工程需要一些自定义的设定 ,设定一下 。。。。。。 2.vue 2 =》 vue 3 需要升级一下 vue add

[c++] Why should I use Smart Pointers

感情迁移 提交于 2020-04-26 14:57:45
深入理解智能指针 专有指针 Ref: unique_ptr的使用和陷阱 一、初始化 只可以使用new来分配内存,不可 拷贝和赋值。 unique_ptr< int > up1( new int ()); // okay,直接初始化 unique_ptr < int > up2 = new int (); // error! 构造函数是 explicit unique_ptr < int > up3(up1); // error! 不允许拷贝 二、基本操作 unique_ptr<T> up 空的unique_ptr,可以指向类型为T的对象,默认使用delete来释放内存 unique_ptr <T,D> up(d) 空的unique_ptr同上,接受一个D类型的删除器d,使用删除器d来释放内存 up = nullptr 释放up指向的对象,将up置为空 up.release() up放弃对它所指对象的控制权,并返回保存的指针,将up置为空,不会释放内存 up.reset(…) 参数可以为 空、内置指针,先将up所指对象释放,然后重置up的值. View Code 三、参数、返回值 unique_ptr不可拷贝和赋值,那要怎样传递unique_ptr参数和返回unique_ptr呢? 事实上不能拷贝unique_ptr的规则有一个例外:我们可以拷贝或赋值一个将要被销毁的unique

MySQL5.7 如何找出占用CPU高的SQL

核能气质少年 提交于 2020-04-26 11:41:47
https://www.percona.com/blog/2020/04/23/a-simple-approach-to-troubleshooting-high-cpu-in-mysql/ One of our customers recently asked whether it is possible to identify, from the MySQL side, the query that is causing high CPU usage on his system. The usage of simple OS tools to find the culprit has been a widely used technique for a long time by PostgreSQL and Oracle DBAs, but it didn’t work for MySQL as historically we’ve lacked the instrumentation to match an OS thread with an internal processlist thread – until recently. Percona added support to map processlist ids to OS thread ids through

耿建超英语语法---时态+疑问句

梦想的初衷 提交于 2020-04-26 08:31:18
(1)任何一句话都有时态   那什么是时态呢,主要由时间(现在/过去/将来/过去将来)和特点(一般/完成/进行/完成进行)两部分组成,相互结合有16中时态,但过去将来一般用不到,当其他12种时态都会时,这个也就会了,12种时态如下: 一般现在时/一般过去时/一般将来时 现在完成时/过去完成时/将来完成时 现在进行时/过去进行时/将来进行时 现在完成进行时/过去完成进行时/将来完成进行时 (2)四种时态   对于中度聊天(高考)来说,掌握8种时态(一般现在时/一般过去时/一般将来时;现在进行时/过去进行时;现在完成时/过去完成时;现在完成进行时)就足够了,对于简单聊天(中考)来说,掌握5种时态(一般现在时/一般过去时/一般将来时;现在进行时;现在完成时)就可以了,但是对于现在来说,先介绍四种时态(一般现在时/一般过去时/一般将来时;现在进行时)! 一般现在时:do/does (最近(以现在为中心的一段时间)都会发生的相同的动作(平常,一般,老)) 有两种情况 : 1.延续时间短的词/不可延续的词(eat,come,study,watch,call):需要重复才可延续至一个时间段,因此表示习惯时,需要加平常,一般,老。 2.延续时间长的词(know,have,like,hate,want,need,look,looklike):不需要重复,便可延续至一个时间段,不需要加平常,一般,老

耿建超英语语法---陈述句(1)

旧时模样 提交于 2020-04-26 08:31:06
(1)句子结构 陈述句有 5种句子结构 ,如下: 主 + 谓 主 + 谓 + 宾 主 + 谓 + 宾 + 宾补 主 + 谓 + 间宾 + 直宾 主 + 系 + 表 有几点需要说明: 主:n 宾:n 表:n,a,adv,介短,done 对于谓语、系语,稍微复杂一点,如下: 谓语部分 = 时态/情态动词 + 谓语动词 系语部分 = 时态/情态动词 + 系动词 上述谓语、系语两部分可以合成一部分记忆: 谓语/系语部分 = 时态/情态动词 + 动词 举例: 他吃 he (does + eat) eats 他吃了 he (did + eat)ate 他能来 he can come 上边的例子讲到的都是谓语动词的句子,下边介绍一下 be动词的5种时态: 一般现在时:am is are + n/a/adv/介短+done 一般过去时:was were + n/a/adv/介短+done 一般将来时:be going to be + n/a/adv/介短+done 现在进行时:be being + n/a/adv/介短+done 现在完成时:have/has been + n/a/adv/介短+done 关于一般将来时,be going to (时态)与 will(情态动词)都表示将来,但是有一下区别: be going to:强调打算,翻译为“要,打算” will:强调结果,翻译为“会”