Tag:Class library

  • How to call the web API interface using restsharp


    Rest is byRepresentational State TransferThese three word prefixes are synthesized. This architecture style is particularly popular in previous years. The behavior specification of restful API can be referred to: https://docs.microsoft.com/en… Generally, the formats returned by the restful API are the common plurantext, JSON and XML formats. Restsharp is an open source HTTP client class library, […]

  • JavaScript promise Revelation


    This article, a simple implementation of promise, mainly popularizes the use of promise. For a long time, JavaScript handles asynchrony in the way of callback, which is almost popular in the front-end development field. When designing APIs, browser manufacturers, SDK developers, or authors of various class libraries have basically followed the callback routine. In recent […]

  • Asp.net core uses log4net global log processing


    1、 Reference class library:   1、 Microsoft.Extensions.Logging.Log4Net.AspNetCore   2、log4net.AspNetCore 2、 Configure log4net.config file 3、 Create your own myexceptionfilterattribute and inherit it   Exceptionfilterattribute is an abstract class that relies on the injection log object   logger public class MyExceptionFilterAttribute : ExceptionFilterAttribute { private readonly ILogger _logger; /// ///Through the constructor, dependency injection log objects /// /// public MyExceptionFilterAttribute(ILogger […]

  • Browse loader 0.3.0 release


    browserify-loaderrelease0.3.0, there is no function update. The promise feature of ES6 is used to replace the dependency on the RSVP and EventEmitter node packages. The size of the class library has been greatly reduced. Next, we plan to provide plug-in mode to support more languages that can be compiled into JavaScript, includingJSXWait.

  • Promise.prototype.done


    The promise design specification does not specify promise.prototype.done, so you can use the implementation provided by the existing class library or implement it yourself. effect No matter whether the callback chain of promise object ends with then method or catch, as long as the last method throws an error, it may not be caught (because […]

  • Talk about spring’s integration of Kafka


    order This article briefly combs some usage options of production / consumption Kafka messages in Java applications. Available class libraries kafka client spring for apache kafka spring integration kafka spring cloud stream binder kafka In addition to the official Java API class library, there are many additional packages in the spring ecology. Here is a […]

  • Identity application of ASP. Net core (Part 1)


    1、 Foreword In the introduction of the previous chapter, I briefly introducedIdentityServer4The persistent storage mechanism related configuration and operation data, realized data migration, but did not explain the persistent operation to users. We also mentioned in the summary, becauseIdentityServer4This supports access to other authentication methods, so you can make reasonable adjustments according to your needsextendFor […]

  • I like an open source class library, which can help you simplify each line of code and recommend it to you


    A small partner in the “black iron age” reader group sighed, “hutool‘s open source class library is too powerful. Basically, there should be tool classes in it.” Seriously, I often use hutool at work. It can really help us simplify every line of code, make Java as elegant as a functional language, and make the […]

  • The relationship between koa / Co / Bluebird or Q / generators / promises / thunks


    I can always find many good questions and good answers when I wander around so. Their “good” lies not only in the value of knowledge, but also in how to express it: how to “ask questions” or “answer”. I posted an article in SF not long agoComparison between webcomponents and reactThis is a typical example. […]

  • (2) Autoload


    Thinkphp6 & laravel7 & swoft both use composer to load class libraries. To access the entry file of the framework, the first thing for the framework is to configure automatic loading, which is the basic work of calling and instantiating the following classes. Why do I need to load automatically? When using undefined classes and […]

  • Python uses the command line PIP install to install the library network speed slow solution


    To install the third party Library: Recently, I found that the installation speed of Jieba library is very slow, because the default source of PIP is abroad, PIP install some_ Packages are very slow and often times out, leading to installation failure; So replace PIP with domestic image, you can download and install it quickly. […]

  • Talking about the monitoring of Kafka consumer offset lag


    order This paper mainly discusses the monitoring of Kafka consumer offset lag programme Using the official class library ConsumerOffsetCheckerConsumerGroupCommand Using official JMX ConsumerOffsetChecker In version as followskafka_2.10-!/kafka/tools/ConsumerOffsetChecker.scala object ConsumerOffsetChecker extends Logging { private val consumerMap: mutable.Map[Int, Option[SimpleConsumer]] = mutable.Map() private val offsetMap: mutable.Map[TopicAndPartition, Long] = mutable.Map() private var topicPidMap: immutable.Map[String, Seq[Int]] = immutable.Map() private […]