码迷,mamicode.com
首页 > 全部
网络爬虫初步:从访问网页到数据解析
本篇文章在这里只是起一个抛砖引玉的作用。本文主要是讲解了如何使用Java/Python访问网页并获得网页代码、Python模仿浏览器进行访问网页和使用Python进行数据解析。希望我们以本文开始,一步一步解开网络蜘蛛神秘的一面。...
分类:Web程序   时间:2015-08-10 20:07:38    阅读次数:155
Linux进程管理 - ps,top,pstree,signal,kill,killall举例演示
ps:将某个时间点的进程运行情况撷取下来 [root@www ~]# ps aux <==观察系统所有的进程数据 [root@www ~]# ps -lA <==也是能够观察所有系统的数据 [root@www ~]# ps axjf <==连同部分进程树状态 选项与参数: -A :所有的 process 均显示出来,与 -e 具有同样的效用; -a :不与 terminal 有关的所有 ...
分类:系统相关   时间:2015-08-10 20:05:20    阅读次数:178
[第2章]多线程:NSOperation的简单使用
一、介绍特点 在GCD基础上实现 更好地控制和处理大量并发操作 比GCD速度稍慢 1、NSOperation NSOperation是抽象类,使用方法: 1、使用系统提供的子类; 2、自定义类。 2、NSOperationQueue NSOperationQueue,用于调度和管理NSOperation。...
分类:编程语言   时间:2015-08-10 20:06:27    阅读次数:129
UVA 10986 Sending email SPFA
题意:告诉n个点和m条边,求s到t的最短路径。。 思路:N和M都比较大了,n有20000,m有50000,用邻接表加SPFA。 #include #include #include #include #include #include #include #define INF 99999999 using namespace std; int n,m,s,t; int dis[2...
分类:其他好文   时间:2015-08-10 20:06:17    阅读次数:130
Codeforces Round #Pi (Div. 2) D. One-Dimensional Battle Ships
Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line consisting of n square cells (that is, on a 1?×?n table). At the beginning of the game Alice ...
分类:其他好文   时间:2015-08-10 20:05:45    阅读次数:148
LeetCode(24) Swap Nodes in Pairs
题目Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You may...
分类:其他好文   时间:2015-08-10 20:06:13    阅读次数:117
机器学习中梯度下降法和牛顿法的比较
在机器学习的优化问题中,梯度下降法和牛顿法是常用的两种凸函数求极值的方法,他们都是为了求得目标函数的近似解。在逻辑斯蒂回归模型的参数求解中,一般用改良的梯度下降法,也可以用牛顿法。由于两种方法有些相似,我特地拿来简单地对比一下。下面的内容需要读者之前熟悉两种算法。梯度下降法梯度下降法用来求解目标函数的极值。这个极值是给定模型给定数据之后在参数空间中搜索找到的。迭代过程为:可以看出,梯度下降法更新参数...
分类:其他好文   时间:2015-08-10 20:04:38    阅读次数:238
uva558 Wormholes SPFA 求是否存在负环
J - Wormholes Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Description In the year 2163, wormholes were discovered. A wormhole is a subspace...
分类:其他好文   时间:2015-08-10 20:06:03    阅读次数:114
Android 学习之获取网络文本文件
上次我们学习如何从网络上获取一张图片,今天我们学习如何从网络上获取文本文件,以XML文件为例子。因为XML文件在实际开发中最为常见。 我们以下面图片为例子学习如何从网络上获取XML文件 我们的xml文件为: 9月起办理手机卡需实名认证 方案要求,从2015年2月1日起,基础电信企业和虚拟运营商的各类营销渠道在为用户办理电话入网手续时,停止人工录入方式,改用专用移动应用程序...
分类:移动开发   时间:2015-08-10 20:04:24    阅读次数:128
简单字符串处理方法:
string:一些字符串处理函数: strcpy(s1,s2): **s1,s2定义为字符数组。** 把字符串s2中的内容copy到s1中,连字符串结束标志也一起copy. strcmp(s1,s2): **s1,s2定义为字符数组。** 比较两个字符串的大小,返回比较的结果。一般形式是: ①字符串1小于字符串2,strcmp函数返回一个...
分类:其他好文   时间:2015-08-10 20:05:31    阅读次数:123
【笔试】12、企业发放的奖金根据利润提成。
/** * 题目:企业发放的奖金根据利润提成。 * 利润(I)低于或等于10万元时,奖金可提10%; * 利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%; * 20万到40万之间时,高于20万元的部分,可提成5%;,前面的提成不变 * 40万到60万之间时高于40万元的部分,可提成3%; * 60万到100万之...
分类:其他好文   时间:2015-08-10 20:05:03    阅读次数:108
454 Authentication failed, please open smtp flag first!
1、错误描述454 Authentication failed, please open smtp flag first! Exception in thread "main" javax.mail.AuthenticationFailedException at javax.mail.Service.connect(Service.java:267) at javax.mail.Servic...
分类:其他好文   时间:2015-08-10 20:04:41    阅读次数:120
leetcode:LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if ...
分类:系统相关   时间:2015-08-10 20:02:52    阅读次数:163
PHP日志
$des = './Application/Runtime/Logs/Api/api.log'; // $now = date('c'); $now = date('Y-m-d H:i:s'); $log = 'NOTICE'; $destination = 'DB连接失败'; error_log("[{$now}] ".$destination.' '.$_SERVER['REMOTE...
分类:Web程序   时间:2015-08-10 20:02:41    阅读次数:168
【笔试】13、求数值
/** * 题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少? * 时间:2015年7月29日08:31:58 * 文件:Lianxi13.java * 作者:cutter_point */ package bishi.zuixin50.t2015729; public class Lianxi13 { public static v...
分类:其他好文   时间:2015-08-10 20:04:59    阅读次数:100
com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user
1、错误描述553 Mail from must equal authorized user com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.j...
分类:其他好文   时间:2015-08-10 20:03:59    阅读次数:197
【笔试】14、判断这一天是这一年的第几天
/** * 题目:输入某年某月某日,判断这一天是这一年的第几天? * 时间:2015年7月29日08:31:58 * 文件:Lianxi14.java * 作者:cutter_point */ package bishi.zuixin50.t2015729; import java.util.*; public class Lianxi14 { public static ...
分类:其他好文   时间:2015-08-10 20:02:59    阅读次数:128
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!