写一条存储过程,实现往User中插入一条记录并返回当前UserId(自增长id) --推荐写法 if(Exists(select * from sys.objects where name=N'Usp_InsertedID')) drop proc Usp_InsertedID go create proc Usp_InsertedID as insert into [User] output inserted.UserID values(N'张三蛋',3) --另一种写法(SCOPE_IDEN…
最近在用mybatis,之前用过ibatis,总体来说差不多,不过还是遇到了不少问题,再次记录下, 比如说用#{},和 ${}传参的区别, 使用#传入参数是,sql语句解析是会加上"",比如 select * from table where name = #{name} ,传入的name为小李,那么最后打印出来的就是 select * from table where name = ‘小李’,就是会当成字符串来解析,这样相比于$的好处是比较明显对的吧,#{}传参能防止sql注入,如…
本着为提高工作效率百度或者google这些代码发现拿过来的都不好用,然后自己写了个,写的一般但记录下以后再优化 <html> <head> <script> $(function(){ /* bieanju原创多条件筛选 */ $('.filter').click(function(){ var name = $(this).attr('data-name'); var value = $(this).attr('value'); var url = window.lo…
由于我在Cellar下安装了多个PHP版本,所以这里记录下如何修改本地的PHP版本 cd /usr/local/bin cp php71 php cp php71-fpm php-fpm vscode下修改php的执行路径来避免打开后的“The language server needs at least PHP 7 installed”这个提示. // "php.validate.executablePath": "/usr/local/Cellar/php56/5.6.3…
机器学习中大量的用到了Python,因此需要有pycharm作为Python的编译工具,配合anconda环境进行配置,将macos,tensorflow ,python的配置记录下: We suggest using Anaconda python 2.7 distribution: ```sh >>wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh (depending on your OS, cho…