Questions tagged [evaluation]

Anything related to evaluation of expressions, i.e. the process used to determine the value of expressions in a running program.

What is it?

Evaluation is about rules, algorithms and strategies used for the evaluation of expressions or the computation of evaluation functions.

Related tags

  • The tag may be used more specifically for the execution or invocation of evaluations.
  • For more specific questions use tags such as for example

See also:

1334 questions
9
votes
3 answers

Evaluation of an IF statement in VB.NET

For the following If-statements in VB.NET, what will be the sequence in which the conditions will be evaluated? Case 1: If ( condition1 AND condition2 AND condition3 ) . . End If Case 2: If ( condition1 OR condition2 OR condition3 ) . . End…
TheLameProgrammer
9
votes
4 answers

Java precedence for multiple + and - operators

This is more of a theoretical question to understand Java's evaluation of arithmetic operations. Since + and - have the same precedence, I don't quite understand how Java evaluates the following expressions (where there are more than one + and -…
ncw
  • 1,635
  • 1
  • 18
  • 26
9
votes
2 answers

F#: how to evaluate a "seq" to get all its values eagerly?

We know that in F#, seq is lazy evaluated. My question is, if I have a seq with limited number of values, how to convert it into some data type that contains all its value evaluated? > seq { for i in 1 .. 10 do yield i * i };; val it : seq =…
vik santata
  • 2,989
  • 8
  • 30
  • 52
9
votes
2 answers

django: how to evaluate a project for refactoring

Has anyone of you done evaluation of a django project and how to improve/refactor it's code base? A pet project in company I work at is becoming more widely used and it would be good to improve its quality before further development. Are there any…
gruszczy
  • 40,948
  • 31
  • 128
  • 181
9
votes
5 answers

does python multiplicative expression evaluates faster if finds a zero?

suppose i a have a multiplicative expression with lots of multiplicands (small expressions) expression = a*b*c*d*....*w where for example c is (x-1), d is (y**2-16), k is (xy-60)..... x,y are numbers and i know that c,d,k,j maybe zero Does the…
Lord British
  • 405
  • 3
  • 10
9
votes
2 answers

Why can't I bind + in clojure?

Can anyone explain why I can rebind list but not +? (binding [list vector] (list 1 3)) (binding [list +] (list 1 3)) (binding [+ list] (+ 1 3)) I'd like to rebind + so I can do partial evaluation.
John Lawrence Aspden
  • 17,124
  • 11
  • 67
  • 110
9
votes
2 answers

Deferred evaluation in python

I have heard of deferred evaluation in python (for example here), is it just referring to how lambdas are evaluated by the interpreter only when they are used? Or is this the proper term for describing how, due to python's dynamic design, it will…
C-o-r-E
  • 583
  • 7
  • 16
9
votes
1 answer

Why do "data Unit = Unit" and "()" behave differently in GHCi?

In GHCi: (> means output) data Unit = Unit let x = Unit let y = () :p x > x = (_t1::Unit) :p y > y = () :i () > data () = () -- Defined in `GHC.Tuple' Why do Unit and () behave differently? There are also other types that behave like (), for…
bennofs
  • 11,873
  • 1
  • 38
  • 62
9
votes
7 answers

Getting code statistics from big projects

I'm interested in code statistics tools. Specifically I need to get statistics on Java EE code, but any code analyzer would do. Should I start creating one of my own or is there some project that you have used? ex. LOC, number of classes , libs ...…
Mite Mitreski
  • 3,596
  • 3
  • 29
  • 39
9
votes
5 answers

Math Expression Evaluation

What is the best way to implement a python program that will take a string and will output its result according to operator precedence (for example: "4+3*5" will output 19). I've googled for ways to solve this problem but they were all too complex,…
Ori Shavit
  • 255
  • 2
  • 5
  • 8
9
votes
1 answer

Evaluating MongoDB-like JSON Queries in PHP

Consider the following (rather complicated) query expressed in this JSON object: { "name": "Kindle Fire", "sale": true, "price": { "$gt": 199, "$lt": 264 }, "price.vat": { // bogus, just to show $a['price.vat'] ==…
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
9
votes
5 answers

Evaluation of multiples 'IN' Expressions in 'WHERE' clauses in mysql

Updating by @Cesar's request. Hope I understood what you want, if not, please revert. Quassnoi. If I make an SQL query like this: SELECT * FROM TABLE_NAME WHERE b IN (2, 7) AND c IN (3, 9), can I assume that MySQL will match only pairs from elements…
Cesar
  • 4,076
  • 8
  • 44
  • 68
9
votes
4 answers

Ground-truth data collection and evaluation for computer vision

Currently I am starting to develop a computer vision application that involves tracking of humans. I want to build ground-truth metadata for videos that will be recorded in this project. The metadata will probably need to be hand labeled and will…
9
votes
4 answers

Why is the integer converted to string in this case?

What is happening below? using System; using System.Collections.Generic; using System.Linq; using System.Text; public class DotNetPad { public static void Main(string[] args) { int i = 10; string k = "Test"; …
deostroll
  • 11,661
  • 21
  • 90
  • 161
8
votes
1 answer

Making a list "unlazy" in clojure

I recently noticed that there was a very clear implementation of insertion sort here : Insertion sort in clojure throws StackOverFlow error which suffers from a memory overflow, due to the fact that concat lazily joins lists. I was wondering :…
jayunit100
  • 17,388
  • 22
  • 92
  • 167