Day 10

苍穹外卖--开发记录day09-10 今天学习了springtask的简单使用,用springtask来定义定时任务,然后学习了websocket的双向传输,了解了通过ws由服务器端向前端发送数据;完成了来单提醒,催单的功能; 阅读详情

1.最长回文子串

最长回文子串
枚举、字符串、dp

1.1 解析

在这里插入图片描述

1.2 代码

//中心扩展算法
    int getLongestPalindrome(string s) {
        int n=s.size();
        int len=1;//统计结果
        for(int i=0;i<n;i++)//枚举中心点
        {
            //当长度是奇数的时候
            int left=i-1,right=i+1;
            while(left>=0&&right<n&&s[left]==s[right])
            {
                left--;
                right++;
            }
            len=max(len,right-left-1);

            //当长度是偶数的时候
            left=i,right=i+1;
            while(left>=0&&right<n&&s[left]==s[right])
            {
                left--;
                right++;
            }
            len=max(len,right-left-1);
        }
        return len;
    }
    
//方法二:动态规划
void ToLower(string& s)
    {
        for(auto& e:s)
        {
            if(e>='A'&&e<='Z') e+=32;
        }
    }
    int getLongestPalindrome(string s) {
        //1.准备工作
        ToLower(s);
        //2.创建dp表+初始化
        int n=s.size();
        vector<vector<bool>> dp(n,vector<bool>(n));
        //3.填表
        int maxlen=1;//记录回文串的长度
        for(int i=n-1;i>=0;i--)
        {
            for(int j=i;j<n;j++)
            {
                if(s[i]==s[j])
                {
                    dp[i][j]=i+1<j?dp[i+1][j-1]:true;
                    if(dp[i][j]&&maxlen<(j-i+1))
                    {
                        maxlen=j-i+1;
                    }
                }
            }
        }
        return maxlen;
    }

2.买卖股票的最好时机(一)

买卖股票的最好时机(一)
贪心、线性dp

2.1 解析

在这里插入图片描述

2.2 代码

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n=0;
    cin>>n;
    vector<int> nums(n);
    for(int i=0;i<n;i++) cin>>nums[i];
    int ret=0;//记录结果
    int prevmin=nums[0];
    for(int i=1;i<n;i++)
    {
        prevmin=min(prevmin,nums[i-1]);
        if(ret<nums[i]-prevmin)
            ret=nums[i]-prevmin;
    }
    cout<<ret;
    return 0;
}

3.[NOIP2002 普及组] 过河卒

[NOIP2002 普及组] 过河卒
二维dp

3.1 解析

在这里插入图片描述

3.2 代码

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    x+=1,y+=1;
    //1.创建dp表
    vector<vector<long long>> dp(n+2,vector<long long>(m+2));
    //2.初始化
    dp[0][1]=1;
    //3.填表
    for(int i=1;i<=n+1;i++)
    {
        for(int j=1;j<=m+1;j++)
        {
            if((i==x&&j==y)||(abs(i-x)+abs(j-y)==3&&i!=x&&j!=y))
                dp[i][j]=0;
            else dp[i][j]=dp[i-1][j]+dp[i][j-1];
        }
    }
    cout<<dp[n+1][m+1];
    return 0;
}
day10-会员主题开发 从dwm_mem_member_behavior_day_i表查找。获取dwm_mem_member_behavior_day_i表。分别计算最近30天和最近90天消费的会员,然后左关联,判断空值。xxx公司 2020-10 到 2022-11 报表开发。从dwm_mem_second_buy_i表获取。负责xxxx架构设计,负责技术选型,负责团队管理。从dwm_mem_sell_order_i获取。从dwm_mem_first_buy_i获取。MapReduce执行流程。Yarn资源调度流程。 阅读详情

相关推荐

S/4中的16种特殊库存类型

S/4中的16种特殊库存类型

yanzibing99的博客 1万+

Day_10_复现

print(f"训练集特征的形状{X_train.shape},训练集标签的形状{y_train.shape},测试集特征的形状{X_test.shape},测试集标签的形状{y_test.shape}")svm_model = SVC(random_state=42) # 采用random_state=42的随机数种子,便于复现,其他的内参采用默认参数。# 训练集特征的形状(6000, 30),训练集标签的形状(6000,),测试集特征的形状(1500, 30),测试集标签的形状(1500,)

sheyu980113的博客 868

liquibase扩展支持达梦数据库

近期项目中需要支持国产数据库,需要liquibase底层支持达梦数据库,记录下操作的详细步骤以便分享。 1.liquibase支持的数据库很多如MySQL, PostgreSQL, Oracle, Sql Server, DB2。但是达梦数据库并不支持,所以需要新建DMDatabase类来适配达梦数据库。达梦语法和Oracle很像所以只需要复制liquibase-core下的Oracle Database做些修改就可了。以下为需要修改的地方 public class DMDatabase extends A

qq_43677719的博客 5472

day10作业

2501_92530734的博客 297

AI漫剧制作全流程零基础实操指南:从剧本到剪辑

AI漫剧是一种利用AI工具将剧本、分镜、出图、配音、剪辑整合为流水线的短视频内容形式。其技术原理基于文生图、图生图与文本转语音模型的组合,核心挑战在于角色一致性控制与分镜批量出图。这项技术大幅降低了视频制作门槛,使个人创作者无需演员和设备即可产出剧情向短内容,广泛应用于短视频平台的情景剧、玄幻、甜宠等题材。本文给出了一套零基础可照做的全流程实操方案,覆盖剧本提示词、分镜表、出图选型、配音合成与剪辑模板,帮助你快速跑通AI漫剧制作链路。

weixin_29048309的博客 519

自动驾驶仿真 (四)—— 基于PreScan与Simulink的AEB系统多场景验证

本文详细介绍了基于PreScan与Simulink的AEB系统多场景验证方法,涵盖标准场景搭建、复杂工况扩展及控制策略优化。通过仿真技术,显著降低测试成本并提升场景覆盖率,有效解决实车测试中的痛点问题。特别适用于自动驾驶领域的AEB系统开发与验证。

weixin_28273593的博客 248

苍穹外卖学习 Day10 Day11 Day12

苍穹外卖Day10 Day11 Day12的学习

m0_74448051的博客 1407

2024年物联网嵌入式最新嵌入式期末大作业——家用智能晾衣杆,初面蚂蚁金服

在家用智能晾衣杆中,用户可以根据自身的需要,切换手动和自动两个模式。天气对应的接口对应心知天气的天气图,可以下载后:调整尺寸->调整透明度->用画图工具保存为单色位图->提取出点阵信息(如我用的zimoV2.2软件),将点阵信息,存到数组里,根据weather的信息,调用display.drawBitmap()方法就能打印出对应的天气了。该库依赖于,将他们导入后,设置屏幕的主从关系,片选信号和数据,时钟信号等引脚后,就设置好屏幕的驱动。

2401_85013604的博客 1247

10.19Day1

leetcode26

qq_52680399的博客 101

torchsparse安装

torchsparse安装以及安装失败原因分析和解决

AI_BING_的博客 1万+

AI数字人直播带货全攻略:从零搭建到高效运营

本文提供了一份从零开始搭建与运营AI数字人直播间的完整指南。详细解析了AI数字人直播带货的核心价值与适用场景,并分步讲解了硬件准备、软件选择、数字人创建、话术编排、OBS推流设置及开播测试等关键环节。最后,文章还分享了高效运营策略与常见避坑指南,旨在帮助商家利用AI技术实现降本增效,打造24小时不间断的智能带货直播间。

weixin_29269441的博客 2231

java_day10作业

文章目录java_day10练习题练习1练习2练习3练习4练习5 java_day10练习题 练习1 一、需求说明:定义一个数组,数组中元素为:{24,69,80,57,13},将数组中的元素按照从小到大的顺序进行排序。 1.2.操作步骤描述 1.创建一个一维数组,数组内容为{24,69,80,57,13}。 2.对数组中元素按照从小到大的顺序进行排序。 3.将排完序的数组进行打印。 packa...

364

ROS机器人里程计模型

3.5 移动机器人系统模型 相信大家的机器人平台STM32端底层控制和机器人urdf建模都已经顺利完成了,在正式开始ros端编写机器人启动功能包之前,我们还不得不学习一些必要的理论知识。别担心数学不好,这里基本都是高中数学。下面我们开始,Are you ready? 没准备好也开始了。 3.5.1 常用坐标系系统模型 在移动机器人技术研究中,最为常用的坐标系统是笛卡尔坐标系统。而在SLAM算法研究中,有如下几个比较常见的笛卡尔坐标系统,它们分别为机器人坐标系XR YR OR 、传感器坐标系XS YS OS

「小白学移动机器人」一个专注分享移动机器人相关知识的公众号! 1万+

Day10实验

Day10## 实验9整理的部分题 1.编写出一个通用的人员类(Person),该类具有姓名(Name)、年龄(Age)、性别(Sex)等域。然后对Person 类的继承得到一个学生类(Student),该类能够存放学生的5门课的成绩,并能求出平均成绩。最后在Main函数中对student类的功能进行验证。 public class Person { private String name; ...

weixin_44720195的博客 1261

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

Day 10 训练

今日任务:把之前所有的处理手段都处理一遍,回顾一下全流程,以后就用处理好的部分直接完成开始机器学习建模(简单建模,不涉及调参)和评估。

qq_62585870的博客 899

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

C语言基础 day10作业

一、思维导图二、作业。

weixin_49366095的博客 166

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

JZ Day10 B组 T3 序列问题

未完成,待补充

owo 171

day2 10字符类型

day2 10字符类型

qq_42722278的博客 121

Day_10

复习日。

mutongyindi的博客 223

苍穹外卖Day10

创作不易,大家的支持就是我坚持下去的动力!

m0_70660627的博客 2934

Day10 算法训练营

232.用栈实现队列;225.用队列实现栈;1047. 删除字符串中的所有相邻重复项。(双端队列)是一种更灵活的数据结构,它支持从两端(队头和队尾)进行插入和移除操作。可以被用作普通队列(FIFO)、栈(LIFO)或双向队列。方法用于将一个元素插入到队列的尾部。注意Deque和Queue的区别。方法在插入失败时会抛出。

qq_54162207的博客 1205

Linux入门DAY10

本文介绍了Linux进程管理中的信号发送机制,重点讲解了kill、pkill和pgrep命令的使用方法。通过实验演示了如何向进程发送不同信号(如SIGTERM、SIGSTOP、SIGCONT)来控制进程运行状态,包括暂停、继续和终止进程。文章还探讨了特殊进程状态,特别是僵尸进程的产生原理和危害,并提供了通过C程序模拟僵尸进程的代码示例。这些内容为Linux系统管理员提供了实用的进程管理技巧,帮助解决常见的进程控制问题。

m0_63492986的博客 718

day10-SpringBootWeb案例

day10-SpringBootWeb案例

chuanchengdabing的博客 320

苍穹外卖-day10

day10主要完善:订单状态定时处理,来单提醒和用户催单三个业务功能提示:以下是本篇文章正文内容,下面案例可供参考提示:这里对文章进行总结:例如:以上就是今天要讲的内容,本文仅仅简单介绍了pandas的使用,而pandas提供了大量能使我们快速便捷地处理数据的函数和方法。

2401_88683087的博客 1104
上一篇: Day 9
下一篇: Day 11
Tangcan-
博客等级 码龄3年 664粉丝 91原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值