azkaban二次开发

springboot封装azkaban的api,提供可调用azkaban任务流的接口

流程如下:
springboot接口->azkaban api->azkaban project(flow tasks)->shell脚本->spark tasks

Api测试

curl -k -X POST --data "action=login&username=azkaban&password=azkaban" https://192.168.33.162:8443
{"session.id" : "2b0a77ee-ee93-4d31-a188-8bcc89bacdb2","status" : "success"
}curl -k -X POST --data "session.id=2b0a77ee-ee93-4d31-a188-8bcc89bacdb2&ajax=executeFlow&project=iot&flow=iot&flowOverride[buiz]=iot_ads_use_x_hour&flowOverride[projects]=120100lae&flowOverride[meterKind]=1&flowOverride[meterCode]='xxx'&flowOverride[dt]=2021-11-16&flowOverride[archive_suffix]=''" https://192.168.33.162:8443/executor
{"project" : "iot","message" : "Execution queued successfully with exec id 7975","flow" : "iot","execid" : 7975
}curl -k --data "session.id=2b0a77ee-ee93-4d31-a188-8bcc89bacdb2&ajax=fetchexecflow&execid=5559" https://192.168.33.162:8443/executor
{"project" : "iot","updateTime" : 1637132885051,"type" : null,"attempt" : 0,"execid" : 5559,"submitTime" : 1637132859558,"nodes" : [ {"nestedId" : "iot_main","startTime" : 1637132859661,"updateTime" : 1637132884986,"id" : "iot_main","endTime" : 1637132884914,"type" : "command","attempt" : 0,"status" : "FAILED"} ],"nestedId" : "iot","submitUser" : "azkaban","startTime" : 1637132859655,"id" : "iot","endTime" : 1637132885046,"projectId" : 17,"flowId" : "iot","flow" : "iot","status" : "FAILED"
}curl -k --data "session.id=2b0a77ee-ee93-4d31-a188-8bcc89bacdb2&ajax=fetchExecJobLogs&execid=5559&jobId=iot_main&offset=0&length=10000" https://192.168.33.162:8443/executor
{"length" : 0,"offset" : 0,"data" : ""
}

FlowJobProcess

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import okhttp3.*;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action1;
import rx.functions.Func1;import javax.net.ssl.*;
import java.io.IOException;
import java.security.cert.CertificateException;/*** curl -k -X POST --data "action=login&username=azkaban&password=azkaban" https://192.168.0.162:8443* curl -k -X POST --data "session.id=78d1374e-3b0e-445b-9a71-302cffa05f98&ajax=executeFlow&project=iot&flow=iot&flowOverride[buiz]=iot_ads_use_x_hour&flowOverride[projects]=120100lae&flowOverride[meterKind]=1&flowOverride[meterCode]='xxx'&flowOverride[dt]=2021-11-16&flowOverride[archive_suffix]=''" https://192.168.0.162:8443/executor* curl -k --data "session.id=78d1374e-3b0e-445b-9a71-302cffa05f98&ajax=fetchexecflow&execid=5559" https://192.168.0.162:8443/executor* curl -k --data "session.id=78d1374e-3b0e-445b-9a71-302cffa05f98&ajax=fetchExecJobLogs&execid=5559&jobId=iot_main&offset=0&length=10000" https://192.168.0.162:8443/executor*/
public class FlowJobProcess {public static void main(String[] args) {Observable.create(new Observable.OnSubscribe<Response>() {@Overridepublic void call(Subscriber<? super Response> subscriber) {OkHttpClient okHttpClient = getUnsafeOkHttpClient();String url = "https://192.168.0.162:8443";RequestBody requestBody = new FormBody.Builder().add("action", "login").add("username", "azkaban").add("password", "azkaban").build();Request request = new Request.Builder().url(url).post(requestBody).build();Call call = okHttpClient.newCall(request);try {Response response = call.execute();subscriber.onNext(response);} catch (IOException e) {e.printStackTrace();}}}).map(new Func1<Response, String>() {@Overridepublic String call(Response response) {String result = null;try {result = response.body().string();} catch (IOException e) {e.printStackTrace();}System.out.println("授权成功:" + result);JSONObject jsonObject = JSON.parseObject(result);return jsonObject.getString("session.id");}}).flatMap(new Func1<String, Observable<String>>() {@Overridepublic Observable<String> call(String s) {System.out.println("sessionId:" + s);OkHttpClient okHttpClient = getUnsafeOkHttpClient();String url = "https://192.168.0.162:8443/executor";RequestBody requestBody = new FormBody.Builder().add("session.id", s).add("ajax", "executeFlow").add("project", "iot").add("flow", "iot").add("flowOverride[buiz]", "iot_ads_use_x_hour").add("flowOverride[projects]", "120100lae").add("flowOverride[meterKind]", "1").add("flowOverride[meterCode]", "xxx").add("flowOverride[dt]", "2021-12-02").add("flowOverride[archive_suffix]", "").build();Request request = new Request.Builder().url(url).post(requestBody).build();String result = "";Call call = okHttpClient.newCall(request);try {Response response = call.execute();result = response.body().string();System.out.println(result);} catch (IOException e) {e.printStackTrace();}return Observable.just(s + "@" + result);}}).subscribe(new Action1<String>() {@Overridepublic void call(String s) {String[] split = s.split("@");String sessionId = split[0];String result = split[1];/*** flow exec result:{*   "project" : "iot",*   "message" : "Execution queued successfully with exec id 5626",*   "flow" : "iot",*   "execid" : 5626* }*/System.out.println("sessionId is" + sessionId + " and flow exec result:" + result);}});}public static OkHttpClient getUnsafeOkHttpClient() {try {// Create a trust manager that does not validate certificate chainsfinal TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {@Overridepublic void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {}@Overridepublic void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {}@Overridepublic java.security.cert.X509Certificate[] getAcceptedIssuers() {return new java.security.cert.X509Certificate[]{};}}};// Install the all-trusting trust managerfinal SSLContext sslContext = SSLContext.getInstance("SSL");sslContext.init(null, trustAllCerts, new java.security.SecureRandom());// Create an ssl socket factory with our all-trusting managerfinal SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();OkHttpClient.Builder builder = new OkHttpClient.Builder();builder.sslSocketFactory(sslSocketFactory);builder.hostnameVerifier(new HostnameVerifier() {@Overridepublic boolean verify(String hostname, SSLSession session) {return true;}});return builder.build();} catch (Exception e) {throw new RuntimeException(e);}}
}

下面的web项目只是spark任务启动前的前置任务:利用接口删除数据

es数据Dao

import com.mysql.jdbc.StringUtils;
import lombok.SneakyThrows;
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.GetAliasesResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.cluster.metadata.AliasMetaData;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;import java.io.IOException;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;/*** 针对某个索引,在dt内,基于设备编码删除数据*/
@Repository
public class IndexHandler {@AutowiredRestHighLevelClient esClient;public void getAllIndexes() throws IOException {GetAliasesRequest getAliasesRequest = new GetAliasesRequest();GetAliasesResponse alias = esClient.indices().getAlias(getAliasesRequest, RequestOptions.DEFAULT);Map<String, Set<AliasMetaData>> aliases = alias.getAliases();Set<String> indices = aliases.keySet();indices.forEach(new Consumer<String>() {@Overridepublic void accept(String s) {System.out.println("index:" + s);}});}public SearchResponse search(String dt, String meterKind, String meterCode) throws IOException {String index = "";switch (meterKind) {case "0":index = "ads_iot_electricity_index2";break;case "1":index = "ads_iot_water_index";break;}if (StringUtils.isNullOrEmpty(index)) {throw new IllegalArgumentException("es index is not matched!!!");}System.out.println("index:" + index);BoolQueryBuilder must = QueryBuilders.boolQuery().must(QueryBuilders.matchQuery("dt", dt));String meterCodeAlas = "equipmentNo";if (!StringUtils.isNullOrEmpty(meterCode)) {must.must(QueryBuilders.matchQuery(meterCodeAlas, meterCode));}System.out.println("must:" + must.toString());//查询apiSearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();searchSourceBuilder.query(must);SearchRequest searchRequest = new SearchRequest();searchRequest.indices(index.split(","));searchRequest.source(searchSourceBuilder);return esClient.search(searchRequest, RequestOptions.DEFAULT);}@SneakyThrowspublic BulkByScrollResponse deleteByQuery(String dt, String meterKind, String meterCode) {String index = "";switch (meterKind) {case "0":index = "ads_iot_electricity_index2";break;case "1":index = "ads_iot_water_index";break;}if (StringUtils.isNullOrEmpty(index)) {throw new IllegalArgumentException("es index is not matched!!!");}BoolQueryBuilder must = QueryBuilders.boolQuery().must(QueryBuilders.matchQuery("dt", dt))//注意旧索引没有meterKind
//                .must(QueryBuilders.matchQuery("meterKind", meterKind)).must(QueryBuilders.matchQuery("equipmentNo", meterCode));System.out.println("must:" + must.toString());DeleteByQueryRequest request = new DeleteByQueryRequest();request.setQuery(must);request.indices(index);request.setConflicts("proceed");request.setTimeout(String.valueOf(TimeValue.timeValueMinutes(5)));request.setRefresh(true);request.setQuery(must);BulkByScrollResponse bulkByScrollResponse = esClient.deleteByQuery(request, RequestOptions.DEFAULT);return bulkByScrollResponse;}}

IndexController

import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;import java.io.IOException;@Controller
@ResponseBody
public class IndexController {@AutowiredIndexHandler indexHandler;@GetMapping("/search/{dt}/{meterKind}")public R search(@PathVariable("dt") String dt, @PathVariable("meterKind") String meterKind) throws IOException {return search(dt, meterKind, null);}@GetMapping("/search/{dt}/{meterKind}/{meterCode}")public R search(@PathVariable("dt") String dt, @PathVariable("meterKind") String meterKind, @Nullable @PathVariable("meterCode") String meterCode) throws IOException {if ("yyyy-MM-dd".length() != dt.length()) {throw new IllegalArgumentException("dt格式必须为yyyy-MM-dd");}System.out.println("dt:" + dt);SearchResponse response = indexHandler.search(dt, meterKind, meterCode);RestStatus status = response.status();System.out.println("status:" + status);if (status == RestStatus.OK) {SearchHits hits = response.getHits();SearchHit[] searchHits = hits.getHits();for (SearchHit hit : searchHits) {// do something with the SearchHitString sourceAsString = hit.getSourceAsString();System.out.println("hits:" + sourceAsString);}return R.ok().put("data", searchHits);} else {return R.error(-1, "not ok").put("data", response.status());}}/*** Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]*///@DeleteMapping("/delete/{dt}/{meterKind}/{meterCode}")@RequestMapping(value = "/delete/{dt}/{meterKind}/{meterCode}", method = RequestMethod.GET)public R deleteByQuery(@PathVariable("dt") String dt, @PathVariable("meterKind") String meterKind, @PathVariable("meterCode") String meterCode) {System.out.println("dt:" + dt);if ("yyyy-MM-dd".length() != dt.length()) {throw new IllegalArgumentException("dt格式必须为yyyy-MM-dd");}BulkByScrollResponse response = indexHandler.deleteByQuery(dt, meterKind, meterCode);System.out.println("delete response:" + response);return R.ok().put("data", response);}
}

EsConfig

import lombok.Data;
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;/*** 配置绑定*/
@Data
@Configuration
@ConfigurationProperties(prefix = "es")
public class EsConfig {/*** Factory method 'esClient' threw exception;* nested exception is java.lang.IllegalArgumentException: Host name may not be null*/private String host;private int port;@Beanpublic RestHighLevelClient esClient() {return new RestHighLevelClient(RestClient.builder(new HttpHost(host, port, "http")));}}

R

import org.apache.http.HttpStatus;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R<T> extends HashMap<String, Object> {private static final long serialVersionUID = 1L;private T data;public T getData() {return data;}public void setData(T data) {this.data = data;}public R() {put("code", 200);put("msg", "success");}public static R error() {return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");}public static R error(String msg) {return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}

Main

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;@SpringBootApplication(scanBasePackages = "com.xx.yy", exclude = {DataSourceAutoConfiguration.class})
public class Main {public static void main(String[] args) {SpringApplication.run(Main.class, args);}
}

TestData

import com.mz.iot.dao.IndexHandler;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;@SpringBootTest
public class TestData {//    @Autowired
//    JdbcTemplate template;@AutowiredIndexHandler indexHandler;@AutowiredRestHighLevelClient esClient;@Testvoid testGetAllIndexes() throws IOException {indexHandler.getAllIndexes();}@Testvoid testEsClient() {System.out.println("esClient:" + esClient);}@Testvoid testDelete() {BulkByScrollResponse bulkByScrollResponse = indexHandler.deleteByQuery("2021-12-23", "1", "CACVHNM61U62");System.out.println("test delete response:" + bulkByScrollResponse);}@Testvoid testSearch() throws IOException {SearchResponse response = indexHandler.search("2021-12-23", "1", "CACVHNM61U62");System.out.println("test search response:" + response);SearchHits hits = response.getHits();SearchHit[] searchHits = hits.getHits();for (SearchHit hit : searchHits) {// do something with the SearchHitString sourceAsString = hit.getSourceAsString();System.out.println("hits:" + sourceAsString);}}
}

application.propertis

server.port=8888
server.tomcat.accesslog.encoding=utf-8
debug=false
my.car.brand=byd
my.car.price=9999.98
#Consider the following:
#If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
#If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
spring.profiles.active=test
spring.mvc.hiddenmethod.filter.enabled=true

application-test.yml

spring:datasource:url: jdbc:mysql://192.168.33.169:3306/paascloud_wfsusername: mzadminpassword: Mz@123456driver-class-name: com.mysql.jdbc.Driverjdbc:template:query-timeout: 30data:elasticsearch:client:reactive:endpoints: 191.168.33.163:9200application:name: cupon
es:host: 192.168.33.163port: 9200
my:car:brand: bwm

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.3.4.RELEASE</version><relativePath/></parent><artifactId>iot_web</artifactId><modelVersion>4.0.0</modelVersion><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target><!--覆盖父工程spring-boot-starter-parent中定义的依赖版本--><elasticsearch.version>6.5.4</elasticsearch.version><lombok.version>1.18.18</lombok.version><mysql.version>5.1.48</mysql.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jdbc</artifactId></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency><dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><scope>provided</scope></dependency><dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>4.9.1</version></dependency><dependency><groupId>io.reactivex</groupId><artifactId>rxjava</artifactId><version>1.3.0</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.75</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId><optional>true</optional></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><excludes><exclude><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId></exclude></excludes></configuration></plugin></plugins></build>
</project>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/150760.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

yolo系列模型训练数据集全流程制作方法(附数据增强代码)

yolo系列的模型在目标检测领域里面受众非常广&#xff0c;也十分流行&#xff0c;但是在使用yolo进行目标检测训练的时候&#xff0c;往往要将VOC格式的数据集转化为yolo专属的数据集&#xff0c;而yolo的训练数据集制作方法呢&#xff0c;最常见的也是有两种&#xff0c;下面我…

开源与闭源:大模型发展的双重走向

目录 前言开源和闭源的优劣势比较开源的优势闭源的优势 开源和闭源对大模型技术发展的影响对技术发展的影响对数据共享的影响对业务拓展的影响 开源与闭源的商业模式比较开源的商业模式闭源的商业模式 处在大模型洪流中&#xff0c;向何处去&#xff1f;结语 前言 随着人工智能…

YoloV8改进策略:动态蛇形卷积,解决管状结构问题

文章目录 摘要论文《DSCNet:基于拓扑几何约束的动态蛇形卷积管状结构分割》1、简介2、相关研究2.1、基于网络设计的方法2.2、基于特征融合的方法2.3、基于损失函数的方法3、方法3.1、动态蛇形卷积(Dynamic Snake Convolution)3.2、多视图特征融合策略3.3、拓扑连续性约束损失…

C++11 模板参数包(Parameter pack)

做个小笔记 Template parameter pack&#xff08;模板参数包&#xff09;是C中用于接受零个或多个模板参数的一种机制。 语法&#xff1a;typename|class... pack-name 示例&#xff1a;模板参数只有一个参数包的情况 这个例子演示了一个可变参数的类模板&#xff08;variad…

python利用matplotlib画实验图

import matplotlib.pyplot as plt import seaborn as sns import numpy as np from matplotlib.font_manager import FontProperties#coding:utf-8 # plt.rcParams[font.sans-serif] [SimHei] #用来正常显示中文标签 # plt.rcParams[axes.unicode_minus] False #用来正常显示…

中国智能音箱市场销量下降,百度稳居第一 /中国即评出10个大模型创新案例 |魔法半周报

我有魔法✨为你劈开信息大海❗ 高效获取AIGC的热门事件&#x1f525;&#xff0c;更新AIGC的最新动态&#xff0c;生成相应的魔法简报&#xff0c;节省阅读时间&#x1f47b; 中国智能音箱市场销量下降&#xff0c;百度稳居第一 中国即将评选出10个最具代表性的大模型创新案例…

【Typroa使用】Typroa+PicGo-Core(command line)+gitee免费图片上传配置

TyproaPicGo-Core(command line)gitee免费图片上传配置 本文是在win10系统下配置typroapicGo-Core(command line)gitee图片上传的教程。需要的环境和工具有&#xff1a; gitee账号&#xff0c;新建仓库及token令牌&#xff1b;已经安装了的typroa&#xff0c;需要0.9.98版本以上…

2023最全的性能测试种类介绍,这6个种类特别重要!

系统的性能是一个很大的概念&#xff0c;覆盖面非常广泛&#xff0c;包括执行效率、资源占用、系统稳定性、安全性、兼容性、可靠性、可扩展性等&#xff0c;性能测试就是描述测试对象与性能相关的特征并对其进行评价而实施的一类测试。 性能测试是一个统称&#xff0c;它其实包…

Ubuntu22上安装cuda-12-3

说明 最近在运行通义千问模型的的时候&#xff0c;报错&#xff0c;提示使用Ubuntu22.04默认的cuda11.5不支持&#xff0c;之前是使用apt安装的&#xff0c;版本比较老。 CUDA官网下载&#xff1a;https://developer.nvidia.com/downloads 安装步骤 安装支持Ubuntu22的源 …

大数据Doris(二十五):Stream Load数据导入演示和其他导入案例

文章目录 数据导入演示和其他导入案例 一、数据导入演示

【Leetcode合集】9. 回文数

9. 回文数 9. 回文数 代码仓库地址&#xff1a; https://github.com/slience-me/Leetcode 个人博客 &#xff1a;https://slienceme.xyz 给你一个整数 x &#xff0c;如果 x 是一个回文整数&#xff0c;返回 true &#xff1b;否则&#xff0c;返回 false 。 回文数是指正序…

【Web】Ctfshow SSRF刷题记录1

核心代码解读 <?php $url$_POST[url]; $chcurl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $resultcurl_exec($ch); curl_close($ch); ?> curl_init()&#xff1a;初始curl会话 curl_setopt()&#xff1a;会…

水质测定仪的优势特点有哪些?

水质测定仪&#xff1a;水环境保护的得力助手 随着人们环保意识的不断提高&#xff0c;水质问题逐渐引起了大家的关注。为了保护水环境&#xff0c;必须加强对污水排放的监测&#xff0c;而水质测定仪在这个过程中扮演着重要的角色。 水质测定仪是一种专业的仪表&#xff0c;主…

旋极携手西班牙SoC-e公司,为中国客户提供高效可靠TSN通讯解决方案

2023年2月&#xff0c;旋极信息与西班牙SoC-e公司正式签订战略合作协议&#xff0c;成为其在中国区重要合作伙伴。 SoC-e是一家世界领先的基于FPGA技术的以太网通讯解决方案供应商&#xff0c;是一系列IP核开发领域的先锋&#xff0c;为关键任务实施网络化、同步性和安全性提供…

如何使用贝锐花生壳内网穿透远程访问JupyterNotebook?

在数据科学领域&#xff0c;Jupyter Notebook 已成为处理数据的必备工具。 其用途包括数据清理和探索、可视化、机器学习和大数据分析。Jupyter Notebook的安装非常简单&#xff0c;如果你是小白&#xff0c;那么建议你通过安装Anaconda来解决Jupyter Notebook的安装问题&#…

【23真题】超难985!做完感觉没学过!

本套试卷难度分析&#xff1a;22年西北工业大学827考研真题&#xff0c;我也发布过&#xff0c;若有需要&#xff0c;戳这里自取&#xff01;本套试题内容有难度&#xff0c;题目考察全为大题&#xff0c;题目不多&#xff01;但是题目都很新颖&#xff0c;状态方程的题目考察较…

Qt给控件添加图片

双击qrc文件&#xff0c;选择下面的addFiles&#xff0c;将图片添加进来&#xff0c;然后选中图片右键Select All 设置控件字符&#xff1a; ui.btnSet->setText(""); 设置资源&#xff1a; ui.btnSet->setStyleSheet("QPushButton{background-image:…

7.BeanFactory的作用

BeanFactory的作用 BeanFactory是Spring中非常核心的一个顶层接口;它是Bean的“工厂”、它的主要职责就是生产Bean;它实现了简单工厂的设计模式,通过调用getBean传入标识生产一个Bean;它有非常多的实现类、每个工厂都有不同的职责(单一职责)功能,最强大的工厂是:Defaul…

CMSIS-RTOS在stm32使用

目录&#xff1a; 一、安装和配置CMSIS_RTOS.1.打开KEIL工程&#xff0c;点击MANAGE RUN-TIME Environment图标。2.勾选CMSIS CORE和RTX.3.配置RTOS 时钟频率、任务栈大小和数量&#xff0c; 软件定时器. 二、CMSIS_RTOS内核启动和创建线程。1.包含头文件。2.内核初始化和启动。…