夫道、德、仁、义、礼,五者一体也。
道者,人之所蹈,使万物不知其所由。
德者,人之所得,使万物各得其所欲。
仁者,人之所亲,有慈惠恻隐之心,以遂其生成。
义者,人之所宜,赏善罚恶,以立功立事。
礼者,人之所履,夙兴夜寐,以成人伦之序。\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
result = edit_distance("fox", "fab") | |
print(result) | |
def edit_distance(str1, str2): | |
len1 = len(str1) | |
len2 = len(str2) | |
maxtrix = [[i for j in range(len2 +1)] for i in range(len1 + 1)] | |
maxtrix[0] = [i for i in range(len1 + 1)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutomateProcessor { | |
private UserExceptionAnalysisListener userExceptionAnalysisListener = new UserExceptionAnalysisListener(); | |
private UserModelingListener userModelingListener = new UserModelingListener(); | |
private HardRuleFilterListener hardRuleFilterListener = new HardRuleFilterListener(); | |
private AntiRubbishListener antiRubbishListener = new AntiRubbishListener(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hello.world; | |
import joptsimple.internal.Strings; | |
import kafka.admin.AdminUtils; | |
import kafka.admin.RackAwareMode; | |
import kafka.utils.ZKStringSerializer$; | |
import kafka.utils.ZkUtils; | |
import org.I0Itec.zkclient.ZkClient; | |
import org.I0Itec.zkclient.ZkConnection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/epoll.h> | |
#include <string.h> | |
int main() { | |
int epoll_fd = epoll_create1(0); | |
struct epoll_event event, events[5]; | |
char read_buffer[11]; | |
int running = 1, event_count, i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET bashbin="f:\tools\cmder\vendor\git-for-windows\bin" | |
SET currentpath=%cd% | |
REM replace \ to / | |
SET unixpath=%currentpath:\=/% | |
REM replace : to empty | |
SET unixpath=%unixpath::=% | |
REM add / at begnning | |
SET unixpath=/%unixpath% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vamdt.fox.fox.service; | |
import org.springframework.beans.factory.BeanFactoryUtils; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.stereotype.Service; | |
import org.springframework.util.Assert; | |
import org.springframework.web.method.HandlerMethod; | |
import org.springframework.web.servlet.ModelAndView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(cat ip.txt) | |
do | |
ssh -q -p 16322 -o "BatchMode=yes" -o "ConnectTimeout=3" "$i" "echo 2>&1" && echo "$i OK" || echo "$i NOK" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: "/", | |
async: false, | |
dataType: "json", | |
success: function() { | |
window.open("http://google.com", "_blank"); | |
} | |
}); |