Thursday, December 21, 2023

Peter Piper tongue twister

 Peter Piper picked a peck of pickled peppers.

A peck of pickled peppers Peter Piper picked.

If Peter Piper picked a peck of pickled peppers,

Where's the peck of pickled peppers Peter Piper picked?


Peter Piper picked a peck of pickled peppers.

If Peter Piper picked a peck of pickled peppers,

How many pickled peppers that Peter Piper picked?


Sunday, December 17, 2023

北京4050人员退休新政策

 北京4050人员退休新政策是什么

《北京市城镇登记失业人员灵活就业社会保险补贴办法》

第一条为了鼓励我市城镇登记失业人员灵活就业,根据《北京市人民政府贯彻落实国务院关于进一步加强就业再就业工作文件的通知》(京政发[2006]4号)精神,制定本办法。

第二条本办法适用于具有本市城镇户口,从事灵活就业,并办理了就业登记的城镇登记失业人员。

华律网

第三条城镇登记失业人员符合下列条件的,可以申请灵活就业社会保险补贴:

(一)女满40周岁,男满45周岁以上(以下简称“4045”失业人员)及中、重度残疾人;


(二)在社区从事家政服务与社区居民形成服务关系,或在区县、街道(乡镇)、社区统一安排下从事自行车修理、再生资源回收、便民理发、果蔬零售等社区服务性工作,以及没有固定工作单位,岗位不固定、工作时间不固定能够取得合法收入的其他灵活就业工作;

(三)已实现灵活就业满30日,并在户口所在区县劳动保障部门办理了个人就业登记。

第四条灵活就业社会保险补贴期限:

(一)符合第三条规定的“4045”失业人员及中度残疾人可以享受累计最长3年的社会保险补贴;

(二)距法定退休年龄不足5年的城镇登记失业人员及重度残疾人,可以享受累计最长5年的社会保险补贴。

第五条灵活就业社会保险补贴标准:

(一)基本养老保险以本市上年末职工月最低工资标准为缴费基数,按照28%的比例,补贴20%,个人缴纳8%;

(二)失业保险以本市上年末职工月最低工资标准为缴费基数,按照2%的比例,补贴1.5%,个人缴纳0.5%;

(三)基本医疗保险以本市上年职工月平均工资标准的70%为缴费基数,按照7%的比例,补贴6%,个人缴纳1%。

申请程序

1、申请人缴纳当年度养老、医疗保险三日后,凭本人

身份证、托管合同书和缴费票据原件,在市档案托管中心灵活就业人员社保补贴受理窗口初审,领取《申请表》和灵活就业证明。《申请表》只需填写一至七栏,贴照片。缴费票号、缴费金额和补贴金额部分不填。

2、灵活就业证明由申办人在其户口所在地社区劳动保障工作站登记盖章。

3、申请人持《申请表》、《灵活就业证明》及本人身份证、户口本等相关材料(一式三份)到街道(乡镇)劳动保障事务所申请复核,经审核无误后签字盖章(劳动保障事务所留存一份)。

4、申请人持《申请表》、《灵活就业证明》等相关材料到市档案托管中心受理窗口办理申报手续。

5、由市档案托管中心查阅档案,核对出生年月等情况无误后,汇总上报劳动保障部门。劳动保障部门审核后报财政部门拨付资金。

6、按照发放时间通知,申办人凭身份证和《受理卡》到指定银行领取社保补贴。

根据以上内容的相关的回答可以得出,在北京4050人员退休的政策必须是在满足年龄条件以及失业的情况,如果并没有稳定的工作,并且年龄也满足条件是有可能申请到4050的,如果您还有相关法律咨询可以致电华律网在线律师解答。



What is CORS

 What is CORS, what is preflight, how do you resolve it in Spring Boot?

WebMvcConfigurer CorsRegistry

后来 HTML5 支持了 CORS 协议。CORS 是一个 W3C 标准,全称是”跨域资源共享”(Cross-origin resource sharing),允许浏览器向跨源服务器,发出 XMLHttpRequest 请求,从而克服了 AJAX 只能同源使用的限制。它通过服务器增加一个特殊的 Header[Access-Control-Allow-Origin]来告诉客户端跨域的限制,如果浏览器支持 CORS、并且判断 Origin 通过的话,就会允许 XMLHttpRequest 发起跨域请求。

前端使用了 CORS 协议,就需要后端设置支持非同源的请求,Spring Boot 设置支持非同源的请求有两种方式。

第一,配置 CorsFilter。


@Configuration

public class GlobalCorsConfig {

    @Bean

    public CorsFilter corsFilter() {

        CorsConfiguration config = new CorsConfiguration();

          config.addAllowedOrigin("*");

          config.setAllowCredentials(true);

          config.addAllowedMethod("*");

          config.addAllowedHeader("*");

          config.addExposedHeader("*");


        UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource();

        configSource.registerCorsConfiguration("/**", config);


        return new CorsFilter(configSource);

    }

}



需要配置上述的一段代码。第二种方式稍微简单一些。

第二,在启动类上添加:


public class Application extends WebMvcConfigurerAdapter {  


    @Override  

    public void addCorsMappings(CorsRegistry registry) {  


        registry.addMapping("/**")  

                .allowCredentials(true)  

                .allowedHeaders("*")  

                .allowedOrigins("*")  

                .allowedMethods("*");  


    }  

}  





What is CSRF


How do you know a Spring Boot how many endpoints, and the endpoint details like path

How do you share session between different servers?


Microservice, UnknowHostException?



  1. Can you explain the differences between @RestController and @Controller annotations in Spring Boot?

  2. How do you implement security in a Spring Boot application?


How do you create and use Java annotations, and what are some common use cases for annotations?

Java annotations are metadata that provide additional information about the code to the compiler, runtime or other tools. They can be used to add information, enable/disable code generation or check code correctness.

Here are the steps to create and use Java annotations:

  1. What are the different operators available in RxJS, and how do you use them?

  2. What is the difference between the mergeMap and switchMap operators in RxJS?

  3. How do you use the retry operator in RxJS to retry an HTTP request?

  4. How do you use the combineLatest operator in RxJS to combine multiple observables?

  5. Can you explain the role of access tokens in OAuth 2.0?

  6. What is saml

In summary, while OAuth 2.0 is primarily designed for delegated authorization scenarios, SAML is designed for SSO scenarios.

Token type:

Access token/ID token/Refresh token/Reference token.


Access tokens can come in two flavours - self-contained or reference.

A JWT token would be a self-contained access token - it’s a protected data structure with claims and an expiration. Once an API has learned about the key material, it can validate self-contained tokens without needing to communicate with the issuer. This makes JWTs hard to revoke. They will stay valid until they expire.

When using reference tokens - IdentityServer will store the contents of the token in a data store and will only issue a unique identifier for this token back to the client. The API receiving this reference must then open a back-channel communication to IdentityServer to validate the token.

Reference tokens (sometimes also called opaque tokens) on the other hand are just identifiers for a token stored on the token service. The token service stores the contents of the token in some data store, associates it with an infeasible-to-guess id and passes the id back to the client. 

An ID token is encoded as a JSON Web Token (JWT).

An ID token is an artifact that proves that the user has been authenticated. It was introduced by OpenID Connect (OIDC).

In the OAuth 2 context, the access token allows a client application to access a specific resource to perform specific actions on behalf of the user. That is what is known as a delegated authorization scenario.

OAuth 2 core specifications say nothing about the access token format. It can be a string in any format. A common format used for access tokens is JWT.

An access token is a short-lived token that is used to access protected resources on behalf of an authenticated user. 


Saturday, December 16, 2023

The human consciousness is really like a tiny candle

 From Elon Musk:

Fermi was very good at asking profound questions and one of his questions which is called the Fermi Paradox is where are the aliens and one of the explanations is that and I think the one that and I think appears to be most accurate is consciousness is extremely rare ... and the crazist thing is that I've seen no evidence of aliens whatsoever this means that I think most likely at least in this part of galaxy we are the only consciousness that exists. And so you can think

The human consciousness is really like a tiny candle in a very vast darkness and we must do everything we can to ensure that candle does not go out.

If we do not become multiplanet species then eventually at some point something will happen to the planet either it'll be manmade or it'll be something natural like a meteor like whatever killed the dinosaurs for example and so eventually the sun will expand and will destroy all life on earth so if one cares about life on earth at all we should care about becoming multiplanet species and eventually going out there and becoming a multi stellar species and having many star systems we want the exciting parts of science fiction to not be fiction forever and we want make them real. 


https://www.youtube.com/watch?v=QnpPU1KjcIU 

Monday, December 4, 2023

Youtube video to audio

 

1. Youtube to autdio

Youtube to MP3 audio Converter - yt2k

2. Audio split

mp3splt download | SourceForge.net

https://mp3splt.sourceforge.net/mp3splt_page/documentation/man.html

mp3splt.exe -t 10.00 The5AM.mp3

3. Upload to QQMusic cloud

Sunday, December 3, 2023

Quote

 1. Love and do what you will

2. Take arrows in your forehead, but never in your back