Tag:Valuable

  • It took me five years to get started and give up

    Time:2020-10-25

    Learning without weariness is fun If you can’t take a technology or craft as a lifelong or long-term pursuit, then you will be like me. Five years of PHP time, satisfied with food and clothing, but lost a lot of things. It doesn’t mean to say that we should learn from time to time. If […]

  • Use cookie to save value temporarily

    Time:2020-9-27

    Product details: //Cookie zero time storage cart function addcar() {   //Determine whether the cookie has a value   if (getCookie(“shopcar”) == null) {   //Array type   setCookie(“shopcar”, “[]”);   }// in this example, the value is written dead   var obj = {     Name: “shoes”,     Price: “1200”   };   //Gets the value, in this case of string type   var liststr […]

  • PHP redis distributed lock

    Time:2020-8-23

    A simple PHP redis distributed lock class can handle its own business logic by acquiring and releasing locks /** *Class distributedlocks distributed locks based on redis */ class DistributedLocks { /** *Get lock function *@ param $key string lock key *@ param $expire string lock time *@ return bool failed to get the result false […]

  • Vue footstep: Vue + element UI form validation has value but failed.

    Time:2020-7-21

    1、 As shown in the figure: there is a value but the verification fails     2 export default { data() { return { form: { template: null } rules: [ Template: {required: true, message: ‘data template cannot be empty’, trigger: ‘blur’} ] } } }   The above is the correct verification example. 3、 […]

  • The usage of interface in TS

    Time:2020-7-14

    The main functions of the interface in TS are as follows: Constraint description of “object“ Abstracts part of the behavior of a class 1、 Attribute interface The interface can define the definite attribute, optional attribute, arbitrary attribute and read-only attribute 1. Determine properties interface UserInfo { name: string; age: number; } const myInfo: UserInfo = […]

  • Android access to rongyun IM is not connected??

    Time:2020-4-2

    Failed to initialize rongyun? Fusion cloud connection failed?? The connection callback method does not execute??? Impossible, just a few lines of code, how can there be mistakes. 1. Add rongyun Maven warehouse in gradle maven {url “https://dl.bintray.com/rongcloud/maven”} 2. Add dependency on gradle of app (so files have been added by default in 2.9.19 and later […]

  • Vue step: Vue + element UI form validation has value but failed.

    Time:2020-3-1

    1、 As shown in the figure: there is value but verification fails     Two. export default { data() { return { form: { template: null } rules: [ Template: {required: true, message: ‘data template cannot be empty’, trigger: ‘blur’} ] } } }   The above is the correct verification example. Three. At present, […]

  • C ා IEnumerable data loss after calling any() method

    Time:2020-1-19

    Call the getchildren method to get the result, and then judge whether there is a value of result. Any (). After that, the original data disappears.var result=GetChildren(new Guid(“”));if(result!=null && result.Any()){} private IEnumerable<Guid> GetChildren(Guid id) { return _dataLayer.Get(x => x.ToId == id)?.Select(x => x.FromId); }

  • waiting_520

    Time:2019-11-29

    As a programmer, you must have encountered NullPointerException, which is inevitable for new comers or experienced people in the Jianghu, but it is so powerless. In order to solve it, you can only judge a value before using it. However, this will make the code become bloated. Fortunately, jdk8 introduces optional to deal with the […]