2016-11-17 Shawn Ng
window.location.href = "https://www.zybuluo.com/ShawnNg/note/570367" 继续阅读 »
2014-08-26 summer
``` sudo apt-get install staden-io-lib-utils libstaden-read-dev http://ubuntuforums.org/showthread.php?t=1581237 ``` 继续阅读 »
2014-05-26 summer
1、code的使用问题 为了让想想展示的内容使用code或者pre格式,在使用md格式时,最好在展示的内容前和后使用空格进行分割。markdown中使用code或者pre的格式分别是:只要简单地缩进 4 个空格或是 1 个制表符就可以 2、code中插入连接的问题 按照以往的习惯,在md文件code区域编辑link,使用的连接markdown代码如下: 继续阅读 »
2015-05-07 summer
最近在学习Tkinter的知识,这使用图片时发现不能正常显示,google一下,发现Tkinter默认支持gif格式,使用其他格式的文件需要安装PIL模块。不过在安装过程中出现了一下错误问题: ``` 1 warning generated. clang: warning: -framework Tcl: 'linker' input unused clang: warning: -framework Tk: 'linker' input unused In file included from _imagingtk.c:19: /Applications/Xcode.app/Contents/Developer/Platform 继续阅读 »
2014-09-04 summer
今天在centos系统上执行命令是出现错误,error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory.如下图所示: 继续阅读 »
2016-05-18 craneyuan
Question Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11' has binary representation 00000000000000000000000000001011, so the function should return 3. 解说 这道题的意思是统计32位整数二进制格式下的‘1’的个数。 more Solution rig 继续阅读 »
2016-06-16 YongHao Hu
C++
231. Power of Two Question Given an integer, write a function to determine if it is a power of two. Solution Approach #1 (count the number of 1) [Accepted] Algorithm Integer is a power of two means only one bit of n is '1', for example, 100 is 2^2=4 while 110 is 2^2+2^1=6. 继续阅读 »
2016-05-06 craneyuan
Question Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. UPDATE (2016/2/13): The return forma 继续阅读 »
2016-06-06 craneyuan
Question 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 = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will always be valid. Try to do this in one pass. 解说 这道题的意思是,如何反向删 继续阅读 »
2016-06-16 YongHao Hu
C++
160. Intersection of Two Linked Lists Question Write a program to find the node at which the intersection of two singly linked lists begins. 继续阅读 »