title | categories |
---|---|
yaml front matter 测试 |
此文档用于测试不同 markdown 解析器对非严格&扩展语法的支持
- 一级列表
- 使用二空格进行列表缩进
<!DOCTYPE html> | |
<html> | |
<!-- Golden Verses: Markdown theme for iOS Editorial app--> | |
<!-- You can change the look of the Markdown preview by editing the CSS below, for example to match your blog/website or just your personal preferences. Things between double curly braces are template variables that are replaced automatically depending on your editor settings. --> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Preview</title> | |
<style type="text/css"> | |
body { | |
margin: 0; |
// Windows | |
error_log(__FILE__.':'.__LINE__.':['.date("Y-m-d G:i:s",time())."] msg: xxx\n", 3, 'c:/cy'.date("Y-m-d").'.log'); | |
// Linux | |
file_put_contents('/tmp/cy'.date("Y-m-d").'.log', __FILE__.':'.__LINE__.':'."msg: xxx\n", FILE_APPEND); | |
// usage: outputTrace2Html(sprintf("post IDs = %s", print_r(array_keys($postIDArray),true))); | |
function outputTrace2Html($msg,$new=false) | |
{ |
public static void mergeSort(int[] arr) { | |
mSort(arr, 0, arr.length-1); | |
} | |
/** | |
* 递归分治 | |
* @param arr 待排数组 | |
* @param left 左指针 | |
* @param right 右指针 | |
*/ |
# 数组 | |
ip_array=(10.10.80.158 10.10.80.159 10.10.80.160) | |
echo ${ip_array[*]} # 以一个字符串打印所有元素 | |
echo ${ip_array[@]} # 每个元素作为一个字符串 | |
echo ${#ip_array[*]} # 数组元素个数 | |
# 字符串 | |
len=${#str} #长度 |
@Target({ElementType.TYPE}) | |
@Retention(RetentionPolicy.RUNTIME) // 使用元注解 | |
public @interface Controller { // 注解的定义: modifier @interface Annotation | |
String value() default ""; // 注解的方法都是这种格式: Type elementName() default defaultVal; | |
} | |
// RequestMapping | |
@Target({ElementType.METHOD, ElementType.TYPE}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Mapping |