Tag:method

  • Interviewer: it’s said that blocking I / O model will make threads sleep. Why is java thread running?

    Time:2019-10-27

    Abstract: the original source: https://studyidea.cn “public account: General procedures” welcome to follow and reprint, keep the abstract, thank you! Using java to block I / O model to read data will lead to thread blocking, and thread will enter sleep, thus giving CPU execution right until data reading is completed. During this period, if you […]

  • Gradle build script

    Time:2019-10-27

    Building language Gradle provides a domain specific language that currently supports both groovy and kotlin. In a groovy build script (. Gradle) you can use any groovy element. In the kotlin build script (. Gradle. KTS), you can use any kotlin element. Project and task Everything gradle builds is based on two concepts: project and […]

  • Swift practical skills

    Time:2019-10-26

    Swift practical skills From OC to swift, the difference is quite big. This article records some problems I encountered in the process of developing from OC to swift, and then records these problems I encountered into an article. Generally speaking, it is some of the following skills of swift language, hoping to help people in […]

  • Talking about constant pool in heap through string. Intern() method

    Time:2019-10-25

    brief introduction String is one of our most commonly used classes. Like ordinary Java classes, its objects will exist in the Java heap. But the string class has its own special features. It can be generated by the new method or directly assigned by quoted string constants. Before JDK7, there was a permanent perm area […]

  • Exceptions in java basic

    Time:2019-10-25

    abnormal Abnormal level Error: internal error and resource exhaustion error of Java runtime system. An application should not throw an object of this type. If such an internal error occurs, there is nothing to do but to notify the user and try to make the program terminate safely. Exception RuntimeException: an exception caused by a […]

  • View and modify Oracle hidden parameters

    Time:2019-10-21

    View hidden parameters SELECT x.ksppinm name, y.ksppstvl value, y.ksppstdf isdefault, decode(bitand(y.ksppstvf,7),1,’MODIFIED’,4,’SYSTEM_MOD’,’FALSE’) ismod, decode(bitand(y.ksppstvf,2),2,’TRUE’,’FALSE’) isadj FROM sys.x$ksppi x, sys.x$ksppcv y WHERE x.inst_id = userenv(‘Instance’) AND y.inst_id = userenv(‘Instance’) AND x.indx = y.indx –and x.ksppinm =’_external_scn_rejection_threshold_hours’ order BY translate(x.ksppinm, ‘ _’, ‘ ‘); Modify implicit parameter method: Here is an example of modifying the implicit parameters of […]

  • The method and code segment of ruby basic knowledge

    Time:2019-10-21

    Methods in ruby are named blocks of code, parameterized code associated with one or more objects. When calling, the method name, receiver (the object), parameter value and the value of the last expression must be given as the return value. Similar to Ruby methods are code blocks, which have no names and are called only […]

  • Servlet & HTTP & request notes

    Time:2019-10-19

    #Today’s content:     1. Servlet HTTP protocol     3. Request ## Servlet: 1. Concept Step 2. 3. Execution principle 4. Life cycle 5. Servlet 3.0 annotation configuration 6. Servlet architecture Servlet — Interface             | Genericservlet — abstract class             | Httpservlet — abstract class Generic servlet: the default null implementation of other methods in the servlet interface, only the service […]

  • Iterations in JS (arrays)

    Time:2019-10-19

      What is iteration? It can be simply understood that each item in the target (array, object, etc.) can be accessed in order (in fact, it is no different from the concept of traversal). I divide the iteration of the array into two types: lookup ergodic   Search:   1.indexOf(item,start)  This method searches for the specified […]

  • Revisit Android and fragment lifecycles

    Time:2019-10-19

    Review the Android and fragment life cycle, understand the role of life cycle methods, when to call them, and what to do. 1. Android life cycle 1.1 life cycle diagram 1.2 life cycle function description onCreate: activity is being created, the first method of life cycle, setcontentview is required to load layout. Time consuming operations […]

  • C ා list: comparison of four methods of de duplication based on object attributes

    Time:2019-10-19

    Test code: private void TestDistinct() { Task.Run(() => { //Generate test data DateTime dt = DateTime.Now; Random rnd = new Random(); List list = new List(); int total = 1000000; for (int i = 0; i < total; i++) { MyData info = new MyData(); info.id = rnd.Next(1, total * 10).ToString(); info.name = rnd.Next(1, total […]

  • Return map in mybatis

    Time:2019-10-18

    In mybatis, we usually use it as follows: Return a result User selectOne(User user); select id,username,telphone from user where telphone=#{telphone} and password = #{password} Return multiple results (in fact, this is the same as the above, just the control of query conditions) List selectList(User user); select id,username,telphone from user We just need toresultTypeChange tojava.util.HashMap, this […]