上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: 需求:模拟登录知乎,因为知乎首页需要登录才可以查看,所以想爬知乎上的内容首先需要登录,那么问题来了,怎么用python进行模拟登录以及会遇到哪些问题? 前期准备: 环境:ubuntu,python2.7 需要的包:requests包、正则表达式包 安装requests:pip install req 阅读全文
posted @ 2016-03-27 18:11 puyangsky 阅读(27070) 评论(7) 推荐(0)
摘要: 一、定义1. 作用:对象消亡时,自动被调用,用来释放对象占用的空间2.特点: (1) 名字与类名相同 (2) 在前面需要加上"~" (3) 无参数,无返回值 (4) 一个类最多只有一个析构函数 (5) 不显示定义析构函数会调用缺省析构函数 二、用法1.普通用法 代码: 结果: 分析: 在main函数 阅读全文
posted @ 2016-03-25 14:47 puyangsky 阅读(27197) 评论(2) 推荐(4)
摘要: 一、安装:在之前的博客中已经写过:http://www.cnblogs.com/puyangsky/p/4763234.html 二、python数组切片知识: python中序列类有list、string、tuple、buffer、unicode等,它们都支持index, len, max, mi 阅读全文
posted @ 2016-03-24 16:19 puyangsky 阅读(772) 评论(0) 推荐(1)
摘要: 原题: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tre 阅读全文
posted @ 2016-03-23 14:36 puyangsky 阅读(336) 评论(3) 推荐(0)
摘要: (1)进程运行时能够访问哪些资源或文件,不取决于进程文件的属主属组,而是取决于运行该命令的用户身份的uid/gid,以该身份获取各种系统资源。 (2)对一个属主为root的可执行文件,如果设置了SUID位,则其他所有普通用户都将可以以root身份运行该文件,获取相应的系统资源。 (3)可以简单地理解 阅读全文
posted @ 2016-03-22 16:15 puyangsky 阅读(14137) 评论(1) 推荐(4)
摘要: 原题: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exi 阅读全文
posted @ 2016-03-13 13:21 puyangsky 阅读(1414) 评论(2) 推荐(0)
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2016-03-10 13:28 puyangsky 阅读(259) 评论(0) 推荐(0)
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2016-03-09 15:04 puyangsky 阅读(266) 评论(0) 推荐(0)
摘要: 用法:void func(int param1, int param2 = 1, int param = 3) {} func(10); //等同于func(10, 1 , 3) func(10,8); //等同于func(10, 8, 3) func(10, , 3);//编译错误,只能最右边的连 阅读全文
posted @ 2016-03-03 13:15 puyangsky 阅读(600) 评论(0) 推荐(0)
摘要: 直接上代码: #include<stdio.h> #include<string> #include<iostream> using namespace std; class Student { private: int age; string name; public: Student(int, 阅读全文
posted @ 2016-03-02 13:44 puyangsky 阅读(7782) 评论(0) 推荐(4)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页