expression Questions
2
Solved
I'm trying to convince an S4 method to use an expression as an argument, but I always get an error returned. A trivial example that illustrates a bit what I'm trying to do here :
setGeneric('myfun...
Overlive asked 9/8, 2011 at 16:47
5
Solved
Why don't rvalues have a memory address? Are they not loaded into the RAM when the program executes or does it refer to the values stored in processor registers?
Neanderthal asked 10/9, 2011 at 6:47
2
Solved
I've noticed many languages like Ruby and CofeeScript (well a transcompiler) support everything being an expression.
Now it makes the language somewhat simple to understand and definitely seems ne...
Billington asked 7/9, 2011 at 0:5
27
Solved
One for the mathematicians. This has gone around the office and we want to see who can come up with a better optimised version.
(((a+p) <= b) && (a == 0 || a > 1) && (b >= ...
Sweetbread asked 19/12, 2008 at 12:52
3
Solved
If an expression evaluates multiple && operators, and does not evaluate any operators of lower precedence (eg. ||, ?:), will the expression evaluate to 0 as soon as one of the &&s r...
Sulfonmethane asked 25/8, 2011 at 19:22
3
We know 1+2+...+n is equal to n(n+1)/2.
But can we get the same result programatically if we don't know it in advance?
About why I have such a question.
Think of a more complex situation:
X1+X2...
Rileyrilievo asked 11/8, 2011 at 14:0
3
I want to parse expressions such as res = ((a*(2+b))/c)+5.603+(6*(d^5)). I want to do it in c++ only.
Kursk asked 5/8, 2011 at 6:10
4
Solved
Why the following code throws an exception at runtime, whereas doing it in the traditional way compiles without problem?
var left = Expression.Constant(25d);
var right = Expression.Constant(20);
...
Nucleotide asked 30/7, 2011 at 15:29
9
Solved
I need to extract some records if some variables have some values.
For example, if status>0 I need to filter result like :
where object.id=status
else, if status=0, I need to remove this where ...
Hofmann asked 27/7, 2011 at 15:37
4
A text field contains mathematical expressions like: 12+45-6 Is possible to convert this string to a number?
Can we use the predicate facility?
NSString *foo = @"((a*b)/c+(d/5))+15";
// dummy pre...
Canaletto asked 24/7, 2011 at 21:40
1
Solved
Is there a method that allows me to evaluate a mathematical expression in a string? Example (Not actual Code):
Input = "2+2"
Output = SomeMethod(Input)
Output = 4
Update: Nevermind, I found a w...
Forever asked 7/7, 2011 at 1:19
5
Solved
Is there a single-expression way to assign a scalar to all elements of a boost matrix or vector? I'm trying to find a more compact way of representing:
boost::numeric::ublas::c_vector<float, N&...
Thuythuya asked 28/4, 2009 at 13:42
2
Solved
Suppose we have 3 variables and we need to ASSERT that they can either all be equal to -1 or neither can be equal to -1. I wrote the following code:
x := 1;
y := 1;
z := 1;
ASSERT( (x = -1) = (y ...
Dunlap asked 1/7, 2011 at 9:25
3
I'm trying to implement data localization logic for Entity Framework. So that if for example a query selects Title property, behind the scenes it should reference the column Title_enGB or Title_deC...
Cheadle asked 16/6, 2011 at 9:20
4
I am trying to find (and replace with something else) in a text all parts which
start with '/'
ends with '/'
between the two /'s there can be anything, except the strings '.' and '..'.
(For you...
Startling asked 14/6, 2011 at 22:27
4
Solved
Im my Java application, users can specify how to name their files from a series of metadata fields. i.e
%artist% - %album% - %disctotal%
My code then parses these fields and renames file accori...
Faqir asked 8/6, 2011 at 20:46
1
Solved
I have a need to store data using the HSTORE type and index by key.
CREATE INDEX ix_product_size ON product(((data->'Size')::INT))
CREATE INDEX ix_product_color ON product(((data->'Color')))...
Antons asked 7/6, 2011 at 11:31
2
Solved
I need to write a regular expression for taking input like this
23,456,22,1,32767
i.e.
No commas allowed at the start or end.
Spaces may come before and/or start of comma for e.g. 23, 45,56 ,...
Combings asked 7/6, 2011 at 7:16
4
Solved
I have a method and I want to add this method as an extension method to properties of my class.
This method give an expression as input parameter. The method is like below :
public static string ...
Veiling asked 18/5, 2011 at 10:3
3
Solved
I am using a DataGrid in Expression Blend but I just need to show only the registries and hide the ColumnHeader.
How do I do that?
Zildjian asked 2/7, 2009 at 18:17
1
Solved
I don't understand what is happening here:
Both of these lines compile:
Func<object> func = () => new object();
Expression<Func<object>> expression = ()=>new object();
...
Hobbyhorse asked 2/5, 2011 at 20:45
7
Solved
Context: I am prototyping in prep for (maybe) converting my WinForms app to WPF.
I make very simple tree view event handler for which the code is:
var treeViewItem = (TreeViewItem)e.NewValue;
var...
Froma asked 25/4, 2011 at 18:48
2
Solved
I have used file_get_contents() to basically get the source code of a site into a single string variable.
The source contains many rows that looks like this:
<td align="center"><a href="s...
Yemen asked 20/4, 2011 at 19:42
2
Solved
This problem occurs in both NHibernate 2 and 3. I have a Class A that has a member set of class B. Querying the classes directly executes nicely. But when I pass one of the expressions involving cl...
Villareal asked 19/1, 2011 at 16:56
1
I have an ExpressionSet object that I want to subset. For example,
> str(ESet)
Formal class 'ExpressionSet' [package "Biobase"] ..
..@ assayData :..
..@ phenoData :
.. .. .. ..$ STATUS : n...
Abomb asked 8/4, 2011 at 10:42
© 2022 - 2024 — McMap. All rights reserved.