Questions tagged [expression]
Combination of several programming symbols and values intending to produce a result
7,238
questions
0
votes
2
answers
13
views
How to easily extract the 2nd last element in an array/string in Azure Data Factory Expression?
Let's say string is a variable file name like few examples below:
file1_name_cr_001.csv
file2_name1_name2.nn.123.456_updt_000.csv
filename_2012.444.1234_utc_del_004.csv
The length of last 8 string ...
0
votes
0
answers
25
views
Combine few Expression<Func<T,bool>
I have 5 Expression<Func<T,bool> to filter data in Azure storage table. I need to combine all of them.
Expression<Func<T,bool>> x = (e => e.a < value))
Expression<Func<...
0
votes
0
answers
14
views
SSRS Specify Values using label, values
I have a query that uses a where in (@). Customer is asking to have a single label with multiple values inside it.
label
Value
a
1,2,3
b
1
c
1,2
SSRS image example
How can I add the values to ...
0
votes
1
answer
14
views
How to sum a row based on the total group in SSRS
Im facing an issue whereby how to sum the % for each of column based on group in SSRS by using expression. Refer my use case below
I have one outcome which all the product with a percentage result. ...
-2
votes
3
answers
60
views
Conditional operator is giving compilation error in c
(a>b) ? return a : return b;
This code is giving compilation error why
0
votes
0
answers
30
views
The Height of the graph in ssrs does not align with Y axis
Currently I working on report that need to visualize graphical bar chart using SSRS report for customer engagement by using report builder.
However the height of the bar chart populated is not align ...
0
votes
1
answer
16
views
Jinja2 using numeric expressions in Template Expressions
I need to do something apparently very simple:
typedef enum {
{% for e in mylist %}
{{ e }} = 0x{{ '%04X' % (1 << loop.index0) }},
{%- endfor %}
ALL = 0x0FFF
} Sound_Region_t;
...
2
votes
0
answers
48
views
How to remove/replace this character i.e. (\",\") from variable expression value?
Have a variable output in ADF as below:
{
"name": "variable1",
"value": "[\"(NAME\",\"varchar,HEADER1\",\"varchar,HEADER2\",\&...
1
vote
1
answer
82
views
How to generate an Expression to query a match on any members of an entity or of its related Entities?
I have the following code that I'm using to perform searches on my efcore data. Since the data set it so huge, I had to start using dynamic / generic types. I've been able to query on entity level ...
0
votes
1
answer
64
views
An expression is recognized as a function
I am trying to implement some graph algorithms with the OCaml language.
I've made a graph type with a two dimension array which refer to the graph I want to use
And here is my function to get the list ...
-3
votes
1
answer
44
views
I have written my code (C programming) and all the input is working. However, it is not presenting the output. What am I doing wrong? [closed]
int main(){
int num1;
int num2;
int num3;
printf("Input the first integer: ");
scanf("%d", &num1);
printf("Input the second integer: ");
...
1
vote
2
answers
48
views
(R) How can a bigger expression be written by combining shorter variable expressions?
Brief introduction, I have multiple data file that can be fitted by models based in mathematical equations that are a combination (by sum, mutiplication, etc...) of other shorter mathematical ...
1
vote
1
answer
26
views
Expression to check if a given string exist in a output of a script task in ADF
I get following result from my script task, How should I build expression to check if the result contains 'exceed'
{
"resultSetCount": 1,
"recordsAffected": 0,
"resultSets&...
1
vote
1
answer
29
views
Regex to match code with fixed country code and variable wildcard usage
I need to implement a regex which cover several requirements. These are the following:
A length restriction to max 8 chars should be done (with or
without wildcard). In any case the code is never ...
-1
votes
0
answers
26
views
Difficulty in create regex [duplicate]
40
I'm having trouble checking in React Js if a value is is any of the following combinations
no spaces in starting
Ramaining accept anything(number , operators, letters)
0
votes
1
answer
26
views
Missing Expression: Server error number: 003000 (EOCINativeException) [FireDAC][Phys][Ora] ORA-00936: missing expression
SELECT
UserId,
FirstName,
MiddleName,
LastName,
Gender,
Email,
Student,
Password,
Major,
Ethnicity,
Class,
...
0
votes
0
answers
41
views
LINQ Doesn't contains subquery expression
I recently stumpled upon the problem to dynamically create Linq expressions.
Most examples I found deal with the rather simple task, just comparing one property of a given database entity with a ...
0
votes
1
answer
22
views
Building Expression to search in child properies (collection) of object
I have a search setup to return matching Record objects based on criteria. It builds an Expression Tree based on the type of criteria and queries the database to return matches. Previously, it only ...
0
votes
0
answers
36
views
Iterate collection in expression
I need to iterate over collection in expression:
private readonly Expression<Func<TModel, IEnumerable<TMember>>> _collection;
private readonly IEnumerable<Expression<Func<...
1
vote
0
answers
35
views
How do I make a Simple ANTLR grammar extension?
I'm writing a framework that uses ANTLR to parse Java-style expressions. I had in mind to create a new type of free-form literal. The literal will look similar to a string, so I thought to extend ...
0
votes
2
answers
67
views
Regular Expressions: Strings of an even length in which all the 'o’s (if any) come before all the 'g’s (if any)
I'm pretty new to regular expressions so I could use some help.
Right now I have:
(oo|og)+(oo|gg|og|go)*
for the alphabet = {o,g}
which I made from a previous task, as an answer to "Strings of an ...
0
votes
1
answer
28
views
Have some questions on python regular expressions
Ok, I've got this script:
#!/usr/bin/python3
import requests
from bs4 import BeautifulSoup
import re
def get_html(url):
r = requests.get(url)
return r.content
url = "https://foxnews....
0
votes
0
answers
11
views
rsyslog property filter by expression not working
I want to filter the rsyslog message by the expression.
when I send the message over the udp socket, the filter works as expected.
But when sending the message over the UNIX socket, the filter does ...
0
votes
0
answers
16
views
Remove null attributes with table row from popup using Arcade expression in ArcGIS Portal
I am using the HTML code to configure the popup
<font size="2">
<table border="1">
<tbody>
<tr>
<td><b><font color="#000000">...
0
votes
1
answer
40
views
IP Address regex with netmasks
the format goal:
require a.b.c.d/x where >>
a is 1-3 digit num btw 1-223
b, c, and d are 1-3 digit num btw 0-255 and *required
x is 1 or 2 digit num btw 8-32 and the (/x) group is optional
...
1
vote
0
answers
15
views
What is the correct MS Access expression within a form to return a value from one field related to another field in the same table?
I have a database of student travelers on an international tour. Each student picks three others as roommates, and I need to associate each roommate ( [R2] [R3] and [R4] ) with their respective ...
0
votes
1
answer
55
views
Evaluate String expression in Swift just like javascript eval
I am getting dynamic conditions through API to apply in the application. It could be any logical expression. The task is to run all the condition received in mobile app and proceed further as per the ...
0
votes
1
answer
14
views
mapbox : how to combine two expressions to style a layer?
I have this expressions that styles my layer when a feature is clicked:
the circle radius changes from 2 (default) to 5 (clicked).
'circle-radius'=> [
'case',
['boolean', ['feature-state', '...
0
votes
0
answers
17
views
Text from csv to after effects
I am trying to read prices from a csv file. the prices are in this format 15.90. the problem I am facing is the style (font size) of the numbers before the comma is not the same style (font size) for ...
0
votes
0
answers
21
views
How looks like an Expression-Tree (when function calls are involved)
I've found many places that shows expression-trees that involve operators (+,-,*, &&, ||, etc). Here is a simple example:
But I can not find an example when functions (with zero or more ...
0
votes
0
answers
27
views
How to Simplify this Boolean Expression X' Y' Z + X' Y Z' + X Y' Z' + X Y Z
D = X' Y' Z + X' Y Z' + X Y' Z' + X Y Z
= Z (X' Y' + X Y) + Z'(X Y' + X' Y)
This is where I got so far..., please I would like to ask for some help on how to properly simplify this expression since ...
1
vote
0
answers
51
views
From postfix to expression-tree algorithm (with function call)
After reviewing all related entries in Stackoveflow and also after googleing a lot, I can not find the algorithm I need.
Having expressions similar to this one (in postfix notation):
"This is a ...
-2
votes
3
answers
55
views
Using logical operators in an expression [duplicate]
I am trying to understand that bit of code:
s = list()
r = string()
# actual bit of code:
print(s and 'ERROR' or r or 'EMPTY')
What this does:
if s is not an empty list, then you must print 'ERROR'
...
0
votes
0
answers
30
views
Dynamic Select in Entity Framework Core
I am creating a procedure that performs a dynamic select of the fields.
For example:
List<Company> items = await entity
.Skip(model.Start)
.Take(model.Length)
.Select(...
0
votes
0
answers
33
views
Logging C# Expression Tree invocation
I am looking to create a simple rules engine using expression trees starting from the example given here: https://mobiusstraits.com/2015/08/12/expression-trees/
I'm wondering how I might log the ...
0
votes
1
answer
54
views
SSRS conditional date selection expression
I have a sql ssrs report which takes data based on selected date range.
There's 2 date parameters:
date from
date till
I need the date from and date till to fill in automatically based on which date ...
0
votes
0
answers
24
views
Matching Math expression with Regex
Valid math expressions:
a * b + c
-a * b / 1.50
a + b * 4.6 - k
And these are invalid math expressions:
--a *+ b @ 1.5.0 // two consecutive signs, two consecutive operators, invalid operator, invalid ...
1
vote
0
answers
51
views
parse mathematical expression in c
I am Writing a simple calculator that accepts arguments from command line and evaluates the string.
Intentionally, it should accept the mathematical expression and evaluate it but it throws some ...
-2
votes
3
answers
42
views
Multiple Or Conditions in Regex
Lets say I have messy data pattern:
TRND-0LL2134.SV
TRN_RTXDFT.SV
TRND_ZRSFTFF.SV
DR3345.SV
I am trying to use regex to filter on prefixes with "-" or "_", and those without.
...
0
votes
2
answers
28
views
Unix command to add 2 numbers from 2 separate files and write it to a 3rd file
I have 2 files. I need to add the count of rows of the both and write it to 3rd file.
If the content of 3rd file is >25 , i need to print error.txt and if =<25 , i need to print success.txt
...
28
votes
1
answer
857
views
Does C# guarantee evaluation order of branched nested expressions?
C# handles both nested and chained expressions, obviously.
If the nesting and/or chaining is linear then it's evident what order the expressions are evaluated in:
Foo(Bar(Baz().Bop())) can only ...
1
vote
1
answer
22
views
How Can I convert infix expression containing ++ or -- to a normal infix expression
Basically, I'm trying to get rid of ++ or -- from an infix expression by incrementing the value that's applied to it, but the code gives a weird output. I also used a shifting function to delete the ++...
0
votes
0
answers
13
views
evaluate js expression in swift
How to get expression output for given string expression from object.
eg:
given
let expression = "$.name"
let obj = ["name": "abc", "date": "20-Apr&...
0
votes
0
answers
19
views
How to create a variable list of bquote expressions in order to use sub/superscript in a R plot legend
I have a shiny app that takes a user inputed number, user_input, and plots that many lines on a graph; the legend also has that many items in it. Currently for the legend names I have a loop that ...
0
votes
0
answers
48
views
Re-using projection Func<TModel, TDto> in EFC Expression queries
I am working on the re-usable projection methods for my EFC queries & manual model-to-DTO convertions.
My expectation is to have single-defined model-to-DTO projection (in a static class) and be ...
1
vote
1
answer
61
views
How can I use a built Expression in an Include .Where() to apply an Include Filter when it expects Expression but only allows Func?
I'm getting some errors trying to build expression trees on nested collections. I have classes:
// not DB entity
public FilterTerm
{
public string ComparisonOperatorA { get; set; }
public ...
1
vote
1
answer
66
views
Compound Statement Expression In C
Below code is not working.
int i = {(void) 999; 100;};
Adding parentheses will work. WHY?
int i = ({(void) 999; 100;});
There is another way to do this type of assignment:
int i = ((void) 999, 100)...
2
votes
1
answer
80
views
Boolean Algebra expression conversion in C#
I am working on converting the boolean algebra expression something like this
NOT(a AND b) = (NOT a) OR (NOT b)
NOT (a OR b) = (NOT a) AND (NOT b)
a AND NOT (b AND c) = (EQ a) AND ( ( NOT b) OR (...
0
votes
1
answer
40
views
Converting nvarchar data type to number in MS Access Passthrough query for subsequent calculations
I'm working with a SQL passthrough to SQL Server query in a MS Access environment. I'm displaying the query results in an Access form and performing a display calculation to it in a text box.
The data ...
1
vote
1
answer
42
views
How can I build an Expression with dynamic comparison operators for an unknown number of filters?
I'm new to expression building, so bear with me a little bit.
I'm building off of this answer, using PredicateBuilder for building a predicate with an unknown number of filters. Say I have these ...