例如 //类 public class User1 { public int id { get; set; } public string name { get; set; } } //方法 [HttpPost, Route("api/OrderPayJs/Notify0")] public str ...
分类:
Web程序 时间:
2020-07-19 00:53:10
阅读次数:
134
前两天看到阮大神的一篇在css中使用变量的文章,整理了一下。 这个重要的 css 新功能,所有主要浏览器已经都支持了。本文全面介绍如何使用它,你会发现原生 css 从此变得异常强大。 一、变量的声明 声明变量的时候,变量名前面要加两根连词线(--)。 body { --foo: #7F583F; - ...
分类:
Web程序 时间:
2020-07-19 00:34:53
阅读次数:
89
参考 优秀程序员的代码都是如何分层的? 1、背景 2、如何进行分层 3、分层领域模型的转换 4、总结 领域模型转换那些事儿 1、背景 说起应用分层,大部分人都会认为这个不是很简单嘛 就controller,service, mapper三层。看起来简单,很多人其实并没有把他们职责划分开,在很多代码中 ...
分类:
其他好文 时间:
2020-07-18 22:45:12
阅读次数:
90
场景: 在开发web项目的时候,写一些通用的公共方法是很常见的操作,而一些关于Http的操作,经常会用到HttpContext这个对象。 若是在Controller里,我们操作就很简单,可以使用注入的方法直接使用:,比如以下代码: public class HomeController : Cont ...
分类:
Web程序 时间:
2020-07-18 22:26:34
阅读次数:
118
# coding: utf-8 import arcpy class Toolbox(object): def __init__(self): """Define the toolbox (the name of the toolbox is the name of the .pyt file)." ...
分类:
编程语言 时间:
2020-07-18 22:16:15
阅读次数:
119
AI提示自动补齐代码插件 Codota TabNine 自动为Color值命名框架 Name That Color ...
分类:
移动开发 时间:
2020-07-18 21:58:54
阅读次数:
81
Linux vi/vim 所有的 Unix Like 系统都会内建 vi 文书编辑器,其他的文书编辑器则不一定会存在。 但是目前我们使用比较多的是 vim 编辑器。 vim 具有程序编辑的能力,可以主动的以字体颜色辨别语法的正确性,方便程序设计。 相关文章:史上最全Vim快捷键键位图 — 入门到进阶 ...
分类:
系统相关 时间:
2020-07-18 21:48:49
阅读次数:
163
解决办法: 在不生效的那个swiper的js代码中插入以下两行代码就OK了 observer:true, //修改swiper自己或子元素时,自动初始化swiper observeParents:true, //修改swiper的父元素时,自动初始化swiper ...
分类:
其他好文 时间:
2020-07-18 20:00:21
阅读次数:
80
// $arr=[ // ['title'=>'laravel1'], // ['title'=>'laravel2'] // ]; // // 添加 // DB::table('news')->insert($arr); //添加后获取添加数据的自增主键 // $id=DB::table('new ...
分类:
数据库 时间:
2020-07-18 19:58:54
阅读次数:
77
1.Test.php <?php namespace app\sample\controller; class Test { public function hello($id,$name){ echo $id; echo '|'; echo $name."<br>"; return 'hello, ...
分类:
Web程序 时间:
2020-07-18 19:52:59
阅读次数:
76