• Some characteristics of laravel model


    1 model copy The replicate method can save a new copy of the model, for example: Here, the basic data of $user and $newuser, and $shipping and $newshipping are consistent $user = \App\User::find(1); $newUser = $user->replicate(); $newUser->save(); $shipping = App\Address::create([ ‘type’ => ‘shipping’, ‘line_1’ => ‘123 Example Street’, ‘city’ => ‘Victorville’, ‘state’ => ‘CA’, ‘postcode’ […]

  • C + + constructors and destructors


    Constructor Parameterless constructor If you create a class and you don’t write any constructors, the system will automatically generate a default parameterless constructor. The function is empty and does nothing As long as you write a certain other constructor (non parametric constructor), the system will not automatically generate such a default constructor. If you want […]

  • Why Apache bookkeeper? (Part 1)


    Original author: Sijie GuoTranslation: streamnnative Sijia Apache bookkeeper is optimized for real-time workload and is a scalable, fault-tolerant, low latency log storage service. Initially developed by Yahoo! Research, bookkeeper was incubated as a sub project of Apache zookeeper in 2011, and finally launched as a top-level project of Apache in January 2015. Since its initial […]

  • Centos7 install HBase 1.6.0


    Installation and configuration of HBase 1.6.0 Installation and configuration of zookeeper 1. HBase depends on zookeeper, which needs to be installed before use #Download wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz #Decompress tar -zxvf zookeeper-3.4.14.tar.gz #Rename mv zookeeper-3.4.14 zookeeper 2. Configuration #The internal configuration can remain unchanged and only one copy is needed cd zookeeper/conf cp zoo_sample.cfg zoo.cfg 3. Start […]

  • C + + multithread — thread


    Description of multithreading API: http://www.cplusplus.com/refe… There are two types of multitasking:Process based and thread based. Process based multitasking is the concurrent execution of programs. Thread based multitasking is the concurrent execution of fragments of the same program. <thread> STD:: thread is declared in the header file of ා include < thread >, so the header […]

  • Go map concurrent read / write exception causes service crash


    Yesterday, I suddenly received an alarm saying that the service port was lost, that is, the service crashed. After reading the error log, we found that it was a map concurrent read-write problem. We recorded it to avoid making similar errors again. Analyze error log Discovery is a call json.Marshal The error statistics are as […]

  • Some unusual git special operations


    Discard changes and force local code to be overridden git fetch –all git reset –hard origin/master git pull Light copy git clone –depth=1 https://…… Rebind remote warehouse git remote set-url origin https://gitee.com/***.git Roll back previous version git reset –hard HEAD^ Roll back previous versions git reflog git reset –hard COMMIT_ID //COMMIT_ID or git reset –hard […]

  • Using JS object to talk about the difference between hard and soft link and file copy


    preface On Linux or MacOS systems,lnCommand is an important command, its function is to establish a synchronous link for a file in another location. For the front end, the most widely used ln command is to install and create a NPM command globally npm i -g xxx(nrm) When you press enter and the above installation […]

  • Copy, shallow copy and deep copy of objects in JavaScript


    I have encountered the problem of copying in the development before. I also saw the assignment related problems written by novice students in Vue development. In use, the concept is not clear and the assignment data is blurred. In order to help others or help themselves to remember more deeply, after consulting the relevant information, […]

  • Research on deep copy / shallow copy of nsarray and nsmutablearray


    1、 Yuanqi The following two questions should be asked frequently during the interview. YesNSArrayandNSMutableArrayconductcopyandmutableCopyWhat kind of arrays do you get? WhenNSStringAs a property of an object, we should usestrongstillcopyTo decorate? During the interview in March this year, I was confused by these two questions, so I specially studied them today.I believe that you will have […]

  • Skills of using mobaxerm


    Minimize to pallet: ctrl + M Minimize at start: MobaXterm.exe -hideterm Set Windows startup: WIN+R -> shell:startup – >Copy Icon https://blog.mobatek.net/post/mobaxterm-command-lines/

  • Moocnet_ Learning summary of Kafka stream processing platform


    Learning summary of “Kafka stream processing platform” on moocnet Time: Sunday, September 9, 2018 Note: part of this article is from moocnet. @Moocnet: https://www.imooc.com Teaching source code: None Learning source code: https://github.com/zccodere/s… Chapter 1: Course Introduction 1-1 Course Introduction Course introduction Analysis of Kafka concept Kafka structure design Kafka scene application Kafka advanced features Chapter […]