<?php
/*
* 调用远程RESTful的客户端类
* 要求最低的PHP版本是5.2.0,并且还要支持以下库:cURL, Libxml 2.6.0
* This class for invoke remote RESTful Webservice
* The requirement of PHP version is 5.2.0 or above, and support as below:
* cURL, Libxml 2.6.0
*
* @Version: 0.0.1 alpha
* @Created: 11:06:48 2010/11/23
* @Author: Edison tsai<dnsing@gmail.com>
* @Blog: http://www.timescode.com
* @Link: http://www.dianboom.com
*/
class HttpRequestService{
#cURL Object
private $ch;
#Contains the last HTTP status code returned.
public $http_code;
#Contains the last API call.
private $http_url;
#Set up the API root URL.
public $api_url;
#Set timeout default.
public $timeout = 10;
#Set connect timeout.
public $connecttimeout = 30;
#Verify SSL Cert.
public $ssl_verifypeer = false;
#Response format.
public $format = ''; // Only support json & xml for extension
public $decodeFormat = 'json'; //default is json
public $_encode ='utf-8';
#Decode returned json data.
//public $decode_json = true;
#Contains the last HTTP headers returned.
public $http_info = array();
public $http_header = array();
private $contentType;
private $postFields;
private static $paramsOnUrlMethod = array('GET','DELETE');
private static $supportExtension = array('json','xml');
#For tmpFile
private $file = null;
#Set the useragnet.
private static $userAgent = 'Timescode_RESTClient v0.0.1-alpha';
public function __construct(){
$this->ch = curl_init();
/* cURL settings */
curl_setopt($this->ch, CURLOPT_USERAGENT, self::$userAgent);
curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
curl_setopt($this->ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($this->ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
curl_setopt($this->ch, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
curl_setopt($this->ch, CURLOPT_HEADER, FALSE);
}
/**
* Execute calls
* @param $url String
* @param $method String
* @param $postFields String
* @param $username String
* @param $password String
* @param $contentType String
* @return RESTClient
*/
public function call($url,$method,$postFields=null,$username=null,$password=null,$contentType=null){
if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0 && !empty($this->format)) {
$url = "{$this->api_url}{$url}.{$this->format}";
}
$this->http_url = $url;
$this->contentType = $contentType;
$this->postFields = $postFields;
$url = in_array($method, self::$paramsOnUrlMethod) ? $this->to_url() : $this->get_http_url();
is_object($this->ch) or $this->__construct();
switch ($method) {
case 'POST':
curl_setopt($this->ch, CURLOPT_POST, TRUE);
if ($this->postFields != null) {
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->postFields);
}
break;
case 'DELETE':
curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
break;
case 'PUT':
curl_setopt($this->ch, CURLOPT_PUT, TRUE);
if ($this->postFields != null) {
$this->file = tmpFile();
fwrite($this->file, $this->postFields);
fseek($this->file, 0);
curl_setopt($this->ch, CURLOPT_INFILE,$this->file);
curl_setopt($this->ch, CURLOPT_INFILESIZE,strlen($this->postFields));
}
break;
}
$this->setAuthorizeInfo($username, $password);
$this->contentType != null && curl_setopt($this->ch, CURLOPT_HTTPHEADER, array('Content-type:'.$this->contentType));
curl_setopt($this->ch, CURLOPT_URL, $url);
$response = curl_exec($this->ch);
$this->http_code = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
$this->http_info = array_merge($this->http_info, curl_getinfo($this->ch));
$this->close();
return $response;
}
public function call_fopen($url,$method,$postFields=null,$username=null,$password=null,$contentType=null){
if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0 && !empty($this->format)) {
$url = "{$this->api_url}{$url}.{$this->format}";
}
$this->http_url = $url;
$this->contentType = $contentType;
$this->postFields = $postFields;
$url = in_array($method, self::$paramsOnUrlMethod) ? $this->to_url() : $this->get_http_url();
$params = array('http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded'."\r\n",
'content' => $this->create_post_body($this->postFields)
));
$ctx = stream_context_create($params);
$fp = fopen($url, 'rb', false, $ctx);
if (!$fp) {
die ("can not open server!");
}
$response = @stream_get_contents($fp);
if ($response === false) {
die ("can not get message form server!");
//throw new Exception("Problem reading data from {$url}, {$php_errormsg}");
}
return $response;
}
public function setEncode($encode){
!empty($encode) and $this->_encode = $encode;
return $this;
}
public static function convertEncoding($source, $in, $out){
$in = strtoupper($in);
$out = strtoupper($out);
if ($in == "UTF8"){
$in = "UTF-8";
}
if ($out == "UTF8"){
$out = "UTF-8";
}
if( $in==$out ){
return $source;
}
if(function_exists('mb_convert_encoding')) {
return mb_convert_encoding($source, $out, $in );
}elseif (function_exists('iconv')) {
return iconv($in,$out."//IGNORE", $source);
}
return $source;
}
/**
* POST wrapper,不基于curl函数,环境可以不支持curl函数
* @param method String
* @param parameters Array
* @return mixed
*/
public function do_post_request($url, $postdata, $files)
{
$data = "";
$boundary = "---------------------".substr(md5(rand(0,32000)), 0, 10);
//Collect Postdata
foreach($postdata as $key => $val)
{
$data .= "--$boundary\r\n";
$data .= "Content-Disposition: form-data; name=\"".$key."\"\r\n\r\n".$val."\r\n";
}
$data .= "--$boundary\r\n";
//Collect Filedata
foreach($files as $key => $file)
{
$fileContents = file_get_contents($file['tmp_name']);
$data .= "Content-Disposition: form-data; name=\"{$key}\"; filename=\"{$file['name']}\"\r\n";
$data .= "Content-Type: ".$file['type']."\r\n";
$data .= "Content-Transfer-Encoding: binary\r\n\r\n";
$data .= $fileContents."\r\n";
$data .= "--$boundary--\r\n";
}
$params = array('http' => array(
'method' => 'POST',
'header' => 'Content-Type: multipart/form-data; boundary='.$boundary,
'content' => $data
));
$ctx = stream_context_create($params);
$fp = fopen($url, 'rb', false, $ctx);
if (!$fp) {
die ("can not open server!");
}
$response = @stream_get_contents($fp);
if ($response === false) {
die ("can not get message form server!");
//throw new Exception("Problem reading data from {$url}, {$php_errormsg}");
}
return $response;
}
/**
* POST wrapper for insert data
* @param $url String
* @param $params mixed
* @param $username String
* @param $password String
* @param $contentType String
* @return RESTClient
*/
public function _POST($url,$params=null,$username=null,$password=null,$contentType=null) {
$response = $this->call($url,'POST',$params,$username,$password,$contentType);
//$this->convertEncoding($response,'utf-8',$this->_encode)
return $this->json_foreach($this->parseResponse($response));
}
public function _POST_FOPEN($url,$params=null,$username=null,$password=null,$contentType=null) {
$response = $this->call_fopen($url,'POST',$params,$username,$password,$contentType);
return $this->json_foreach($this->parseResponse($response));
}
public function _photoUpload($url, $postdata, $files) {
$response = $this->do_post_request($url, $postdata, $files);
return $this->json_foreach($this->parseResponse($response));
}
//将stdclass object转换成数组,并转换编码
public function json_foreach($jsonArr)
{
if(is_object($jsonArr))
{
$jsonArr=get_object_vars($jsonArr);
}
foreach($jsonArr AS $k=>$v){
if(is_array($v))
{
$jsonArr[$k]=$this->json_foreach($v);
}
elseif(is_object($v))
{
$v=get_object_vars($v);
$jsonArr[$k]=$this->json_foreach($v);
}
else
{
$v=$this->convertEncoding($v,"utf-8",$this->_encode);
$jsonArr[$k]=$v;
}
}
return $jsonArr;
}
/**
* PUT wrapper for update data
* @param $url String
* @param $params mixed
* @param $username String
* @param $password String
* @param $contentType String
* @return RESTClient
*/
public function _PUT($url,$params=null,$username=null,$password=null,$contentType=null) {
$response = $this->call($url,'PUT',$params,$username,$password,$contentType);
return $this->parseResponse($this->convertEncoding($response,'utf-8',$this->_encode));
}
public function create_post_body($post_params) {
$params = array();
foreach ($post_params as $key => &$val) {
if(is_array($val))
{
$val = implode(',', $val);
}
$params[] = $key.'='.urlencode($val);
}
return implode('&', $params);
}
/**
* GET wrapper for get data
* @param $url String
* @param $params mixed
* @param $username String
* @param $password String
* @return RESTClient
*/
public function _GET($url,$params=null,$username=null,$password=null) {
$response = $this->call($url,'GET',$params,$username,$password);
return $this->parseResponse($response);
}
/**
* DELETE wrapper for delete data
* @param $url String
* @param $params mixed
* @param $username String
* @param $password String
* @return RESTClient
*/
public function _DELETE($url,$params=null,$username=null,$password=null) {
#Modified by Edison tsai on 09:50 2010/11/26 for missing part
$response = $this->call($url,'DELETE',$params,$username,$password);
return $this->parseResponse($response);
}
/*
* Parse response, including json, xml, plain text
* @param $resp String
* @param $ext String, including json/xml
* @return String
*/
public function parseResponse($resp,$ext=''){
$ext = !in_array($ext, self::$supportExtension) ? $this->decodeFormat : $ext;
switch($ext){
case 'json':
$resp = json_decode($resp);break;
case 'xml':
$resp = self::xml_decode($resp);break;
}
return $resp;
}
/*
* XML decode
* @param $data String
* @param $toArray boolean, true for make it be array
* @return String
*/
public static function xml_decode($data,$toArray=false){
/* TODO: What to do with 'toArray'? Just write it as you need. */
$data = simplexml_load_string($data);
return $data;
}
public static function objectToArray($obj){
}
/**
* parses the url and rebuilds it to be
* scheme://host/path
*/
public function get_http_url() {
$parts = parse_url($this->http_url);
$port = @$parts['port'];
$scheme = $parts['scheme'];
$host = $parts['host'];
$path = @$parts['path'];
$port or $port = ($scheme == 'https') ? '443' : '80';
if (($scheme == 'https' && $port != '443')
|| ($scheme == 'http' && $port != '80')) {
$host = "$host:$port";
}
return "$scheme://$host$path";
}
/**
* builds a url usable for a GET request
*/
public function to_url() {
$post_data = $this->to_postdata();
$out = $this->get_http_url();
if ($post_data) {
$out .= '?'.$post_data;
}
return $out;
}
/**
* builds the data one would send in a POST request
*/
public function to_postdata() {
return http_build_query($this->postFields);
}
/**
* Settings that won't follow redirects
* @return RESTClient
*/
public function setNotFollow() {
curl_setopt($this->ch,CURLOPT_AUTOREFERER,FALSE);
curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION,FALSE);
return $this;
}
/**
* Closes the connection and release resources
* @return void
*/
public function close() {
curl_close($this->ch);
if($this->file !=null) {
fclose($this->file);
}
}
/**
* Sets the URL to be Called
* @param $url String
* @return void
*/
public function setURL($url) {
$this->url = $url;
}
/**
* Sets the format type to be extension
* @param $format String
* @return boolean
*/
public function setFormat($format=null){
if($format==null)return false;
$this->format = $format;
return true;
}
/**
* Sets the format type to be decoded
* @param $format String
* @return boolean
*/
public function setDecodeFormat($format=null){
if($format==null)return false;
$this->decodeFormat = $format;
return true;
}
/**
* Set the Content-Type of the request to be send
* Format like "application/json" or "application/xml" or "text/plain" or other
* @param string $contentType
* @return void
*/
public function setContentType($contentType) {
$this->contentType = $contentType;
}
/**
* Set the authorize info for Basic Authentication
* @param $username String
* @param $password String
* @return void
*/
public function setAuthorizeInfo($username,$password) {
if($username != null) { #The password might be blank
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($this->ch, CURLOPT_USERPWD, "{$username}:{$password}");
}
}
/**
* Set the Request HTTP Method
* @param $method String
* @return void
*/
public function setMethod($method) {
$this->method=$method;
}
/**
* Set Parameters to be send on the request
* It can be both a key/value par array (as in array("key"=>"value"))
* or a string containing the body of the request, like a XML, JSON or other
* Proper content-type should be set for the body if not a array
* @param $params mixed
* @return void
*/
public function setParameters($params) {
$this->postFields=$params;
}
/**
* Get the header info to store.
*/
public function getHeader($ch, $header) {
$i = strpos($header, ':');
if (!empty($i)) {
$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));
$value = trim(substr($header, $i + 2));
$this->http_header[$key] = $value;
}
return strlen($header);
}
}
?>
分享到:
相关推荐
创建一个`HttpRequestService`类,使用OkHttp的`Call`和`enqueue`或`execute`方法来发起请求。这个类可以提供异步和同步两种请求方式: ```java public class HttpRequestService { private final OkHttpClient ...
2. **HttpRequestService.class.php**: 此文件定义了HTTP请求服务类,用于处理HTTP请求和响应。它封装了诸如GET、POST等HTTP方法,方便开发者在处理人人网API时发送请求并接收返回的数据。通常,这个类会配合...
它非常适合与Django Rest Framework API点... 然后,您将从HttpRequestService继承并按照以下方式实现抽象方法: from apps.devices.models import Device # Your Device Django model.from rest_framework import se
内容概要:本文详细介绍了如何使用COMSOL Multiphysics进行金属纳米盘的散射、消光和吸收截面的计算。首先,通过几何建模创建一个直径80nm、厚度20nm的金纳米盘,并设置了精确的材料参数(如Drude模型),确保模拟的准确性。接着,选择了电磁波频域作为物理场,配置了合适的边界条件(如散射边界条件和端口激发),并进行了精细的网格划分,特别是在纳米盘边缘加密网格以提高计算精度。然后,利用后处理脚本提取了散射、消光和吸收截面的数据,提供了具体的计算公式和注意事项。最后,强调了验证结果的重要性和一些常见的错误避免方法,如检查能量守恒和调整网格密度。 适合人群:从事纳米光子学研究的科研人员和技术爱好者,尤其是对COMSOL Multiphysics有一定基础的用户。 使用场景及目标:适用于需要精确计算金属纳米盘光学特性的研究人员,帮助他们理解和掌握COMSOL中相关参数的设置和优化方法,从而更好地进行科学研究和发表高质量论文。 其他说明:文中还提供了一个详细的录屏教程,涵盖了从建模到后处理的完整流程,方便用户跟随操作。同时,提醒用户注意单位转换和数据归一化等问题,以确保计算结果的正确性。
DL/T 645-2007 的规定帧编写读写函数,对收到原始数据进行解码
餐饮行业: 店外引流:在餐厅门口放置爆店码,顾客进店前碰一碰,就能了解今日特色菜品、优惠套餐等信息,吸引顾客进店消费。 店内互动:在餐桌等位置设置爆店码,顾客用餐过程中碰一碰,可参与抽奖活动、领取餐后优惠券,或跳转到电子菜单进行加菜,增加顾客的用餐乐趣和二次消费几率。 零售店铺: 服装门店:在橱窗展示新品时,贴上爆店码,顾客碰一碰可查看模特穿搭视频、获取商品详情和尺码信息,以及该商品的会员专属折扣。在试衣镜旁放置爆店码,顾客碰一碰能查看搭配建议、关注公众号或加入会员,提升引流转粉效率。 便利店:在收银台设置爆店码,顾客付款时碰一碰,可领取满减优惠券、了解会员积分规则,或获取当季新品推荐,促进顾客当场购买或成为会员,提升销售额和顾客忠诚度。 线下活动: 展会:在展会入口、展位等位置放置爆店码,参与者碰一碰就能快速获取展会详情、参展商名单、活动议程、展位地图等信息,方便活动的推广和组织,同时也能收集参与者的信息,为后续营销做准备。 促销活动:在商场中庭、店铺门口等举办促销活动时,使用爆店码。顾客碰一碰可了解活动规则、参与方式,还能直接领取电子优惠券或参与线上互动游戏,增加活动的参与度和传播度。 服务行业: 美业:在美甲美睫店的服务台、镜子旁等地方设置爆店码,顾客碰一碰可自动引导添加美业小助理微信,方便预约下次服务,也可获取美容护肤知识、会员专属优惠等信息。 健身行业:在健身房的前台、更衣室门口、器械旁放置爆店码。顾客碰一碰能了解课程安排、教练介绍,还可参与打卡活动,分享训练成果到社交平台,领取健身优惠券或小礼品,吸引更多潜在顾客。 旅游行业: 景区:在景区入口、景点打卡处等设置爆店码,游客碰一碰可获取景区地图、景点介绍、语音讲解,还能领取景区纪念品优惠券或参与线上互动活动,提升游客的旅游体验和景区的知名度。 酒店:在酒店大堂、客房门口、餐厅等位置放置爆店码。客人碰一碰可了解酒店
MIL-STD-454N.PDF
内容概要:本文提出了一种基于标准视频编解码器和优化特征平面的高效压缩方法,用于处理3D高斯点阵(3D Gaussian Splatting)。该方法通过引入统一架构将点云数据和特征平面结合,利用2D特征平面实现连续空间表示,并通过频率域熵建模和通道位分配优化压缩性能。实验结果表明,该方法在显著减少存储需求的同时保持了高质量的渲染效果,特别是在“自行车”场景中实现了146倍的压缩率而图像质量几乎无损。此外,该模型与现有3DGS渲染管道无缝集成,维持了相似的渲染速度。 适合人群:对3D场景压缩和渲染技术感兴趣的计算机视觉研究人员及工程师,特别是关注实时应用和移动设备性能优化的专业人士。 使用场景及目标:①需要在资源受限环境中(如移动设备或头戴显示器)进行高效3D场景表示的应用开发者;②寻求在不牺牲渲染质量的前提下大幅降低存储和传输成本的技术团队;③希望利用标准视频编解码器实现快速硬件解码的研究者。 其他说明:该研究不仅适用于特定的数据集,还为未来3D表示技术的发展提供了关键见解,促进了更高效的3D压缩技术发展。实验验证了该方法的有效性,展示了显著的存储节省和视觉保真度。
内容概要:本文详细介绍了超声波焊接技术在汽车门板塑焊机中的应用,涵盖了从源码程序到硬件加工的各个方面。首先强调了超声波焊接在汽车制造中的重要性,然后展示了控制板和显示板的源码程序,包括初始化代码、PID控制算法、频率跟踪算法等。此外,还讨论了超声波换能器、手柄外壳、铝件和焊头的加工技术及其具体要求。文中提供了多个代码示例,如STM32的PWM配置、DMA传输、PID算法实现等,展示了如何通过软件和硬件的紧密结合实现高效的超声波焊接。 适合人群:从事汽车制造业、电子工程、嵌入式开发等相关领域的技术人员,尤其是对超声波焊接技术和嵌入式系统感兴趣的工程师。 使用场景及目标:适用于希望深入了解超声波焊接技术原理和技术实现的读者,帮助他们掌握从源码编写到硬件加工的全流程知识,提高焊接系统的稳定性和可靠性。 其他说明:文章不仅提供了详细的代码示例,还分享了许多实践经验,如频率跟踪算法、温度补偿、硬件互锁机制等,有助于读者更好地理解和应用这些技术。
可配置阶数和位宽的级联型IIR滤波器(具体代码和工程私聊qq947336191)
程序设计语言基础JAVAWEB_Java的常用工具类[2025网盘版.备考复习]
内容概要:本文详细介绍了Halcon与C#联合开发的一个稳定版工业视觉框架,涵盖环境配置、图像处理流水线设计、异常处理、内存管理和算法模块化等方面的内容。首先,文章强调了环境配置的重要性,确保Halcon的runtime版本与开发环境一致,避免常见的dll版本不匹配问题。接着,描述了图像处理流水线的设计,采用了Task+async/await的方式提高效率,并通过状态机实现流程引擎,使配置更加灵活。此外,文章深入探讨了内存管理,提供了多个实例,如使用using语句确保HRegion对象正确释放,以及通过HalconMemoryKiller类防止内存泄漏。异常处理方面,文章展示了如何将Halcon的错误码转化为易读的信息,并实现了全局异常捕获和日志记录。最后,文章提到了框架的实际应用场景,如PCB板检测,并分享了许多实战经验和技巧,如相机断线自动重连、图像显示控件的手势操作等。 适合人群:具备一定编程基础并希望深入了解Halcon与C#联合开发的工程师和技术爱好者。 使用场景及目标:适用于工业视觉项目的开发,旨在帮助开发者构建高效稳定的图像处理系统,提高系统的鲁棒性和维护性。 其他说明:文中提供的代码片段和实战经验对于解决常见问题非常有价值,尤其是内存管理和异常处理方面的最佳实践。
内容概要:本文详细介绍了基于三菱FX1N-30MR PLC和威纶TK6070触摸屏的恒压供水系统的实战应用。主要内容涵盖系统的关键功能如定时锁定、模式切换、PID控制、故障联锁以及小泵控制等。文中不仅提供了具体的梯形图代码片段,还分享了许多实际调试经验和注意事项。例如,定时锁定功能通过M384和M385实现,确保系统稳定运行;模式切换由M400-M403控制,可在触摸屏上进行选择;PID控制可以选择变频器或3A模块,后者提供更平稳的压力曲线;故障联锁机制能够在变频器故障时自动切换到工频泵,保障供水安全;小泵控制则用于应对压力波动,保持管网压力稳定。 适用人群:从事工业自动化领域的工程师和技术人员,尤其是对PLC编程和触摸屏应用有一定基础的人群。 使用场景及目标:适用于需要理解和实施恒压供水系统的工程项目。目标是帮助读者掌握三菱PLC和威纶触摸屏的具体应用技巧,提高系统的可靠性和效率。 其他说明:文中提到的一些特殊操作和调试技巧,如通过D129输入4016解锁系统,以及在触摸屏上设置隐藏菜单等,有助于解决实际工程中的常见问题。此外,文章强调了硬件配置和通信设置的重要性,提醒读者在实际操作中避免常见的错误。
内容概要:本文详细介绍了基于51单片机的全自动洗衣机系统的设计与实现。系统支持手动和自动两种操作模式,能够灵活调整水位、洗涤时间和漂洗次数等参数。文中提供了详细的Proteus 8仿真图、C语言源码及Hex文件的使用说明。硬件方面,采用STC89C52作为主控芯片,搭配LCD1602显示屏、按键阵列、直流电机驱动模块、水位传感器和门磁开关等组件。软件部分涵盖了按键处理、电机控制、水位检测等功能模块的具体实现方法。此外,还讨论了一些常见的调试技巧和注意事项。 适合人群:具有一定单片机基础知识的学习者、电子爱好者、嵌入式系统开发者。 使用场景及目标:适用于希望深入了解51单片机及其外围设备的应用开发,特别是对于嵌入式控制系统感兴趣的读者。通过本项目的实践,读者可以掌握单片机的基本编程技能,学会如何构建和调试小型自动化系统。 其他说明:文中提供的代码和仿真图可以帮助初学者更好地理解和掌握相关知识点。同时,针对可能出现的问题给出了实用的解决方案,如按键消抖、电机驱动保护等。
Java在线教育学习平台LW PPT
系统名称:基于SSM实现的小说网站 技术栈:SSM框架、MYSQL数据库、JS语言、B/S架构 系统功能:前台界面功能包括站内信息查看(通过作者、小说名、小说类型查找小说)、用户注册、小说列表查看(按章节查看并阅读,用户登录后收藏,付费或免费查看)、在线支付、排行榜(热门小说、点击率);后台功能包括用户管理(管理员和注册用户)、站内信息管理、小说类别管理、小说信息管理、章节信息管理、支付信息管理。 摘要:简单而言信息化就是为了人们的生活便利所带来的新时代的东西,有了淘宝、京东,我们可以进行网购漂亮的衣服;有了快手、抖音我们可以真实的感受主播给我们带来最真实的货物;有了美团我们可以在家就吃到全城的美食。这就是信息化带给我们的福利,别看一个小小的APP或者WEB应用,它能够解决的是社会上的某一类问题。企业资源计划ERP这类软件可能有很多人都听到过,熟悉它的人都知道一个小小的TOB应用软件可以指挥数以万计的企业员工有条不紊的进行着企业各项的生产任务。可想而知,信息化软件的力量足可以撼动整个企业乃至整个行业的情况。此次我们的设计所做的应用也是根据现实生活当中的需求来进行针对性的功能解决的,所有的业务也好,功能啥的都是根据实际的需求设计而来。各种各样应运而生的信息化软件都是为了解决生活当中的问题的,我们也不例外,就是为了能够解决这样或者那样的问题才进行的设计。随着近几年的疫情不断发展,居家办公的情况更多出现在人们的生活当中,那么一些单调无味的工作和生活就影响着人们的心情。小说的需求场景也就越来越多了,人们的娱乐方式也由此变得更加丰富些。电子小说的出现可以大概率的帮助人们随时随地进行小说的阅读,同时还能够搜寻出自己喜欢小说。
内容概要:本文详细介绍了基于模型预测控制(MPC)的异步电机电流环改进仿真项目。首先,文章阐述了双闭环矢量控制框架的整体架构,即外层采用PI控制的速度环和内层采用MPC控制的电流环。接着,深入探讨了电机模型的核心代码,包括磁链观测器的简化处理以及预测控制器的代价函数设计。文中还分享了多个实际调试过程中遇到的技术挑战及其解决方案,如离散化方法的选择、开关频率惩罚项的设定、预测步长的影响等。此外,作者通过实验数据展示了MPC相较于传统PI控制在动态响应、电流跟踪精度等方面的显著优势。 适合人群:电气工程专业学生、从事电机控制系统研究的研发人员和技术爱好者。 使用场景及目标:适用于希望深入了解并掌握异步电机模型预测电流控制技术的研究人员。主要目标是通过理论与实践相结合的方式,提高对MPC的理解和应用能力,特别是在电流环控制方面的优化。 其他说明:文章不仅提供了详细的数学公式和代码实现,还附带了一些实用的小技巧和注意事项,有助于读者更好地理解和复现相关研究成果。同时,文中引用了多篇权威文献作为参考,进一步增强了内容的专业性和可信度。
lvgl-8.3.0 在github下载了好久才下载下来,希望方便大家使用。
兰州石化职业技术大学岗位实习手册(学生)印9200册.doc
On-device Model 在 KMP 的集成与用例.pptx