Questions tagged [alias]
An alias is an alternative name. In computer science, the most common contexts are command aliases in shells, column aliases in databases, or variable references in languages like C++.
alias
4,483
questions
0
votes
0
answers
32
views
Alias/bash function with path as parameter does not execute [closed]
If I write a function in my .bashrc that I can invoke through an alias:
alias myalias='f(){ echo $EXPORTED_VAR/run_script.sh /usr/local/software_dir/DIR2024a ; unset -f f; }; f'
and then I call this ...
-1
votes
2
answers
61
views
Cross join and Alias in SQL [closed]
I want to understand why mySQL says there's an error in the syntax when I try to run this query:
select g1.*, g2.*
from (select * from Customer where referee_id is not null) Logs g1, Logs g2
Am I ...
0
votes
1
answer
77
views
How does SQL Server allow multiple of the same alias in the same SELECT statement?
I was doing some queries with Dapper and came across a use case where I needed to return different columns using the same alias to be able to map into different objects with the same property name e.g....
0
votes
1
answer
34
views
JPA Criteria Api: Using alias from GROUP BY in SELECT
I need to aggregate some data by datetime intervals. The correct SQL string for my DB looks like:
select dttm_agg, count(id)
from table_name
group by DateTime::Format("%Y-%m-%d")(dttm) as ...
0
votes
0
answers
75
views
C++ constructor "alias" to pass a class-member as argument [duplicate]
I have a (template) class with a constructor that takes two parameters:
template <typename T>
struct Reg {
T val;
Reg(std::string name, ComplexObject &obj) { ... }
};
and I want to ...
0
votes
1
answer
22
views
TypeORM CLI doesn't properly work with import aliases
I’ve encountered an issue where the TypeORM CLI doesn’t seem to recognize these aliases, leading to module resolution errors during migration generation.Is there a way how to fix it?
import {
Column,...
-1
votes
3
answers
76
views
create a linux shell alias from a python script
I want to write a python script, that sets some shell aliases, that can be executed after running the python script.
I have tried the following approaches:
import subprocess
command: str = 'alias ...
1
vote
1
answer
28
views
How to use alias in LEFT JOIN with alasql?
This simple query works fine in MySQL, but fails in AlaSQL - why?
SELECT DISTINCT any_event.*, temp.event_name AS parent_name
FROM any_event
LEFT JOIN any_event AS temp ON any_event.parent_id=temp....
0
votes
1
answer
96
views
EitherT with Scala type alias
Try to use type alias with EitherT get compilation error
type FuEiErr[T] = Future[Either[Error, T]]
type FuEiErrInt = Future[Either[Error, Int]]
case class Error(msg: String)
def fA(x:Int): FuEiErr[...
1
vote
2
answers
259
views
Angular new control flow @for with async pipe and aliasing variable with as
I migrated from the structural directives *ngIf and *ngFor to the new control flow with @if and @for in Angular.
But there is one case that I used previously but I cannot seem to get it to work with ...
0
votes
2
answers
68
views
Seamlessly using maps with different comparators
I was using an alias to refer to one of two maps:
map<int, int> & map_alias = use_map_a ? map_a : map_b;
but then changed map_b to use std::greater as its comparator (instead of the default ...
2
votes
3
answers
105
views
awk throwing syntax error only when used as alias
I have run the following command successfully, to calculate the total CPU usage using the ps command:
ps -A -o pcpu | tail -n+2 | awk '{sum+=$1}END{print sum}'
However, when I tried to create an ...
0
votes
0
answers
19
views
Nginx doesn't see the files from all the static folders
I have this program structure:
my_app
|- app.py
|- exstensions.py
|- run.py
|- blueprints
|- admin
└── static
├── file1.css
└── file2.js
└── templates
└─...
0
votes
0
answers
25
views
Set variable in Cmder's alias file, user_aliases.cmd
I want to create a variable in user_aliases.cmd for use later in the file, with Cmder under Git for Windows (with Clink). Windows 11.
I've read that this is the way to do it, but it's not working for ...
1
vote
2
answers
91
views
How can I prevent TS errors in vs code due to custom vite alias plugin
I'm using a npm workspaces mono repo with two workspaces _common and le. My project is React + Vite + TS + Tailwind. I'm using a custom aliasing plugin with vite...
import path from 'path';
import fs ...
1
vote
0
answers
55
views
TypeORM Error when using camel case alias in addSelect
I'm using TypeORM and Postgresql .I have 2 entities event and eventParticipant relationship is one-to-many. I want to sort by the number of eventParticipants with booking status so I used addSelect ...
0
votes
0
answers
11
views
DNS.GetHosyByName not returning expected results upon .net Migration
Before migrating from net461 -> .net6.0, Dns.GetHosyByName() returned list of aliases but after migration it returns back 0 results. Any reason why this would be the case? Any other way to retrieve ...
0
votes
1
answer
24
views
Comparing a table of invalid objects through aliases using the time and date?
I recently posted a question using DBLinks and monitoring invalid objects. Now I've got to make a table and register by date all invalid objects and make comparisons between runs of this code and if ...
0
votes
0
answers
7
views
Alias elements of anchored dictionary elsewhere in same yaml doc
I want to reference nested elements of an anchored dictionary elsewhere in the same yaml doc.
Can I do this without having to define anchors for each nested element?
Presently, my draft definition ...
-1
votes
1
answer
39
views
Reference an alias variable in my SQL where clause? [duplicate]
I am working on a query that requires the use of flags from 2 different tables. I did a left join to get the columns but the alias cannot be used in the where clause.
Why does the ZH021ProcessedFlag ...
0
votes
0
answers
100
views
favicons return 403 forbidden on local machine
We have recently upgraded our favicons so that they are accessed via the apache Alias function. They work just fine on several of our servers, but on my local development machine they return 403 ...
1
vote
3
answers
197
views
Alias Imports Suddenly Caused Module Not Found Errors in NextJS
I am building a NextJS app and all of a sudden all my import aliases stopped working
This is my jsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"...
0
votes
0
answers
30
views
worspress nginx alias not working properly
I have the current configuration like this:
#test blog
location /test {
alias /var/www/domain/test;
location = /test/favicon.ico {
log_not_found off;
...
1
vote
1
answer
35
views
Apache Alias and proxy pass in the same domain
I have a issue with vhost configuration in Apache/2.4.58
I have a NodeJs frontend and laravel api backend.
This is my vhost:
<VirtualHost *:443>
ServerName backend.mydomain.com
...
0
votes
0
answers
36
views
next.js image alias and Image component
All my other alias (components...) are ok but not the one below. What is the right way to do that ?
import Image from 'next/image';
import heroImage from '@images/hero.jpg'; // Using the alias
...
0
votes
0
answers
62
views
How to add multiple entries in a alias in Nu Shell?
I was wondering if there is any way to have something like:
alias system = sudo vpm sync; sudo vpm update; sudo vpm autoremove; sudo vpm cleanup
This is possible in bash --even in fish.
I was not ...
0
votes
0
answers
33
views
Setting aliases when creating Conda environment
Is it possible to include an alias in a conda YAML file, so when you create the environment from the YAML you set the alias? I have a Snakemake workflow that works in a Conda environment and I would ...
0
votes
0
answers
56
views
Using aliases in javascript files using tsconfig
I have a project that was created using Create React App, in this project the development is in javascript, but I want to use typescript in some places, initially I had jsconfig, which had aliases ...
0
votes
1
answer
83
views
Using Aliases in a Javascript Function
I have a function responsible for constructing URLs using relative paths, such as ../../assets/images/content/recipe/. I want to replace the ../../assets/images part with a Vite alias, but it doesn't ...
0
votes
1
answer
34
views
Python unexpected non-zero returncode when checking alias command set in .bashrc file
I want to call an alias command set in a .bashrc file from python. However, the returncode of source ~/.bashrc; command -v command is for some reason 1 instead of 0 which is the case if the same ...
2
votes
2
answers
802
views
Creating aliases for Github Copilot CLI (ghcs, ghce not recognised)
I'm having an issue setting up aliases for github copilot.
gh copilot suggest and gh copilot explain work fine, I want to reduce them to ghcs and ghce.
When I run ghcs "create new dir" this ...
1
vote
1
answer
32
views
procedure/alias [a portion of] a somewhat long MySQL command?
Not an "alias" but similar...
I'm working with an incomplete MySQL database, adding repetitive manual updates from an external reference. It's slow going, and I'm hoping to streamline a ...
1
vote
2
answers
2k
views
Understanding class importation and alias management in Laravel 11's new directory structure
I seek guidance on importing classes and managing aliases in Laravel 11, which has introduced a new directory structure. In previous Laravel versions, I would handle these tasks in the app.php ...
0
votes
0
answers
36
views
Drupal 9 contextual filter on url alias
With Drupal 9 installation I am using apthauto to create alias pattern for content type using multiple fields data.
I need to create a REST export view for single node with contextual filter matching ...
3
votes
3
answers
75
views
How to access the previous value of text in Cypress that you expect to change?
I'm in the process of upgrading Cypress from version 8 to version 13. In version 8, I was able to do something like this:
cy.getBySel('mealList-totalCalories').invoke('text').as('totalCals');
This ...
0
votes
2
answers
95
views
How to time how long a bash alias took to execute (solved... maybe?)
I have a few alias' on my Dreadnaught embedded Linux system, some of them have a reasonably long list of jobs to do. I'm trying to improve the efficiency of these task, and trying to time how long ...
0
votes
3
answers
55
views
SQL query in Oracle to sum up values from an alias column
In Oracle I would like to make a SELECT statement combined with UNION ALL to count all rows in some tables (second column) and assign a description to each row (first column). Below is what I actually ...
0
votes
0
answers
20
views
Microsoft GraphAPI - behavior with emails received from alias email addresses
I am looking for validation of what I was able to compile on the various forums + chatGPT.
My case: I have a primary address and associated secondary addresses (aliases).
I use Microsoft GraphAPI to ...
-10
votes
1
answer
212
views
How to Alias `python` to Python 2 (`/usr/bin/python2`) on WSL Ubuntu?
Context:
I am trying to compile JModelica Ubuntu (running on WSL - Windows Subsystem for Linux) and facing a challenge with Python version conflicts. The compilation process requires Python 2, but by ...
0
votes
1
answer
66
views
How do I tell the Jackson JSON deserializer to prefer one field over another when both are present?
I am writing code to parse JSON responses from a service where I can get two different formats that I want to map to the same kind of object. This is a simplified example of my code:
data class ...
-2
votes
2
answers
116
views
Replace dataframe with its alias in select in pyspark
I am trying to learn about the dataframe alias command in pyspark. Here is what I observe.
Suppose I have a sample dataframe
t1_df = spark.createDataFrame([['a'], ['b']], 'c1: string')
print(t1_df....
0
votes
0
answers
48
views
Error: vite build in github actions - for using aliases
When I use github actions to run vite build, I get the following error (locally it works fine):
enter image description here
And if the aliases are being declared:
vite.config.ts ----------------------...
0
votes
1
answer
135
views
Start ssh session on remote hosts with local bash rc file
Is it possible somehow to source a specific bashfile right at the start of each ssh session on a foreign host? I have a file with just aliases that I want to use on foreign hosts as well as on my ...
0
votes
1
answer
93
views
URL Alias for Contrloler/Method in CodeIgniter 4
In CodeIgniter 3 I could do this in the Config/Routes.php file:
$routes->get('Net_Price', 'SomeController::SomeNonIndexMethod');
'Net_Price' is an alias (for the lack of a better term). And the ...
0
votes
0
answers
35
views
@Where clause whith nested association
I have the following relationship:
@Entity
public class User {
//other fields
@Where(clause = "media.deleted = false")
@OneToMany(mappedBy = "user", cascade = ...
-2
votes
1
answer
34
views
mysql how do you place an alias on a derived table [duplicate]
I have the following query
SELECT * FROM(
(select * from `responses` a order by id, exam, question)
left JOIN
(select max(exam) as maxexam from responses b )
on a....
0
votes
1
answer
128
views
Error while trying to execute a binary file whit zsh alias
i got a binary file in a specific directory and I was trying to make an alias in my .zshrc file to execute the binary file. And I was getting this error message when I try to run it:
jupiter
zsh: can'...
0
votes
1
answer
44
views
How to speed up Open Folder "whose name starts with" in AppleScript
Here's my basic AppleScript...
I have a fixed file path, followed by 1 variable folder, followed by a variable partial folder name (ie variable folder starts with "12345").
What I failed to ...
0
votes
0
answers
75
views
pf.conf in QNX Neutrino blocks every packet for my aliased IP
I'm trying to apply packet filter for my QNX Neutrino system.In my situation, there are several aliased IP address to simulate other devices which yet to be developed.
What I'm struglling now is the ...
0
votes
0
answers
21
views
While using alias in joins (in Oracle) I'm getting no response in hackerrrank platform [duplicate]
-- This query is not working
SELECT
S.NAME, G.GRADE, S.MARKS
FROM
STUDENTS AS S
LEFT JOIN
GRADES AS G ON S.MARKS BETWEEN G.MIN_MARK AND G.MAX_MARK;
-- However, this query IS ...