本地构建和自动化构建

by Amir Off

由Amir Off

如何构建最强大,最安全的家庭自动化系统 (How to build the most robust and secure home automation system)

In this article, I’ll discuss how I built a Smart Home Automation System with Angular and Node.js on a Raspberry Pi without relying on any external cloud services.

在本文中,我将讨论如何在Raspberry Pi上不依赖任何外部云服务的情况下,使用Angular和Node.js构建智能家居自动化系统。

介绍 (Intro)

Over the last few days, I spent some nights designing and developing a home automation system based on JavaScript, with the use of Angular and Node.js. And, like with any other project, the planning involved some deep research on the internet.

在过去的几天里,我花了一些晚上使用Angular和Node.js设计和开发基于JavaScript的家庭自动化系统。 并且,与任何其他项目一样,该计划涉及对互联网的一些深入研究。

It turned out that there are plenty of fish in the sea —plenty of solutions on how to implement a home automation system. Some offer paid services in “the cloud” and others explain how to build your own using a technology called MQTT.

事实证明,海中有很多鱼-有关如何实施家庭自动化系统的大量解决方案。 一些提供“云”中的付费服务,另一些解释如何使用称为MQTT的技术构建自己的服务。

None of the solutions made any sense to me. All options were either expensive, or had inconvenient implementations or even security flaws.

没有一种解决方案对我有意义。 所有选项要么昂贵,要么实现不便,甚至存在安全漏洞。

But, before we go any further, let’s explain what MQTT is. MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol. MQTT is designed for constrained devices and low-bandwidth, high-latency, or unreliable networks.

但是,在进一步介绍之前,让我们解释一下MQTT是什么。 MQTT代表MQ遥测传输 。 它是一种发布/订阅,极其简单和轻便的消息传递协议。 MQTT专为受限设备和低带宽,高延迟或不可靠的网络而设计。

The design principles are to minimise network bandwidth and device resource requirements whilst attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal for the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.

设计原则是在尝试确保可靠性和一定程度的交付保证的同时,最小化网络带宽和设备资源要求。 这些原则也使该协议成为新兴的连接设备的“机器对机器”(M2M)或“物联网”世界以及带宽和电池电量极为宝贵的移动应用的理想选择 。

Why wasn’t I convinced about using MQTT, or by any of the solutions I found on the internet? Two reasons:

为什么我对使用MQTT或我在互联网上找到的任何解决方案都不满意? 两个原因:

  1. While the MQTT technology seems very convenient for IoT devices, I still thought it was unnecessary. The system which I will be showing in the following tutorial operates in the same medium where the IoT devices live. All benefits that MQTT has for being “fast” and having “low-bandwidth” become irrelevant. Plus there’s all the hassle that is involved in its implementation and all the extra overhead with the additional npm packages that are required for it to work in a JavaScript environment. Instead, I will be using generic JavaScript and Node.js libraries only, nothing more!

    尽管MQTT技术对于物联网设备非常方便,但我仍然认为这是不必要的。 我将在以下教程中显示的系统在IoT设备所在的相同介质上运行。 MQTT所具有的“快速”和“低带宽”的所有优点变得无关紧要。 另外,它的实现还涉及所有麻烦,并且在JavaScript环境中运行它需要额外的npm软件包带来的所有额外开销。 相反,我将仅使用通用JavaScript和Node.js库,仅此而已!
  2. What about the security part? Well, I’m not a big fan of “the cloud” or cloud computing in general. In some cases it can be very beneficial, but in most cases it’s just unnecessary. Think about it: why would you have a service that is required for controlling your home appliances to be hosted somewhere else in “the cloud” and not in your own network?

    安全部分呢? 好吧,我一般都不喜欢“云”或云计算。 在某些情况下,这可能是非常有益的,但在大多数情况下,这是不必要的。 想一想:为什么您需要一项服务,以控制您的家用电器托管在“云”中而不是您自己的网络中?

One might think that “the cloud” provides the ability to access your home appliances from anywhere in the world via the internet.

可能有人认为“云”提供了通过互联网从世界任何地方访问您的家用电器的能力。

But think about this: when your home network doesn’t have internet connection, “the cloud” becomes redundant. More importantly, you can still make your home automation system accessible from the internet using port-forwarding even if it’s hosted on your local network.

但是请考虑一下:当您的家庭网络没有Internet连接时,“云”将变得多余。 更重要的是,即使端口托管在本地网络上,您仍然可以使用端口转发从互联网访问家庭自动化系统。

This is when it “clicked” for me, and I thought about hosting the whole system on a Raspberry Pi and keeping it in my local network.

这是当它为我“点击”时,我考虑过将整个系统托管在Raspberry Pi上,并将其保留在我的本地网络中。

技术 (The technology)

  1. Software: The reason why I chose Angular and Node.js is because they’re based on JavaScript and I’m already familiar with it. After all, I wanted to design and develop a progressive web app that communicates with my IoT devices via HTTP — and JavaScript offered all the functionality that I needed.

    软件:之所以选择Angular和Node.js是因为它们基于JavaScript,并且我已经很熟悉。 毕竟,我想设计和开发一个渐进式Web应用程序,该应用程序可通过HTTP与我的IoT设备进行通信-JavaScript提供了我需要的所有功能。

  2. Hardware: The system works with microcontrollers like the Arduino Uno/Mega/Du/MKR1000, Adafruit HUZZAH CC3000, and any other microcontroller with a WiFi connection. I am using the ESP8266 as a base component for my home automation system. It’s a low-cost WiFi microchip with microcontroller capability. It has everything I need and for a cheap price! Lastly, we need to host the system somewhere on our local network — so what’s better than the Raspberry Pi?

    硬件:该系统可与Arduino Uno / Mega / Du / MKR1000,Adafruit HUZZAH CC3000和任何其他具有WiFi连接的微控制器一起使用。 我将ESP8266用作家庭自动化系统的基本组件。 这是一款具有微控制器功能的低成本WiFi微芯片。 它具有我需要的一切,而且价格便宜! 最后,我们需要将系统托管在本地网络上的某个地方–那么有什么比Raspberry Pi更好的呢?

This won’t be a coding tutorial where I dive deep into coding, since this project is open-source and I will be publishing everything on GitHub. I will only demonstrate how to implement your own home automation system and will be going through each step. If you’re a developer please fork the repository and get involved in improving it.

这不是我将深入研究编码的编码教程,因为该项目是开源的,我将在GitHub上发布所有内容。 我将仅演示如何实现自己的家庭自动化系统,并将逐步进行每个步骤。 如果您是开发人员,请分叉存储库并参与改进。

设置 (The setup)

I estimate that it will take about 40 minutes to finish this whole setup plus any time spent online searching for solutions for installation errors.

我估计大约需要40分钟才能完成整个安装过程,并且花费任何时间在线搜索安装错误的解决方案。

需要什么? (What is needed?)

A Raspberry Pi is required. In my example I’m using a Raspberry Pi 3, but it should work with most versions. The components needed are:

需要Raspberry Pi。 在我的示例中,我使用的是Raspberry Pi 3,但它适用于大多数版本。 所需的组件是:

  1. Raspberry Pi board

    树莓派板
  2. MicroSD card (A class 10 with 16 GB or higher is recommended)

    MicroSD卡(建议使用16 GB或更高的Class 10)
  3. A USB MicroSD card reader or SD card adapter

    USB MicroSD读卡器或SD卡适配器
  4. HDMI monitor and a USB keyboard (only required temporarily for the first boot of the Raspberry Pi)

    HDMI监视器和USB键盘(仅在Raspberry Pi首次启动时临时需要)
  5. Ethernet cable (not needed for Raspberry Pi 3 as it has built in WiFi)

    以太网电缆(Raspberry Pi 3内置WiFi不需要)

在Raspberry Pi上安装Raspbian OS (Installing Raspbian OS on the Raspberry Pi)

Raspbian is a free operating system based on Debian Linux, and it is optimized for Raspberry Pi.

Raspbian是基于Debian Linux的免费操作系统,并且已针对Raspberry Pi进行了优化。

I recommend the headless “LITE” version. It has no desktop environment or any graphical user interface, and it’s remotely accessible from a computer or device on the same network via SSH. We’re keeping things simple since this is the only way we are going to access the Raspberry Pi. The LITE version has all the functionality we’re looking for.

我推荐无头“ LITE”版本。 它没有桌面环境或任何图形用户界面,并且可以通过SSH从同一网络上的计算机或设备进行远程访问。 我们将事情保持简单,因为这是我们访问Raspberry Pi的唯一方法。 LITE版本具有我们正在寻找的所有功能。

  1. Download the latest Raspbian image from the official Raspberry Pi website.

    从Raspberry Pi官方网站下载最新的 Raspbian映像。

  2. Flash the Raspbian OS image to the SD card with Etcher or any other OS image burning software of your choice.

    使用Etcher或您选择的任何其他OS映像刻录软件将Raspbian OS映像闪存到SD卡。

设置Raspberry Pi (Setting up the Raspberry Pi)

To get the Raspberry Pi ready to boot we need to:

要使Raspberry Pi准备启动,我们需要:

  1. Insert the MicroSD card into the Raspberry Pi

    将MicroSD卡插入Raspberry Pi
  2. Connect the USB keyboard and the HDMI cable

    连接USB键盘和HDMI电缆
  3. Connect the Ethernet cable or if you have a Raspberry Pi 3 and want to use WiFi you should set up the network in the next section

    连接以太网电缆,或者如果您有Raspberry Pi 3并想使用WiFi,则应在下一部分中设置网络

When the Raspberry Pi has finished booting up, log in using username pi and password raspberry

Raspberry Pi完成启动后,使用用户名pi和密码raspberry登录

启用WiFi并连接到网络 (Enabling WiFi and connecting to the network)

Skip this step if you chose to connect with an Ethernet cable.

如果您选择使用以太网电缆连接,请跳过此步骤

  1. Open the “wpa-supplicant” configuration file

    打开“ wpa-supplicant”配置文件
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

2. add the following at the bottom of the file while adding your wifi name and password:

2.在文件底部添加以下内容,同时添加您的wifi名称和密码:

network={
ssid="your_networks_name"   psk="your_networks_password"
}

3. Press Ctrl+X to save the code. Confirm with Y then Enter

3.Ctrl+X保存代码。 确认与Y然后Enter

4. Reboot the Raspberry Pi with the following command:

4.使用以下命令重新启动Raspberry Pi:

$ sudo reboot

启用S​​SH并更改用户名和密码 (Enabling SSH and changing the username and password)

Now that the Raspberry Pi is connected to the internet, it’s recommended to change the default password.

现在Raspberry Pi已连接到Internet,建议更改默认密码。

  1. Open the Raspberry Pi configuration tool and click the second option “Change User Password” and follow the instructions

    打开Raspberry Pi配置工具,然后单击第二个选项“更改用户密码”,然后按照说明进行操作
$ sudo raspi-config

2. Select option 5 “Interfacing Options” then activate SSH

2.选择选项5“接口选项”,然后激活SSH

3. Reboot the Raspberry Pi. When it’s up, you have SSH enabled and it’s ready to be accessed remotely from your desktop computer

3.重新启动Raspberry Pi。 启动时,您已启用SSH,并且可以从台式计算机远程访问它

$ sudo reboot

配置对Raspberry Pi的远程访问 (Configuring remote access to the Raspberry Pi)

Now, finally, the part when we install the required software on the Raspberry Pi. This part can be executed directly on the Pi through the terminal using a HDMI monitor and a USB keyboard. For convenience — and since we enable remote SSH connection — we’re going to connect from another desktop environment. This is the best and easiest way to remotely access and control the Pi whenever changes and configurations are needed.

现在,最后是我们在Raspberry Pi上安装所需软件的部分。 这部分可以使用HDMI监视器和USB键盘通过终端直接在Pi上执行。 为了方便起见,并且由于我们启用了远程SSH连接,因此我们将从另一个桌面环境进行连接。 每当需要更改和配置时,这是远程访问和控制Pi的最佳和最简便的方法。

So, basically, this is how you can access the command line interface of a Raspberry Pi remotely from another computer or any device on the same network using SSH. This can be done in two ways:

因此,基本上,这就是您可以使用SSH从另一台计算机或同一网络上的任何设备远程访问Raspberry Pi的命令行界面的方法。 这可以通过两种方式完成:

  1. Using the Command Prompt or PowerShell (I’m using Windows on a Desktop computer), replace with your username and IP address

    使用命令提示符或PowerShell(我在台式计算机上使用Windows),替换为您的用户名和IP地址
$ ssh username@ipaddress

If you do not know the IP address, type “hostname -I" in the Raspberry Pi command line.

如果您不知道 IP地址,请在Raspberry Pi命令行中键入“ hostname -I"

2. The second method is using a client program like PuTTY or any other functioning client SSH software. Here’s an easy guide for using PuTTY.

2.第二种方法是使用客户端程序,例如PuTTY或任何其他程序 客户端SSH软件。 这是使用PuTTY的简单指南

在Raspberry Pi上安装所需的软件 (Installing the required software on the Raspberry Pi)

Before installing anything, it’s recommended to update the Raspberry Pi’s operating system and packages. Doing this regularly will keep it up-to-date.

在安装任何东西之前,建议先更新Raspberry Pi的操作系统和软件包。 定期执行此操作可以使它保持最新状态。

  1. Update the system packages list using the following command:

    使用以下命令更新系统软件包列表:
$ sudo apt-get update

2. Upgrade all your installed packages to their latest version:

2.将所有已安装的软件包升级到最新版本:

$ sudo apt-get dist-upgrade

3. Download and install the latest version of Node.js:

3.下载并安装最新版本的Node.js:

// To download$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
// To install$ sudo apt-get install -y nodejs
// Check if the installation was successful:$ node -v

4. Install the Angular CLI globally:

4.全局安装Angular CLI:

$ npm install -g @angular/cli

5. Install the Git version-control system:

5.安装Git版本控制系统:

$ sudo apt-get install git

安装数据库(MongoDB) (Installing the database (MongoDB))

We need a database for storing the registered users and their credentials. Here are the required steps:

我们需要一个数据库来存储注册用户及其凭证。 这是必需的步骤:

  1. Install MongoDB

    安装MongoDB
$ sudo apt-get install mongodb

2. Start the MongoDB process

2.启动MongoDB进程

$ sudo service mongodb start

3. Start the mongo Shell

3.启动mongo Shell

$ mongo

3. Create a database called “smarthaus”

3.创建一个名为“ smarthaus”的数据库

$ use smarthaus

In MongoDB, default database is test. If you didn’t create any database, then collections will be stored in test database.

在MongoDB中,默认数据库为test。 如果您未创建任何数据库,则集合将存储在测试数据库中。

安装Smart Haus (Installing Smart Haus)

1. Check the current work directory using this command:

1.使用以下命令检查当前工作目录:

$ pwd
/* It will probably print "/home/pi"   where "pi" is the current user directory */

It’s recommended to clone the project’s repository under the pi’s user directory but you can navigate somewhere else if you’re sure.

建议在pi的用户目录下克隆项目的存储库,但如果确定的话,可以导航到其他地方。

2. Clone the repository from:

2.从以下位置克隆存储库:

$ git clone https://github.com/ameer157/smarthaus.git

Make sure to navigate inside the directory using:

确保使用以下内容浏览目录:

$ cd smarthaus

Before installing any npm packages using “npm install” please refer to the npm guide to fix permissions to learn how to fix any “EACCESS ”errors you might face during installation. This is very important since it will prevent any npm permission errors, and allows you to install packages globally without using sudo. Using sudo with npm is not recommended and should be avoided.

在使用“ npm install”安装任何npm软件包之前,请参考npm指南以修复权限,以了解如何解决在安装过程中可能遇到的任何“ EACCESS ”错误。 这非常重要,因为它将防止任何npm权限错误,并允许您在不使用sudo的情况下全局安装软件包。 不建议将sudo与npm一起使用, 应避免使用

3. Install all the required packages for the project:

3.安装项目所需的所有软件包:

$ npm install

启动Node.js服务器 (Starting the Node.js server)

Before starting the server we need to build the project using the Angular CLI tool. And lastly, we configure the Raspberry Pi so that it runs the server whenever it boots up.

在启动服务器之前,我们需要使用Angular CLI工具构建项目。 最后,我们配置Raspberry Pi,使其在启动时运行服务器。

  1. Build the project using:

    使用以下命令构建项目:
$ ng build --prod

2. Edit the rc.local file using nano:

2.使用nano编辑rc.local文件:

$ sudo nano /etc/rc.local

3. Add the following on the line before exit 0 then exit and save the file:

3.exit 0之前的行中添加以下内容,然后退出并保存文件:

su pi -c 'cd /home/pi/smarthaus/backend && sudo node server.js > log.txt &'

The Node.js server is now ready! It will run on every system boot up and save logs in under the same directory in a “log.txt” file.

Node.js服务器现在准备就绪! 它将在每次系统启动时运行,并将日志保存在同一目录下的“ log.txt”文件中。

Let’s run it now and see if it works using this command:

现在运行它,并使用以下命令查看它是否有效:

$ sudo node server

The system in now accessible from any device on your network via the Raspberry Pi’s IP address.

现在可以通过Raspberry Pi的IP地址从网络上的任何设备访问该系统。

Please go ahead and fork this project and get involved in developing the missing parts ?

请着手这个项目,并涉足发展中缺少的部分?

结束 (The end)

We got ourselves a working home automation system running safely on a Raspberry Pi in our local network without the use of “the cloud” or somebody else’s server.

我们获得了一个可以正常工作的家庭自动化系统,该系统可以在本地网络中的Raspberry Pi上安全运行,而无需使用“云”或其他人的服务器。

My Raspberry Pi sitting next to my Fingbox and router in the living room ?

我的Raspberry Pi坐在客厅的Fingbox和路由器旁边吗?

I hope you enjoyed reading,Please follow and share for more tech stuff ??

希望您喜欢阅读,请关注 分享更多的技术资料?

翻译自: https://www.freecodecamp.org/news/the-most-robust-and-secure-home-automation-system-6d0ddbb39f29/

本地构建和自动化构建

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

相关文章

  1. 四 ST LoRa开发板接入LoRaWAN服务器-APP配置

    LoRa服务器的设备节点数据可以通过MQTT client查看,这里的工具就比较多了,我选择用Python自己开发一个,可以看一下,数据可视化方面polt还是可以的。 这里的难点(对于我一个python小白)我们要看一下&#x…...

    2024/4/28 20:47:32
  2. 前后台分离的项目中,如何优雅的传输boolean类型的参数

    前言:需求 这是一个Spring Angular前后台分离的项目,目前有一个查看作业列表的功能,并且已经设置了分页和几个查询参数,如图。 现在需要增加一个已评阅和未评阅的查询功能。 Work实体的属性如下: id: number; cont…...

    2024/4/28 8:15:54
  3. VSCode 启动 Vue 项目 npm install 报错

    1. 报错后,查看了版本。 查看node版本:node -v 查看npm版本:npm -v 查看Augular版本:ng --version 2. 感觉 Augular CLI版本太低,使用以下方法升级到最新版本: 》 npm uninstall -g angular/cli 》 npm …...

    2024/4/29 0:37:58
  4. ✈工欲善其事,必先利其器✔

    ✈工欲善其事,必先利其器✔By Freepik, www.cnblogs.com 查看原始文档 每天都要去的网站 Hacker News:非常棒的针对编程的链接聚合网站Programming reddit:同上MSDN:微软相关的官方技术集中地,主要是文档类infoq&…...

    2024/4/28 22:23:14
  5. 页面卡顿性能优化的两个解决方案

    过年回来胖了6斤。 目录 场景chrome 性能测试解决方案重绘和重排 一眨眼,入职半年了。 感觉自己进步挺大的,但是都又杂又碎,并不是很清楚自己哪些地方进步了,感觉最近积极的总结挺有帮助的。 工作中遇到了两次数据量很大的时…...

    2024/4/28 8:14:14
  6. 如何运营一个开源项目并取得较大影响力?

    除了擅长编写 md 电子书来攒 star,我还写了一系列的开源软件,也掌握了一些项目运营的技巧。开源并不是你把软件、README 写好就行了,还有详细的文档、示例程序等等。开源也不是你的项目好了,就会有一堆人参与进来。开源还要你帮助…...

    2024/4/28 22:15:40
  7. 割双眼皮可以改善眼叽无力吗

    ...

    2024/4/28 11:34:20
  8. 上脸提肌三点保定唐县哪里做双眼皮提肌需要另外交钱吗

    ...

    2024/4/28 10:17:38
  9. 【笔记整理】—— 2.13 Vue概述 | 指令 | 添加样式

    目录一、简介1 前端开发技术的发展历程2 Vue 特点3 MVVM 与 MVC 区别4 Vue 基本框架二、指令v-cloak : 解决 插值表达式闪烁V-text : 把元素以文本形式执行v-html : 把元素以html形式执行v-bind : 属性绑定机制v-on : …...

    2024/4/28 0:49:35
  10. 双眼皮术后19天喝酒了

    ...

    2024/4/28 2:24:02
  11. vuejs的使用-指令

    vue指令的使用 <div id"app"><p>{{ this.$data.msg }}//使用vm上的$data属性//{{ }}的语法叫mustache语法//在DOM结构中使用js语法&#xff0c;这个类型称之为jsx语法糖</p><p>{{ this._data.msg }}//使用vm上的私有属性_data</p><…...

    2024/4/28 20:32:50
  12. vue 常用指令学习(v-model,v-on,v-for)

    前言 jQuery 一梭子代码就出来了 事件驱动 vue 一块json就完事 有点像angular 数据驱动 只有ie8以上才能兼容 使用vue 第一步 引入vue {{msg}} <script> new Vue({el:body,data:{msg:hello world,} }) //el 输出的作用域&#xff0c;data 输出的数据 </script> /…...

    2024/4/28 8:35:00
  13. Vuejs的指令及组件用法总结

    vuejs介绍 Vue.js是当下很火的一个JavaScript MVVM库&#xff0c;它是以数据驱动和组件化的思想构建的。相比于Angular.js&#xff0c;Vue.js提供了更加简洁、更易于理解的API&#xff0c;使得我们能够快速地上手并使用Vue.js。 如果你之前已经习惯了用jQuery操作DOM&#xff0…...

    2024/4/28 8:55:16
  14. Angular源码剖析:DefaultKeyValueDiffer和DefaultIterableDiffer的变更检测算法

    前言 Angular原生实现了两个工具类&#xff1a;DefaultKeyValueDiffer和DefaultIterableDiffer&#xff0c;它们分别用来检查两个对象或两个数组之间的差别&#xff08;也就是diff&#xff09;。典型的使用场景是&#xff1a;检查某个变量在两个时刻之间是否发生了改变、发生了…...

    2024/4/28 7:54:00
  15. Vue指令与事件

    1.{{ msg }}问题&#xff1a; <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><meta http-equiv"X-UA-Co…...

    2024/4/21 16:10:45
  16. vue指令初步认识

    概述 Vue.js&#xff1a;核心思想是数据驱动Vue.js是当下很火的一个JavaScript MVVM库&#xff0c;它是以数据驱动和组件化的思想构建的。相比于Angular.js&#xff0c;Vue.js提供了更加简洁、更易于理解的API&#xff0c;使得我们能够快速地上手并使用Vue.js vue常用指令&am…...

    2024/4/28 8:48:09
  17. 孙漫双眼皮埋线效果怎么样

    ...

    2024/4/20 14:34:55
  18. Ionic4—解析html数据

    目录 一、TS页面 二、html模板 一、TS页面 public list: any {title: 标题,content: <h2>内容</h2> } 二、html模板 Ionic4使用Angular中的innerHTML属性解析字符串中的标签。 <h2>{{list.title}}</h2> <div [innerHTML] list.content>&…...

    2024/4/20 14:34:54
  19. angular把html转换成字符串,Angular 设置string文本以html文本解析显示

    start最近在使用富文本编辑&#xff0c;获取到了富文本编辑器&#xff0c;编辑好的string文本&#xff0c;想转换成html文本显示&#xff0c;发现Angular和Vue还是有点区别的&#xff0c;下面记录一下&#xff0c;转换方法正式开始编写文件Htmlpipe.ts/** Author: lazy_tomato*…...

    2024/4/20 14:34:53
  20. 为什么埋线双眼皮可以重新埋吗

    ...

    2024/4/20 14:34:51

最新文章

  1. 水稻病害检测(YOLO数据集,多分类,稻瘟病、纹枯病、褐斑病、枯心病、霜霉病、水稻细菌性条纹斑病、稻苞虫)

    是自己利用LabelImg工具进行手工标注&#xff0c;数据集制作不易&#xff0c;请尊重版权&#xff08;稻瘟病、纹枯病、褐斑病、枯心病、霜霉病、水稻细菌性条纹斑病、稻苞虫&#xff09; 如果需要yolv8检测模型和数据集放在一起的压缩包&#xff0c;可以关注&#xff1a;最新最…...

    2024/4/29 1:54:16
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. ArcGIS10.8保姆式安装教程

    ArcGIS 10.8是一款非常强大的地理信息系统软件&#xff0c;用于创建、管理、分析和可视化地理数据。以下是ArcGIS 10.8的详细安装教程&#xff1a; 确保系统满足安装要求 在开始安装之前&#xff0c;请确保您的计算机满足以下系统要求&#xff1a; 操作系统&#xff1a;Windo…...

    2024/4/28 19:55:10
  4. linux系统编程 线程 p1

    线程 1.线程的概念2.线程的创建/终止/取消&#xff0c;栈的清理2.1线程创建2.2线程终止2.3 栈的清理 1.线程的概念 线程就是一个正在运行的函数。 posix线程是一套标准&#xff0c;而不是实现。 openmp线程。 线程标识&#xff1a;pthread_t &#xff08;linux环境下是整形数&…...

    2024/4/25 1:46:17
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/28 13:52:11
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/28 3:28:32
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/26 23:05:52
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/28 13:51:37
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/28 15:57:13
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/25 18:39:16
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/28 1:34:08
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/28 1:22:35
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/25 18:39:14
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/26 23:04:58
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/28 5:48:52
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/26 19:46:12
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/27 11:43:08
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/27 8:32:30
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57