粒子滤波 应用

If you're developing any type of IoT product, inevitably you'll need some type of mobile app. While there are easy ways, they're not for production use.

如果您要开发任何类型的物联网产品,则不可避免地需要某种类型的移动应用程序。 尽管有简单的方法 ,但它们并不用于生产。

In this tutorial, we'll talk about the basics of Particle app development. You'll learn about some of the many app frameworks you can take advantage of. Plus there's libraries, tricks, and tools along the way to make your life a lot easier.

在本教程中,我们将讨论粒子应用程序开发的基础知识。 您将了解许多可以利用的应用程序框架。 此外,还有各种库,技巧和工具,使您的生活更加轻松。

应用框架 (App Frameworks)

Sometimes it's dang near irritating to program multiple applications natively. You see, Swift (or Objective C 🤮) and Java aren't terrible at first glance (well, maybe except for Obj-C 🤮). But when you're resource constrained, you have to figure out a new game plan. That's where App Frameworks come in.

有时,本地编写多个应用程序很烦人。 您会发现,Swift(或Objective C🤮)和Java乍一看并不糟糕(嗯,也许是Obj-C except除外)。 但是,如果您资源有限,就必须制定新的游戏计划。 那就是App Framework的用武之地。

These frameworks allow an app developer to write, build and test cross platform apps. In some cases, the frameworks convert your app into native code. That means that they run as fast and as well as one written in Swift or Java.

这些框架允许应用程序开发人员编写,构建和测试跨平台应用程序。 在某些情况下,框架会将您的应用程序转换为本机代码。 这意味着它们的运行速度和使用Swift或Java编写的速度一样快。

I did the research and as of January 2020, here are some of the most supported frameworks:

我进行了研究,截至2020年1月,以下是一些最受支持的框架:

  • Framework7

    框架7

  • Flutter

  • NativeScript

    本机脚本

  • ReactNative

    ReactNative

  • Ionic

    离子性

  • Cordova / PhoneGap

    科尔多瓦 / PhoneGap

  • Meteor

    流星

  • Xamarin

    Xamarin

The list goes on for days.

该列表持续了几天。

I've used a few of these frameworks in the past. I've built a Meteor app which (surprisingly) worked. In the end I had to pick one though. What did I go with?

我过去曾经使用过其中一些框架。 我构建了一个(令人惊讶的)有效的Meteor应用程序。 最后,我不得不选一个。 我去了什么?

NativeScript.

NativeScript。

For the most part, NativeScript's documentation and on-boarding experience is fantastic. Not only can you preview your app inside an emulator but you can load it directly to your phone too!

在大多数情况下,NativeScript的文档和入门经验都很棒。 您不仅可以在模拟器中预览应用程序,还可以将其直接加载到手机中!

One of the cool things about NativeScript is that it supports TypeScript. TypeScript is a superset of JavaScript with some extra wiz-bang features.

NativeScript的优点之一是它支持TypeScript。 TypeScript是JavaScript的超集,具有一些额外的wiz-bang功能。

Unlike other languages, JavaScript technically has no types. If you've done any Particle development you likely know what a type is. We're talking about int, String, float and more. i.e. they're directives to to make sure your JavaScript code stays consistent.

与其他语言不同,JavaScript技术上没有类型。 如果完成了任何Particle开发,您可能会知道类型是什么。 我们正在谈论intStringfloat等。 也就是说,它们是确保您JavaScript代码保持一致的指令。

NativeScript is also compatible with most major JavaScript web frameworks. This includes Vue.Js and Angular.

NativeScript还与大多数主要JavaScript Web框架兼容。 这包括Vue.Js和Angular 。

I've only noticed one major drawback thus far: the mobile preview mode (tns preview command) does not pay well with native libraries. If you have some native platform specific libraries, you'll have to use the emulator or a device (if you have one).

到目前为止,我仅注意到一个主要缺点:移动预览模式( tns preview命令)不能与本机库一起使用。 如果您有一些本机平台特定的库,则必须使用仿真器或设备(如果有的话)。

If you're gung-ho and you want to build multiple apps in their respective languages, the more power to you. There is an advantage over the above frameworks: tried and true Particle SDKs.

如果您是gung-ho,并且想要以各自的语言来构建多个应用程序,那么您将获得更多的功能。 与上述框架相比,它有一个优势:久经考验的真实的SDK。

可用的库和SDK (Available Libraries & SDKs)

Particle has gone out of their way to make app development a little easier. This is thanks to the massive development work that has gone into their own SDKs. Yup, gone are the days you have to write manual HTTP request handlers.

Particle已竭尽全力使应用程序开发更加轻松。 这要归功于他们自己的SDK中的大量开发工作。 是的,您不得不编写手动HTTP请求处理程序的日子已经一去不复返了。

Here's a link to both the iOS and Android SDKs:

这是iOS和Android SDK的链接:

  • iOS

    的iOS

  • Android

    安卓系统

Though we won't be covering them here, they reflect all the potential calls that you can make using the Cloud API.

尽管我们不会在这里介绍它们,但是它们反映了您可以使用Cloud API进行的所有潜在调用。

Speaking of Cloud API, Particle has also developed a Node.js library as well. As you can imagine, you can use this for your server side code or JavaScript based app frameworks. Sadly, it doesn't work with NativeScript. Frameworks that use a WebView should be more compatible.

说到Cloud API,Particle还开发了一个Node.js库。 可以想象,您可以将其用于服务器端代码或基于JavaScript的应用程序框架。 可悲的是,它不适用于NativeScript。 使用WebView的框架应该更兼容。

In the case of this tutorial, we'll be mostly focusing on the Cloud API. This way you have a good understanding of the overall system. It may seem intimidating but if you do it right, you'll get the hang of it real fast.

在本教程中,我们将主要关注Cloud API。 这样,您对整个系统有了很好的了解。 这似乎令人生畏,但是如果您做对了,您将很快掌握其实质。

进行API调用 (Making API Calls)

In NativeScript you can't use libraries like [request](https://github.com/request/request). (Which happens to be the library Particle's very own DMC used in the CLI — DMC if you're reading this, Hi!) You'll have to use the provided HTTP module.

在NativeScript中,不能使用[request](https://github.com/request/request)类的库。 (这恰好是CLI中使用的库Particle自己的DMC-如果您正在阅读,则为DMC,嗨!)您必须使用提供的HTTP模块。

If you scroll all the way to the bottom of that page, you'll see a fully fledged POST example. I'll reproduce it here but with some Particle specific changes:

如果您一直滚动到该页面的底部 ,将会看到一个完整的POST示例。 我将在此处重现它,但会进行一些特定于粒子的更改:

// Create form post data
var data = new FormData();
data.append("name", "update");
data.append("data", "It's hammer time!");
data.append("private", "true");
data.append("access_token", _token);// Configure the httpModule
return httpModule.request({url: `https://api.particle.io/v1/devices/events`,method: "POST",content: data}).then(response => {const result = response.content.toJSON();console.log(result);},e => {if (e) console.log(e);});

The above is an example of what's equivalent to Particle.publish in DeviceOS. Let's break down the parts.

上面是与DeviceOS中的Particle.publish等效的示例。 让我们分解零件。

First of all, one of the main gotchas of Particle's Web API is the data format. I first expected that they use JSON but I was sorely wrong. After actually reading the documentation I realized that most POST requests were actually application/x-www-form-urlencoded. That means when you submit data, it's the equivalent to hitting the submit button on an HTML form.

首先,粒子Web API的主要难题之一是数据格式。 我最初希望他们使用JSON,但是我非常错误。 实际阅读文档后,我意识到大多数POST请求实际上都是application/x-www-form-urlencoded 。 这意味着您提交数据时,相当于单击HTML表单上的“提交”按钮。

Fortunately, there is an easy way to assemble form data in Node/JavaScript. We can use the FormData() object. Take a look at the above. There should be some familiar parameter names in the data.append calls.

幸运的是,有一种简单的方法可以在Node / JavaScript中组装表单数据。 我们可以使用FormData()对象。 看看上面的内容。 data.append调用中应该有一些熟悉的参数名称。

"name" refers to the name of the event you're publishing to.

"name"是指您要发布到的事件的名称。

"data" refers to the string formatted data that you're publishing.

"data"是指您要发布的字符串格式的数据。

"private" dictates whether or not you want to broadcast this data to the whole Particle world, or just your little corner of it.

"private"指示您是否要将此数据广播到整个粒子世界,或者只是广播到您的小角落。

"access_token" is a token that you can generate in order to make these API calls. Without a token though, you're dead in the water.

"access_token"是可以生成以进行这些API调用的令牌。 如果没有令牌,您将死在水里。

获取令牌 (Getting a Token)

Where do we get this elusive access_token?

我们从哪里得到这个难以捉摸的access_token

At first I had no idea.

起初我不知道。

I created an OAuth user and secret in the console. That lead to a dead end. Fiddled around with different API calls and settings. Nothing. Then it hit me like a ton of bricks. There's an access_token attached to the curl request on every device page!

我在控制台中创建了OAuth用户和密码。 那导致死胡同。 摆弄着不同的API调用和设置。 没有。 然后它像一堆砖头一样打击我。 每个设备页面上的curl请求都有一个access_token

Open up any device, click the little console button near Events. A popup with instructions an a URL will pop up. Copy the text after access_token=. That is your access_token! See below:

打开任何设备,单击“ 事件”附近的小控制台按钮 带有说明和URL的弹出窗口将会弹出。 在access_token=之后复制文本。 那就是你的access_token ! 见下文:

You can use this token to make calls to the Particle API. This can be to subscribe, publish, write to a function, read variables and more.

您可以使用此令牌来调用Particle API。 这可以是订阅,发布,写入函数,读取变量等。

通过命令行 (Through the command line)

That's nice and everything but how the heck can you programmatically generate one? One way is with the command line.

很好,一切都很好,但是您如何以编程方式生成一个呢? 一种方法是使用命令行。

particle token create is the name of the command you need to know about. When you run it, you'll be prompted to login. (Also enter your Authenticator code if you use one.) Then the command line will spit out a shiny new access_token you can use with the API!

particle token create是您需要了解的命令的名称。 运行它时,系统将提示您登录。 (如果您使用的话,也请输入您的Authenticator代码。)然后,命令行将吐出一个可用于API的闪亮的新access_token

通过API本身 (Through the API itself)

If you couldn't guess, particle token create is a frontend to a raw API call. You can make these API calls directly too. Here's what it looks like in NativeScript.

如果您无法猜测, particle token create就是原始API调用的前端 。 您也可以直接进行这些API调用。 这是NativeScript中的样子。

// Create form post data
var data = new FormData();
data.append("username", "jaredwolff");
data.append("password", "this is not my password");
data.append("grant_type", "password");
data.append("client_name", "user");
data.append("client_secret", "client_secret_here");// Configure the httpModule
return httpModule.request({url: `https://api.particle.io/v1/oauth/token`,method: "POST",content: data}).then(response => {const result = response.content.toJSON();console.log(result);},e => {if (e) console.log(e);});

This call may get more complicated. Mostly in the case if you have two factor authorization setup. It's well worth it when you figure it all out. After all, no one wants to manually create auth tokens if they don't have to!

该调用可能变得更加复杂。 通常,如果您有两个因素的授权设置。 当您全力以赴时,这是非常值得的。 毕竟,没有人愿意手动创建身份验证令牌!

Now you're ready to write and read from your devices. There's one thing though that may trip you up. Subscribing to events can be troublesome with a regular HTTP client. So much so that if you try to do it with NativeScript's HTTP client, it will lock up and never return. Luckily there is a way to handle these special HTTP calls.

现在,您可以进行设备读写了。 虽然有一件事可能会使您绊倒。 对于常规HTTP客户端,订阅事件可能会很麻烦。 如此之多,以至于如果您尝试使用NativeScript的HTTP客户端执行此操作,它将锁定并且永远不会返回。 幸运的是,有一种方法可以处理这些特殊的HTTP调用。

服务器发送了什么? (Server Sent What?)

Server Sent Events (SSE for short) is an HTTP/S subscription functionality. It allows you to connect to a SSE end point and continuously listen for updates. It's a similar web technology to what companies use for push notifications. It does require some extra functionality under the hood though...

服务器发送事件(简称SSE)是HTTP / S订阅功能。 它使您可以连接到SSE端点并持续监听更新。 这与公司用于推送通知的网络技术类似。 尽管它确实需要一些额外的功能...

上证所图书馆 (SSE Library)

After much head scratching and searching I stumbled upon nativescript-sse. It looked simple enough that I could start using immediately. More problems arose when I tried to use it though.

经过nativescript-sse和搜寻之后,我偶然发现了nativescript-sse 。 它看起来很简单,我可以立即开始使用。 但是,当我尝试使用它时,出现了更多问题。

First, it turns out you can't use the library in tns preview mode. The alternative is to use tns run ios --emulator or use tns run ios with your iPhone connected to your computer. The non-emulator command will automatically deliver your prototype app.

首先,事实证明您不能在tns preview模式下使用该库。 替代方法是在连接了iPhone的计算机上使用tns run ios --emulator或使用tns run ios 。 non-emulator命令将自动提供您的原型应用程序。

Side note: I had already set up my phone in Xcode. You may have to do this yourself before tns run ios is able to find and deploy to your phone.

旁注:我已经用Xcode设置了手机。 在tns run ios能够找到并部署到手机之前,您可能必须自己执行此操作。

Secondly, once I got the library working, I noticed I would get some very nasty errors. The errors seemed to happen whenever a new message from Particle came along.

其次,一旦我的图书馆开始工作,我注意到我会遇到一些非常讨厌的错误。 每当来自Particle的新消息出现时,错误似乎就会发生。

Turns out the underlying Swift library for iOS had fixed this last year. So I took it upon myself to figure out how to upgrade the NativeScript plugin. I'll save you the time to say that it can be a pain and there is a learning curve!

事实证明,iOS的基础Swift库已于去年修复。 因此,我亲自思考了如何升级NativeScript插件。 我会节省您的时间,说这可能很痛苦,而且有学习的弯路!

Fortunately after some hacking I got something working. More instructions on how to compile the plugin are in the README. Alternatively, you can download a pre-built one on the Release page of the repository.

幸运的是,经过一些黑客攻击后,我有了一些工作。 有关如何编译该插件的更多说明,请参见README 。 或者,您可以在存储库的“ 发行”页面上下载预构建的一个。

Download the .tgz file to wherever you like. Then, you can add it using tns plugin add. The full command looks like this:

.tgz文件下载到.tgz位置。 然后,您可以使用tns plugin add添加它。 完整的命令如下所示:

tns plugin add path/to/plugin/file.tgz

You can check to make sure the library is installed by running tns plugin list

您可以通过运行tns plugin list来检查以确保已安装该库

**jaredwolff$ tns plugin list
Dependencies:
┌─────────────────────┬──────────────────────────────────────────────────────────────────────────────────┐
│ Plugin              │ Version                                                                          │
│ @nativescript/theme │ ~2.2.1                                                                           │
│ nativescript-sse    │ file:../../Downloads/nativescript-sse/publish/package/nativescript-sse-4.0.3.tgz │
│ tns-core-modules    │ ~6.3.0                                                                           │
└─────────────────────┴──────────────────────────────────────────────────────────────────────────────────┘
Dev Dependencies:
┌──────────────────────────┬─────────┐
│ Plugin                   │ Version │
│ nativescript-dev-webpack │ ~1.4.0  │
│ typescript               │ ~3.5.3  │
└──────────────────────────┴─────────┘
NOTE:
If you want to check the dependencies of installed plugin use npm view <pluginName> grep dependencies
If you want to check the dev dependencies of installed plugin use npm view <pluginName> grep devDependencies**

Once installed, invoking the library takes a few steps. Here's an example:

安装完成后,调用库需要几个步骤。 这是一个例子:

import { SSE } from "nativescript-sse";sse = new SSE("https://api.particle.io/v1/events/blob?access_token=<your access token>",{}// Add event listener
sse.addEventListener("blob");// Add callback
sse.events.on("onMessage", data=>{// TODO: do stuff with your event data here!console.log(data);
});// Connect if not already
sse.connect();

First you need to import and create an instance of the library. When you create the instance, you will have to enter the URL that you want to use.

首先,您需要导入并创建该库的实例。 创建实例时,必须输入要使用的URL。

In this case we'll be doing the equivalent of Particle.subscribe(). It should look something similar to the above: https://api.particle.io/v1/events/<your event name>?access_token=<your access token>.

在这种情况下,我们将等效于Particle.subscribe() 。 它看起来应该类似于上面的内容: https://api.particle.io/v1/events/<your event name>?access_token=<your access token> : https://api.particle.io/v1/events/<your event name>?access_token=<your access token>

Replace <your event name> and <your access token> with the name of your event and your freshly created token!

<your event name><your access token>替换为事件的名称和您新创建的令牌!

Then you set up the library to listen for the event you care about. In this case blob is the event I most care about.

然后,您设置库以侦听您关心的事件。 在这种情况下, blob是我最关心的事件。

Then make sure you configure a callback! That way you can get access to the data when blob does come along. I've made a TODO note where you can access said data.

然后确保您配置了回调! 这样一来,当出现blob时,您就可以访问数据。 我做了一个TODO记录,您可以在其中访问所述数据。

Finally, you can connect using the .connect() method. If you don't connect, SSE will not open a session and you'll get no data from Particle.

最后,您可以使用.connect()方法进行连接。 如果您不连接,SSE将不会打开会话,您也不会从Particle中获取任何数据。

Placement of the code is up to you but from the examples it looks like within the constructor() of your model is a good place.(https://github.com/jaredwolff/nativescript-sse/blob/master/demo/app/main-view-model.ts)

代码的位置由您决定,但是从示例看来,在模型的constructor()中看起来是个好地方。( https://github.com/jaredwolff/nativescript-sse/blob/master/demo/app /main-view-model.ts )

其他例子 (Other Examples)

If you're curious how to use SSE in other places I have another great example: Particle's CLI.

如果您想知道如何在其他地方使用SSE,我还有另一个很好的例子:Particle的CLI。

Particle uses the [request](https://github.com/request/request) library to handle SSE events in the app. Whenever you call particle subscribe blob it invokes a getStreamEvent further inside the code.  You can check it out here. The request library has more information on streaming here.

粒子使用[request](https://github.com/request/request)库处理应用程序中的SSE事件。 每当您调用particle subscribe blob它都会在代码内部进一步调用getStreamEvent 。 您可以在这里查看。 request库在此处提供有关流式传输的更多信息。

更多资源 (More resources)

This is but the tip of the iceberg when it comes to connecting with Particle's API. Particle has some great documentation (as always) you can check out. Here are some important links:

这只是与Particle的API连接时的冰山一角。 粒子有一些很棒的文档(一如既往),您可以签出。 以下是一些重要的链接:

  • API documentation

    API文档

  • Javascript SDK

    Javascript SDK

  • iOS SDK

    iOS SDK

  • Android SDK

    Android SDK

结论 (Conclusion)

In this post we've talked about app frameworks, NativeScript, NativeScript plugins and Server Sent Events. Plus all the Particle related things so you can connect your NativeScript app to Particle's API.

在本文中,我们讨论了应用程序框架,NativeScript,NativeScript插件和服务器发送事件。 加上所有与Particle相关的东西,以便您可以将NativeScript应用程序连接到Particle的API。

I hope you've found this quick tutorial useful. If you have any questions feel free to leave a comment or send me a message. Also be sure to check out my newly released guide. It has content just like this all about Particle's ecosystem.

我希望您发现本快速教程对您有所帮助。 如果您有任何问题,请随时发表评论或给我发送消息 。 另外,请务必查看我最新发布的指南 。 它具有与粒子生态系统一样的内容。

Until next time!

直到下一次!

This post was originally from https://www.jaredwolff.com/how-to-develop-particle-iot-apps-using-nativescript/

这篇文章最初来自 https://www.jaredwolff.com/how-to-develop-particle-iot-apps-using-nativescript/

翻译自: https://www.freecodecamp.org/news/how-to-develop-particle-iot-apps-using-nativescript/

粒子滤波 应用

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

相关文章

  1. 双眼皮有几种做法

    ...

    2024/5/8 19:56:01
  2. 跨端开发面面谈之NativeScript从入门到放弃

    跨端开发面面谈之NativeScript从入门到放弃 ronniegong关注 0.3522018.05.21 11:29:49字数 2,712阅读 7,245 跨端开发面面谈之基于WebView的Hybrid开发模式一文总结了基于WebView的混合开发模式的发展路线和在各个方向的优化方式&#xff0c;简单介绍了基于这一模式的Ionic框…...

    2024/5/1 16:26:14
  3. 做割双眼皮手术要多少钱

    ...

    2024/4/20 19:33:15
  4. 如何在Nativescript角度应用程序中检测ibeacons

    At my work, we constantly think about ways to improve the user’s experience. One of the things I am working on is enabling our mobile app to aware of the user’s presence when the user come within proximity of certain rooms at our premise and automaticall…...

    2024/4/20 19:33:14
  5. 割双眼皮的效果

    ...

    2024/4/20 19:33:13
  6. 韩式双眼皮好吗

    ...

    2024/4/20 19:33:13
  7. NativeScript 2.4版本发布,支持Web Workers规范

    NativeScript 2.4版本发布&#xff0c;该版本将支持Angular 2.2、Node 6、ES6和ES7&#xff0c;同时附带了默认的CSS主题。\\在NativeScript 2.4版本的发布声明中&#xff0c;来自Telerik的Valio Stoychev声称&#xff1a;“这是我们有史以来最重量级的一次发布。在过去的两个月…...

    2024/4/24 16:23:11
  8. 用Vue.js开发原生应用选择Weex还是NativeScript?

    Vue.js是一个很好的框架&#xff01;它有一个友好的学习曲线&#xff0c;结合了最好的React的组件方法和Angular的模板。尽管如此&#xff0c;Vue.js仍然有一个限制&#xff0c;它还不能像React的React Native&#xff0c;Vue.js目前还没有稳定、广泛采用的方法来开发原生应用程…...

    2024/4/20 19:33:10
  9. 做双眼皮有几种方法

    ...

    2024/4/20 1:24:53
  10. 韩式双眼皮价格多少

    ...

    2024/4/20 19:33:09
  11. 双眼皮整形术

    ...

    2024/4/29 18:58:23
  12. AngularJs directive使用自定义filter

    Js代码 /** * money formatter, will add <small> tag for the yuan and the decimal * <div ng-bind-html"number|slMoney [:shrink [:noHtml :decimalLength]]"></div> * */ sl.filter(slMoney,[$filt…...

    2024/5/2 1:42:21
  13. 割韩式割切韩式怎么做医院割埋线双眼皮恢复

    ...

    2024/4/20 19:33:05
  14. angular 自定义过滤器

    <!DOCTYPE html><html><head><meta charset"UTF-8"><title></title><script src"js/angular.min.js" type"text/javascript" charset"utf-8"></script></head><!--自定义过…...

    2024/5/2 17:36:37
  15. angular filter等知识

    部分知识来源 Angular之自定义filter的用法Javascript parseFloat、parseDouble类型转换&#xff0c;数值加减&#xff0c;四舍五入Angular内置过滤器自定义filter 1.先自定义过滤器 var pmsApp angular.module("pmsApp", ["ui.router", ui.bootstrap, ui…...

    2024/4/20 19:33:21
  16. Angular自定义过滤器

    2019独角兽企业重金招聘Python工程师标准>>> Angular有许多不同的过滤器&#xff0c;但是还是有很大的限制。比如&#xff0c;我项目中需要在字符串中截取一段显示出来。例如时间过滤器&#xff0c;前面部分是获取的时间&#xff0c;后面是格式化的方式。除此以外还…...

    2024/4/20 19:33:29
  17. 割双眼皮大概要多少钱

    ...

    2024/4/20 19:34:15
  18. AngularJs Filter详解2--自定义过滤器

    在AngularJs中可以添加自定义过滤器&#xff0c;来过滤处理或格式化数据 实例1&#xff1a; <div ng-app"myApp" ng-controller"myCtrl"><p ng-repeat"x in items | arrayFilter">{{x}}-----转换后&#xff1a;{{x |dateFormat}}&l…...

    2024/4/20 19:34:15
  19. 全切割双眼皮手术后遗症

    ...

    2024/4/22 4:12:59
  20. Angular自定义管道pipes过滤器

    一、状态类型转对象的特定值 1、自定义管道过滤器StatusFilterPipe.ts import { Pipe, PipeTransform } from angular/core;export class PipeVo {value: string;label: string; }Pipe({name: statusFilter,pure: false }) export class StatusFilterPipe implements PipeTra…...

    2024/4/28 22:54:32

最新文章

  1. 2024-05-09四月初二周四

    2024-05-09四月初二周四 06:40-23:00 深兰Ai第五期 Part1:课时258&#xff1a;00:00:00 12:30-13:00 午饭烧水&#xff1a; 13:30-23:00 机器学习 19:00-20:00 晚饭&#xff1a; 20:00-23:00 coding 2.5 特征降维 unending 23:00-06:30 烧水资料下载...

    2024/5/8 22:28:34
  2. 梯度消失和梯度爆炸的一些处理方法

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

    2024/5/7 10:36:02
  3. 01背包问题 小明的背包

    2.小明的背包1 - 蓝桥云课 (lanqiao.cn) #include <bits/stdc.h> using namespace std; const int N1010;//开始写的105 开小了 样例过了但最后只过了很少一部分 int n,m; int v[N],w[N]; int f[N][N];int main() {cin>>n>>m;for(int i1;i<n;i){cin>&…...

    2024/5/5 8:41:06
  4. [C++][算法基础]模拟队列(数组)

    实现一个队列&#xff0c;队列初始为空&#xff0c;支持四种操作&#xff1a; push x – 向队尾插入一个数 x&#xff1b;pop – 从队头弹出一个数&#xff1b;empty – 判断队列是否为空&#xff1b;query – 查询队头元素。 现在要对队列进行 M 个操作&#xff0c;其中的每…...

    2024/5/5 0:14:29
  5. 【外汇早评】美通胀数据走低,美元调整

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

    2024/5/8 6:01:22
  6. 【原油贵金属周评】原油多头拥挤,价格调整

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

    2024/5/7 9:45:25
  7. 【外汇周评】靓丽非农不及疲软通胀影响

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

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

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

    2024/5/7 14:25:14
  9. 【外汇早评】日本央行会议纪要不改日元强势

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

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

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

    2024/5/4 23:55:05
  11. 【外汇早评】美欲与伊朗重谈协议

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

    2024/5/4 23:54:56
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

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

    2024/5/7 11:36:39
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

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

    2024/5/4 23:54:56
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

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

    2024/5/6 1:40:42
  15. 【外汇早评】美伊僵持,风险情绪继续升温

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

    2024/5/4 23:54:56
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

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

    2024/5/8 20:48:49
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

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

    2024/5/7 9:26:26
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

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

    2024/5/4 23:54:56
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

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

    2024/5/8 19:33:07
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

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

    2024/5/5 8:13:33
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

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

    2024/5/8 20:38:49
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

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

    2024/5/4 23:54:58
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

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

    2024/5/6 21:42:42
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

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

    2024/5/4 23:54:56
  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