代码改变世界

unicode发展

2017-09-11 14:01 by FTD_W, 296 阅读, 0 推荐, 收藏, 编辑
摘要:作者:于洋链接:https://www.zhihu.com/question/23374078/answer/69732605来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 很久很久以前,有一群人,他们决定用8个可以开合的晶体管来组合成不同的状态,以表示世界上的万物。 阅读全文

Bsee64算法,编码实现

2017-09-11 11:02 by FTD_W, 479 阅读, 0 推荐, 收藏, 编辑
摘要:代码是阿帕奇开源代码,C语言实现。使用位运算,可以更快地实现算法,下面会详细介绍如何使用位运算进行编码。 因为有些网络传送渠道并不支持所有的字节,例如传统的邮件只支持可见字符的传送,像ASCII码的控制字符就 不能通过邮件传送。这样用途就受到了很大的限制,比如图片二进制流的每个字节不可能全部是可见字 阅读全文

C#中 const static readonly

2017-09-07 08:54 by FTD_W, 175 阅读, 0 推荐, 收藏, 编辑
摘要:readonly:运行时常量,程序运行时赋值,赋值后无法更改,一般称为只读变量 const:编译时常量,在编译时将该常量引用替换为字面量,一般只能赋值为数字,字符串,枚举类型 static:静态变量、静态方法、静态类 静态变量: 特点: 1、通过static关键字修饰,是属于类,实例成员属于对象,在 阅读全文

SQL 中Varchar和NVarchar比较

2017-08-29 17:04 by FTD_W, 1290 阅读, 0 推荐, 收藏, 编辑
摘要:varchar(n)类型中,n最大到8000。弱存储英文,则占一个字节,存储汉字,则占两个字节。 nvarchar(n)类型中,n最大到4000。无论存储英文还是汉字,都占用两个字节。 如果是存储汉字的字段,使用nvarchar比较合适,若使用varchar存储汉字,可能在MySQL中出现???的乱 阅读全文

263_Ugly Number

2016-04-20 17:02 by FTD_W, 167 阅读, 0 推荐, 收藏, 编辑
摘要:Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文

22_Generate Parentheses

2016-04-20 16:42 by FTD_W, 119 阅读, 0 推荐, 收藏, 编辑
摘要: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: " 阅读全文

338_Counting Bits

2016-03-24 14:09 by FTD_W, 155 阅读, 0 推荐, 收藏, 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文

70_Climbing Stairs

2016-03-21 20:28 by FTD_W, 175 阅读, 0 推荐, 收藏, 编辑
摘要:You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文

83_Remove Duplicates from Sorted List

2016-03-21 19:50 by FTD_W, 128 阅读, 0 推荐, 收藏, 编辑
摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文

230_Kth Smallest Element in a BST

2016-03-21 19:32 by FTD_W, 140 阅读, 0 推荐, 收藏, 编辑
摘要:Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文