• Using shell to display wordcount function


       shell script programming is one of the most core technologies of Linux system. It can use simple commands to achieve some complex functions. At the same time, Linux provides many text processing commands, such as grep (grep family), TR, SED, awk, etc. once you master these commands, you can easily process text in Linux […]

  • Flash back of MySQL


    MySQL DBAs or developers sometimes delete or update data by mistake. If it is an online environment and has a great impact, they need to be able to roll back quickly. The traditional recovery method is to use the backup instance, and then use the binlog after removing the wrong SQL to recover the data. […]

  • Four pitfalls of data innovation


    Introduction: there is no need to say more about the importance of data today. All enterprises are aware of the importance of data and hope to use data to drive business development. However, many enterprise information managers still have some misunderstandings about data intelligence and data-driven, which will make the data utilization of enterprises fall […]

  • Windows emergency response and system reinforcement (6)


    Introduction and analysis of windows high risk vulnerabilities over the years 1、 Vulnerability introduction: 1. Vulnerability: <1> Vulnerability: an important factor affecting network security; <2> . vulnerability exploitation: become the most common means of malicious attacks; <3> Vulnerability attack: industrialization, low cost, means diversification, low threshold trend; <4> Information age: both individuals and enterprises are […]

  • . net core high concurrency business, add a lock


    For high concurrency services, you should avoid some abnormal problems caused by concurrency and need to add a lock. Use redis’s lock 10 seconds timeout, throw timeout exception using (var redisLocker = new RedisLocker(_appApiRedisConfig, $”SaveStudyStatus:{accountId}”, 10000, 10000)) { if (!redisLocker.Success) { throw new TimeoutException(); } }

  • laravel sentry


    Sign up GitHub login Create project selectionlaravel Install extended use composer require sentry/sentry-laravel php artisan vendor:publish –provider=”Sentry\SentryLaravel\SentryLaravelServiceProvider” public function report(Exception $exception) { if (app()->bound(‘sentry’) && $this->shouldReport($exception)) { app(‘sentry’)->captureException($exception); } parent::report($exception); } vi config/sentry.php return array( ‘dsn’ => env(‘DSN’), // capture release as git sha // ‘release’ => trim(exec(‘git log –pretty=”%h” -n1 HEAD’)), // Capture bindings […]

  • JavaScript judge leap year


    requirement: Enter a year to judge whether it is a leap year (leap year: divisible by 4)alsoNot divisible by 100orYear divisible by 400 Code implementation: //Using function to judge leap year function isRunYear(year) { //Return true for leap year, otherwise return false var flag = false; if (year % 4 == 0 && year % […]

  • File upload in Django (using class based view)


    Background There is a special introduction on Django’s official website on how to deal with itFile uploadOffileIt’s about how to use itmodelTo handle the scene of file upload. However, the fastest way to develop in Django is to useclass-based viewsTo develop. So, I sorted out how to use itclass-based viewsTo handle the scene of file […]

  • JavaScript array de duplication


    requirement: Remove from array[‘c’, ‘a’, ‘z’, ‘a’, ‘x’, ‘a’, ‘x’, ‘c’, ‘b’,’y’,’g’]Duplicate elements in. Realization idea: Select the non duplicate elements in the old array and put them into the new array. Only one duplicate element will be retained. Traverse the old array, and then take the old array elements to query the new array. […]

  • Angular cookies cookieStore


    Angularjs provides a good $cookies and $cookiestore API for handling cookies. Now let’s see how to use $cookies and $cookiestore in angular. Step 1 – install ngcookies and introduce it into the system We can use NPM or bower to install ng cookies and paste the GitHub addresshttps://github.com/angular/bower-angular-cookies After installation, we can directly introduce our […]

  • Installing JDK, Tomcat and MySQL in Linux


    Wen Pingge date 20201010 Environment introduction This article is mainly to practice the Linux environment to install software records, focusing on the operation of Linux.Operating environment: MacOS 10.15.7 VMware fusion professional 11.5.6(Last year’s double 11 took advantage of the activity to buy a genuine, 500 + RMB, refreshing) Zentermlite version 4.1.0 (21) Software version: Linux:CentOS-8.2.2004-x86_ […]

  • DIY implementation of ThinkPHP core framework (14)


    A series of articles: DIY implementation of ThinkPHP core framework (1) MVC DIY implementation of ThinkPHP core framework (2) entry file DIY implementation of ThinkPHP core framework (3) routing DIY implementation of ThinkPHP core framework (4) namespace DIY implementation of ThinkPHP core framework (5) composer DIY realizes the core framework of ThinkPHP (6) realizes its […]