Skip to content

Instantly share code, notes, and snippets.

@cshijiel
cshijiel / mvn.md
Created October 31, 2016 07:49
Maven 相关命令

背景:有时候只需要编译代码而不需要运行测试代码,这时候就需要下面这个命令。

mvn test-compile

其他:

Maven常用命令:

  1. 创建Maven的普通java项目: mvn archetype:create -DgroupId=packageName
#include <stdio.h>
#include <malloc.h>
typedef struct Node {
int data;
struct Node *next;
} ListNode;
void InsertListNode(ListNode *head, int pos, int data, int len);
@cshijiel
cshijiel / QuickSort.c
Created May 26, 2017 09:52
快速排序(C语言版)
#include <stdio.h>
int main() {
printf("Hello, World!\n");
int array[10] = {49, 38, 65, 97, 48, 13, 27, 11, 56, 45};
int maxlen = sizeof(array) / sizeof(int);
show(array, maxlen, 0, maxlen - 1);
quickSort(array, maxlen, 0, maxlen - 1);
@cshijiel
cshijiel / main.c
Created July 8, 2017 09:13
判定所给的栈操作序列是否合法
#include <stdio.h>
#define TRUE 1
#define FALSE 0
int checkStackOption(char str[], int length) {
int leftSize = 0;
for (int i = 0; i < length; ++i) {
if (str[i] == 'I') {
@cshijiel
cshijiel / 2.cpp
Last active August 11, 2017 06:40
冒泡排序、奇偶排序
#include <iostream>
using namespace std;
int main() {
int a[10];
for (int i = 0; i < 10; ++i) {
cin >> a[i];
}
// 首先,我们把奇数放到数组左边,偶数放到数组右边
@cshijiel
cshijiel / ListNode.java
Created September 4, 2017 12:47
Add Two Numbers
package Add;
/**
* Created by chenpeng on 2017/9/4.
*
* @version 1.0
*/
/**
* Definition for singly-linked list.
@cshijiel
cshijiel / calculateOvertimeSalary.js
Last active October 31, 2018 15:04
短小快命令
var sum = 0.0;
for(var i = 0;i<$('span[id^=showDt]').length;i++){
var temp = parseFloat($($('span[id^=showDt]')[i]).text());
sum+= temp;
}
console.log(sum*4*150)
@cshijiel
cshijiel / github.css
Created July 1, 2018 14:18
github.css for Typora
:root {
--side-bar-bg-color: #fafafa;
--control-text-color: #777;
}
@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext);
@font-face {
font-family: 'Open Sans';
font-style: normal;
private static class ClearParameterNameProvider implements ParameterNameProvider {
private static ParameterNameDiscoverer discoverer = new LocalVariableTableParameterNameDiscoverer();
private static ParameterNameProvider provider = new DefaultParameterNameProvider();
@Override
public List<String> getParameterNames(Constructor<?> constructor) {
String[] parameterNames = discoverer.getParameterNames(constructor);
return Optional.ofNullable(parameterNames).map(Arrays::asList).orElse(provider.getParameterNames(constructor));
}
@cshijiel
cshijiel / InternetMap.java
Created August 20, 2018 05:44
北京互联网地图
package com.roc.test;
import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Builder;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;