Tag:Return value

  • Powermock: Java unit testing techniques

    Time:2021-8-1

    Introduction:Gao De’s technical boss said to the teacher when talking about methodology: “complex problems should be simplified, and simple problems should be deepened.” This sentence makes me feel deeply. This is not a set of code writing methods – split a complex logic into many simple logic, then deeply implement each simple logic, and finally […]

  • From AOP to method combination

    Time:2021-7-31

    “Actual combat elisp” series aims to tell my experience of using elisp to customize Emacs, and invite friends of Emacs to give me advice – if there are really a large number of Emacs users, hahaha. Emacs’s org mode uses a markup language called org. Like most markup languages, it also supports unordered lists and […]

  • Use of mock framework MOQ

    Time:2021-7-30

    Use of mock framework MOQ Intro MOQ is a very popular mock framework in. Net. Using the mock framework, we can only test the code we are concerned about, and use the mock object to configure the expected behavior of dependent services for dependencies. MOQ is based onCastleBased on the dynamic agent technology, the types […]

  • Some problems in using spring AOP

    Time:2021-7-29

    I have encountered some problems when using AOP. I hereby record it First write a commonly used AOP slice Slice class aoplog package com.mantis.aop.aspect; import com.fasterxml.jackson.databind.ObjectMapper; import com.mantis.aop.common.util.DataUtil; import eu.bitwalker.useragentutils.UserAgent; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.validation.BeanPropertyBindingResult; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.Arrays; import java.util.Enumeration; import […]

  • Delayed execution and immutability, the system explains javastream data processing

    Time:2021-7-28

    Recently, when I was writing business in the company, I suddenly couldn’t rememberStreamHow should the accumulation in be written? But I can only program for Google. It took me three precious minutes to learn. It’s very simple. Since I used jdk8, stream is my most commonly used feature. It is used for various streaming operations. […]

  • Basic grammar of kotlin language

    Time:2021-7-28

    Kotlin is a static programming language for modern multi platform applications, which was developed by   JetBrains development, which is a new language running on the JVM; Kotlin language is the optimization and encapsulation of Java language. There are many similarities in syntax, and they can call each other; Kotlin language can be used in […]

  • JS function arguments and application of higher order functions

    Time:2021-7-26

    Function member – arguments Arguments: the collection of all arguments (class array object) passed in when the function is called Arguments. Callee: an attribute of arguments that points to the function itself Function name. Caller: the caller of the function. If it is called globally, the returned caller is null. Function name. Length: number of […]

  • Hide function 1

    Time:2021-7-26

    insert overwrite table … partition(platform_id) select if(user_id regexp(‘.*:.*’),user_id,concat(platform_id,’:’,user_id)) as user_id, …, last_onlined_at,created_at,rating_score,updated_at,noise,platform_id from `XXX`; concat concat(platform_id,’:’,user_id)) asuser_idConcat splice alias is user_ id if If () is equivalent to the ternary operatorIf (conditional expression, result 1, result 2) is equivalent to the ternary operator in Java, but the expression types behind if can be different.The equal […]

  • Beijing Taobao project day13

    Time:2021-7-24

    1. Redis command 1.1 introduction case operation @Test public void testHash() throws InterruptedException { Jedis jedis = new Jedis(“192.168.126.129”,6379); jedis.hset(“person”, “id”, “18”); Jedis.hset (“person”, “name”, “hash test”); jedis.hset(“person”, “age”, “2”); Map<String,String> map = jedis.hgetAll(“person”); Set<String> set = jedis.hkeys(“person”); // Get all keys List<String> list = jedis.hvals(“person”); } @Test public void testList() throws InterruptedException { Jedis […]

  • How to use action, func and predict in C #

    Time:2021-7-18

    Translation link:https://www.infoworld.com/art… A delegate is a type safe function pointer that can refer to a method with the same signature as the delegate. Delegates are often used to implement callback methods or event mechanisms, and are usually declared with the “delegate” keyword in C #. You can declare a delegate at the level of a […]

  • Go language learning function

    Time:2021-7-17

    A function is an organized, reusable block of code used to perform a specified task.Go language supports functions, anonymous functions and closures, and functions belong to “first class citizens” in go language. 1、 Function declaration and call 1. Declaration of function Func keyword is used to define functions in go language. The specific format is […]

  • Swift closure 1-basic concepts

    Time:2021-7-7

    Link to the original text:http://1199game.com/2016/09/S… introduction At the beginning of this article, we mainly explain some knowledge points of closures in swift. This is the first article in this series. The basic concept of closure Closure is an anonymous function. Other languages have similar concepts. In Objective-C, it is a block, and in C + […]