Tag:method

  • Access to WeChat public address openId

    Time:2019-11-14

    When WeChat partners are developing WeChat public numbers, small programs or WeChat’s built-in browser, the first problem they will encounter is how to get openId. Today, Xiaobian brings us how to get openId.   First We need to get the appid from the wechat developer background. The appid is the only one obtained by the administrator when […]

  • [convert] javascript high performance array de duplication

    Time:2019-11-13

    Original address: https://www.cnblogs.com/wisewrong/p/9642264.html   I. test template Array de duplication is a commonplace problem. There are various solutions on the Internet In order to test the performance of these solutions, I wrote a test template to calculate the time-consuming of array de duplication // distinct.js let arr1 = Array.from(new Array(100000), (x, index)=>{ return index }) […]

  • E-mail processing control aspose.email for. Net will be updated in October!

    Time:2019-11-13

    Aspose.Email for .NETIs a complete set of e-mail processing controls, used to build cross platform applications, without using Microsoft Outlook can create, operate, transform and transfer e-mail. The API provides e-mail processing functions, such as adding, extracting or deleting attachments in mail objects, and customizing headers by adding or deleting recipients or changing topics. Aspose.Email […]

  • Introduction to okhttp in Android Development

    Time:2019-11-10

    The most popular network request framework nowadays is okhttp. Since Android 4.4, Google has started to replace httpurlconnection in the source code with okhttp, and in the SDK after Android 6.0, Google has removed the support for httpclient, and the popular retrofit in the market is also re packaged with okhttp. This shows how powerful […]

  • Simply judge and judge the intersection / overlap of two rectangles C#

    Time:2019-11-8

    Recently, we need to use the simple application of rectangle intersection algorithm, so we take a very simple algorithm for the novice’s reference. Why is it for the novice’s reference? Because the efficiency of this algorithm is not very high, but this algorithm only has three simple lines. The program uses two methods to judge […]

  • Android WebView supports input file to enable camera / select photos

    Time:2019-11-7

    To activate the input file photographing or file selection function of WebView, you can override the specified method in the webview.setwebchromeclient method to intercept the input event of WebView and do our corresponding operations. Android code webView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int newProgress) { if (newProgress == 100) { ProgressBar. Setvisibility (view. […]

  • ThinkPHP 6.0 swoole extended websocket tutorial

    Time:2019-11-6

    Preface ThinkPHP is about to usher in the latest version 6.0. For the current more and more popular swoole, ThinkPHP also launched the latest extension think swoole 3.0. introduce Tp6.0, which is about to be launched, has been adapted to swoole. It has also launched think swoole 3.0, and is adapted to socketio by default. […]

  • Java 8 HashMap

    Time:2019-11-5

    HashMap uses array, linked list and red black tree to store key value pairs. When the linked list is long enough, it will be converted to red black tree. HashMap is non thread safe. Constants in HashMap static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; static final int MAXIMUM_CAPACITY = 1 << 30; static final […]

  • Review the delegation and event that you can understand under the object-oriented core

    Time:2019-11-5

      The core of case interpretation is object-oriented. All cases are based on C ා, involving the most frequently concerned issues in our practice: 1. Encapsulation, inheritance and polymorphism; 2. Abstract class and interface; 3. Delegation and event. III. entrustment and events Generally speaking, the purpose of using delegation is to “realize the effect of […]

  • Common object creation modes

    Time:2019-11-5

    1. Object constructor var obj = new Object(); obj.name = ‘tom’; obj.age = 15; obj.sayName = function() { console.log(this.name) } The disadvantage of this method is obvious, that is to write a lot of code. 2. Object literal creation var obj1 = { name: ‘tom’, age: 15, sayName: function() { console.log(this.name) } } var obj2 […]

  • [Objective-C] explore the essence of the bottom layer of category

    Time:2019-11-4

    No matter how perfect a class design is, there may be some unpredictable situations in the future requirements evolution. How to extend the existing classes? In general, inheritance and composition are good choices. However, in Objective-C 2.0, category is also provided, which can dynamically add new behaviors to existing classes. Today, category has been found […]

  • Audit analysis of ThinkPHP < 6.0 SQL injection code

    Time:2019-11-2

    Too many versions only analyze the large version and the version with more users. Currently, the version with the most users is 3.2.3. During the audit, multiple versions were found to be unpublished Test environment: mysql5.6 / php5.5 First of all, it is clear that the full version of ThinkPHP may have wide byte injection […]