Tag:method

  • Phpredis error “function redis:: settimeout() is deprecated” solution

    Time:2019-12-5

    The project throws an exception during local development: Function Redis::setTimeout() is deprecated Error code found: <?php use Illuminate\Support\Facades\Redis; … Redis::setTimeout($key, $timeout); The project uses the PHP redis extension to operate redis. After phpredis version 5.0, the method of non redis standard commands is discarded (https://pecl.php.net/package-changelog.php? Package = redis & release = 5.0.0rc1). For example, the […]

  • EasyUI datetimebox control binding double click event to automatically select the current date and time

    Time:2019-12-5

    This method is to achieve this goal by extending the method without changing the original JS First, expand a method of binding double click event in datetimebox control $.extend($.fn.datetimebox.methods, { //Bind double click event method bindDblClick: function (jq) { var panel = $(jq).combo(“panel”); panel.find(“.calendar-dtable tbody”).unbind(“.calendar”).bind(“dblclick.calendar”, function (e) { var calendar = $(jq).datetimebox(“calendar”); var spinner = […]

  • JS modify override pseudo class style

    Time:2019-12-4

    It is very convenient for JQ to operate CSS style, but it is difficult to directly operate JQ by changing the style of pseudo class. The following methods will be applied quickly`Var linewid = ‘content‘ //Then apply the following methods document.styleSheets[0].addRule(‘.test::after’, ‘left:’ + lineNeedWid + ‘px’); document.styleSheets[0].addRule(‘.test::before’, ‘left:’ + (lineNeedWid + 1) + ‘px’); document.styleSheets[0].addRule(‘.test::before’, […]

  • Covariant and contravariant

    Time:2019-12-4

    Forward: https://www.cnblogs.com/ninputer/archive/2008/11/22/generic_covariant.html Background: covariance and contraversion   Suppose there are two types: Tsub is a subclass of tParent. Obviously, Tsub type references can be safely converted to tParent type references. If a generic interface ifoo,IFooCan be converted to ifooIn other words, we call this process covariant, and say that this generic interface supports covariance for t. […]

  • Scrapy’s download Middleware

    Time:2019-12-4

    Download Middleware brief introduction Downloader, unable to execute JS code, does not support proxy itself Download the middleware framework for hooks to enter the request / response processing process of scratch, a lightweight underlying system for global modification of the request and response of scratch The download Middleware in the scratch framework is a class […]

  • How to unit test C project in VS

    Time:2019-12-4

    scene Spring boot + JUnit implements unit test of querying database in idea: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/92780716 How to use junit4 + spring test to write unit tests in SSM: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/85112004 Realize paging and JUnit unit test in SSM: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/85113289 In Java, refer to the above for unit testing, then under the. Net platform, how to use VS […]

  • C-covariance and inversion

    Time:2019-12-3

    Microsoft official overview: In C, covariance and inversion can realize implicit reference conversion of array type, delegate type and generic type parameters. Covariant preserves allocation compatibility, while contravariant preserves allocation compatibility. Covariance: the ability to use a more derived type than the originally specified derived type. Contravariant: able to use less derived types. Official example: […]

  • The difference and summary of static self in PHP

    Time:2019-12-3

    /*** static self difference and summary * summary: * 1. In PHP, when there is no inheritance, you use self:: class and static:: class to get the current class name. *2. If inheritance is used and the method is written in the parent class, you need to get the current parent class name and unknown […]

  • [original] advanced IOS development (Tang Qiao) reading notes (2)

    Time:2019-12-3

    Part 3: the underlying principles of IOS development 1. Objective-C object model 1.1 isa pointer Code of nsobject. H: NS_ROOT_CLASS @interface NSObject { Class isa; } Code of objc. H: typedef struct objc_class *Class; typedet struct objc_object { Class isa; } *id; Each object has a pointer named isa to the object’s class The flow […]

  • Efficient memory allocation of high performance go service

    Time:2019-12-2

    Efficient memory allocation of high performance go service Manual memory management is really a problem (such as C C + +). Fortunately, we have a powerful automation system that can manage memory allocation and life cycle, thus freeing our hands. However, if you want to solve the problem by adjusting the JVM garbage collector parameters […]

  • Common usage of pymysql

    Time:2019-12-1

    The difference between cursor. Fetchone() and cursor. Fetchall(): Cursor. Fetchone(): only one data can be displayed Cursor. Fetchall(): to display all the data found Other common methods of pymsql import pymysql #Connect to database db = pymysql.connect(“localhost”,”admin”,”[email protected]”,”dbpymysql”) #Create a cursor object using the cursor () method cursor = db.cursor() #Executing SQL statements using the execute() […]

  • A brief introduction to the preparatory work of the development project

    Time:2019-11-30

    Install the node version required by the project. When installing a node, the NPM package management library will be downloaded automatically. Install Git Because git’s default theme color is much better than PowerShell’s, see the following: The way to change terminal in vscode is: CTRL +, open vscode’s settings panel, enter shell in the search […]