- 博客(31)
- 资源 (4)
- 问答 (7)
- 收藏
- 关注
原创 numpy中的省略号(...)和冒号(:)
numpy中的省略号(...)和冒号(:)省略号和冒号的作用冒号的作用省略号的作用两者的区别最近看到一份代码,里面出现类似这样的代码a[..., 0]。一时间不太清楚,于是去了解了一下。自己明白了,在这里记录一下。省略号和冒号的作用省略号和冒号都是用来操作列表,用来快速操作元素的。冒号的作用比如下面的例子:c = np.random.randint(0, 100, 10)print(c)生成这样一个随机列表:[49 29 75 51 23 39 92 97 55 56]然后进行以下
2020-10-26 22:12:41 3586 2
原创 Ubuntu 机箱前置耳机没声音的问题(彻底解决)
换了台电脑,发现前置耳机孔没有声音,在网上找了很多的办法,一种办法能够出声,就是安装pavucontrol软件:sudo apt-get install pavucontrol安装之后,配置里设置,一直显示是unplugged的,也就是就算是插上耳机,在这里输出,电脑不能识别你的耳机已经插入,在你重启或者电脑睡眠之后再启动,还需要重新设置。最后,找到了一个彻底解决的办法:a...
2019-10-17 21:09:46 2414 3
原创 字母大小写转换
由于经常遇到字母的大小写转换,常用的思路是判断,然后进行转换,这样比较麻烦,有一种比较方便快捷的方法,不用比较,直接进行位操作就可以了简单的字母大小写转换:统一转成大写:ch & 0b11011111 简写:ch & 0xDF 统一转成小写:ch | 0b00100000 简写:ch | 0x20...
2019-09-07 19:13:51 770
原创 ubuntu 18.04 使用indicator-multiload
indicator-multiload 是ubuntu下面一个很好的系统状态监视器,可以监视系统的cup,内存,网络以及硬盘读写转该,并以将其可视化。这个软件在ubuntu18.04之前能够正常的工作,没有任何问题,但是ubuntu18.04由于使用的是gnome的桌面环境,导致indicator不能正常显示,找了好多资料,这里成功的找到了一个解决方案,再次分享以下,也记录下来,方便以后用得...
2018-12-12 12:19:57 2423 2
原创 emacs+Latex 设置xelatex编译命令,以及预览功能
刚安装了AUCTex,但是一般写中文的时候经常会用到xeCJK包和xelatex编译命令,但是AUCTex默认不提供对这些的支持,在网上找了很多资料,找到一个比较笨的解决方案:使用 M-x customize-group 然后输入tex-command 就可以打开latex的配置界面了,这里有好多命令,暂时还没搞清楚这些命令都是做什么用的,暂时提供如和修改,能够使用C-c C-c命令使用xel...
2018-11-07 22:19:30 4623
原创 乘法的计算顺序(乘法加括号问题)
乘法运算对于一般的数据都有结合性,比如一般的常数乘法:,这是满足结合律的,而对于特殊数据的乘法,比如矩阵乘法,不同的计算顺序可能会有不同的计算复杂度。所以计算顺序就很重要,这是这个问题提出的背景,而我们要列举出所有的计算顺序也就是给乘法式加括号,比如(A(B(C(DE))))这是其中的一种。那么我们如何找到所有的加括号的方法呢?下面给出代码:#include <iostream&g...
2018-10-11 19:55:11 5420
原创 根据前序和中序便遍历构造完整二叉树,并输出层次遍历
#include <iostream>#include <queue>typedef struct node{ char name; struct node* left; struct node* right; int _l; int _r; node(int l, int r) { _l = l;...
2018-03-22 21:12:11 524
原创 linux下的golang环境配置
Ubuntu下安装和配置golang(包括升级)一.安装这里以安装golang1.9为例: 1.首先通过命令行直接安装 sudo apt-get install golang-1.92.下载好之后,查看go的版本 catik@catik-Aspire-V3-471:~$ go version go version go1.9.2 linux/amd64可以看得出,这里的版本是go
2018-01-06 17:20:00 3325
原创 golang的初认识以及实践
这篇博客也算当做我这几点学习go语言的一个小总结和小复习吧golang的简单介绍Go 是一个开源的编程语言,它能让构造简单、可靠且高效的软件变得容易。Go是从2007年末由Robert Griesemer, Rob Pike, Ken Thompson主持开发,后来还加入了Ian Lance Taylor, Russ Cox等人,并最终于2009年11月开源,在2012年早些时候发布了Go 1稳
2018-01-03 21:23:25 324
原创 8.20
题目:In an undirected graph G = (V, E), we say D ⊆ V is a dominating set if every v ∈ V is either in D or adjacent to at least one member of D. In the DOMINATING SET problem, the input is a graph and a b
2017-12-30 23:51:44 276
原创 leetcode题目例题解析(十六)
leetcode题目例题解析(十六)Valid Parentheses题目描述: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. The brackets must close in the corre
2017-12-30 23:26:36 308
原创 leetcode题目例题解析(十五)
leetcode题目例题解析(十五)Sort Colors题目描述: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue
2017-12-30 00:52:53 297
原创 leetcode题目例题解析(十四)
leetcode题目例题解析(十四)Find Peak Element题目描述: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
2017-12-30 00:13:59 221
原创 leetcode题目例题解析(十三)
leetcode题目例题解析(十三)Letter Combinations of a Phone Number题目描述: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just
2017-12-28 20:32:22 238
原创 leetcode题目例题解析(十二)
leetcode题目例题解析(十一)First Missing Positive题目描述: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. You
2017-12-28 19:14:36 273
原创 leetcode题目例题解析(十一)
leetcode题目例题解析(十一)Combinations题目描述: Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example, If n = 4 and k = 2, a solution is: [[2,4],
2017-11-30 20:42:30 218
原创 leetcode题目例题解析(十)
leetcode题目例题解析(十)Partition List题目描述: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the origina
2017-11-30 19:55:17 260
原创 leetcode题目例题解析(九)
leetcode题目例题解析(九)Unique Paths题目描述: A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in t
2017-11-07 12:55:24 317
原创 leetcode题目例题解析(八)
leetcode题目例题解析(八)Minimum Path Sum题目描述: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: Y
2017-11-07 11:59:21 236
原创 leetcode题目例题解析(七)
leetcode题目例题解析(七)Swap Nodes in Pairs题目描述: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. You
2017-10-23 01:12:46 304
原创 leetcode题目例题解析(六)
leetcode题目例题解析(六)Valid Sudoku题目描述: Determine if a Sudoku is valid The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. 题意解析: 这道题就是判断一个给定的数独是否是合理的,
2017-10-23 00:50:54 257
转载 leetcode题目例题解析(五)
leetcode题目例题解析(五)Generate Parentheses题目描述: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [
2017-10-15 11:34:38 248
原创 leetcode题目例题解析(四)
leetcode题目例题解析(四)Remove Nth Node From End of List题目描述: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n
2017-09-22 00:22:26 307
原创 leetcode题目例题解析(三)
leetcode题目例题解析(三)Search for a Range题目描述: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity
2017-09-21 23:51:32 308
原创 leetcode题目例题解析(二)
leetcode题目例题解析(二)Subsets题目描述: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,
2017-09-15 20:59:49 289
原创 leetcode题目例题解析
leetcode题目例题解析(一)Add Two Numbers题目描述: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single
2017-09-08 13:27:19 435
原创 Unity3d-制作粒子光环特效
利用Unity3d制作一个特效,与这个网站效果类似:首先,在Unuty3d下面建立了一个object,命名为Particle。然后建立一个脚本:并挂在刚刚建立的gameobject下面然后然后依次点击Components->Effects->Particle System添加Particle System组件。设置变量:粒子的初速度设为0,并把emission Rate
2017-04-26 13:53:13 18156
转载 emacs快捷键
Emacs快捷键列表C = ControlM = Meta = Alt | EscDel = Backspace基本快捷键(Basic)C-x C-f "find"文件, 即在缓冲区打开/新建一个文件C-x C-s 保存文件C-x C-w 使用其他文件名另存为文件C-x C-v 关闭当前缓冲区文件并打开新文件C-x i 在当前光标处插入文件C-x
2015-04-02 13:46:41 389
翻译 How to Install Jdownloader on Ubuntu
JDownloader is a free open-source download management tool that makes downloading fast and easy. Steps1安装 JDownloader, 打开终端 ( Ctr+Alt+T ) 把下面的命令输入到终端: sudo add-apt-repository ppa:jd-te
2015-03-21 20:34:09 651
Linux 下编译c++ opengl的小程序
2015-06-23
C++模板类的问题,求解答
2015-04-25
c++ 如何动态的决定输出的宽度
2015-04-23
求一段elisp代码,关于插入换行
2015-04-18
永真式的判定程序(c++)
2015-04-12
c++类的对象中分配的内存的内存能不能在在程序中间delete掉再重新分配?
2015-04-06
正在学c++, class内存分配的问题
2015-04-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人