2018年8月28日

使用sublime text3 链接sftp/ftp

摘要: 1、安装sublime text3 2、在底部控制区输入 import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Pack 阅读全文

posted @ 2018-08-28 10:11 城南北 阅读(173) 评论(0) 推荐(0) 编辑

2017年8月1日

最长公共子序列

摘要: 加入收藏 | 分享这个卡塔 编写一个称为LCS该函数的函数可以接受两个序列,并返回传递给序列的最长子序列。 子 子序列与子字符串不同。子序列的术语不需要是原始序列的连续项。 示例子序列 “abc”=“a”,“b”,“c”,“ab”,“ac”,“bc” LCS示例 LCS( "abcdef" , "a 阅读全文

posted @ 2017-08-01 17:27 城南北 阅读(159) 评论(0) 推荐(0) 编辑

2017年7月31日

12.字符串转换为驼峰命名法

摘要: 完成方法/函数,使得其短划线/下划线分隔的单词转换成骆驼套管。输出中的第一个词应该如果原词是大写只大写。 例子: function toCamelCase(str){ str=str.split(/[-_]/); console.log(str) return str.map(function(x, 阅读全文

posted @ 2017-07-31 10:12 城南北 阅读(525) 评论(0) 推荐(0) 编辑

2017年7月28日

11.总数字作为数字Sum Strings as Numbers

摘要: 总的来说这是一个将字符串转化为数字进行计算再转化为字符串的计算,醉生与死; Given the string representations of two integers, return the string representation of the sum of those integers. 阅读全文

posted @ 2017-07-28 17:27 城南北 阅读(416) 评论(0) 推荐(0) 编辑

2017年7月27日

10:Are they the "same"?他们是相同的吗?

摘要: 给定两个数组a并b写入一个函数comp(a, b)(compSame(a, b)在Clojure中),它检查两个数组是否具有相同的多项式的“相同”元素。“同样”的意思是,这里b的元素是a平方的元素,不管命令如何。 例子 有效数组 comp(a, b)返回真实,因为b121是11的平方,14641是1 阅读全文

posted @ 2017-07-27 15:20 城南北 阅读(667) 评论(0) 推荐(0) 编辑

2017年7月25日

09.怎么取一个完美次幂

摘要: 一个完美的功率为正整数的分类: 在数学中,完美的电源是可被表示为另一个正整数的整数次幂的正整数。更正式地说,n是一个完美的功率,如果存在自然数m> 1,并且k> 1,使得米ķ = N。 你的任务是检查wheter一个给定的整数是一个完美的动力。如果它是一个完美的电源,返回一对m和k具有m ķ = N 阅读全文

posted @ 2017-07-25 17:32 城南北 阅读(175) 评论(0) 推荐(0) 编辑

08.IPv4到INT32

摘要: 采取以下IPv4地址:128.32.10.1此地址的4个字节,其中每个八位位组是单个字节(或8位)。 第一八位位组128具有二进制表示:千万 第二个八位位组32具有的二进制表示:0010万 第三八位位组10具有的二进制表示:00001010 第四个八比特组1具有的二进制表示:00000001 所以1 阅读全文

posted @ 2017-07-25 17:01 城南北 阅读(247) 评论(0) 推荐(0) 编辑

07.Sum of numbers from 0 to N

摘要: 描述: 我们要生成一个函数,该函数计算从0开始的序列,并结束,直到序列之后的给定数字: 0 1 3 6 10 15 21 28 36 45 55 .... 由...创建 0 + 0 + 1 + 2 + 0 + 1 + 2 + 3 + 0 + 1 + 2 + 3 + 4 + 0 + 1 + 2 + 3 阅读全文

posted @ 2017-07-25 15:18 城南北 阅读(202) 评论(0) 推荐(0) 编辑

06.Vowel Count

摘要: Return the number (count) of vowels in the given string. We will consider a, e, i, o, and u as vowels for this Kata. function getCount(str) { var vowe 阅读全文

posted @ 2017-07-25 14:43 城南北 阅读(306) 评论(0) 推荐(0) 编辑

05.Primes in numbers

摘要: Given a positive number n > 1 find the prime factor decomposition of n. The result will be a string with the following form : with the p(i) in increas 阅读全文

posted @ 2017-07-25 14:15 城南北 阅读(320) 评论(0) 推荐(0) 编辑

导航