IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供软件/框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::storage::StoreableItem; | |
| #[cfg(debug_assertions)] | |
| use crate::wrapper::time; | |
| use anyhow::bail; | |
| use embedded_svc::http::client::{Client, Request, RequestWrite, Response}; | |
| use embedded_svc::http::{SendHeaders, Status}; | |
| use embedded_svc::io; | |
| use esp_idf_svc::http::client::{EspHttpClient, EspHttpClientConfiguration}; | |
| use log::{debug, error}; | |
| use rust_decimal::Decimal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 通过官方接口定义 tantivy 数据库 | |
| let mut schema_builder = SchemaBuilder::default(); | |
| let id_field = schema_builder.add_bytes_field("id", STORED); | |
| let value_index = TextFieldIndexing::default() | |
| .set_tokenizer(CANG_JIE) // Set custom tokenizer | |
| .set_index_option(IndexRecordOption::WithFreqsAndPositions); | |
| let value_option = TextOptions::default().set_indexing_options(value_index); | |
| let value_field = schema_builder.add_text_field("value", value_option); | |
| let schema = schema_builder.build(); | |
| let index = Index::create_in_dir(dir, schema.clone())?; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let cb = format!("{}{}{}220120200217", rid, DID, dt); | |
| let rb = md5(&cb.as_bytes()); | |
| let mut re = vec![]; | |
| for i in 0..4 { | |
| let s = &rb[i * 8..i * 8 + 8]; | |
| let u1 = i32::from_str_radix(&s[0..2], 16).unwrap(); | |
| let u2 = i32::from_str_radix(&s[2..4], 16).unwrap(); | |
| let u3 = i32::from_str_radix(&s[4..6], 16).unwrap(); | |
| let u4 = i32::from_str_radix(&s[6..8], 16).unwrap(); | |
| re.push((u1 & 0xff) | ((u2 << 8) & 0xff00) | ((u3 << 24) as u32 >> 8) as i32 | u4 << 24); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - var blocks = 94; | |
| .container | |
| - var d = 6; | |
| - while (d--) { | |
| .digit | |
| - } | |
| .surface | |
| - for (var b = 1;b <= blocks;++b) { | |
| div(class="block b" + b) |