Ubuntu 16.04无法连接ssh服务解决方法

  • Post author:
  • Post category:其他

我使用的是Ubuntu16.0.4LTS系统,第一次安装完成以后远程连接SSH服务不成功,所用远程连接客户端是MobaXterm,大家也可用其他的类似客户端,第一次连接报Access denied。 解决方法如下: 1、先试着开启SSH服务 在使用SSH之前,可以先检查SSH服务有没有开启。使用命令: sudo ps -e | grep ssh 来查看,如果返回的结果是“xxxx? 00:00:0…

继续阅读 Ubuntu 16.04无法连接ssh服务解决方法

beego实现跨域

  • Post author:
  • Post category:其他

使用路由过滤器实现跨域访问 /routers/router.go 的init方法中添加过滤器 beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{ //允许访问所有源 AllowAllOrigins: true, //可选参数"GET", "POST", "PUT", "DELETE", "OPTIONS…

继续阅读 beego实现跨域

python使用装饰器会改变被装饰函数的函数名,如何去解决

  • Post author:
  • Post category:python

import functools # 使用自定义装饰器会改变被装饰的函数的函数名,解决方法: # 第一种 import functools  @functoool.wraps(func) # 第二种 cell_fun.__name__ = func.__name__ def set_fun(func): # @functools.wraps(func) def cell_fun(): print(…

继续阅读 python使用装饰器会改变被装饰函数的函数名,如何去解决

3DES支持PKCS7Padding补码方式

  • Post author:
  • Post category:其他

package com.topnet.utils; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Hex; import org.bouncycastle.jce.pro…

继续阅读 3DES支持PKCS7Padding补码方式

又是.equals方法但不是String

  • Post author:
  • Post category:其他

Integer c = 3; Integer d = 3; Integer e = 321; Integer f = 321; System.out.println(c == d); System.out.println(e == f); 输出 true false Integer为对象判断是否相等还是使用equals最靠谱, int为基本类型,判断是否相等就是可以使用==. 其中的原因: sta…

继续阅读 又是.equals方法但不是String

html5中必填项设置

  • Post author:
  • Post category:其他

required:在任何输入元素中都可以用到 <input  type="text" id="name" required> 如果没有填写,会提示“请填写此字段”,元素提交不了 版权声明:本文为liqy1991原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。原文链接:https://blog.csdn.net/liqy1991/article/det…

继续阅读 html5中必填项设置

LAYOUT SHOW

  • Post author:
  • Post category:其他

android:layout_above 将该控件的底部至于给定ID的控件之上 android:layout_below 将该控件的顶部至于给定ID的控件之下 android:layout_toLeftOf 将该控件的右边缘和给定ID的控件的左边缘对齐 android:layout_toRightOf 将该控件的左边缘和给定ID的控件的右边缘对齐 android:layout_alignBasel…

继续阅读 LAYOUT SHOW

Beautifulsoup在网页爬虫中的简单使用

  • Post author:
  • Post category:其他

1、安装模块 目前Beautiful Soup的最新版本是4.x,之前的版本已经停止开发了,所以这里推荐使用beautifulsoup4。 pip3 install beautifulsoup4 2、安装beautifulsoup解析器 Beautiful Soup的HTML和XML解析器是依赖于lxml库的,所以在使用之前先安装lxml库,推荐使用lxml作为解析器,因为效率更高。 pip3 i…

继续阅读 Beautifulsoup在网页爬虫中的简单使用

echarts地图禁止点击事件以及鼠标默认事件

  • Post author:
  • Post category:其他

echarts怎么禁止地图点击和鼠标默认事件 在series里边把silent改为true,默认是false触发点击事件和默认事件 series:[ { type:'map', silent:true, } ] ecahrts地图配置官方文档 版权声明:本文为T_221原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。原文链接:https://blog.csdn.…

继续阅读 echarts地图禁止点击事件以及鼠标默认事件

【Educoder实训平台作业】※网页抓取及信息提取

  • Post author:
  • Post category:其他

第1关:数据获取—分数线目录页 # -*- coding: utf-8 -*- import urllib.request as req import os import hashlib # 国防科技大学本科招生信息网中录取分数目录页URL: url = 'https://www.nudt.edu.cn/bkzs/xxgk/lqfs/index.htm' def step1(): # 请按下面的注…

继续阅读 【Educoder实训平台作业】※网页抓取及信息提取