摘要: 一.cat的常用用法 1.总结 2.实验 (1).非交互式编辑 [root@~_~ day5]# cat > cattest.sh <<STOP > hello > STOP [root@~_~ day5]# cat cattest.sh hello [root@~_~ day5]# cat > c 阅读全文
posted @ 2017-04-17 21:34 ajilisiwei 阅读(12212) 评论(1) 推荐(2) 编辑
摘要: test :用于文件类型检查和变量比较 一.用途: 1.判断表达式 2.判断字符串 3.判断整数 4.判断文件 测试例子: (1).test [root@~_~ day5]# cat test.sh #!/bin/bash a=$1 b=$2 if test $a -eq $b then echo 阅读全文
posted @ 2017-04-10 22:12 ajilisiwei 阅读(730) 评论(0) 推荐(0) 编辑
摘要: 变量的数值计算 1.$((表达式)) (1).实验1 [root@~_~ day4]# cat test.sh #!/bin/bash a=6 b=2 echo "a-b=$(($a-$b))" echo "a+b=$(($a+$b))" echo "a*b=$(($a*$b))" echo "a/ 阅读全文
posted @ 2017-04-09 03:58 ajilisiwei 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 一.统计字符串长度 1.wc –L [root@~_~day4]# echo "hello" | wc -L 5 2.expr length string [root@~_~day4]# echo `expr length "hello"` 5 3.${#String} [root@~_~day4] 阅读全文
posted @ 2017-04-08 22:25 ajilisiwei 阅读(1187) 评论(0) 推荐(0) 编辑
摘要: 一.变量列表 二.实验 系统:centos 7 1.特殊变量 [root@~_~ day2]# cat p.sh #!/bin/bashecho '$0:'$0echo '$*:'$*echo '$@:'$@echo '$#:'$#echo '$1$2$3:' $1$2$3 [root@~_~ da 阅读全文
posted @ 2017-04-01 22:54 ajilisiwei 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 项目需要,在使用KendoUI,又涉及到jsonp数据格式的处理,网上看到这样一种实现方法,在此小记一下(其实是因为公司里只能上博客园等少数网站,怕自己忘了,好查看一下,哈哈哈) 1. 新建控制器扩展类 ContollerExtensions.cs public static class Conto 阅读全文
posted @ 2017-03-01 01:45 ajilisiwei 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 1.学习文章:AJAX 跨域请求 - JSONP获取JSON数据 1.asp.net代码 参考文章:http://www.sxt.cn/info-2790-u-756.html (1).增加CorsHandler类, public class CorsHandler : DelegatingHand 阅读全文
posted @ 2016-12-29 02:02 ajilisiwei 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 一,控制器代码: [RoutePrefix("ajilisiwei")] //加URL前缀 (非必需) public class ShoppingController : ApiController { [HttpPost] [Route("Test/{product}")] public IEnu 阅读全文
posted @ 2016-12-01 23:31 ajilisiwei 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 原文的转载地址:http://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/ 一.Nuget安装相关dll Web API 2 : Install-Package Strathweb.CacheOutput.WebApi2 W 阅读全文
posted @ 2016-11-29 02:14 ajilisiwei 阅读(3421) 评论(0) 推荐(0) 编辑
摘要: 方法一.JavaScriptSerializer 方法二.JsonConvert 示例: Web API项目 1.新建 Model: namespace WebApi{ public class Product { public string Name { set; get; } public st 阅读全文
posted @ 2016-11-28 01:08 ajilisiwei 阅读(1481) 评论(0) 推荐(0) 编辑