alias

.bashrc备份(for Linux)

元气小坏坏 提交于 2020-01-29 11:05:05
PS1="[[\e[32m]\u@\h:[\e[33m]\w ][\e[0m] $ " # Alias alias vi=‘vim’ alias ls=‘ls -hF’ alias ll=‘ls -al’ alias la=‘ls -a’ alias cls=‘clear’ function fgrep(){ find * -type f -name “$1” | xargs grep $2; } alias fgrep=fgrep alias grep=‘grep -rns --color=auto’ alias find=‘find ./ -name’ #alias tg=‘find . -name *.h -or -name *.c -and -type f|xargs ctags -a’ #alias ctags=" brew -prefix /usr/bin/ctags" 来源: CSDN 作者: CMD侠 链接: https://blog.csdn.net/weixin_43965823/article/details/104104471

C# 数据库并发的解决方案(通用版、EF版)

故事扮演 提交于 2020-01-27 04:21:38
十年河东,十年河西,莫欺少年穷。 EF就如同那个少年,ADO.NET则是一位壮年。毕竟ADO.NET出生在EF之前,而EF所走的路属于应用ADO.NET。 也就是说:你所写的LINQ查询,最后还是要转化为ADO.NET的SQL语句,转化过程中无形降低了EF的执行效率。 但是,使用EF的一个好处就是系统便于维护,减少了系统开发时间,降低了生成成本。 OK,上述只是做个简单的对比,那么在实际编码过程中,我们应当怎样提升EF的性能呢? 工欲善其事,必先利其器。 我们使用EF和在很大程度提高了开发速度,不过随之带来的是很多性能低下的写法和生成不太高效的sql。 虽然我们可以使用SQL Server Profiler来监控执行的sql,不过个人觉得实属麻烦,每次需要打开、过滤、清除、关闭。 在这里 强烈推荐一个插件MiniProfiler 。实时监控页面请求对应执行的sql语句、执行时间。简单、方便、针对性强。 如图: 关于MiniProfiler的使用,大家可参考: MiniProfiler工具介绍(监控加载用时,EF生成的SQL语句)--EF,迷你监控器,哈哈哈 1、EF使用SqlQuery 上述已经说的很明白了,EF效率低于ADO.NET是因为LINQ-TO-SQL的过程消耗了时间。而使用SqlQuery则可以直接写SQL语句。 当然,如果你想得到更快的执行速度

采用微软的AutoML框架对鸢尾花进行特征筛选

随声附和 提交于 2020-01-25 03:22:46
from sklearn import datasets from sklearn.model_selection import train_test_split from nni.feature_engineering.gbdt_selector import GBDTSelector import torch iris = datasets.load_iris() x = iris.data y = iris.target params = { # default=0.1, type=double, alias=shrinkage_rate 'learning_rate': 0.2, # default=regression,任务类型 'application': 'binary', # 叶子节点的数量 'num_leaves': 31, # default=1, type=int, alias=verbose | 日志冗长度,[详细信息]代表是否输出 < 0: Fatal, = 0: Error (Warn), > 0: Info 'verbosity': -1, 'data_random_seed': 2, 'bagging_fraction': 0.8,# default=1.0, type=double, 0.0 < bagging_fraction < 1.0,

Unaliasing a global alias in zsh

天大地大妈咪最大 提交于 2020-01-23 07:51:34
问题 I had defined a global alias in my zsh shell using "alias -g" . When I am trying to unalias it, the shell throws the following error : "unalias: no such hash table element". Any pointers on how to unalias a globally defined alias? 回答1: You need to escape it while attempting to unalias . Try saying: unalias \aliasname instead of unalias aliasname Since it's a global alias, the shell would substitute it anywhere on the command line unless you escape it. 来源: https://stackoverflow.com/questions

Unaliasing a global alias in zsh

夙愿已清 提交于 2020-01-23 07:51:16
问题 I had defined a global alias in my zsh shell using "alias -g" . When I am trying to unalias it, the shell throws the following error : "unalias: no such hash table element". Any pointers on how to unalias a globally defined alias? 回答1: You need to escape it while attempting to unalias . Try saying: unalias \aliasname instead of unalias aliasname Since it's a global alias, the shell would substitute it anywhere on the command line unless you escape it. 来源: https://stackoverflow.com/questions

PostgreSQL - Aliases column and HAVING

人走茶凉 提交于 2020-01-23 05:21:07
问题 SELECT CASE WHEN SUM(X.Count)*3600 is null THEN '0' ELSE SUM(X.Count)*3600 END AS PJZ, X.Mass FROM X WHERE X.Mass > 2000 HAVING ((X.Mass / PJZ * 100) - 100) >= 10; Getting: ERROR: Column »pjz« doesn't exists. How can I do something like this? 回答1: Wrap it into a derived table: SELECT CASE WHEN PJZ = 0 THEN 100 ELSE PJZ END as PJZ, mass FROM ( SELECT CASE WHEN SUM(X.Count)*3600 is null THEN '0' ELSE SUM(X.Count)*3600 END AS PJZ, X.Mass FROM X WHERE X.Mass > 2000 GROUP BY X.mass ) t WHERE PJZ =

SQL Alias of joined tables

青春壹個敷衍的年華 提交于 2020-01-22 15:13:34
问题 I have a query like this: select a1.name, b1.info from (select name, id, status from table1 a) as a1 right outer join (select id, info from table2 b) as b1 on (a1.id = b1.id) I only want to include everything where a1.status=1 and since I'm using an outer join, I can't just add a where constraint to table1, because all info from table2 that I want to be excluded will still be there, just without the name. I was thinking something like this: select z1.name, z1.info from ((select name, id,

How do I run system executables with aliases within R?

大城市里の小女人 提交于 2020-01-22 02:30:10
问题 Suppose, I am running system command in R to run an executable . inputfile <- "/path/myfile.txt" How can I replace /path/myfile.txt in the below command with inputfile as shown in the command below? system ("executable -input inputfile -output output.txt") 回答1: Try either of these: library(gsubfn) fn$system("executable -input $inputfile -output output.txt") or without packages: cmd <- sprintf("executable -input %s -output output.txt", inputfile) system(cmd) 来源: https://stackoverflow.com

Git using for aliases different shell than bash

亡梦爱人 提交于 2020-01-21 09:43:46
问题 I am learning git for some time, recently I have been using aliases. Everything was working, until last time. My example alias stopped working ( git simple-commit works fine ) simple-loop = "!simpleLoop() { NAME=$1; i="1"; while [ $i -le $2 ]; do git simple-commit $NAME$i; i=$[$i+1]; done; }; simpleLoop" I am getting fatal in terminal simpleLoop() { NAME=$1; i=1; while [ $i -le $2 ]; do git simple-commit $NAME$i; i=$[$i+1]; done; }; simpleLoop: 1: [: Illegal number: $[1+1] It looks like git

yii执行流程

戏子无情 提交于 2020-01-19 02:13:11
yii执行流程 原文: http://www.cnblogs.com/bluecobra/archive/2011/11/30/2269207.html 一 目录文件 |-framework 框架核心库 |--base 底层类库文件夹,包含CApplication(应用类,负责全局的用户请求处理,它管理的应用组件集,将提供特定功能给整个应用程序),CComponent(组件类,该文件包含了基于组件和事件驱动编程的基础类,从版本1.1.0开始,一个行为的属性(或者它的公共成员变量或它通过getter和/或setter方法??定义的属性)可以通过组件的访问来调用),CBehavior(行为类,主要负责声明事件和相应事件处理程序的方法、将对象的行为附加到组件等等),CModel(模型类,为所有的数据模型提供的基类),CModule(是模块和应用程序的基类,主要负责应用组件和子模块)等等 |--caching 所有缓存方法,其中包含了Memcache缓存,APC缓存,数据缓存,CDummyCache虚拟缓存,CEAcceleratorCache缓存等等各种缓存方法 |--cli YII项目生成脚本 |--collections 用php语言构造传统OO语言的数据存储单元。如:队列,栈,哈希表等等 |--console YII控制台 |--db 数据库操作类 |--gii YII 代码生成器