百度富文本编辑器ueditor上传文件到对象存储BOS中
此前做了一个百度富文本编辑器ueditor上传文件到bcs中的整合说明,并附上了整合文件下载,岂料百度在BAE3.0时不再支持BCS,导致原来上传的图片不能访问,代码不能工作。这里说一点,百度在未通知用户的情况下,直接将之前的bcs设为不能访问,是一个非常不负责任的做法,希望下次工程师做决定之前慎重一下。BCS不在工作,我的博客还应继续。所幸有一个BCS的替代品BOS,因此我在原来的基础上整合了百...
牛客网做题
牛客网(http://www.nowcoder.com/)是一个非常好的网站,适合程序员面试、笔试之用。像一头牛一样努力变成,相信肯定会拿到好的offer!机器学习中做特征选择时,可能用到的方法有?A.卡方B.信息增益C.平均互信息D.期望交叉熵答案:ABCD,参考:http://blog.csdn.net/fighting_one_piece/article/details/37912051 下...
面试笔试重点总结:操作系统、计算机网络、设计模式
操作系统推荐教程:http://c.biancheng.net/cpp/u/xitong/ 1. 进程的有哪几种状态,状态转换图,及导致转换的事件。如上图所示,进程包括三种状态:就绪态、运行态和阻塞态。详细说明如下:注意:创建和退出不是进程的状态。阻塞和就绪的区别:阻塞是等待除CPU以外的资源,而就绪等待的是CPU资源。1)就绪——执行:对就绪状态的进程,当进程调度程序按一种选定的策略从中选中一个...
Prepare for interview
有ABCD四个人要在夜里过一座桥,他们通过这座桥分别需要耗时1、2、5、10分钟,现在只有一支手电,过桥时必须带有手电,并且同时最多只能两个人一起过桥。请问如何安排能够让四个人尽快都过桥 >1、1和2先过去,时间为2 >2、1回来,时间为1 >...
某银行笔试题总结
这次线上考试没有很好的分配好时间,分成客观题和主观题。共90分钟。后面的主观题答题太慢,导致有几道题都没有做完。(题号不代表题目顺序)A和B表分别如下图所示,演示数据库inner join、left join、right join和full join。这道题其实很简单,只是他给的题目有点容易让人误解,因为A与B的模式完全一样。我的做法如下:用C#实现单例模式。因为时间紧急,只做成如下形式,主要考虑...
如何判断IP地址是A类B类还是C类
简单的说:A类网络的IP地址范围为:1.0.0.1-126.255.255.254; B类网络的IP地址范围为:128.1.0.1-191.255.255.254; C类网络的IP地址范围为:192.0.1.1-223.255.255.254具体解释:1.A类IP地址一个A类IP地址由1字节(每个字节是8位)的网络地址和3个字节主机地址组成,网络地址的最高位必须是“0”,即第一段数字范围为1~12...
[LeetCode] Minimum Window Substring
Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T...
你应该认识的 12 位最有影响力的程序员
我们每天所玩的 app 或游戏,不是凭空生出来,而是有某些人在某些地方,呕心沥血,以一行一行程序写出来的。平台、网页、网络本身,都是起源于此。现在工程师写程序创造一个又一个便利的产品,也是站在巨人肩膀上的结晶。Business Insider列出 12位至今仍在世的重要工程师,让我们来认识这些程序界的大前辈吧!自由操作系统 Linux 开发者&nb...
Linux获得本机公网ip
我们主要使用的两个命令,curl 和 wget。你可以换着用。Curl 纯文本格式输出:curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.appspot.com curl ipinfo.io/ip curl ipecho.net/plain curl&n...
[LeetCode] Edit Distance
Edit DistanceGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the foll...
[LeetCode] Missing Number
Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] ...
[LeetCode] Text Justification
Text JustificationGiven an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words...
[LeetCode] Merge Intervals
Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].解题思路:数组区域合并。首先将原数组按照左边界排序,然后扫描数组。每次比较...
[LeetCode] Insert Interval
Insert IntervalGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to th...
[LeetCode] N-Queens II
N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.解题思路:这道题与http://blog.csdn.net/kangrydotnet/article/details/4785746...
[LeetCode] N-Queens
N-QueensThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solu...
[LeetCode] Ugly Number II
Ugly Number IIWrite a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 i...
网站下的robots
面试某软,被面试官问道:你做爬虫,知不知道很多网站下都有个robots文件? 答曰:不知。 于是面试官给我演示了一遍~ 遂卒。首战惨败。 下来查了维基百科,基本了解ro...
[LeetCode] Group Anagrams
Group AnagramsGiven an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], R...
[LeetCode] Ugly Number
Ugly NumberWrite 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 example, 6, 8 are ugly while...