- 博客(349)
- 收藏
- 关注
原创 How to Build ARPACK in Windows10 with Microsoft Visual Studio 2015
There are some websites that I had used:http://www.cnblogs.com/hellraider/archive/2012/09/29/2707231.htmlhttp://www.recheliu.org/memo/buildarpackonwindowsforvisualstudiostep 1: Download ming
2017-03-21 22:17:28
933
1
原创 机器学习 *** 初识流形
最近在学习一个机器学校相关的算法,需要用到流形这个知识,无奈我也不是很清楚这是啥,花了一点时间初步的认识了一下。下面写一下自己对流形这个概念的认识吧~如果有哪里不对希望有人能帮我指出来,多谢~流形:英文叫Manifold,many fold,许多面片的叠加。流形在维基百科上的定义是:局部具有欧几里得空间性质的空间哦。。。酱紫的哦,但是啥是欧几里得空间性质???
2017-02-28 18:58:15
1232
原创 机器学习 *** 模块以及费用函数
对于数据集而言,想要拟合出该数据集对应的函数h时,需要用一个花费函数来衡量函数h的准确程度。该花费函数可以写作:
2017-02-28 09:26:34
582
原创 机器学习 *** 介绍
最近开始准备为研究生方向做准备了,同时因为学校这边项目的原因需要学习机器学习相关的算法,所以在coursera上开始学习机器学习相关内容。Tom Mitchell给了一个机器学习的定义:"A computer program is said to learn from experience E with respect to some class of tasks T and perfor
2017-02-27 23:32:53
390
原创 Tomcat+Eclipse+Ubuntu ××× Servlet.service() for servlet [jsp] in context with path [] threw exceptio
报错如下: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.IllegalStateException: No output folder] with root causejava.lang.IllegalStateException: No output folder
2016-10-02 23:23:56
9020
原创 Android *** transition不起作用
写acitivity之间的动态效果的时候发现没有动态效果。。。于是发现自己忘了加ActivityOptions transitionActivityOptions = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, sharedView, transitionName);。。。。以及。。。a
2016-09-13 21:01:59
1567
原创 Android *** Error: cannot resolve symbol bindingadapter
今天开始使用bindingadapter注释的时候却发现怎么也导不了import android.databinding.BindingAdapter;BindingAdapter始终显示红色错误提示,弄了一个多小时才发现自己没有在主module的build.gradle下配置好,参考这篇官方文档:https://developer.android.com/topic/libraries/
2016-09-13 12:49:41
2095
原创 Android *** android studio Error:Failed to resolve: com.android.support:appcompat-v7:23.+
下午装了android studio,然后新建一个helloworld的project却报了这么一个错误:android studio Error:Failed to resolve: com.android.support:appcompat-v7:23.+网上没有什么好的答案,后来我在sdk manager里面把extras里面的android support repository下载之后
2016-09-05 19:41:08
5776
1
原创 静态页面下,页面编码为gb2312,但是源代码中出现大量/uxxxx的解决方法
昨天爬一个网站的时候发现该网站charset为gb2312,但是网页下方出现大量的/uXXX类似的字符串而且里面还穿插了很多的\n\r类似的字符串,一直搜也没搜到,后来发现是因为该网站的那部分使用了json保存数据。所以直接爬下json的部分,然后用pathon的json块处理json就可以了!
2016-08-03 15:34:03
556
原创 Python *** 爬下糗事百科数据
刚开始学习python,目前只是将部分数据爬下然后记录到txt文件中。代码在github上挂着,地址:https://github.com/treeshy/pythondemo/blob/master/spider_qiushibaike.py
2016-07-17 17:16:06
296
原创 WINAPI *** SAL
翻译与节选与理解选自msdn。https://msdn.microsoft.com/en-us/library/hh916383.aspxHeader AnnotationSAL 2.0 注释What Is SAL and Why Should You Use It?Simply stated, SAL is an inexpensive way t
2016-05-16 11:32:41
590
原创 WINAPI *** _in_ and _out_ and _in_opt_
#define __in #define __out#define __in_opt翻译来自stackoverflow。以上来自于SAL注释语言,(Source-code Annotation Language)。SAL annotations are useful for two things:Static analysis through PREf
2016-05-16 10:53:34
716
转载 Android *** Drawable、Bitmap、Canvas、Paint之间区别
1.基本介绍:Bitmap - 称作位图,一般位图的文件格式后缀为bmp,当然编码器也有很多如RGB565、RGB888。作为一种逐像素的显示对象执行效率高,但是缺点也很明显存储效率低。我们理解为一种存储对象比较好。Drawable - 作为Android平台下通用的图形对象,它可以装载常用格式的图像,比如GIF、PNG、JPG,当然也支持BMP,当然还提供一些高级的可视化对象,比如渐变、
2016-05-08 11:14:38
305
原创 Android *** android-doc阅读《进程与线程》
青色为引用doc内容,黑色是自己的感受~如果某个应用程序组件是第一次被启动,且这时应用程序也没有其他组件在运行,则Android系统会为应用程序创建一个包含单个线程的linux进程。默认情况下,同一个应用程序的所有组件都运行在同一个进程和线程里(叫做“main”主线程)。如果组件启动时,已经存在应用程序的进程了(因为应用程序的其它组件已经在运行了),则此组件会在已有的进程和线程中启动运
2016-05-03 09:38:27
279
原创 LeetCode *** 344. Reverse String
题目:Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh". 分析:代码:class Solution {public: string reverseStrin
2016-04-27 22:20:30
296
原创 LeetCode *** 345. Reverse Vowels of a String
题目:Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle". Example 2:Given s = "leetcode", return "leotcede".
2016-04-27 22:19:34
346
原创 LeetCode *** 166. Fraction to Recurring Decimal
题目:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating, enclose the repeating part in parenthese
2016-04-27 22:17:11
269
原创 LeetCode *** 29. Divide Two Integers(binary search)
题目:Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 分析:代码:class Solution {public: int divide(int dividend, int divi
2016-04-27 22:16:07
444
原创 LeetCode *** 344. Reverse String
题目:Write a function that takes a string as input and returns the string reversed.Example: Given s = "hello", return "olleh".分析:代码:class Solution {public: string reverseString(
2016-04-27 19:05:29
210
原创 LeetCode *** 151. Reverse Words in a String
题目:Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". 分析:代码:class Solution {public: void reverseWords(s
2016-04-27 17:00:23
272
原创 LeetCode *** 130. Surrounded Regions
题目:Given a 2D board containing 'X' and 'O', capture all regions surrounded by'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For example,X X X XX O O
2016-04-27 15:38:11
211
原创 LeetCode *** 307. Range Sum Query - Mutable (Binary Indexed Trees)
题目:Given an integer array nums, find the sum of the elements between indicesi and j (i ≤ j), inclusive.The update(i, val) function modifies nums by updating the element at indexi to val.Ex
2016-04-27 10:34:32
269
原创 LeetCode *** 91. Decode Ways
题目:A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the tot
2016-04-27 10:33:49
217
原创 LeetCode *** 220. Contains Duplicate III (set::lower_bound)
题目:Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] andnums[j] is at most t and the difference between i
2016-04-26 22:54:03
219
原创 LeetCode *** 127. Word Ladder(BFS)
题目:Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence frombeginWord to endWord, such that: Only one letter can be chan
2016-04-26 20:58:47
324
原创 LeetCode *** 341. Flatten Nested List Iterator(审题审题!!)
题目:Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list -- whose elements may also be integers or other lists.Example 1:Given the
2016-04-26 19:46:46
324
原创 LeetCode *** 179. Largest Number (sort的使用。。。)
题目:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is9534330.Note: The result may b
2016-04-26 19:35:22
232
原创 LeetCode *** 211. Add and Search Word - Data structure design(字典树)
题目:Design a data structure that supports the following two operations: void addWord(word)bool search(word)search(word) can search a literal word or a regular expression string containing onl
2016-04-26 09:07:49
278
原创 LeetCode *** 98. Validate Binary Search Tree
题目:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's ke
2016-04-25 22:22:12
178
原创 LeetCode *** 210. Course Schedule II
题目:There are a total of n courses you have to take, labeled from 0 ton - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed a
2016-04-25 20:34:42
242
原创 LeetCode *** 3. Longest Substring Without Repeating Characters
题目:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b
2016-04-25 20:07:48
207
原创 LeetCode *** 71. Simplify Path (getline的使用)
题目:Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"分析:代码:class Solution {public: string
2016-04-25 19:16:30
228
原创 LeetCode *** 304. Range Sum Query 2D - Immutable
题目:Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1,col1) and lower right corner (row2, col2).The above rectangle (with the
2016-04-25 17:06:01
192
原创 LeetCode *** 324. Wiggle Sort II (virtual indexing)
题目:Given an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6].(2) Given nums = [1, 3, 2, 2,
2016-04-25 16:20:59
711
原创 LeetCode *** 152. Maximum Product Subarray
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the lar
2016-04-25 14:58:32
191
原创 LeetCode *** 61. Rotate List
题目:Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.分析:代码:/** * Defin
2016-04-25 10:30:56
211
原创 LeetCode *** 143. Reorder List
题目:Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it
2016-04-24 23:17:55
186
原创 LeetCode *** 79. Word Search
题目:Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertic
2016-04-24 22:08:58
173
原创 LeetCode *** 43. Multiply Strings
题目:Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are non-negative.Converting the input string to
2016-04-24 20:37:08
181
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人