[LeetCode] 772. Basic Calculator III
The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and empty spaces .
2018-09-17
ORACLE---oracle查看耗资源的进程Spid
1.第一步查看消耗资源的进程; {代码...} 2.第二步Spid查看sql_id; {代码...} 3.第三步通过sql_id查sql_fulltext; {代码...}
LeetCode541. Reverse String II -- 按步长反转字符串
Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k c...
2018-06-29
leetcode #5 最长回文子串
题目 给定一个字符串s,找到s中最长的回文子串。你可以假设 s的最大长度为 1000。 思路 动态规划 P(i,j) = (P(i+1,j-1) and Si == Sj) 代码 ps:注意这里外面的for用的是长度,直接下标i循环也是可以的 {代码...} 马拉车算法 {代码...}
2020-02-01
C语言学习笔记一
01.字符串指定字符截取: {代码...}
2015-08-26
强化学习基础篇【1】:基础知识点、马尔科夫决策过程、蒙特卡洛策略梯度定理、REINFORCE 算法
环境(environment):智能体以外的一切统称为环境,环境在与智能体的交互中,能被智能体所采取的动作影响,同时环境也能向智能体反馈状态和奖励。虽说智能体以外的一切都可视为环境,但在设计算法时常常会排除不相关的因素建立一个理想的环境模型来对算法功能进行模拟。
2023-06-02
Go1.22 新特性:Slices 变更 Concat、Delete、Insert 等函数,对开发挺有帮助!
大家好,我是煎鱼。在 Go1.22 这个新版本起,切片(Slices)新增和变更了一些行为。对于开发者相对更友好了一点。新增 Concat 函数在以前的 Go 版本中,有一个很常见的使用场景,如果我们想要拼接两个切片。必须要手写类似如下的代码: {代码...} 输出结果: {代码...} 如果在 Go 工程中常用到,大家还会在类似 util 包...
Loki日志服务实践整理
Add the configuration of your storage, pointing to the designated S3 bucket.StorageConfig with AWS S3 :
2024-01-17
[LeetCode] 115. Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of S which equals T.
2018-12-26
kubernetes 设置 Master 可调度与不可调度
kubernetes 设置 Master 可调度与不可调度语法kubectl taint node [node] key=value[effect][effect] 可取值: [ NoSchedule | PreferNoSchedule | NoExecute ]NoSchedule: 一定不能被调度PreferNoSchedule: 尽量不要调度NoExecute: 不仅不会调度, 还会驱逐Node上已有的Pod取消污点 {代码...} 设置污点 {代码...} 查看验...
2022-06-10
[LintCode/LeetCode] Two Strings are Anagrams/Valid Anagram
Write a method anagram(s,t) to decide if two strings are anagrams or not.
2016-04-04
JAVA IO源码学习系列一(OutputStream)
介绍 1. 输出流:OutputStream {代码...} 2. OutputStream 源代码介绍 对于输出流的超类,最主要的就是写操作对于写到什么地方,这个需要不同的子类去实现具体的write方法,后续介绍 {代码...} 3. 内容不多,召唤神兽 {代码...}
2017-11-16
Start Using Java Lambda Expressions(转载)
Lambda expressions are a new and important feature included in Java SE 8. A lambda expression provides a way to represent one method interface using an expression. A lambda expression is like a method, it provides a list of formal parameters and a body (which can be an expression or a block of co...
2016-06-11
Is Subsequence
Is Subsequence 题目链接:[链接] greedy, 只要s里面当前的字符可以和t里的字符匹配,s的index就+1 {代码...} follow up: string很长,用字典存起来dict很大,用trie
2017-02-06
Introduction
I am a member of GembaChina's PD team , and have 2-3 years experiences in scripts programming , web application developments , and linux server's managements , my major in university is Petroleum Machinery , my favorite course is Java/PHP programming , and I do not like micrtsoft/adobe 's courses...
2014-11-06
kubernetes核心实战(九)
14、Ingress检查是否有安装 {代码...} 若未安装可以查看官网文档:[链接]创建环境: {代码...} 查看四层负载并测试 {代码...} 创建七层 {代码...} 电脑上写死hosts {代码...} 测试访问 {代码...} url 重写 {代码...} 流量限制 {代码...} 注:可以将server 改为nodeport 即可在外部访问,将 type 改为 NodePort {代码...}...
2021-12-06
prometheus remote-write解析(二) -- 源码解读
整体流程remoteConfigs支持配置多个remoteStorage,每个remoteStorage使用1个QueueManager;watcher将sample发送给QueueManager;1个QueueManager中管理多个shard,每个shard的容量为capactiy;每个shard会定时(batch_send_deadline)定量(max_samples_per_send)的向remote endpoint发送数据;代码入口入口:storage/remot...