pic

@ sign in C variable declaration

[亡魂溺海] 提交于 2019-11-27 04:32:32
问题 I found this header file for PIC microcontrollers by the name of pic1250.h and I'm unable to get the hang of some syntax used in it. The source for the file is: /* * Header file for the Microchip * PIC 12c508 chip * PIC 12c509 chip * Baseline Microcontrollers */ static volatile unsigned char RTCC @ 0x01; static volatile unsigned char TMR0 @ 0x01; static volatile unsigned char PCL @ 0x02; static volatile unsigned char STATUS @ 0x03; static unsigned char FSR @ 0x04; static volatile unsigned

Lucene小结

喜你入骨 提交于 2019-11-27 03:56:49
1.Lucene是什么 Lucene是apache下的一个开源的全文检索引擎工具包。 2.什么是全文检索 全文检索就是先分词创建索引,再执行搜索的过程。 3.什么是分词 就是将一段文字分成一个个单词 4.Lucene实现全文检索的流程 全文检索的流程分为两大部分:索引流程、搜索流程。 索引流程 :采集数据--->构建文档对象--->创建索引(将文档写入索引库)。 搜索流程 :创建查询--->执行搜索--->渲染搜索结果。 5.代码 5.1项目结构 5.2BookDao代码 1 package cn.hc.dao; 2 3 import cn.hc.pojo.Book; 4 import cn.hc.util.GetConn; 5 import org.apache.lucene.document.*; 6 7 import java.sql.Connection; 8 import java.sql.ResultSet; 9 import java.sql.SQLException; 10 import java.sql.Statement; 11 import java.util.ArrayList; 12 import java.util.List; 13 14 public class BookDao { 15 16 public List<Book> queryAll(){

爬取妹子图

旧时模样 提交于 2019-11-26 20:28:50
本文转自 https://blog.csdn.net/baidu_35085676/article/details/68958267 文中的代码,我自己跑了一遍,主要的解析的方式用的是 BeautifulSoup 但是代码跑起来可能会出现一些问题 TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 个人 觉得应该是网站的反爬虫机制的问题,可以尝试一下,变换ip地址。 1 import requests 2 from bs4 import BeautifulSoup 3 import os 4 import time 5 6 all_url = 'http://www.mzitu.com' 7 #http请求头 8 Hostreferer = { 9 'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 10 'Referer': 'http://www.mzitu.com' 11 } 12 Picreferer = { 13 'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 14 'Referer': 'http://i.meizitu

Monitoring Juniper SRX Firewall CPU, Memory and Flow Session Information from PRTG

泄露秘密 提交于 2019-11-26 16:16:28
While using PRTG to monitor our firewalls, we found by default it could not poll Juniper SRX’s CPU and flow information with auto discovery method. From command line, we are able to use following SNMP Mib to get CPU, Memory and Flow Session information, but not directly from PRTG. PRTG is powerful network monitoring tools for enterprise with following features I likes : Easy to deployment, as it said it can be installed in 2 minutes Auto discovery methods to find monitoring elements. Support distribution implementation. You could install agents it in multiple location. Support Multiple

Prim(生成最小树)

我的梦境 提交于 2019-11-26 16:02:17
步骤 ( 0 )选定图中的任意一个顶点 v0 ,从 v0 开始生成最小生成树。 ( 1 )初始化 dist [v0]=0 ,其他点的距离值 dist [ i ]=∞ 。其中 dist [ i ] 表示不在集合 X 中的点到 X 中的点的距离值。 ( 2 )经过 N 次如下步骤操作,最后得到一棵含 N 个顶点, N-1 条边 的最小生成树: ①选择一个 未标记的点 k ,并且 dist [k] 的值是最小的 ②标记点 k 进入集合 X ③ 以 k 为中间点, 修改未标记点 j ,即 X 外的点到 X 的距离值 ( 3 )得到最小生成树 T 。 ///O(|V|^2) V点数 #include<algorithm> #include<cstdio> using namespace std; const int N=5e3+5; const int INF=0x3f3f3f3f; int dis[N]; int pic[N][N]; bool book[N]; int V; //节点数 int prim() { for (int i=1;i<=V;i++) { dis[i]=INF; book[i]=false; } dis[1]=0; int res=0; while (1) { int v=-1; for (int u=1;u<=V;u++) { if (!book[u]&&(v==

百度图片抓取

烈酒焚心 提交于 2019-11-26 11:55:55
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 11/23/2019 4:06 PM # @Author : DeltaT # @File : 百度图片爬虫.py """爬虫下载百度图片""" import re import os import urllib import requests search_kw = input('请输入需要下载图片种类: ') begin_page_num = 0 # 请求次数 end_page_num = 30 # 每页编号的增加值 page_num = 1 # 爬取的最大页数 all_pic_urls = list() # 保存所有url # 循环抓取每一页的图片地址 while True: if begin_page_num > page_num: break print("第{}次发送请求".format(begin_page_num + 1)) current_page_num = (begin_page_num - 1) * end_page_num # 计算页面url所需要的参数, 根据该参数拼凑url进行翻页 search_kw = urllib.parse.quote(search_kw, safe='/') url_begin = "http://image

Android Retrofit+RXJava的使用

笑着哭i 提交于 2019-11-26 10:19:56
Retrofit+RXJava Retrofit 和 RXJava 分别是什么就不一个个的介绍了,都是我们现在常用的最受欢迎的.当然,现在常用的也是将 Retrofit与RXJava 结合起来,下面就是我将两者最简单的结合 首先第一步我们添加依赖和添加网络权限 //RXJava implementation 'io.reactivex.rxjava2:rxjava:2.2.6' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' //Retrofit implementation 'com.squareup.retrofit2:retrofit:2.4.0' //Gson converter implementation 'com.squareup.retrofit2:converter-gson:2.4.0' //RxJava2 Adapter implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0" //http implementation 'com.squareup.okhttp3:okhttp:3.4.1' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1' /