Questions tagged [expression]
Combination of several programming symbols and values intending to produce a result
7,641
questions
-1
votes
0
answers
39
views
"*" and "/" are being ignored in expressions | python based interpreter
when I ran shell.py and tried writing expressions like 5 + 6 * 7 I noticed that "*" MUL and "/" DIV were being ignored, all numbers are recognized as either float or int and ...
0
votes
1
answer
16
views
ADF Pipeline Expression Builder Regexreplace
I need to know how to formulate an ADF Pipeline Expression for regexreplace, supplying a parameter
@dataset().table_name.
I have the expression:
@regexreplace(@dataset().table_name, '[^a-zA-Z0-9_]', '...
0
votes
1
answer
96
views
What is the difference between "for(i=1;i<=10;i++)" and "for(i=1;i<=10;i++); ". How does the code work in both the cases?
When both the expressions were printed both gave a different output.
when the first program is executed i'm getting numbers from 1 to 10, when the second code is executed i'm getting only 11 as the ...
0
votes
1
answer
33
views
Rename ggplot x-axis labels using a named vector containing subscripted characters
I'd like to replace the x-axis labels in my plot with a named vector. Some of the new names have characters I'd like subscripted. I've given an example below in which I'd like "H2O2 500 µM" ...
1
vote
1
answer
83
views
Trouble with sed expression using unicode range in new environment
I have the following sed range replacement expression in a bash clean script I wrote years ago that works (or at least never gave an error) in the old environment but fails (with an error) in the new ...
0
votes
0
answers
45
views
Solving for and assigning the last remaining variable in a sympy expression
This is a simplification of a more complex problem, in which, depending on previous input, a sympy exression needs to be solved with one remaining variable, where it is not known which variable that ...
2
votes
2
answers
61
views
How Is C# Able To Infer Overload From Lambda Expression
Recently I was surprised that a particular piece of syntax in C# worked in a sort of "magical" way. This syntax had multiple overloads, only differentiated by the generic type in an Action&...
0
votes
0
answers
22
views
How can I set authority variables using Java Spring Security Expressions in Thymeleaf?
I'm working with Thymeleaf templates and Java Spring Security. I want to dynamically set the authority used in the hasAuthority('Admin') expression within my Thymeleaf templates. Instead of a ...
0
votes
1
answer
27
views
How can I align multi-line expressions at the equal sign?
I'm looking for a solution in annotating a ggplot2-figure with multilines in R, that are aligned at the equal sign like in LaTeX' equation using the "&-symbol" within in align{}-...
0
votes
1
answer
76
views
why is the datatable expression column become ready only in vb.net
I'm trying to so I want to use the datatable expression column to print labels so below I made a simple example of moving with a checkbox from datagridview1 to datagridview2
I have the code below, but ...
0
votes
1
answer
57
views
Convert math expression to spoken words in python
I need to convert a mathematical expression into spoken words text, e.g "x^2" to "x to the power of 2" let's say, using python. For expression format, latex is a good but I do not ...
0
votes
1
answer
17
views
How to trim field value in Paginated Report Power BI
I would like help with adding an expression for trimming a field value in a paginated report. The field consists of a first name, last name and number inside of it. I would only like to show the first ...
0
votes
1
answer
26
views
How to build a forward pass of a network in PyTorch based on a string expression?
I have a string expression: self.w0torch.sin(x)+self.w1torch.exp(x). How can I use this expression as the forward pass of a model in PyTorch? The class for instantiating a model is as follows:
class ...
0
votes
1
answer
76
views
Replacement for PredExp on a list bin
I have a bin of type List. I want to query and get the records for which this bin has a value equal to variable 'val', lets say. Using PredExp this can be done using:
predExps = Arrays.asList(
PredExp....
0
votes
1
answer
71
views
JsonPath : filter by value in array to get specific value
I'm trying to filter by value an array in my Json with Jsonpath. I want to get the locationLegalName of the location in the JSON below.
For instance, I have a code CC024 and i need to compare with ...
0
votes
0
answers
62
views
How to calculate an expression in the third column based on the values of first 2 columns?
This is what CHATGPT is suggesting but I dont think thats right. Please help
CREATE TABLE YourTable (
COLA INT,
COLB INT,
COLC_EXPRESSION NVARCHAR(MAX)
);
INSERT INTO YourTable (COLA, ...
0
votes
1
answer
28
views
Manipulating an sympy expression with .func() and args
I have this expression: $expr = \frac{2 A B}{A m + m} + C^2 + D^2$
and I want to get: $expr = \frac{2 B}{m \left( 1 + \frac{1}{A} \right)} + C^2 + D^2$
I am trying to use expr.args to get the term ...
0
votes
1
answer
40
views
Printing Julia Expressions in a Readable Format
I am working with Julia and using the Expr type to represent expressions programmatically. When I print the expressions, I get output like the following for an example program:
$(Expr(:toplevel, :(v1 =...
0
votes
1
answer
67
views
PredExp vs Expression - Aerospike Client (list of integers)
What would be the Expression substitute for the below code which uses PredExp for aerospike client
predExps = Arrays.asList(PredExp.integerVar("v"), PredExp.integerValue((Long) fieldValue), ...
0
votes
0
answers
29
views
using eval-expression.net to evaluate items of a dictionary, as if they were properties of an object
I'm experimenting with eval-expression.net and I want to evaluate expressions like "One.Id==1" instead of "customers["One"].Id==1" ('One' is actually a key in a ...
4
votes
1
answer
174
views
c++ usual arithmetic conversions: cpp.sh vs godbolt different results - who is wrong?
Here is a simple showcase of standard arithmetic conversion:
// Example program
#include <iostream>
using namespace std;
int main()
{
unsigned long a = 0;
int b = 1;
long long c ...
-1
votes
2
answers
110
views
result of this expression is not what i learned
In below code, result is -6. why?
` int x = 5;
int y = 3;
int result = x++ - (--y + ++x) - y--;`
I think at first, inside parenthesis evaluated, then outside of it in left to right order, ...
0
votes
0
answers
30
views
expression(phantom() >= 1) not showing in base R plots
Below, I wonder why the greater, equal sign doesn't show on my Base R plot?
plot(1)
legend("topright", expression(phantom() >= 1))
> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
...
0
votes
1
answer
59
views
How to replace value in Azure Pipelines YAML
What is the correct syntax for replacing and removing a particular value in a parameter in a Azure YAML pipeline?
my pipeline:
Parameters:
- name: App_Name
type: string
values:
- ...
1
vote
2
answers
68
views
How can I visualize subset of a network in Cytoscape?
I created a network using separate node and edge files generated from WGCNA. The network has 381 nodes and over 20K edges. I would like to learn how to subset the giant network that zoom in to one ...
1
vote
1
answer
71
views
C# merge/combine expressions
With the following example classes (which could map to a database table):
class Package
{
public string Name { get; set; }
public decimal Price { get; set; }
public bool Enabled { get; set;...
1
vote
1
answer
74
views
Replacing Variable Name with a String in a Julia Macro
I’m working on a project where I need to create a macro in Julia that takes a Julia code expression, a variable name, and a string as input and returns the same expression with the specified variable ...
0
votes
0
answers
31
views
Smooth transition with filter Mapbox (setPaintProperty)
I'm trying to understand how the filters (expressions) in the setPaintProperty, setLayoutProperty and even setFilter methods work, as I'm noticing some peculiar behavior with transitions.
It seems ...
1
vote
4
answers
110
views
Regex to match prices with different digit
I am trying to write a regex with go to match prices that composed by at least five digits with comma on the price.
For example:
"10,400,000","10,900,000","500,000",
I ...
0
votes
2
answers
36
views
Regular Expression to match any string consisting of letters,digits and apostrophes. But exclude underscores
I'm desperately searching for a regular expression in Python, only using the re library. The expression should divide a text into single strings consisting of letters, digits and apostrophes from any ...
0
votes
0
answers
24
views
Unable to Convert DT_STR to DT_i8 in SSIS package
I am Loading data from a file, which has input datatype for one of the column is String (DT_STR) and my Target data type in Bigint which is DT_I8. I tried Data conversion task to convert it but throws ...
0
votes
1
answer
27
views
Plotting fractions using `bquote(frac( .(number), .(number)) )` in ggplot2
I'm trying to plot fractions inside a geom_tex(label = ) using the bquote(frac( .(number), .(number)) ) syntax.
But it seems ggplot2 doesn't recognize this. Is there a way to plot these fractions ...
0
votes
0
answers
41
views
"*/" as a data conversion operator
I am currently reverse engineering a SQL database for in-car communications over a CAN network. Specifically, this is from the internal database of Volvo‘s VIDA diagnostics program.
There is a table ...
0
votes
1
answer
22
views
remove certain words in field within the mapbox gl expression by zoom level
My data is looking like this
name
Atlanta City
Paris City
London City
...
I want to get rid of the 'City' and not showing on my maps from Zlv 0-10, so only the city name itself shows on maps
and ...
1
vote
3
answers
90
views
C# how to convert SQL query to Lambda Expression
I have a List of the following type:
public class V_Articles
{
public string code{ get; set; }
public string description { get; set; }
public string shortDescription { get; set; }
}
I ...
0
votes
0
answers
19
views
Transformation Map for Scaling a Layer in Adobe After Effects (Similar to Displacement Maps)
I've got a question for Adobe After Effects, which might require writing an expression (and that's something I only know the absolute basics about). Any solution is welcomed, though, maybe somebody ...
3
votes
1
answer
86
views
How could be an initializer expression is "assignment-expression" by the grammer?
I have this sample of code:
struct S {};
S s = S();
Per my understanding, I see that s = S() in the declaration S s = S() is an init-declarator where s is a declarator and = S() is an initializer.
...
1
vote
1
answer
31
views
After Effect : Rebound on screen border and start in a random direction
I'm trying to reproduce the movement of the DVD sign that we had years ago on TV. When the sign is moving on the screen, touching border, rebounding, etc..
I managed to get something working which ...
0
votes
1
answer
29
views
SSRS Sort by Varchar column
I have a view that contain a varchar column(Engaged Hour) to indicate a time portion of a event happened. It has following values when ordered(by Engaged Hour column)
0AM,10AM,10PM,11AM,11PM,12AM,1AM,...
1
vote
1
answer
58
views
MS Access- Count the values in a table row that are equal to 1 but not the other values of 0 and -1 then add them
We have a simple database with a table that has 53 Columns in it, each column can contain a 1,-1, or 0. We need to count the number of 1's and -1 in each record to get the total of each. I would like ...
0
votes
0
answers
10
views
Select layers for composition legend in QGIS
I want to choose specific layers when I'm putting the legend in a map composition. There is an option in which I can write the name of the layers separated by a | . But I have many copies of the layer ...
1
vote
2
answers
53
views
Parentheses and Unary Operator Precedence in Java
As per the order of precedence of operators, () is evaluated before unary operators like ++ or --. But let us consider the following code:-
int x = 1;
x = 2 + (x++);
If x++ is executed first, the ...
2
votes
1
answer
78
views
EF Core 7 - Include only items which are not deleted
In EF Core 7, I am able to filter included collections like
var users = _context.Users.Include(x => x.Roles.Where(y => y.IsDeleted == false)).ToList();
I would like to make an extension, which ...
1
vote
1
answer
93
views
Why does running `Get-Content` return a null-valued expression?
I run this command:
Get-ChildItem -recurse -file | ForEach-Object { (Get-Content $_).Replace('hi there','hello') | Set-Content $_ }
and get this error:
InvalidOperation: You cannot call a method on ...
0
votes
1
answer
59
views
System.Linq.Dynamic.Core: No applicable method 'ArrayLength' exists in type
When parsing the expression I get the error “No applicable method 'ArrayLength' exists in type 'Product'”.
Here's the expression itself:
var experession = "p => (p.MarketingProduct!= null) ...
0
votes
0
answers
13
views
scheduled.task.cronExpression is unknow property
scheduled.task.cronExpression=0 0 12 * * ? # Default cron expression at noon
I am trying to scheduled.task.cronExpression in spring boot application.properties but I am getting Warning
that scheduled....
-1
votes
2
answers
113
views
What subexpressions does an operator apply to if it has the highest precedence?
int a = 1, b = 2, c = 3;
bool z = a >= b || b == c && !b && !!a;
cout << z << endl;
I would like to know why this code prints 0.
I don't know where to start, even ...
0
votes
1
answer
94
views
Is my Expression wrong and does it not compile correctly?
My application I get the following error:
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Decimal'
The following code is part of creating an Expression
var ...
1
vote
1
answer
35
views
How to resolve this waring: is.na() applied to non-(list or vector) of type 'expression'?
The following R code
library(ggplot2)
ggplot() +
annotate("text", x = 1, y = 1, label=expression(paste("model 1, ", italic(R)^2, ": 0.50")),
size = 14/.pt, col='...
0
votes
0
answers
16
views
update symbology when add feature qgis
I'm working in QGIS and I have a virtual layer with lines geometry and categorized symbology by field "name". When I have a new name category I have to do the classify to get the new name in ...