原创 解決JetBrains系列Git push失敗問題

最近在使用JetBrains系列IDE執行Git push操作時,經常遇到push失敗問題,報錯信息如下: Push failed Invocation failed Server returned invalid Response. j

原创 Java判斷迴文字符串

public class Palindrome { public static boolean isPalindrome(String s) { int len = s.length(); for

原创 Loitering

public String pop() { // Remove item from top of stack. String item = a[--N]; a[N] = null; // Avoid loitering

原创 Tenets of Scientific Methods

One of the key tenets of the scientific method is that the experiments we design must be reproducible, so that others c

原创 One of the Reasons Why Everyone Should Learn Programming

“You’ve just done in two hours what it takes the three of us two days to do.” My college roommate was working at a re

原创 The result of division and remainder for negative integers in Java

In Java programming, th quotient a / b rounds toward 0; the remainder a % b is defined such that (a / b) * b + a % b i

原创 Binary Search in Java

Recursive version: int recursiveBinarySearch(int[] arr, int key, int low, int high) { if (low > high) return -

原创 LeetCode-1114. Print in Order

Description: Suppose we have a class: public class Foo { public void first() { print("first"); } public void secon

原创 Java concurrency demo

import java.util.Arrays; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import j

原创 LeetCode 696. Count Binary Substrings

Description: Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's an

原创 (Java) 求一個數組中最大的三個數 和 最小的兩個數

public int maximumProduct(int[] nums) { if (nums.length < 3) return 0; // 開始 in

原创 SpringMVC freemarker 中 Could not resolve view with name 'XXX.ftl' in servlet with name 'SpringMVC'

原文鏈接:https://blog.csdn.net/wealth_123450/article/details/79697777 原因爲freemarker本身配置了templateLoade

原创 配置FreeMarker時IDEA提示cannot resolve property 'templateLoaderPath'

原因: 缺少spring-context-support.jar依賴。

原创 An attempt by a client to checkout a Connection has timed out.

造成這種錯誤的原因多種多樣,我的程序中是因爲hibernate映射文件一個屬性沒有設置not-null的值,所以報錯。

原创 Java解析微信公衆號菜單列表

因爲是新手,所以寫的不是很好,見諒。 /** * 將微信公衆號菜單列表由JSONArray格式解析爲WeChatMenu對象, 並存到數據庫裏 * * @param wechatMenuJsonArray