Scrapy框架——安装以及新建scrapy文件
一.安装 conda install Scrapy :之后在按y 表示允许安装相关的依赖库(下载速度慢的话也可以借助镜像源),安装的前提是安装了anaconda作为python , 测试scrapy是否安装成功,在窗口输入scrapy回车 注意:我这是之前安装了anaconda 所以能直接这样下载 如果没有则需要自己一个一个下载依赖库 和scrapy 但是可以借助豆瓣的镜像源来快速安装 格式: pip install -i https://pypi.douban.com/simap
Widget Factory (高斯消元解线性方程组)
The widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a widget depends on its type: the simple widgets need only 3 days, but the most complex ones may need a
实现一个eventEmitter
var eventEmitter = { functionList: {}, oneFunctionList: {}, on: function (type, fn) { if (!Array.isArray(this.functionList[type])) { this.functionList[type] = []; } this.functionList[type].push(fn); }, one: function (type
sqlserver 2008R2新建数据库时报错,提示无法获得数据库"model"上的排它锁
刚新装了个sqlserver2008 R2,在建立数据库时候报错,提示无法获得数据库"model"上的排它锁。解决办法如下: 打开查询页面,执行下面的语句即可。 use master
declare @sql varchar(100)
while 1=1
begin
select top 1 @sql = 'kill '+cast(spid as varchar(3))
from master..sysprocesses
where spid > 50 and spid <> @@spid
解决ping不通win7主机
之前在路由器上ping笔记本发现ping不通,但是笔记本ping路由器通,也没多想。今天想起来可能是win7的防火墙作怪,以前上课虚拟机好像也是ping不通宿主机,但是宿主机能ping通虚拟机。 简单来说,win7关闭防火墙或者配置防火墙使能够响应ping请求。 控制面板依次打开Control Panel\System and Security\Windows Firewall 然后打开高级设置,选择Inbound Rules,选择 File and Printer Sharing (Echo
Painter's Problem (高斯消元)
There is a square wall which is made of n*n small square bricks. Some bricks are white while some bricks are yellow. Bob is a painter and he wants to paint all the bricks yellow. But there is something wrong with Bob's brush. Once he uses this brush
RabbitMQ简单Java示例——生产者和消费者
添加Maven依赖: 使用rabbitmq-client的最新Maven坐标: <!-- https://mvnrepository.com/artifact/com.rabbitmq/amqp-client -->
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.3.0</version>
</dependency> 添加账户 默认
多项式乘法 FFT模板
题目传送门 在下只是来存个板子,,(板子还是洛谷找的2333) 证明的话,太(wo)难(bu)写(hui),就先留个坑吧,,, NOIP后,如果没退役,我会回来填坑的,, #include<bits/stdc++.h>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<deque>
#include<l
Spark运行架构章节遇到的问题
在spark中运行./spark-shell --master YARN-client --num-executors 3 --executor-memory 1g是碰到如下的问题: biaoshi 表示资源不足,可能是内存不足或者core不足,于是就将1g改为512m,运行成功 以spark-client运行时候查看hdfs时,以http://hadoop1:50070查看,发现多了一个.sparkStaging文件夹 以spark-client运行时碰到如下问题,是因为log server
Code Signal_练习题_differentSymbolsNaive
Given a string, find the number of different characters in it. Example For s = "cabca", the output should be differentSymbolsNaive(s) = 3. There are 3 different characters a, b and c. 我的解答: def differentSymbolsNaive(s):
return len(set(s)) 一模一样
markdown文件的基本常用编写语法
.md即markdown文件 1、标题的几种写法: 第一种: 前面带#号,后面带文字,分别表示h1-h6,上图可以看出,只到h6,而且h1下面会有一条横线,注意,#号后面有空格 第二种: 这种方式好像只能表示一级和二级标题,而且=和-的数量没有限制,只要大于一个就行 第三种: 这里的标题支持h1-h6,为了减少篇幅,我就偷个懒,只写前面二个,这个比较好理解,相当于标签闭合,注意,标题与#号要有空格 那既然3种都可以使用,可不可以混合使用呢?我试了一下,是可以的,但是为了让页面标签的统一性,不建
Windows下Anaconda安装 python + tensorflow
下载安装Anaconda 首先下载Anaconda,可以从清华大学的镜像网站进行下载。 安装Anaconda,注意安装时不要将添加环境变量的选项取消掉。 安装完成之后,在安装目录下cmd,输入 conda list 可以查看Anaconda为我们提供的集成环境: 下面只是一部分截图: 查看版本信息: conda --version Anaconda 安装成功。 接下来需要设置 Anaconda 仓库镜像,因为默认连接的是国外镜像地址,下载速度比较慢,我们把镜像地址改为清华大学开源软件镜像站,A
反片语 (Ananagrams,UVa 156)
题目描述: 1 #include <iostream>
2 #include <string>
3 #include <cctype>
4 #include <vector>
5 #include <map>
6 #include <algorithm>
7 using namespace std;
8
9 map<string,int> msi ;
10 vector<string> words ;
11 string re(string &s){
HTTPS协议,SSL协议及完整交互过程
文章转自 https://blog.csdn.net/dfsaggsd/article/details/50910999 SSL 1. 安全套接字(Secure Socket Layer,SSL)协议是Web浏览器与Web服务器之间安全交换信息的协议。 2. SSL协议的三个特性 Ø 保密:在握手协议中定义了会话密钥后,所有的消息都被加密。 Ø 鉴别:可选的客户端认证,和强制的服务器端认证。 Ø 完整性:传送的消息包括消息完整性检查(使用MAC)。 3. SSL的位置 HTTPS 1. HTT
1788:Pell数列
总时间限制: 3000ms 内存限制: 65536kB 描述 Pell数列a1, a2, a3, ...的定义是这样的,a1 = 1, a2 = 2, ... , an = 2 * an − 1 + an - 2 (n > 2)。 给出一个正整数k,要求Pell数列的第k项模上32767是多少。 输入 第1行是测试数据的组数n,后面跟着n行输入。每组测试数据占1行,包括一个正整数k (1 ≤ k < 1000000)。 输出 n行,每行输出对应一个输入。输出应是一个非负整数。 样例输入 2
1
今日推荐
周排行