The 5th Week of ARTS:8-String to Integer (atoi) 2018-07-28 Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Description Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerica....
The 4th Week of ARTS:5-Longest Palindromic Substring 2018-07-22 Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Description Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: "cbbd" Output: "bb" Solution Brute Force package com.silence.arts.leetcode.first; /** * <br> * <b>Function:</b>.....
基于Github的Webhook实现发布代码后网站自动部署 2018-07-16 基于Github的Webhook实现发布代码后网站自动部署 @(公众号)[知识付费] Introduction 原来使用Github的guthub.io资源库搭建的个人网站,最近迁移到了腾讯云上面。所以之前的部署流程就变成了:本地编写——>push到github——>登录到腾讯云pull代码——>重启jekyll。一次两次还能容忍,但是次数多了就不能接受了,十分麻烦,所以这两天就调整了一下,用基于Github的Webhook来实现代码push到Github后,自动发布。 流程就变成了如下。 自动部署流程 使用github-webhook-handler开发一个Http服务 确保安装了npm 创建一个自动发布的目录autobuild,初始化一个package.json npm init -f 安装github-webhook-handler npm i -S github-webhook-handler 编写index.js,注意mysecret需要跟github的webhook配置一致 [root@VM_225_78_centos autobuild]# cat in....
The 3rd Week of ARTS:4-Median of Two Sorted Arrays 2018-07-14 Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Description There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1: nums1 = [1, 3] nums2 = [2] The median is 2.0 Example 2: nums1 = [1, 2] nums2 = [3, 4] The median is (2 + 3)/2 = 2.5 Solution package com.silence.arts.leetcod....
任务调度Azkaban(二)任务流 2018-07-08 Command任务 创建tpye=command的job文件 silence-pro:command silence$ ll total 40 -rw-r--r-- 1 silence wheel 61 7 3 21:38 command1.job -rw-r--r-- 1 silence wheel 74 7 6 17:56 command2.job -rw-r--r-- 1 silence wheel 68 7 6 17:59 command3.job -rw-r--r-- 1 silence wheel 67 7 6 17:57 command4.job -rw-r--r-- 1 silence wheel 74 7 6 18:00 command5.job silence-pro:command silence$ cat command1.job type=command command=echo "create directory before get data" silence-pro:command silence$ cat command2.job type=comma....
The 2nd Week Of ARTS:2-AddTwoNumbers 2018-07-02 Introduction Algorithm - Learning Algorithm Review - Learning English Tip - Learning Techniques Share - Learning Influence Let's do it!!! Algorithm Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Example Input: (2 -> 4 -&....
The 1st Week of ARTS:1-Two Sum 2018-07-02 Introduction The tag ARTS is a project that launched by @Hao Chen at his WeiChat group which for discussing technologies in his Articles. The meaning of ARTS: A: Algorithm, solve an Algorithm each week at https://leetcode.com. R: Review, review something important or meaningful for you in last week. T: Technique, improve one or two Techniques that discovered in your daily work. S: Share, share something you like or interested or something special for you. Not only technologies but also life or i....