不同语言采集【淘宝1688拼多多API】平台数据的方式

news2024/11/25 15:54:37

首先我们以taobao商品页面采集商品详情数据为例:

请求方式:HTTPS  POST  GET

请求地址:API接口

请求参数

请求参数:num_iid=669646899650&is_promotion=1

参数说明:num_iid:淘宝商品ID
is_promotion:是否获取取促销价

请求示例

Curl 

	
-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.onebound.cn/1688/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=610947572360"

PHP 

<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/1688/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=610947572360";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>

Java 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.PrintWriter;
import java.net.URLConnection;

public class Example {
	private static String readAll(Reader rd) throws IOException {
		StringBuilder sb = new StringBuilder();
		int cp;
		while ((cp = rd.read()) != -1) {
			sb.append((char) cp);
		}
		return  sb.toString();
	}
	public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		conn.setDoOutput(true);
		conn.setDoInput(true);
		PrintWriter out = new PrintWriter(conn.getOutputStream());
		out.print(body);
		out.flush();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static void main(String[] args) throws IOException, JSONException {
		// 请求示例 url 默认请求参数已经URL编码处理
		String url = "https://api-gw.onebound.cn/1688/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=610947572360";
		JSONObject json = getRequestFromUrl(url);
		System.out.println(json.toString());
	}

}

响应示例

{
	"item": {
		"num_iid": "669646899650",
		"title": "大码法式复古温柔风连衣裙长款夏季胖妹妹甜美蝴蝶结泡泡袖仙女裙",
		"desc_short": "",
		"price": "39",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "69.00",
		"nick": "流婉菲旗舰店",
		"num": "200",
		"min_num": 0,
		"detail_url": "https://item.taobao.com/item.htm?id=669646899650",
		"pic_url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01CGgYpe1jGCymUQJ7I_!!4140484520-0-lubanu-s.jpg",
		"brand": "流婉菲",
		"brandId": "2387753389",
		"rootCatId": "50010404",
		"cid": "50001248",
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "<img src=\"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01XLLJfW1jGCnojRRyn_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i4/4140484520/O1CN012FfedL1jGCniNgnCI_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01sIMmZv1jGCymUTzwl_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01ymMJc11jGCymxBw5k_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01mkchrW1jGCyu7xoFS_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01uFpZrJ1jGCyfvvAES_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01e8Rrz91jGCyu7vnVZ_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01qRDhw71jGCyoHLpHO_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i1/4140484520/O1CN01kOJt4x1jGCymxDD6g_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01GknYgb1jGCyiDb275_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01hWZlXt1jGCymUVPEu_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01jFIO4H1jGCykfatfx_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01scJc0S1jGCyiDbhhp_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i1/4140484520/O1CN01ROrw4L1jGCykYj3YJ_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01hKaAlQ1jGCyrILsZy_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01ohNT8W1jGCymUUXEH_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01pO2KTZ1jGCyhU1D3t_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01EugTgW1jGCypDFuML_!!4140484520.jpg\"/><img src=\"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01cDY2YB1jGCytI4agJ_!!4140484520.jpg\"/><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-1.64afad72984e9&p=3702633587&k=i_key&t=1689234805\" style=\"display:none\" />",
		"desc_img": [
			"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01XLLJfW1jGCnojRRyn_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i4/4140484520/O1CN012FfedL1jGCniNgnCI_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01sIMmZv1jGCymUTzwl_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01ymMJc11jGCymxBw5k_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01mkchrW1jGCyu7xoFS_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01uFpZrJ1jGCyfvvAES_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01e8Rrz91jGCyu7vnVZ_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01qRDhw71jGCyoHLpHO_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i1/4140484520/O1CN01kOJt4x1jGCymxDD6g_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01GknYgb1jGCyiDb275_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01hWZlXt1jGCymUVPEu_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01jFIO4H1jGCykfatfx_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i4/4140484520/O1CN01scJc0S1jGCyiDbhhp_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i1/4140484520/O1CN01ROrw4L1jGCykYj3YJ_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01hKaAlQ1jGCyrILsZy_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01ohNT8W1jGCymUUXEH_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01pO2KTZ1jGCyhU1D3t_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i3/4140484520/O1CN01EugTgW1jGCypDFuML_!!4140484520.jpg",
			"https://img.alicdn.com/imgextra/i2/4140484520/O1CN01cDY2YB1jGCytI4agJ_!!4140484520.jpg"
		],
		"item_imgs": [
			{
				"url": "https://img.alicdn.com/imgextra/i2/4140484520/O1CN01CGgYpe1jGCymUQJ7I_!!4140484520-0-lubanu-s.jpg"
			},
			{
				"url": "https://img.alicdn.com/imgextra/i2/4140484520/O1CN01bi1AWG1jGCykfaQNb_!!4140484520-0-lubanu-s.jpg"
			},
			{
				"url": "https://img.alicdn.com/imgextra/i4/4140484520/O1CN01XN6Ku11jGCyiDY52p_!!4140484520-0-lubanu-s.jpg"
			},
			{
				"url": "https://img.alicdn.com/imgextra/i1/4140484520/O1CN01U8knGU1jGCys4Jw7I_!!4140484520-0-lubanu-s.jpg"
			},
			{
				"url": "https://img.alicdn.com/imgextra/i1/4140484520/O1CN01VpVOLH1jGCyiDXCzw_!!4140484520-0-lubanu-s.jpg"
			}
		],
		"item_weight": "",
		"item_size": "",
		"location": "广东广州",
		"post_fee": 0,
		"express_fee": null,
		"ems_fee": "",
		"shipping_to": "",
		"has_discount": "true",
		"video": {
			"url": null
		},
		"is_virtual": "",
		"sample_id": "",
		"is_promotion": "true",
		"props_name": "1627207:3232481:颜色分类:杏色S;1627207:90554:颜色分类:杏色M;1627207:28332:颜色分类:杏色L;1627207:30156:颜色分类:杏色XL;1627207:60092:颜色分类:杏色2XL;1627207:3232482:颜色分类:白色S;1627207:3232478:颜色分类:白色M;1627207:3232479:颜色分类:白色L;1627207:28340:颜色分类:白色XL;1627207:28320:颜色分类:白色2XL",
		"prop_imgs": {
			"prop_img": [
				{
					"properties": "1627207:3232481",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:90554",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28332",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:30156",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:60092",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232482",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232478",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232479",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28340",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28320",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				}
			]
		},
		"property_alias": "",
		"props": [
			{
				"name": "品牌",
				"value": "流婉菲"
			},
			{
				"name": "颜色分类",
				"value": "杏色S 杏色M 杏色L 杏色XL 杏色2XL 白色S 白色M 白色L 白色XL 白色2XL"
			},
			{
				"name": "上市时间",
				"value": "2022年夏季"
			},
			{
				"name": "货号",
				"value": "02028"
			}
		],
		"total_sold": "77",
		"skus": {
			"sku": [
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:3232481",
					"properties_name": "1627207:3232481:颜色分类:杏色S",
					"quantity": "200",
					"sku_id": "4859708472517"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:90554",
					"properties_name": "1627207:90554:颜色分类:杏色M",
					"quantity": "200",
					"sku_id": "4859708472520"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:28332",
					"properties_name": "1627207:28332:颜色分类:杏色L",
					"quantity": "200",
					"sku_id": "4859708472514"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:30156",
					"properties_name": "1627207:30156:颜色分类:杏色XL",
					"quantity": "200",
					"sku_id": "4859708472516"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:60092",
					"properties_name": "1627207:60092:颜色分类:杏色2XL",
					"quantity": "200",
					"sku_id": "4859708472519"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:3232482",
					"properties_name": "1627207:3232482:颜色分类:白色S",
					"quantity": "200",
					"sku_id": "4859708472518"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:3232478",
					"properties_name": "1627207:3232478:颜色分类:白色M",
					"quantity": "200",
					"sku_id": "4990394991054"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:3232479",
					"properties_name": "1627207:3232479:颜色分类:白色L",
					"quantity": "200",
					"sku_id": "4990394991055"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:28340",
					"properties_name": "1627207:28340:颜色分类:白色XL",
					"quantity": "200",
					"sku_id": "4859708472515"
				},
				{
					"price": "39",
					"total_price": 0,
					"orginal_price": "39",
					"properties": "1627207:28320",
					"properties_name": "1627207:28320:颜色分类:白色2XL",
					"quantity": "200",
					"sku_id": "4859708472513"
				}
			]
		},
		"seller_id": "4140484520",
		"sales": 94,
		"shop_id": "461815424",
		"props_list": {
			"1627207:3232481": "颜色分类:杏色S",
			"1627207:90554": "颜色分类:杏色M",
			"1627207:28332": "颜色分类:杏色L",
			"1627207:30156": "颜色分类:杏色XL",
			"1627207:60092": "颜色分类:杏色2XL",
			"1627207:3232482": "颜色分类:白色S",
			"1627207:3232478": "颜色分类:白色M",
			"1627207:3232479": "颜色分类:白色L",
			"1627207:28340": "颜色分类:白色XL",
			"1627207:28320": "颜色分类:白色2XL"
		},
		"seller_info": {
			"nick": "流婉菲旗舰店",
			"item_score": "4.6 ",
			"score_p": "4.7 ",
			"delivery_score": "4.7 ",
			"shop_type": "B",
			"user_num_id": "4140484520",
			"sid": "461815424",
			"title": "流婉菲旗舰店",
			"zhuy": "https://shop461815424.taobao.com/",
			"shop_name": "流婉菲旗舰店"
		},
		"tmall": true,
		"error": "",
		"warning": "",
		"url_log": [],
		"fav_count": "4260",
		"fans_count": "4.3万",
		"freight": "快递: 免运费",
		"props_imgs": {
			"prop_img": [
				{
					"properties": "1627207:3232481",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:90554",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28332",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:30156",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:60092",
					"url": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232482",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232478",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:3232479",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28340",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				},
				{
					"properties": "1627207:28320",
					"url": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
				}
			]
		},
		"_ddf": "xdl",
		"promo_type": null,
		"props_img": {
			"1627207:3232481": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg",
			"1627207:90554": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg",
			"1627207:28332": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg",
			"1627207:30156": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg",
			"1627207:60092": "//img.alicdn.com/imgextra/i4/4140484520/O1CN013RCqQS1jGCymx82im_!!4140484520.jpg",
			"1627207:3232482": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg",
			"1627207:3232478": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg",
			"1627207:3232479": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg",
			"1627207:28340": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg",
			"1627207:28320": "//img.alicdn.com/imgextra/i2/4140484520/O1CN01SCNBHm1jGCytHykh3_!!4140484520.jpg"
		},
		"format_check": "ok",
		"shop_item": [],
		"relate_items": []
	},
	"error": "",
	"secache": "02169582838adc0f9ff3a60f0d7b8d85",
	"secache_time": 1689234805,
	"secache_date": "2023-07-13 15:53:25",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},

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

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

相关文章

Space Saving算法

用于大数据中统计元素数量最多的元素的算法。 SpaceSaving算法是一种近似计数算法&#xff0c;它在大多数情况下能够提供准确的结果。然而&#xff0c;它并不是完全准确的&#xff0c;因为它使用了一些近似技巧来降低内存使用。具体来说&#xff0c;SpaceSaving算法通过牺牲一定…

基于STM32CUBEMX驱动TOF模块VL6180与VL6180X(4)----测量环境光

基于STM32CUBEMX驱动TOF模块VL6180与VL6180X----4.测量环境光 概述样品申请VL6180X传感器的测量流程ALS动态范围ALS动态范围测量流程光强计算公式配置vl6180x测试结果 概述 在本章中&#xff0c;我们将介绍如何配置VL6180X传感器以测量环境光&#xff0c;并获取环境光的强度值…

I.MX8MM系统构建 -- 2.linux内核编译烧录

准备源码 源码位置&#xff1a;/source/myir-imx-linux.tar.gz解压源码 tar zxf myir-imx-linux.tar.gz 编译 进入源码目录后&#xff0c;依次执行下列指令 myirmyir-server1:$ make distclean myirmyir-server1:$ make myd_imx8mm_defconfig myirmyir-server1:$ LDFLAG…

代码随想录刷题第53天|Leetcode1143最长公共子序列

1、Leetcode1143最长公共子序列 题目链接&#xff1a;1143最长公共子序列 本题不要求连续&#xff0c;求最长公共子序列。 1、确定dp数组及下标的含义 dp[i][j]&#xff1a;长度为[0, i - 1]的字符串text1与长度为[0, j - 1]的字符串text2的最长公共子序列为dp[i][j]。 2、…

volatile原理剖析和实例讲解

一、是什么 volatile是Java的一个关键字&#xff0c;是Java提供的一种轻量级的同步机制&#xff0c; 二、能做什么 保证了不同线程对这个变量进行操作时的可见性&#xff0c;有序性。 三、可见性 可见性主要是指一个线程修改了共享变量的值&#xff0c;另一个线程可以看见…

PreparedStatement 相比于 Statement的优点

PreparedStatement 相比于 Statement&#xff0c;有以下几个优点&#xff1a; 1. 预编译&#xff1a;PreparedStatement 对象在执行 SQL 语句之前会进行预编译&#xff0c;这意味着数据库管理系统可以提前解析和编译 SQL 语句&#xff0c;以优化执行计划&#xff0c;从而提高查…

【C语言初阶(15)】操作符1

文章目录 Ⅰ操作符的分类Ⅱ 算术操作符Ⅲ 移位操作符⒈左移操作符⒉右移操作符 Ⅳ 位操作符⒈按位取⒉按位与⒊按位异或⒋按位或⒌位操作符练习题 Ⅴ赋值操作符Ⅵ 单目操作符 Ⅰ操作符的分类 算术操作符移位操作符位操作符赋值操作符单目操作符关系操作符逻辑操作符条件操作符…

【ElasticSearch】ES集群搭建、监控、故障转移

文章目录 1、ES集群介绍2、搭建ES集群3、集群状态监控4、集群职责及脑裂5、分布式新增和查询流程6、ES故障转移 1、ES集群介绍 单机的ES做数据存储与搜索&#xff0c;必然面临两个问题&#xff1a; 海量数据存储问题单点故障问题 因此&#xff0c;考虑使用ES集群&#xff1a…

AIGC浪潮席卷,亚马逊云科技携手海尔设计、Nolibox加速工业设计转型

从机器学习算法到深度学习再到强化学习&#xff0c;AI创新浪潮奔流不息。而AIGC&#xff08;AI-generated Content&#xff0c;人工智能生成内容&#xff09;的到来&#xff0c;更是让AI成为众多企业的得力助手&#xff0c;开拓了文本、图像、音视频等领域的天花板。 在洞悉到…

x86架构ubuntu18下运行mgba模拟器

0. 环境 i7 ubuntu18 1. 准备源码 到https://github.com/mgba-emu/mgba/releases下载源码 mgba-0.10.2.tar.gz tar -zvxf mgba-0.10.2.tar.gz cd mgba0.10.2 2. 编译 mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX/home/xxjianvm/work/mgba-0.10.2/install .. make -j…

PROFINET转TCP/IP网关TCP/IP协议的含义是

大家好&#xff0c;今天要和大家分享一款自主研发的通讯网关&#xff0c;远创智控YC-PN-TCPIP。这款网关可是集多种功能于一身&#xff0c;PROFINET从站功能&#xff0c;让它在通讯领域独领风骚。想知道这款网关如何实现PROFINET和TCP/IP网络的连接吗&#xff1f;一起来看看吧&…

【GeoDa实用技巧100例】004:绘制长沙市宾馆热度图

文章目录 一、加载宾馆分布数据二、绘制热度图三、加载范围数据四、加载底图数据 一、加载宾馆分布数据 加载专栏配套的案例数据data004.rar中的长沙市宾馆酒店.shp&#xff0c;如下图&#xff0c;选择Shapefile格式&#xff1a; 选择长沙市宾馆酒店&#xff0c;加载如下&…

完全平方数(力扣)动态规划 JAVA

给你一个整数 n &#xff0c;返回 和为 n 的完全平方数的最少数量 。 完全平方数 是一个整数&#xff0c;其值等于另一个整数的平方&#xff1b;换句话说&#xff0c;其值等于一个整数自乘的积。例如&#xff0c;1、4、9 和 16 都是完全平方数&#xff0c;而 3 和 11 不是。 示…

【指针进阶】(题目练习)

这篇文章的思维导图在这里&#xff1a;思维导图 一维数组&#xff1a; int a[] {1,2,3,4}; printf("%d\n",sizeof(a)); printf("%d\n",sizeof(a0)); printf("%d\n",sizeof(*a)); printf("%d\n",sizeof(a1)); printf("%d\n"…

Vit 实战营 Class2:图像与Transformer基础

文章目录 数组图像&#xff1a;图像与像素图像分类&#xff1a;机器如何学习&#xff1f;NMT&#xff1a;Neuron Machine TranslationTransformerVision Transformer代码实战 数组图像&#xff1a;图像与像素 什么是数字图像&#xff1f;在计算机图像的图像格式。每一个点叫pix…

全国节能宣传周丨物通博联智慧能源解决方案助力节能降碳

今年7月10日至16日&#xff0c;为全国第33个节能宣传周。今年全国节能宣传周活动主题是“节能降碳&#xff0c;你我同行”。 全国节能宣传周活动是在1990年国务院第六次节能办公会议上确定的活动周&#xff0c;开展该活动是实施全面节约战略、开展节能降碳宣传教育、推动形成绿…

ros系统生成kinova双臂机器人moveit配置包方法,详细过程,亲测有效!

环境&#xff1a;ubuntu18.04 ros&#xff1a;melodic 此博客前提你已经安装了moveit&#xff0c;如果未安装&#xff0c;可参考链接 一、启动MoveIt Setup Assistant roslaunch moveit_setup_assistant setup_assistant.launch点击&#xff1a;Create New MoveIt Configurat…

听产品大佬谈大语言模型的商业化价值

今年 3 月以来&#xff0c;全球各大厂商陆续发布大语言模型&#xff0c;无数人欢欣鼓舞&#xff0c;庆祝沉寂了几年的 AI 领域重新焕发生机。 然而热闹过后&#xff0c;一个现实的问题摆在面前&#xff1a;大语言模型的商业化价值该如何挖掘&#xff1f; 来自美洽的资深产品经…

CVE-2021-41773

CVE-2021-41773 Apache Httpd Server 路径穿越漏洞 Httpd&#xff08;即 HTTP Daemon &#xff0c;超文本传输协议守护程序的简称&#xff09;是一款运行于网页服务器后台&#xff0c;等待传入服务器请求的软件。HTTP 守护程序能自动回应服务器请求&#xff0c;并使用 HTTP 协…

fastadmin调试前端js

当键盘按键抬起后打印id #username&#xff0c;点击箭头的除缓存 隐藏前端昵称 设置为 style"sidplay:none" 添加管理员组别的时候把此处的 NULL改为 1 就可以默认选择第一组别