alias

Apache httpd.conf alias match for wildcard directories

I am looking to create a url alias for any path of: /images/section* to /section_images/section* So for example /images/section_a/a.gif will locate to /section_images/section_a/a.gif I know how to create alias matches to rewrite specific directories: AliasMatch ^/images/(.*) /site/path/section_images/$1 However do not want everyth...

Restricted pointer assignments

I have a question regarding restricted pointer assignments. See the comments in code for specific questions. Overall, I'm just wondering what's legal with restrict (I've read the standard, but still have questions :-( int* Q = malloc(sizeof(int)*100); { int* restrict R = Q; for(int j = 0; j < rand()%50; j++) { R[...

make alias for svn repository

I am working with multiply repositories. Is it possible to create an alias for repositories. So I can use them instead of raw urls? Namely instead of: svn ls https://mysvnrepos.abs/trunk I could use: svn ls myrepo ...

XStream Alias of List root elements

I want to be able to alias the root list element depending upon what type of objects are contained in the list. For example, this is my current output: <list> <coin>Gold</coin> <coin>Silver</coin> <coin>Bronze</coin> </list> And this is what I want it to look like: <coins> <coin>Gold</coin> <coin>Silver</coin> <coin>Bronze</coin> </...

Oracle rename columns from select automatically?

I have 2 tables with the following fields. Table1 AA BB CC DD Table2 AA CC EE Query Select t1.*, t2.* from table1 t1, join table2 t2 on table1.DD = table2.EE My data columns back with the following column names: AA, BB, CC, DD, **AA_1**, **CC_1**, EE I don't want the column names like that. I want them to have ...

SQL - using alias in Group By

Just curious about SQL syntax. So if I have SELECT itemName as ItemName, substring(itemName, 1,1) as FirstLetter, Count(itemName) FROM table1 GROUP BY itemName, FirstLetter This would be incorrect because GROUP BY itemName, FirstLetter really should be GROUP BY itemName, substring(itemName, 1,1) But why can't we simply us...

Opinions: SQL Statements, do you use table aliases?

One of the guys I work with has the following to say about using SQL aliases, and he just posted the following on reddit. What do you guys think, to alias or not to alias? .... So I've always been the odd man out of my with my dev team about how SQL should be written. I learned in school to use aliases, but I hate them personally. I f...

How can I create a subdomain mask that is an alias of another domain?

I want to create a subdomain that is an alias of another domain. Example: google.mysite.com -> www.google.com but I want to display the taget domain content without a redirect, so it looks like content is being serve from my subdomain instead of the target (google in this example) ...

Aliasing a command in vim

Vim is my preferred text editor when I program, and thus I always run into a particularly annoying issue. Frequently, when I quickly need to save the buffer and continue on to some other miscellaneous task, I do the typical :w However, I – what seems to be like more than 50% of the time – always manage to capitalise that :w. Natural...

How do I concatenate arrays of aliases in Perl?

How do you concatenate arrays of aliases in Perl such that the resulting array also contains aliases? The solution that I came up with is: my ($x, $y, $z) = 1 .. 3; my $a1 = sub {\@_}->($x); my $a2 = sub {\@_}->($y, $z); my $a3 = sub {\@_}->(@$a1, @$a2); say "@$a3"; # 1 2 3 $_++ for $x, $y, $z; say "@$a3"; # 2 3 4 What I am n...

How to escape whitespace in a bash alias?

Tried to set some aliases in my .bashrc file. This one... export alias umusic="/Volumes/180 gram/Uncompressed/" ...gets the following error... -bash: cd: /Volumes/180: No such file or directory ...when I try "cd $umusic". I've tried various methods of escaping that whitespace in the directory name, to no avail. (180\ gram, 180%...

Spaces in Cygwin/bash aliases?

I am attempting to set up aliases for my Cygwin bash shells, to run programs contained in the standard Windows C:\Program Files subdirectories. Unfortunately, the alias command really doesn't like spaces in a directory name, and nothing I've tried seems to work. I'm trying to get the following running: alias npp='/cygdrive/c/Program F...

to calculate sum() two alias named columns - in sql

To calculate sum() of two temp column names declared in query - in SQL stud table has only two columns m1,m2. total and total1 is given as temp name. select m1, m2, SUM(m1) + SUM(m2) as Total, SUM(m1) + SUM(m2) as Total1 from stud group by m1, m2 How to calculate grandtotal as sum(total)+sum(total1) with the col...

SQL Server alias for a cluster?

Hi, I'm looking for a bit of advice setting up a SQL cluster to be accessed via an alias. At present, say my cluster is called 'SQLCLUSTER' and I want to set up an alias to redirect to it. Ideally, I'd like any attempt to connect to '(local)' on either of the machines in the cluster to redirect to 'SQLCLUSTER'. I'm using SQL server 200...

Alias for array or hash element in Ruby

Example for array arr = ["a", "b", "c"] # TODO create an alias for arr[1] as x x = "X" # arr should be ["a", "X", "c"] here Example for hash hash = { :a => "aaa", :b => "bbb" , :c => "ccc" } # TODO create an alias for hash[:b] as y y = "YYY" # hash should be { :a => "aaa", :b => "YYY" , :c => "ccc" } here And also an alias for a v...

Subdomain alias of subdomain

Hi Guys, On a Linux Plesk server I want the following: source-sub.domain.com Aliases: alias1.domain.com ->source-sub.domain.com alias2.domain.com ->source-sub.domain.com alias3.domain.com ->source-sub.domain.com So I want several subdomains to point to the source sub domain. How do I do this? Can I make a symlink or something? ...

Switching to an aliased directory

Hello, Just wanted to know if it is possible to switch to an aliased directory using shell script. To switch to a directory there is cd command. But i have aliased the directory and wanted to know as how to switch to the aliased directory. Could someone please help me? ...

MySQL query alias?

I was reading something a few months ago that would take something like: SELECT first, last FROM contacts where status = 'active' and turn it into: SELECT first, last FROM active_contacts It's definitely not a stored procedure and I'm pretty sure it's not a prepared statement. I'm also positive what I was reading did not involve te...

How can I make an alias to a non-function member attribute in a Python class?

I'm in the midst of writing a Python Library API and I often run into the scenario where my users want multiple different names for the same functions and variables. If I have a Python class with the function foo() and I want to make an alias to it called bar(), that's super easy: class Dummy(object): def __init__(self): pass...

Git Alias Problem

I was trying to set up some git aliases by adding these lines to my ~/.gitconfig file: [alias] st = status ci = commit br = branch And when I go to run these commands in the terminal: git st, I get the following error fatal: cannot exec 'git-st': Not a directory. I do not know what the problem is and I have looked online and can...