[RATS]week-3

2024-02-07 05:40
文章标签 week rats

本文主要是介绍[RATS]week-3,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

[RATS]week-3

  • Algorithm
    • Question
    • Answer
    • Result
  • Review
    • Spring Cloud - Main Projects
  • Tips - MySQL 更新语句执行顺序
  • Share - Vue 技能进阶:使用设计模式写出优雅的前端代码 from InfoQ

Algorithm

Question

给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。

示例 1:
输入: “babad”
输出: “bab”
注意: “aba” 也是一个有效答案。
示例 2:
输入: “cbbd”
输出: “bb”

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/longest-palindromic-substring
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

Answer

 public static String longestPalindrome1(String s) {char[] charArray = s.toCharArray();int strLength = s.length();int leftTmp = 0, rightTmp = 0, tmpLength = 0, left = 0, right = 0, length = 0, leftCursor = 0, rightCursor = 0;for (double i = 0.5; i < strLength; i = i + 0.5) {leftTmp = (int) Math.floor(i);rightTmp = (int) Math.ceil(i);while (leftTmp > -1 && rightTmp < strLength) {if (charArray[leftTmp--] != charArray[rightTmp++]) {break;} else {left = leftTmp + 1;right = rightTmp - 1;}}tmpLength = right - left + 1;if (length < tmpLength) {length = tmpLength;leftCursor = left;rightCursor = right;}}return s.length() == 0 ? "" : s.substring(leftCursor, rightCursor + 1);}

Result

在这里插入图片描述

Review

Spring Cloud - Main Projects

Spring Cloud Security
Provides support for load-balanced OAuth2 rest client and authentication header relays in a Zuul proxy.
安全
提供支持针对负载均和 OAuth2 rest Client 和Zuul proxy(网关代理)中的身份认证头部 的中继支持.

Spring Cloud Sleuth
Distributed tracing for Spring Cloud applications, compatible with Zipkin, HTrace and log-based (e.g. ELK) tracing.
侦查
Spring Cloud应用成的分布式追踪,与Zipkin,HTRace和基于日志追踪(如ELK)等系统的兼容

Spring Cloud Data Flow
A cloud-native orchestration service for composable microservice applications on modern runtimes. Easy-to-use DSL, drag-and-drop GUI, and REST-APIs together simplifies the overall orchestration of microservice based data pipelines.
数据流
运行在主流的运行时的由多个微服务组成的基于本地云的大型综合服务。简单易用的DSL,拖拽的GUI和REST-APIs一起简化了基于数据管线微服务的综合应用

Spring Cloud Stream
A lightweight event-driven microservices framework to quickly build applications that can connect to external systems. Simple declarative model to send and receive messages using Apache Kafka or RabbitMQ between Spring Boot apps.

一个轻量级的时间驱动的微服务框架能快速的构建应用,这样就能链接外部系统。通过简洁的声明模型使用Kafka或RabbitMQ来发送和接受来自各各SpringBoot的消息

Spring Cloud Stream App Starters
Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems.
Stream App Starters
Spring Cloud Stream App Starters是基于Spring Boot的Spring 集成应用,来提供外部系统的集成

Spring Cloud Task
A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. Simple declarative for adding both functional and non-functional features to Spring Boot apps.
任务
短生命周期的微服务框架可以快速的构建应用来执行有限数量的数据处理。简单的的声明式添加的功能或非功能话的特性到Spring Boot APPs

Spring Cloud Task App Starters
Spring Cloud Task App Starters are Spring Boot applications that may be any process including Spring Batch jobs that do not run forever, and they end/stop after a finite period of data processing.
Task App Starters
Spring Cloud Task App Starters是Spring Boot 应用,她能处理任何任务,包括永远不会运行Spring批任务,并且可以结束或停止任务在一个有限的数据处理范围内。

Spring Cloud Zookeeper
Service discovery and configuration management with Apache Zookeeper.
Zookeeper
通过Apache Zookeeper服务发现和配置管理

Spring Cloud AWS
Easy integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application around the hosted services without having to care about infrastructure or maintenance.
AWS
简单的继承部署在Amazon Web Service.她提供了便捷的方法与AWS提供的服务通过众所周知的Spring习惯用法and APIs,比如消息或API缓存。开发者可以构建他们的应用围绕托管服务而不必须去关心基础设施或运维。

Spring Cloud Connectors
Makes it easy for PaaS applications in a variety of platforms to connect to backend services like databases and message brokers (the project formerly known as “Spring Cloud”).
连接器
使各种平台的Paas(Platform as a service)应用很方便的链接到后台服务,比如数据库,消息代理(这个项目以前成为Spring Cloud)。

Spring Cloud Starters
Spring Boot-style starter projects to ease dependency management for consumers of Spring Cloud. (Discontinued as a project and merged with the other projects after Angel.SR2.)
Starters
Spring Boot风格的Starter项目来减轻SpringCloud的使用者的依赖管理。(作为一个项目已经不在使用,并且已经在Angel.SR2以后的版本中与其他项目合并)

Spring Cloud CLI
Spring Boot CLI plugin for creating Spring Cloud component applications quickly in Groovy
命令行
Spring Boot命令行插件来使用Groovy快速创建Spring Cloud组件应用。

Spring Cloud Contract
Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts approach.
合同
Spring Cloud 合同是一个伞状项目支撑的解决方案,可以帮助用户成功的实现消费者驱动的合同方法。

Spring Cloud Gateway
Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor.
网管
Spring Cloud 网关是一个基于交互式项目的智能且可编程的路由器

Spring Cloud OpenFeign
Spring Cloud OpenFeign provides integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.
OpenFeign
OpenFeign 提供集成Spring Boot Apps通过自动配置和绑定到Spring环境和其他的惯用的Spring编程模型

Spring Cloud Pipelines
Spring Cloud Pipelines provides an opinionated deployment pipeline with steps to ensure that your application can be deployed in zero downtime fashion and easilly rolled back of something goes wrong.
管线
Pipelines提供了一个可选择的部署管线,来逐步的确定你的应用程序可以非停机部署并且简单的回滚一些错误。

Spring Cloud Function
Spring Cloud Function promotes the implementation of business logic via functions. It supports a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).
功能
Spring Cloud Function提升了业务逻辑功能的实现。他提供跨无服务器提供着的统一的编程模型,也有能力去独立的执行(本地或基于Paas)

Tips - MySQL 更新语句执行顺序

update T set c=c+1 where id=2
在这里插入图片描述

日志分为Redo LogBin Log。使用WAL(Write-Ahead Log) 策略:先写日志,在写磁盘
Redo Log(Crash-Safe):
1.Inno DB 引擎独有。物理日志,固定大小,超出覆盖原有并重复写入。
2.记录做了具体的某个数据做了那些修改。如c=1 ⇒ c=2
3.SQL 语句经过【连接器】权限验证 ⇒【分析器】语法分析 ⇒【优化器】 ⇒执行计划生成 ⇒【执行器】通过InnoDB接口执行SQL语句
4.InnoDB 记录Redo Log,写入内存,在SQL空闲,先写入磁盘。
5.日志满时,会把要擦除的内容写入数据文件。
6.分两次写入。第一次为prepare,在成功写入Bin Log后,会把状态改为Commit。
Binlog(归档日志)
1.Server层实现,逻辑日志,可追加,不会覆盖原来的日志
2.记录原始逻辑.两种类型sql语句形式和表格形式。如c=c+1.一般都建议用表格形式

具体流程如下
在这里插入图片描述

以上摘自极客时间-《MySQL实战45讲》

Share - Vue 技能进阶:使用设计模式写出优雅的前端代码 from InfoQ

Vue 技能进阶:使用设计模式写出优雅的前端代码 from InfoQ

这篇关于[RATS]week-3的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/686672

相关文章

MATH36022 Numerical Analysis 2 Approximation of Functions – Week 3 Exercises

Show that the Chebyshev polynomials are orthogonal on ( − 1 , 1 ) (−1, 1) (−1,1) with respect to the weight function ( 1 − x 2 ) − 1 / 2 (1 − x^2)^{−1/2} (1−x2)−1/2. Ans: T n ( x ) = cos ⁡ ( n arcc

MATH36022 Numerical Analysis 2 Approximation of Functions – Week 2 Exercises

Attempt these exercises in advance of the tutorial in Week 3 Find the best L ∞ L_\infin L∞​ approximation to f ( x ) = x n + 1 + ∑ k = 0 n a k x k f (x) = x^{n+1} + \sum_{k=0}^na_kx^k f(x)=xn+1+∑k=

【Hello Python World】Week 2(1):列表简介

1 姓名3-2 问候语3-3 自己的列表3-4 嘉宾名单3-5 修改嘉宾名单3-6 添加嘉宾你刚找到了3-7 缩减名单3-8 放眼世界3-9 晚餐嘉宾3-10 尝试使用各个函数3-11 有意引发错误 第三章主要是介绍Python中的list,比较简单 3.1 姓名 将一些朋友的姓名存储在一个列表中,并将其命名为names 。依次访问该列表中的每个元素,从而将每个朋

【Hello Python World】Class Notes of Week 2

列表 (3.14 update) 1.数组下标错误会抛出异常(与C++不同)2.一个list里可以有不同的数据结构3.插入方法4.删除方法 第一种方法:pop(),有返回值第二种方法:del,没有返回值第三种方法:remove(),没有返回值,而且会抛出异常 5.操作方法 用sort()和sorted()从小到大排序翻转列表reverse()求长度len() 6.列表的数据处理 求和su

【Hello Python World】Week 1(1):探索 展望

什么是Python一些与学习Python有关的网站 wwwpythonorgwwwliaoxuefengcom廖雪峰老师的个人网站 对Python的展望 什么是Python Python的原型诞生于1989年圣诞节,著名的“龟叔”Guido van Rossum在当时为了打发无聊的圣诞假期,随手开发出这款语言。这个有点“无心插柳”的行为却给我们带来了这个简洁而强大工具。时

21—小结(Week)

一 、xutils的框架设计问题,他内部貌似采用的是线程池管理的,当线程池满的时候,其他的线程就会处于等待状态, 这时候如果界面的数据依赖网络请求结果的话,就会造成阻塞状态。 xutils的整个后台是基于ThreadPoolExecutor线程池来做的,该程序封装的线程池的最大连接数是10,所以每次new 一个httpUtils请求下载的时候,一个new 的请求对象最多download下

xamarn.android binding parse sdk for a week to work

Xamarin.Android PackageName 需要设置为项目命名空间且全小写。 http://blog.csdn.net/jameszhou/article/details/41806377

Coursera耶鲁大学金融课程:Financial Markets 笔记Week 02

Financial Markets 本文是学习 https://www.coursera.org/learn/financial-markets-global这门课的学习笔记 这门课的老师是耶鲁大学的Robert Shiller https://en.wikipedia.org/wiki/Robert_J._Shiller Robert James Shiller (born Ma

STAT315 Week 8 广义线性混合模型(GLMMs)

正如我们使用 LMM 对具有相关观测值的正态数据进行建模一样,我们可以使用 GLMM 对非正态分布且具有相关观测值的数据进行建模。 响应变量通常是离散的或明显非正态的。 GLMM 允许响应数据来自指数族的任何其他分布,包括最常见的二项分布和泊松分布。因此,GLMM 是具有正态分布随机效应的广义线性模型。 上图展示了广义线性混合模型(Generalized Linear Mixed Model

MongoDB聚合运算符:$week

MongoDB聚合运算符:$week 文章目录 MongoDB聚合运算符:$week语法使用举例 $week聚合运算符返回指定日期日期为一年中第几周的数字值为0到53之间。周从周日开始,第1周从一年的第一个周日开始。一年中第一个星期日之前的日期为第0周。这和 strftime标准库函数中的 "%U"操作符相同。 语法 { $week: <dateExpression