Menu
  • HOME
  • TAGS

Understanding Alias Templates

c++,templates,alias,enable-if,c++1z

I don't think the shown example really shows what void_t is good for as it only shows one use case, but when you look at template<typename T> struct has_to_string<T, void_t<decltype(std::to_string(std::declval<T>()))> > : std::true_type { }; it is not so much different from template<typename T> struct has_to_string<T, decltype(std::to_string(std::declval<T>()), void()) > :...

Neo4J Return column alias (AS) name with space, is it possible?

neo4j,cypher,alias

Spaces are possible, you can alias it using the backticks as follows: MATCH (a) RETURN a.age AS `My Alias Age Column Name`; ...

How do I set up a bash alias for a common working folder?

bash,function,alias

Two workarounds: Add this to your .bashrc: CDPATH="$CDPATH:$HOME/some/deep/working" then you can use cd folder/bob from everywhere. Use a variable: myfolder="$HOME/some/deep/working/folder" cd "$myfolder/bob" ...

How to join to a table using aliases

sql,postgresql,join,alias

I may be missing something, but I don't understand the need for the complexity in your example queries. Would something like the following (untested) query work? SELECT Name, PostCode, A.RowIdx AS RowIdx FROM (SELECT Val AS Name, RowIdx FROM myTable WHERE ColumnID=1) A INNER JOIN (SELECT Val AS PostCode, RowIdx...

Use SQL keyword as alias name of a column

mysql,sql,select,alias,keyword

Use backtick(`) or Single Quote(') to give alias name of column in MySQL. Try this: SELECT `id` AS 'key', `country_name` AS value FROM countries; OR SELECT `id` AS `key`, `country_name` AS value FROM countries; ...

Composer: Require a package with custom namespace

php,composer-php,alias

No, there is nothing you can do to shorten these namespaces. Composer doesn't have to do anything with PHP namespaces. The name you use to identify the software package is unrelated to the PHP namespace. They don't have to match in any way. Composer only provides an autoloader that will...

Alias command with parameters as arguments

bash,terminal,command,alias,.bash-profile

Use full path for the file-names instead of tilde ~ move-jar(){ mv "/home/user/Downloads/$1" "/home/user/Documents/$1"; } And this one-liner works for me. move-jar(){ mv ~/Downloads/$1 ~/Documents/$1; } ...

When is the AS keyword optional vs required?

sql,sql-server,tsql,alias

You are in essence asking for the language design decision on when (and why) the AS keyword is optional or required. While this is impossible to answer definitively without referencing the minutes of the design committee meetings, it is likely required exactly where needed to make an unambiguous grammar, and...

Python list aliasing or global variables in OO programming. Different result, same process [duplicate]

python,oop,global-variables,alias

See this SO post: "Least Astonishment" in Python: The Mutable Default Argument When Python executes the following code: def add_cloud(ID,coordinate,Hosts=[]): global CLOUDS CLOUDS += [Cloud(ID, coordinate, Hosts)] It creates a function object, and stores default parameter values that were specified in a tuple under the attribute func_defaults. See: >>> print...

golang function alias on method receiver

go,alias

Yes. You can make an alias like this: var MethodReceiver = (*Person).methodReceiver When you call it, you have to provide a pointer to a person object as the first argument: MethodReceiver(&p) You can see this in action on the Go Playground....

Virtuoso Jena provider query alias syntax

java,alias,sparql,jena,virtuoso

I see you also asked this on the OpenLink Software Support Forums... (ObDisclaimer: I work for OpenLink Software.) I've also posted this answer there. The error you're encountering is coming from the Jena parser, not from Virtuoso nor the Virtuoso Jena Provider. First thing is to correct the query to...

SQL command not properly ended, concerning with table aliases

sql,oracle,alias

The issue is that when the subquery in the where clause is parsed the table alias temp might not have been defined yet. You could use a common table expression instead: ;WITH Temp AS ( SELECT o.received, AVG(p.price*d.qty+d.sfee) avgsale FROM orders o, parts p, odetails d GROUP BY o.received )...

Can an identity alias template be a forwarding reference?

c++,templates,alias,c++14,forwarding-reference

Consider this code: template<class T> using identity = T; template<class T> void foo(identity<T>&&) { } //#1 template<class T> void foo(T&&) { } //#2 int main() { int i{}; foo(i); } Both GCC and Clang reject it because #2 is a redefinition of #1. If they're actually the same template, we...

How to create nested SELECT COUNT with alias in Postgres

sql,postgresql,count,nested,alias

You want to create a separate row for each character. One way is to generate all the characters and then aggregate by them. Here is one approach: select chr(chars.c + ascii('A')) as c, sum(case when ascii(left(m.nome, 1)) = chars.c + ascii('A') then 1 else 0 end) from generate_series(0, 25) as...

How to create an alias on two indexes with logstash?

elasticsearch,alias,logstash,logstash-grok,elastic

As far as I know, there's no way to do it with logstash directly. You can do it from an external program using the elasticsearch API: http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html For example: curl -XPOST 'http://localhost:9200/_aliases' -d ' { "actions" : [ { "add" : { "index" : "indexA-2015.01.01", "alias" : "alias-2015.01.01" } },...

Rails: aliasing the index action in the routes file

ruby-on-rails-4,routes,alias

This works get "/users/:user_id/publications" => "publications#pubmed_search", :as => "user_publications"...

Bash expansion error defining function with pandoc

osx,bash,alias,variable-expansion

That example is a tcsh alias not a bash alias. That's why you needed to add the = that the original had to yours to get it to work at all. The problem is that tcsh (apparently) removes escaping backslashes from history expansion exclamation points that it sees in double...

Where in the Standard does it say that a member alias-declaration can be used as if it was a static member?

c++,alias,language-lawyer,c++14

This is just your normal qualified lookup. From [basic.lookup.qual]: The name of a class or namespace member or enumerator can be referred to after the :: scope resolution operator (5.1) applied to a nested-name-specifier that denotes its class, namespace, or enumeration. Then from [class.qual]: If the nested-name-specifier of a qualified-id...

Error Code: 1248. Every derived table must have its own alias No solution found for query

mysql,sql,alias,derived-table

You need to provide an alias for the subquery, like so: select * from (select PM.ID, PM.Name, PM.TIMEOUT, PMS.PROCESS_MONITOR_ID, PMS.PROCESS_START_DATE from RATOR_IMP.PROCESS_MONITOR as PM JOIN RATOR_IMP.PROCESS_MONITOR_STATISTIC as PMS ON PM.ID = PMS.PROCESS_MONITOR_ID WHERE PM.ENABLED=1 and (PM.NAME='SDRRATINGENGINE11' or PM.NAME='WORKFLOWENGINE1') order by PMS.PROCESS_START_DATE desc) as s limit 10000; From the documentation, Subqueries...

Bash alias doesn't work in cygwin

bash,cygwin,windows-8.1,alias

The syntax of your alias command is correct and should be working as long as the alias command is actually being executed. It sounds like your .bashrc file is not being loaded when you start your bash shell. Make sure you have the following in your ~/.bash_profile file: [[ -s...

Bash - create alias that runs task in background AND carries on running other tasks

bash,alias

If both should be running at the same time, then && is probably not what you want to use. It waits for the exit of the first command and executes the second only if the first was successful. With the backgrounding of the first task, this doesn't really make sense....

Bash alias to script generating shebang text

bash,alias,shebang

You need to do it in two steps, and apparently use single-quotes as well: tempvar='#!/bin/bash\necho configvalue' alias createConfiger='echo -e "$tempvar" > printConfig.sh' ...

use git shell alias in git command

git,shell,command,alias

git doesn't expand aliases at random points in the command line (that would require a lot of scanning and work at all times and potentially break any usage of an aliased word in a branch ref/etc.) The closest you can get to what you want is git push -u origin...

how set unix alias with current directory works on every path

unix,path,find,cygwin,alias

with suggestion on using find -exec i finally my problem solved. The solution is: alias exesh='find . -name "*.sh" -exec /bin/chmod +x {} \;'

Does the Git version that ships with GitHub not have the alias feature?

git,github,alias

Why this error? Nothing to do with GitHub or a particular Git version; quite simply, the syntax you're using is incorrect. Using your command on my Macbook throws the exact same error: $ git config alias error: key does not contain a section: alias How to define an alias The...

Alias Directive for shared hosting

apache,.htaccess,alias

The Alias directive is not allowed outside of the server/vhost config. Since the htaccess file is a "per directory" context, there's no way to do anything outside of the context of the document root. Which means you can't do/know anything outside of the root (which I'm assuming is /home/user/public_html/. You'd...

How to avoid quotes around table aliases in jOOQ

java,sql,alias,jooq

By default, jOOQ will wrap all your identifiers in quotes in order to be able to handle case-sensitivity correctly. The confusing part is why this isn't done for DSL.field(String), but only for Field.as(String). The reason for this is that jOOQ re-uses the String type for both: Plain SQL as in...

Outlook 2010 VBA code to show alias of recipient

email,outlook,alias,outlook-vba

With all your help I was able to solve this by capturing recipient address entry, adding it as a new item, showing alias, then deleting the recipient: Sub ReadRecpDetail() Dim myOlApp As Outlook.Application Dim myItem As Outlook.mailItem Dim myRecipient As Outlook.recipient Dim recipient As Outlook.recipient Dim SMTPaddress As String Dim...

defining grunt aliases with option values defined

javascript,node.js,gruntjs,alias

The Grunt API does not provide a way to interpret commandline arguments , but since every gruntfile is just a Node.js module, you are not restricted in any way to implement the CLI arguments interpretation yourself in the Gruntfile. I just found out that Grunt indeed has a built-in...

Windows CMD interpret code following alias

windows,batch-file,svn,cmd,alias

Try with doskey mysvn=D:\portableSVN\bin\svn.exe --config-dir D:\portableSVN\config $* See doskey /? for more information...

Does git tag mainly works as a kind of alias?

git,alias,git-tag

There is already a pretty good answer, but I wanted to add an answer that goes in a different direction. In a significant way, the answer to the question as asked ("does a tag serve as an alias") is yes, but this could be misleading, because in git, all names...

cannot implicitly convert type error when using aliases

c#,generics,alias

I think the problem is in your alias definition, you should change it to using CreationFunction = System.Func<Microsoft.Xna.Framework.Vector2, GAShooter.Entity>; Create a using alias to make it easier to qualify an identifier to a namespace or type. The right side of a using alias directive must always be a fully-qualified type...

Template and typename syntax

c++,syntax,alias,template-meta-programming

On this line: getArgs<typename func1<int>::operator()>::Type typename func1<int>::operator() is not a type, it's a function. You need to call decltype() on a pointer to it. Use operator& to get a pointer to member: getArgs<decltype(&func1<int>::operator())>::Type ...

How to change the value with a select in SQL?

sql,sql-server,select,alias

Here is what you want: SELECT Calendar_Month, CASE WHEN Series = 'FULL' THEN 'YOUR_TEXT_FOR_FULL' WHEN Series = 'NONE' THEN 'YOUR_TEXT_FOR_NONE' END AS Series ,Cnt FROM T_Cust_Eom_n WHERE (TYP='REB'and Series='FULL') OR (TYP='REB' and Series='NONE') ORDER BY Series DESC,Calendar_Month ...

Providing a column name for the resultant table

sql,sql-server,sql-server-2008,select,alias

You can give colmn name using ALIAS and also you can fetch both count using one query instead of two subqueries. Try this: SELECT COUNT(serialNumber) AS LOTQty, SUM(CASE WHEN PreScan = 'FAIL' THEN 1 ELSE 0 END) AS FailedQty FROM MobileData WHERE mobileName = @mobileName AND model = @model AND...

SQLite dynamic aliases

sql,sqlite,alias

It sounds like you're looking for a conditional statement to choose what column to show: SELECT t1.*, CASE WHEN TYPE = 1 THEN url ELSE us END AS name FROM t1 INNER JOIN t2 ON (t1.id = t2.id) ORDER BY t1.id ASC; Sample output: | id | url | type...

SQL Inner Join with Alias not working - ambigious column name

c#,sql-server,inner-join,alias

By looking at your query, it seems that the problem is in the ORDER BY clause. You have just specified the column name there and not the table name. I suggest you try putting the table name there as well. Here : ORDER BY "+form1.cusIdBox.Text+" ASC You need to add...

Creating command line alias for Java class in ANTLR 4 generated parser

java,windows,antlr,alias,antlr4

Turns out that you should exclude the quotes when defining an alias in Windows. There is also a $* to accept parameters. C:\source\antlr4\Hello>doskey antlr4=java -jar C:\libraries\antlr-4.4-complete.jar $* C:\source\antlr4\Hello>doskey grun=java org.antlr.v4.runtime.misc.TestRig $* ...

Formal argument names for magrittr aliases

r,alias,plyr,pipeline,magrittr

use_series is just an alias for $. You can see that by typing the function name without the parenthesis use_series # .Primitive("$") The $ primitive function does not have formal argument names in the same way a user-defined function does. It would be easier to use extract2 in this case...

Zsh global alias equivalent in fish shell

terminal,alias,fish

Zsh's global alias feature is unique to zsh. fish cannot recognize aliases except where you'd expect a command, as the first word.

Qt5: How to replace numeric values of a column of a SQL table view with text aliases?

sql,qt,table,view,alias

You should create a subclass of QSortFilterProxyModel and reimplement its data virtual method. It can be something like this: QVariant MyModel::data(const QModelIndex & index, int role = Qt::DisplayRole) const { QVariant result = QSortFilterProxyModel::data(index, role); if (index.column() == ERROR_COLUMN) { result = error_to_string(result.toInt()); } return result; } See the documentation...

referencing mySQL query components

mysql,sql,select,alias

You cannot refer to aliases in the select list (or the where clause, for that matter). One way around this is to use a subquery: SELECT starting_principle, interest, principle + interest AS principle_plus_interest FROM (SELECT 50000 AS starting_principle, .065*50000 AS interest FROM some_table) t ...

SQL aliasing with multiple tables

sql,sql-server,tsql,alias

Try this... SELECT r.* ,Player.* ,f.* ,isNull(Player.PlayerFirstName + ' ' + Player.PlayerLastName, ' ') AS 'PlayerName' FROM Report AS r INNER JOIN Player ON Player.PlayerID = r.PlayerID INNER JOIN Fixture AS f ON f.FixtureID = r.FixtureID WHERE r.FixtureID = @FixtureID ORDER BY ReportDate ...

Is it safe to cast between B* and D* if D contains an object of type B as its first member?

pointers,casting,alias,d

Structs in D "work like they do in C", so you can have reasonable expectations on their internal layout. Be wary of hidden members of nested structs, though. Casting from D to B should be fine. It is not safe to cast in the other direction, because y will then...

Adding alias to bashrc to run multiple commands and pass a variable?

bash,shell,command-line,alias

You can combine multiple commands in an alias using a semicolon: alias name_goes_here='activator; clean; compile; run' Then you can use name_goes_here 9002. Alternately, if you need something more complex, consider making a function instead. They're considerably more flexible....

How to concatenate Aliased Types (of consts) into strings.Join()

types,casting,go,alias

As @Not_a_Golfer points out, you should really be looping through the slice of constType and building up a new slice of string. This has the disadvantage of copying each element (which may or may not matter to you). There is another solution, although it involves the unsafe package from the...

Are generic type aliases possible in TypeScript?

generics,typescript,alias

No, not yet. You can see developments on this in issue #1616. As for when this feature will be available... Lately we've been quite busy with ES6 alignment and the recently announced Angular 2.0 related features. We will get to (re)evaluating some of these type system specific issues but there's...

Using alias in cygwin doesn't recognize?

bash,google-chrome,cygwin,alias,.bash-profile

Shell aliases only apply to the first word in a command. They can not be used to replace strings in the middle of commands. Consider using a variable instead: gmail='https://gmail.com' cygstart chrome "$gmail" ...

Aliasing a variable using const reference

c++,reference,const,alias,const-reference

It depends on the configuration. If optimizations are in place it should produce the same results for any good compiler. This would be typical for release builds. If optimizations are disabled it should produce fewer instructions, since you are de-referencing the collection just one time. This would be typical for...

tcsh shell and variable argument alias

alias,tcsh

This works: alias P 'cd /home/projects/\!*' If you pass an argument, it is appended to the end of the path, else !* is replaced by nothing....

Can PHP resolve a Mac alias?

php,osx,alias

Chances are you're not referring to an actual symbolic link. If you're dealing with Finder Aliases, you can use the workaround found in the comments for the is_link docs. Here are the contents of the comment (to avoid a link-only answer for posterity): if( getFinderAlias( $someFile , $target ) )...

mysql: getting getting tuple of an alias which has maximum column value

mysql,sql,max,alias

Use a JOIN with subqueries. select tpt.AlbumId from ( select Album.AlbumId, Sum(Track.UnitPrice) as Total from Album inner join Track on Album.AlbumId = Track.AlbumId group by Album.AlbumId ) tpt JOIN ( select Sum(Track.UnitPrice) as Total from Album inner join Track on Album.AlbumId = Track.AlbumId group by Album.AlbumId ORDER BY Total DESC...

How do I find out if one Python function is an alias for another one?

python,file,alias,file-handling

In Python 3, the open() function is indeed the same object: >>> sys.version '3.4.2 (default, Nov 29 2014, 18:28:46) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)]' >>> id(open) 4467734600 >>> id(io.open) 4467734600 >>> io.open is open True This is not the case in Python 2 however. The io module is...

Use alias for JOIN using JOOQ's SelectQuery

sql,join,alias,jooq

I've found solution. SelectQuery<ParentRecord> selectQuery = context.selectQuery(subSelectQuery.asTable(PARENT.getName())); selectQuery.addJoin(CHILD, JoinType.JOIN, CHILD.PARENT_ID.eq(PARENT.as(PARENT.getName()).ID)); ...

create alias for path

powershell,windows-8,alias

You could just create a variable in your powershell profile with that path as the value. Then all you would need to do is something like cd $dotNet4path To add something to your profile profile, type $profile, into a powershell window and it will display the path to your powershell...

pwd alias causing infinite loop in UNIX (bash)

bash,unix,alias,pwd

alias pwd='echo -e ${color1}jarvis: ${color2}you are currently in the ${color3}$(\pwd)${color2} directory, sir.${NC}' Backslash in \pwd avoids the alias....

Java Runtime.exec() doesn't honor Linux alias

java,linux,process,alias,spawn

The reason is that alias is belonged to interactive shell process, so that the java can't see it. You can see the detail here http://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases If you want to execute the alias: Your shell is bash java Exec "bash -i -c 'ls'" Your shell is zsh java Exec "zsh -i...

Many 1000s of URL redirects in Drupal 7: PathAuto/GlobalRedirect, apache .htaccess, or another solution?

url,drupal,dictionary,alias,scalability

Turns out there is no problem with tens of thousands of URL aliases using the modules Redirect Global Redirect PathAuto I imported the aliases with Redirect Import (but ran into file upload size limit)....

How to write an ipython alias which executes in python instead of shell?

python,macros,ipython,alias,ipython-magic

The normal way to do this would be to simply write a python function, with a def. But if you want to alias a statement, rather than a function call, then it's actually a bit tricky. You can achieve this by writing a custom magic function. Here is an example,...

SQL - using SELECT Alias in WHERE

sql,sql-server,alias

You can use a Common Table Expression or Subquery to create the FName as a kind of virtual column of a new resultset. You can that use the resultset as a kind of virtual table and filter on that in the where clause. SELECT * FROM ( SELECT LastName ,...

Execute script after `python manage.py shell` is up

python,django,shell,alias

You can use the following simple shell script: #!/bin/bash export PYTHONSTARTUP="$1" # Set the startup script python will run when it start. shift # Remove the first argument, don't want to pass that. python manage.py shell "[email protected]" # Run manage.py with the startup script. Just supply the python script you...

How to define aliases in the MongoDB Shell?

mongodb,shell,alias

To list databases try : function sd(){ return db._adminCommand( { listDatabases: 1 } ) } Basically you have to run valid javascript here. Remember that you have to run these in context of admin database - runCommand will not be enough - you have to use _adminCommand here. For other...

Store column result in variable

php,mysql,pdo,alias

Your function returns an associative array, where each column is in an element whose key is the column name. So if you do: $row = yourfunc(); then you can do: $firstname = $row['firstname']; ...

Bash: Pass alias or function as argument to program

bash,function,alias

You're parsing ls, and this is very bad. Moreover, if the last modified “file” is a directory, you'll be lessing/viming a directory. So you need a robust way to determine the last modified file in the current directory. You may use a helper function like the following (that you'll put...

SQL Join Views - Duplicate Field

sql-server,tsql,join,view,alias

You have two instances of cauditnumber at position 1 and 3, you need to alias or remove one. CREATE VIEW KFF_Sales_Data_Updated AS SELECT CustSalesUpdated.cAuditNumber -- HERE ,CustSalesUpdated.Account ,CustSalesUpdated.cAuditNumber --HERE ,CustSalesUpdated.Name ,StkSalesUpdated.cAuditNumber as AuditNumber1 ,StkSalesUpdated.Code ,StkSalesUpdated.Credit ,StkSalesUpdated.Debit ,StkSalesUpdated.Description_1 ,StkSalesUpdated.Id ,StkSalesUpdated.ItemGroup ,StkSalesUpdated.Quantity ,StkSalesUpdated.Reference ,StkSalesUpdated.TxDate FROM...

How to define two aliases for one command in one statement

osx,bash,unix,alias

$ alias {gac,gitac}="git add . && git commit -am " $ alias gac alias gac='git add . && git commit -am ' $ alias gitac alias gitac='git add . && git commit -am ' ...

Delete from aliased table doesn't work (but select does)

sql-server,delete,alias

Put your alias in DELETE syntax like this: delete DB01 FROM [DB01].[forward].[forward_value] as DB01 WHERE Id_forward like 'test' and NOT EXISTS (SELECT * FROM [DB02].[db_marketdata].[forward].[forward_value] as DB02 WHERE DB01.Id_Forward = DB02.Id_Forward and DB01.Id_Block = DB02.Id_Block and DB01.Id_PriceType = DB02.Id_PriceType ) ...

Why are the aliases for string and object in lowercase?

c#,alias,naming,primitive-types,complextype

In C#, there are no "primitive types" and "complex types". There are classes and structs, (reference types and value types, respectively) among others. Both can include methods (e.g. char.IsDigit('a')). So your objections aren't really valid. But there is still the question: why? I'm not sure if there's a good source...

Alias text in HTML or CSS?

html,css,text,fonts,alias

You can't force a font to be aliased at the extent you have in your example. That's not aliased as much as a blown-up pixel font. Fonts that you use in a web page are not bitmap fonts. They are vector fonts. Meaning there are no pixels to alias. *...

How to add a second key-binding to execute-extended command in emacs OS X

emacs,alias,init

There are a few different ways to bind keys in Emacs, but if you simply want to add a second global keybinding for execute-extended-command you can use global-set-key, e.g. (global-set-key (kbd "<f10>") 'execute-extended-command) F10 should now do the same as M-x....

Can a forwarding reference be aliased with an alias template?

c++,templates,alias,c++14,forwarding-reference

This is indeed standard compliant. §14.5.7/2: When a template-id refers to the specialization of an alias template, it is equivalent to the associated type obtained by substitution of its template-arguments for the template-parameters in the type-id of the alias template. Now, consider that during template argument deduction, only the type...

Create a git alias to show files marked as --assume-unchanged?

git,alias

As @maggick said in the comments, .gitconfig goes in your home directory. Your second command is failing because your shell interprets "!git" as a history search. For example: $ echo 'hi' hi $ cat < /dev/null $ !echo echo 'hi' hi Your attempt without !git avoids that issue, but you...

Renaming column multiple ids in SELECT

mysql,sql,select,join,alias

Use ALIAS name to column Try this: SELECT u.id AS userId, u.name AS userName, g.id AS gradeId, g.name As grade FROM users AS u INNER JOIN grades AS g ON g.id = u.grade_id ...

Obtain value of Javascript string variable via an alias

javascript,json,global-variables,eval,alias

Maybe this fact will help you: Any variable in global scope can alternatively be accessed as a property of window. So if you have var something=1; var VARNAME="something"; Then the following are equivalent: console.log(something);//1 console.log(eval(VARNAME));//1 console.log(window[VARNAME]);//1 console.log(window.something);//1 Here are some examples: <script> var something=1; var SCRIPTVAR="something"; console.log(eval(SCRIPTVAR));//1 console.log(something);//1 console.log(window[SCRIPTVAR]);//1 console.log(window.something);//1...

Correct syntax for bash function as alias in .bashrc

linux,bash,shell,scripting,alias

That snippet isn't telling you to do anything with the alias but delete it. It is trying to have you replace the alias with a function since functions are generally more useful than aliases....

MySQL inner join alias issue

mysql,join,alias

You're mixing old-style joins with proper join syntax: SELECT matches.match_id, teamsh.team_name AS "homeTeam", teamsh.team_id AS "homeID", teamsa.team_name AS "awayTeam", teamsa.team_id AS "awayID", competition.NAME, competition.competition_id, teamsh.stadium, matches.date, teamsh.name_short AS "homeTeamShort", teamsa.name_short AS "awayTeamShort", teamsh.pysioid AS "pysioIDh", teamsa.pysioid AS "pysioIDa" FROM matches INNER JOIN teams AS teamsh ON matches.home_team_id = teamsh.team_id INNER...

Defining alias for Tomcat Context inside web application

java,tomcat,alias,context.xml

You'll note from the error message and from Tomcat 8 documentation here, that the aliases property no longer exists. Refer to The Migration Guide to fix it (and possible other problems)....

how to create an alias to a complicated generic type in Java?

java,syntax,types,alias

This should do the trick: import com.w.automation.rtsimulator.headlessclient.data.SearchResult; Callable<MyClass> callable = new Callable<MyClass>() { @Override @SuppressWarnings("unchecked") public MyClass call() throws Exception { return (MyClass) Foo(); } }; You'll also need to define MyClass: public class MyClass extends Map<String, List<SearchResult>> { // implement whatever code you want here for your class objects...

bash shell: Avoid alias to interpret $!

bash,shell,alias,wait

Use a function, not an alias, and you avoid this altogether. my_rsync() { # BTW, this is horrible quoting; run your code through http://shellcheck.net/. # Also, all-caps variable names are bad form except for specific reserved classes. rsync -av ${PATH_EXCLUDE_DEV} ${PATH_SYS_DEV}/ ${PATH_SYS_SANDBOX}/ &>/dev/null cd - } ...in this formulation, no...

Alias to “do X then ” transparently

linux,bash,command-line,alias,io-redirection

Right, I fixed it, as I suspected there was a wrinkle I was missing: exec /bin/login I needed exec to hand control over to /bin/login rather than just call it. So the telnet daemon is started thusly: /usr/sbin/telnetd -l /usr/sbin/not_really_login The contents of the not-really-login script are: #!/bin/sh echo -n...

Error when adding alias to .profile in mac

bash,terminal,alias,.profile

Disable smart quotes in OS X. Your ASCII double quotes are being replaced by fancy slanted Unicode quotes that bash doesn't recognize. Here's a reproduction of the problem: $ cat profile alias goto_test=“cd /Library/WebServer/Documents” $ source profile bash: alias: /Library/WebServer/Documents”: not found $ shellcheck profile In profile line 1: alias...

Make some kind of Event System in ruby

ruby,events,alias

It seems to me you're trying to recreate an already very well understood design pattern, the Observer Pattern. The Ruby Standard Library already has a module that will help you accomplish this. It is documented here. I've given you an example below, but the example in the documentation is more...

Trying to make a permanent Alias - UNIX

linux,bash,unix,alias

I would advise against placing your aliases directly in ~/.profile (which was suggested in the comments). The ~/.profile file is not specific to bash. You should instead place your aliases in ~/.bashrc. Why? .bashrc is guaranteed to be specific to bash (or at least any future variant of it) If...

Bash: override built in command

bash,override,alias

I also tried cd(){ echo before; cd $1; echo after; } however it repetedly echos "before". because it calls recursively the cd defined by you. To fix, use the builtin keyword like: cd(){ pwd; builtin cd "[email protected]"; pwd; } Ps: anyway, IMHO isn't the idea redefine the shell builtins....

Laravel DB Join with asterisk and alias select

sql,laravel,join,alias,asterisk

You need to pass multiple parameters to the select method for each one to get prepared correctly: DB::table('TABLE1') ->leftJoin('TABLE2','TABLE2.COLA', '=', 'TABLE1.COLB') ->select('TABLE1.*', 'TABLE1.COLB AS AAA') // <- 2 separate params here ->get(); ...

PowerShell function ValueFromPipelineByPropertyName not using alias parameter name

function,powershell,parameters,alias

The AD Cmdlets are to blame here The problem here is that the AD Cmdlets return objects in really non-standard ways. For instance, with any other cmdlet if you take the output of the command and select a non-existing property, you'll get back nothing, like this: get-date | select Hamster...

Oracle - Unknown identifier when refering to subquery alias

oracle,subquery,alias

Oracle doesn't allow to use parent columns in the subqueries, which are more than 1 level deep. The simpliest way to fix that is to move where one level upper: (SELECT LISTAGG("Genre",',') WITHIN GROUP (ORDER BY "Genre") from (SELECT DISTINCT "g"."Genre", "RegionBroadcasts"."Title_ID" tmp_title_id from "RegionBroadcasts" left join "Genres" "g" on...

How to set default alias on cloudControl

alias,cloudcontrol

The default entries on the Alias are output are the platform domains, which are provided automatically and exist for every deployment. So this can not be changed. From the perspective of the routing tier all aliases are the same and there is no difference between default and non-default entries. Do...

Tmux breaks zsh aliases

bash,shell,alias,zsh

BASH_SOURCE cannot be used in .zshrc, because it is a bash-specific variable that isn't defined in zsh. You'll have to replace it with its zsh equivalent, found here.

WSGIScriptAlias Apache in MAC Yosemite

apache,alias,wsgi,yosemite

You just add the following before the WSGI definition Alias /cgi-bin /Users/usuario/Sites/usuariocloud/server/ <Location /cgi-bin> SetHandler wsgi-script Options +ExecCGI </Location> <Directory "/Users/usuario/Sites/usuariocloud/server/"> AllowOverride None Order allow,deny Allow from all </Directory> is all ;)...

How to find aliases in emacs

emacs,alias

You can check the value of (symbol-function 'THE-FUNCTION). If the value is a symbol then THE-FUNCTION is an alias. However, if the value is not a symbol THE-FUNCTION might nevertheless have been defined using defalias (or fset). In that case, THE-FUNCTION was aliased not to another function's symbol but to...

Apache - Serve all files in subdirectories

apache,mod-rewrite,alias,subdirectories

You can use the following, untested, mod_rewrite rewriterules. Please note that this is potentially taxing on the server, because for every request that is made to the server, a lot of subrequests are done to check if files exist on the server. As a result, the server is likely unable...

Explanation behind C++ Quiz by Olve Maudal (alias template)

c++,templates,gcc,clang,alias

I think it is 14.5.7 Alias templates 1 A template-declaration in which the declaration is an alias-declaration (Clause 7) declares the identifier to be a alias template. An alias template is a name for a family of types. The name of the alias template is a template-name. The above means...

Apache Alias For External Directory And All Sub Directories

apache,.htaccess,alias

The issue was caused by a base URL. "/" was not correctly working as a base url. Instead i was able to solve it based on the answer here. Set RewriteBase to the current folder path dynamically RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ RewriteRule ^(.*)$ - [E=BASE:%1] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f...