摘要: histogram >>> a = numpy.arange(5) >>> hist, bin_edges = numpy.histogram(a,density=False) >>> hist, bin_edges (array([1, 0, 1, 0, 0, 1, 0, 1, 0, 1], dtype=int64), array([ 0. , 0.4, 0.8, 1.2, 1.6,... 阅读全文
posted @ 2017-06-29 19:04 PengpengSong 阅读(172) 评论(0) 推荐(0) 编辑
摘要: npm install -g karma npm install –g karma-cli Install the plugins (optional) # Install plugins that your project needs: npm install karma-jasmine karma-chrome-launcher --save-dev... 阅读全文
posted @ 2014-09-01 23:12 PengpengSong 阅读(239) 评论(0) 推荐(0) 编辑
摘要: npm rm -g bowernpm cache cleannpm i -g bower 阅读全文
posted @ 2014-08-21 11:26 PengpengSong 阅读(140) 评论(0) 推荐(0) 编辑
摘要: function Foo(a, b) { this.a = a; this.b = b; // simulate getter via valueOf and toString method this.sum = { valueOf: function () { return a + b }, toStr... 阅读全文
posted @ 2014-08-17 21:59 PengpengSong 阅读(186) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class Program { static void Main(string[] arg... 阅读全文
posted @ 2014-08-11 21:13 PengpengSong 阅读(243) 评论(0) 推荐(0) 编辑
摘要: function classof(o) { if (null == o) return 'Null'; if (undefined == o) return 'Undefined'; return Object.prototype.toString.call(o).slice(8, -1);}classof([]);classof({});classof(Date);classo... 阅读全文
posted @ 2014-08-10 10:59 PengpengSong 阅读(225) 评论(0) 推荐(0) 编辑
摘要: function factorial(n) { if (isFinite(n) && n > 0 && n == Math.round(n)) { // 有限的正整数 if (!(n in factorial)) // 没有缓存结果 factorial[n] = n * factorial(n - 1)... 阅读全文
posted @ 2014-08-10 10:03 PengpengSong 阅读(426) 评论(0) 推荐(0) 编辑
摘要: Private Const MAX_PATH As Long = 260Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nSize As Long, ByVal lpBuffer As String) As Long Public Function GetTempDir() As St... 阅读全文
posted @ 2014-08-07 17:20 PengpengSong 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Problem description: The problem may happen when UAC is enabled, it is usually because of the insufficient right to delete the registry key. Solution: 1. Run installer in command prompt as administra... 阅读全文
posted @ 2014-08-07 17:07 PengpengSong 阅读(164) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;namespace StrToInt_CS{ class Program { static void Main(string[] args) { string str = ""; while (!String.Is... 阅读全文
posted @ 2014-08-02 12:48 PengpengSong 阅读(1041) 评论(0) 推荐(0) 编辑