1. lowbit2020-04-08

    lowbit = m & -m = 2的k次方 k为x从最右到左连续0的个数。(0除外) 这里利用的负数的存储特性,负数是以补码存储的,对于整数运算 x&(-x)有 ● 当x为0时,即 0 & 0,结果为0; ●当x为奇数时,最后一个比特位为1,取反加1没有进位,故x和-x除最后一位外前面的位正好相反,按位与结果为0。结果为1。 ●当x为偶数,且为2的m次方时,x的二进制表示中只有一位是1(从右往左的第m+1位),其右边有m位0,故x取反 ...

    阅读全文
  2. 深入理解Java类型信息(Class对象)与反射机制 可以读下这篇文章:https://blog.csdn.net/javazejian/article/details/70768369   写的非常清晰。 ...

    阅读全文
  3. 25780

    字符串搜索问题之前没有好好想,正常使用自带API或者正值表达式,或者第一反应就是常规的暴力搜索。其实这里面有很多很好玩的算法。Robin-Karp算法比较容易理解,而利用有限自动机进行匹配就开始晕了,最后的KMP算法代码不多,但是计算前缀的方法真是很神奇,静下心想了好久才开窍。神奇!神奇!很神奇。 本文讲一个很神奇的搜索字符串中以某一位开始的最长回文的算法。问题可以简化为从字符串首位开始的最长回文。 问题分析: public String getLonggestLeftPa ...

    阅读全文
  4. 天下皆知美之为美,斯恶已。皆知善之为善,斯不善已。 故有无相生,难易相成,长短相形,高下相倾,音声相和,前后相随。 是以圣人处无为之事,行不言之教;万物作焉而不辞,生而不有,为而不恃,功成而弗居。夫惟不居,是以不去。 译文: 天下的人都认清美好的事物,那是因为丑的存在;都能认清善良的事物,那是因为存在不善良。所以有和无因相互对立而依存,难和易因相互对立而形成,长和短因相互对立而显现,高和下因相互对立而依靠,音与声因相互对立而谐和,前和后因相互对立而追随。因此圣人用无为的观 ...

    阅读全文
  5.     《Live Coding #1 - Spring Cloud Eureka using Microservices - Example | Tech Primers Live Stream》:https://www.youtube.com/watch?v=rlS9eH5tEnY 《Designing Microservices using Spring Boot, Spring Cloud, Eureka and Zuul | #2 | Tech ...

    阅读全文
  6. Oracle SOA Business Events简介。 官方文档(Using Business Events and the Event Delivery Network):https://docs.oracle.com/html/E10224_05/obe_intro.htm You can raise business events when a situation of interest occurs. For example, in a loan flow scenari ...

    阅读全文
  7. Spring中Configuration的使用和理解,转载这篇文章写的挺清晰的文章 https://my.oschina.net/wuweixiang/blog/1837294   从Spring3.0,@Configuration用于定义配置类,可替换xml配置文件,被注解的类内部包含有一个或多个被@Bean注解的方法,这些方法将会被AnnotationConfigApplicationContext或AnnotationConfigWebApplication ...

    阅读全文
  8. 本文为https://docs.spring.io/spring/docs/current/spring-framework-reference/core.htmlSpring学习过程中遇到的知识点 先记录后深入学习   Annotations 1. Java-based configuration  中提到了 @Configuration @Bean @Import @DependsOn   Resource Int ...

    阅读全文
  9. NYSE, NASDAQ Vocabulary: 熊市:bear 牛市: bull 股票: share 保证金,债券: security 交易所: exchange 经纪人: broker 商品: commodity 货币: currency 期货: feature 股息,红利: dividend 债券: bond 股票,股份: share 买卖的特权,选择权: option 普通股:common stock 优先股: preferred stock 派生 ...

    阅读全文
  10. Phrasal verbs Phrasal verbs - 动词词组 某些动词与特定的介词相搭配,就会具有完全不同于动词本意的新意思。这些动词和介词的组合就叫做动词词组。   例如: I ran for two hours last night.   (我昨天晚上跑了两个小时。)   I ran into a friend last night. ...

    阅读全文
  11. Besides ApplicationContextAware and BeanNameAware (discussed earlier), Spring offers a wide range of Aware callback interfaces that let beans indicate to the container that they require a certain infrastructure de ...

    阅读全文
  12. 25380

    1. 这个Docker视频demo了一个Docker的应用场景: https://www.youtube.com/watch?v=YFl2mCHdv24 ...

    阅读全文
  13. MvcUriComponentsBuilder 和 ControllerMethodInvocationInterceptor的解读   ControllerMethodInvocationInterceptor实现了CGLIB的MethodInterceptor,所以是CGLIB动态代理的方法拦截器,从命名来看是对Controller的方法做了争强。同时也实现了org.aopalliance.intercept.MethodInterceptor private ...

    阅读全文
  14. Travis CI学习2020-03-19

    官网:https://travis-ci.org/ "Test and Deploy with Confidence" Easily sync your project with Travis CI and you'll be testing your code in minutes! 这是Travis的宗旨。很多github上的open source都在使用travis。 我也是在学习开源项目tesseract的时候接触Travis. &nbs ...

    阅读全文
  15. 参考文章: https://www.cnblogs.com/51kata/p/5152400.html http://www.cnblogs.com/fangjian0423/p/servletContainer-tomcat-urlPattern.html Servlet容器Tomcat中web.xml中url-pattern的配置详解[附带源码分析] https://blog.csdn.net/mengxiangxingdong/article/details/806 ...

    阅读全文
  16. 本文为学习官方文档的学习笔记,单纯知识点摘要。官方文档: https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#spring-data-tier 1) Transaction Management Advantages of the Spring Framework's Transaction Support Model Glob ...

    阅读全文
  17.     《Spring Boot Micro-services, Containers, and Kubernetes - How To》: https://www.youtube.com/watch?v=Bcs-inRnLDc ...

    阅读全文
  18. # Redis configuration file example. # # Note that in order to read the configuration file, Redis must be # started with the file path as first argument: # # ./redis-server /path/to/redis.conf # Note on units: when memory size is needed, it ...

    阅读全文
  19. 在使用spring boot 来new一个springApplication时会读取classpath中的 META-INF/spring.factories中定义的Spring Factories. 比如ApplicationContextInitializers和ApplicationListeners. 下面是spring-boot-2.1.6.RELEASE.jar中默认的spring.factories # PropertySource Loaders org.spring ...

    阅读全文
  20. 应用场景:京东,淘宝等双十一活动多多,送券,满多少送多少等买很多物品后,再使用优惠券等,不同的下单方式都会有不同的实惠。 比如现有下面的活动,图书狂欢节,每满100减50。结算时还可以使用优惠券。现有两张现金结算券,一张是满300减100(券1),一张是满150减50(券2)。用户希望购买下面的书单。 《书1》价格 175 《书2》价格 22.6 《书3》价格 37.5 《书4》价格 65.6 《书5》价格 160.9 《书6》价格 84.6 《书 ...

    阅读全文