Sign in

What is Metadata ?
Metadata is simply data about data. It means it is a description and context of the data. It helps to organize, find and understand data.

Here are a few real world examples of metadata:

Typical metadata
Those are some typical metadata elements:
1. Title and description.
2. Tags and categories.
3. Who created and when.
4. Who last modified and when.
5. Who can access or update.

A photo
Every time you take a photo with today’s cameras a bunch of metadata is gathered and saved with it:
date and time,
filename,
camera settings,
geolocation.

A…

An enum is a special “class” that represents a group of constants (unchangeable variables, like final variables).
To create an enum, use the enum keyword (instead of class or interface), and separate the constants with a comma. Note that they should be in uppercase letters:

Example:

enum Level {
LOW,
MEDIUM,
HIGH
}

You can access enum constants with the dot syntax:
Level myVar = Level.MEDIUM;

Enum Fields
You can add fields to a Java enum.
Thus, each constant enum value gets these fields.
The field values must be supplied to the constructor of the enum when defining the constants. Here’s an…

Below two github repos contain my examples of use of OpenApi codegen:

https://github.com/shipengx/openapi-codegen-demo-spring-boot
This is a Spring Boot web application that uses openapi-codegen maven plugin to generate example PetApi interface for spring boot controller to implement. The auto-generated java classes are generated from “petstore.yaml” openapi spec file.

https://github.com/shipengx/openapi-codegen-demo
This is a Java application that uses openapi-codegen maven plugin to generate exaxmple client code that can call the petstore Web APIs, the API which we wrote in above “spring boot” web app.
It’s a great example of use of auto-generated openapi client class : “ApiClient”.

below is the link for official openapi-generator maven plugin:
https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin

Run this command to start Vault server locally

vault server --dev

this command will start a dev mode vault server locally and give you the vault server url & vault token which you can export in terminal.

Store secrets in Vault
Vault is a secret management system allowing you to store sensitive data which is encrypted at rest. It’s ideal to store sensitive configuration details such as passwords, encryption keys, API keys.

Launch another console window to store application configuration in Vault using the Vault command line. …

Vault comes with various pluggable components called secrets engines and authentication methods allowing you to integrate with external systems.

The purpose of those components is to manage and protect your secrets in dynamic infrastructure (e.g. database credentials, passwords, API keys).

One of the core features of vault is the ability to read and write arbitrary secrets securely. Secrets written to vault are encrypted and then written to backend.

The path prefix tells Vault which secrets engine to which it should route traffic. When a request comes to Vault, it matches the initial path part using a longest prefix match and…

Let’s talk about everything about Redis Cache.

High level Architecture
The basic idea of rate limiting algorithms is simple. At the high-level, we need a counter to keep track of how many requests are sent from the same user, IP address, etc. If the counter is larger than the limit, the request is disallowed.

Where shall we store counters ? Using the database is not a good idea due to the slowness of disk access. In-memory cache is chosen because it is fast and supports time-based expiration strategy. For instance, Redis is a popular option to implement rate limiting. It is an in-memory store that offers two…

For learning

就是拿lc原题考都有大把人答不出来更不用说变形或者新题了刷题更多是练习编程能力抽象思维逻辑思维大厂之所以要考刷题而不像国内那样更多聚焦业务问题是因为对数据结构和算法的理解和应用基本反映了一个码农的潜质尤其是到后期初期可能绝大多数人的工作是用不到数据结构和算法的但是后面要开始接触到软件架构要把控全局代码时时间复杂度和空间复杂度其实就非常重要了直接影响到你设计的软件效率借用地里之前以一位辈说的话刷题厉害的就三种人:
1特聪明的
2特勤奋的
3特别喜欢这家公司的把所有面经和tag题都背下来了
这三种人公司招哪种都不亏

其次,每个人对于“刷题”这件事情的定义是不一样的。比如,有些同学认为把题目做一遍就算刷题了,而对于刷题界的老炮们来说,挑到那最精髓的20%的题各种姿势虐,远比750道题穿肠而过,来的有意义得多。

最后,每个人的知识储备,可用时间与目标公司都不一样。有些猛男一天能把20道高难度题目刷的气定神闲,有些菜鸡一周刷5道中等难度就已经生活不能自理。与其追求刷题数量上的多,不如去找到让自己最高效的刷题节奏。

和所有领域的猛男一样,成为一个刷题猛男的关键在于持久。保持一个良好的状态加上持之以恒,就算是菜鸡也终有蜕变成猛男的一天。

为什么要刷题?
我想大部分newgrad对这个问题没有任何疑惑
但对于已经有很多年工作经验的人
这个问题是一个必须想明白的问题否则会极大的影响自己刷题的motivation一边刷一边愤恨道:我N年的经验根本不看就考这些破算法题?
你们谁工作用过这么复杂的算法?报着这个心理刷题能刷成啥样可想而知做题和工作经验的关系可以类比成下面这个问题:“男人看女人到底是更看重外貌还是思想?”
答:思想决定我会不会和她交往而外貌决定我愿不愿意了解她的思想!
交往=雇佣男人=公司女人=你外貌=做题思想=工作经验一目了然了吧?
考做题是对一个程序员基本素养的考核如果这个不达标你的经验再多公司也不会要你
就比如你去面试国足你说你踢了10年球了, 人家先测你个百米速度你跑了半分钟, 那你踢几年球有意义吗只能说明你在低水平球队混了10年而已.
但一旦你刷题这关过了, all of sudden your experience starts to matter! …

Issac

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store