lichao_normal

导航

2017年12月23日 #

python网络编程学习

摘要: 网络通信 边缘网络中的主机数目庞大,计算机网络是如何实现网络中的两台主机之间的通信的呢? 简单的来说,计算机网络中的主机通信如同现实生活中的物流,当我们需要发送一个快递时,我们需要首先需要准备自己要发送的物品,相当于网络体系结构中的应用层,编写自己的发送的消息;第二,要发送的物品往往需要一个外包装, 阅读全文

posted @ 2017-12-23 22:39 lichao_normal 阅读(202) 评论(0) 推荐(0) 编辑

2017年12月21日 #

Kmeans-机器学习入门

摘要: 一、K-均值聚类 K-均值聚类的目的是将各个样本点映射到距离某个质心最近的聚类中。假设样本点为$\textbf{x}^{t},t=1,2,3,...,n$,第$i$个聚类的质心为$\textbf{m}_{i},i=1,2,...,k$。则,$\textbf{x}^{t}$属于聚类$i$可以表示为: 阅读全文

posted @ 2017-12-21 22:24 lichao_normal 阅读(461) 评论(0) 推荐(0) 编辑

2017年3月30日 #

Rotate Image

摘要: 参照计算机图形学图形变换即可。 public class Solution { public void rotate(int[][] matrix) { if(matrix.length<=1)return ; float dip=(float) ((matrix.length-1)/2.0); i 阅读全文

posted @ 2017-03-30 21:43 lichao_normal 阅读(114) 评论(0) 推荐(0) 编辑

2017年1月4日 #

Combination Sum II

摘要: public class Solution { public List<List<Integer>> combinationSum2(int[] candidates, int target) { List<List<Integer>> res=new ArrayList<List<Integer> 阅读全文

posted @ 2017-01-04 21:45 lichao_normal 阅读(69) 评论(0) 推荐(0) 编辑

Combination Sum

摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文

posted @ 2017-01-04 20:37 lichao_normal 阅读(104) 评论(0) 推荐(0) 编辑

2016年12月10日 #

Android Saving Data(二)

摘要: Saving File android读写文件的形式和普通的java IO的方式并没有什么不同,唯一有所限制的是当我们创建文件的时候不能够在像javaSE那样随意了。一般android读写文件有两种形式: 1 File file = new File(context.getFilesDir(), f 阅读全文

posted @ 2016-12-10 20:44 lichao_normal 阅读(111) 评论(0) 推荐(0) 编辑

Android Saving Data(一)

摘要: Saving Key-value Sets 保存键值对 SharedPreferences只能用来保存一些简单的数据,并且这些数据可以是共享的,也可以是私有的。 SharedPreferences没有构造方法,只能同个Context中的getSharePreference获得。 获取共享首选项的句柄 阅读全文

posted @ 2016-12-10 19:39 lichao_normal 阅读(388) 评论(0) 推荐(0) 编辑

2016年12月9日 #

Search Insert Position

摘要: int searchInsert(int* nums, int numsSize, int target) { int low=0; if(numsSize<=0)return 0; int high=numsSize-1; int mid; while(low<=high){ mid=(low+h 阅读全文

posted @ 2016-12-09 20:37 lichao_normal 阅读(68) 评论(0) 推荐(0) 编辑

Search for a Range

摘要: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the or 阅读全文

posted @ 2016-12-09 20:36 lichao_normal 阅读(71) 评论(0) 推荐(0) 编辑

Search in Rotated Sorted Array

摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 4 5 6 7 0 1 2). You are given a target value to search. If found in 阅读全文

posted @ 2016-12-09 11:04 lichao_normal 阅读(348) 评论(0) 推荐(0) 编辑