min Questions

6

Solved

In Google Sheets, how do I get the value of the first non-empty cell in the row 17 starting at column C forwards?

10

Solved

How would you find minValue below? I have my own solution but want to see how others would do it. val i1: Option[Int] = ... val i2: Option[Int] = ... val defaultValue: Int = ... val minValue = ? ...
Lubra asked 28/9, 2012 at 12:22

10

Solved

I have a ui.slider and change its min and max values on runtime. But these changes only get reflected in the view, when I set the values afterwards too (which causes it to fire events that are not ...
Bearded asked 13/6, 2011 at 16:16

4

Solved

I am not completely green to Python, but I am interested in learning/keeping good practices while I develop my skills. I want to remove the high and low values from a list of numbers, which I know...
Teamwork asked 13/4, 2011 at 22:56

15

Solved

I have three dates in Java: a, b, c. Any or all of these dates may be null. What's the most efficient way of determining the earliest date among a,b,c, without having a massive if-else block? I wou...
Biddick asked 4/4, 2013 at 20:20

4

Solved

I wrote this function, which returns -1. function sayHello() { let arrayEdificiosNiveis = [11,10,10]; var indexMenor = arrayEdificiosNiveis.indexOf(Math.max(arrayEdificiosNiveis)); conso...
Suspire asked 14/4, 2019 at 15:47

16

Solved

In C++, are std::min and std::max preferable over fmin and fmax? For comparing two integers, do they provide basically the same functionality? Do you tend to use one of these sets of functions or d...
Leisaleiser asked 27/10, 2009 at 16:43

3

I'm very new to C++, and I was wondering if there was a way to make a min heap in C++ from the standard library.
Plutocrat asked 7/5, 2010 at 5:29

7

Solved

I'm producing a list of decimal values from a LINQ expression and I want the minimum non zero value. However it's entirely possible that the LINQ expression will result in an empty list. This will ...
Crib asked 29/1, 2010 at 22:22

3

Solved

I have some code that uses a Boost accumulator to track a mean across a rolling window -- "rolling mean". In addition to the rolling mean, I would like to track the minimum and maximum across this ...
Kinnikinnick asked 9/8, 2013 at 18:10

6

Solved

I have a list of dictionaries like so: [{'price': 99, 'barcode': '2342355'}, {'price': 88, 'barcode': '2345566'}] I want to find the min() and max() prices. Now, I can sort this easily enough usin...
Betts asked 16/3, 2011 at 3:56

17

Solved

Where are MIN and MAX defined in C, if at all? What is the best way to implement these, as generically and type safely as possible? (Compiler extensions/builtins for mainstream compilers preferred...
Carbonic asked 9/8, 2010 at 4:49

8

Solved

I want to return the number as long as it falls within a limit, else return the maximum or minimum value of the limit. I can do this with a combination of Math.min and Math.max. public int limit(i...
Peewee asked 29/7, 2013 at 20:23

22

Solved

I'm using Python's max and min functions on lists for a minimax algorithm, and I need the index of the value returned by max() or min(). In other words, I need to know which move produced the max (...
Jinja asked 18/3, 2010 at 23:20

6

Solved

I understand that all of the math functions in java are built in. But I was wondering out of curiosity how Math.min() actually works? I checked the java documentation and couldn't find anything to...
Mcadams asked 25/9, 2013 at 13:27

5

Solved

I have a model with some fields like below class Choclate(models.Model): name = models.CharField(max_length=256) price = models.IntegerField() So i want to get the field name that has the lowe...
Beating asked 30/10, 2013 at 9:10

19

Solved

Array justPrices has values such as: [0] = 1.5 [1] = 4.5 [2] = 9.9. How do I return the smallest value in the array?
Montoya asked 19/1, 2012 at 23:25

6

Solved

I have a simple array formula in excel that doesn't work in the way I wish. In columns A and B there is data (A1 is paired with B1 and so on) while in column F there is the calculation based on the...
Mccarthyism asked 21/8, 2015 at 17:32

8

Solved

I am looking to find the lowest positive value in an array and its position in the list. If a value within the list is duplicated, only the FIRST instance is of interest. This is what I have which ...
Garfish asked 15/1, 2015 at 15:21

14

How can I find out the min and the max date from an array of dates? Currently, I am creating an array like this: var dates = []; dates.push(new Date("2011/06/25")) dates.push(new Date("2011/06/26"...
Carl asked 22/8, 2011 at 5:10

21

Solved

Given the following table in SQL Server 2005: ID Col1 Col2 Col3 -- ---- ---- ---- 1 3 34 76 2 32 976 24 3 7 235 3 4 245 1 792 What is the best way to write the query that yields the following r...
Bowlin asked 15/12, 2008 at 13:27

17

Solved

Below is my pseudo code. function highest(i, j, k) { if(i > j && i > k) { return i; } else if (j > k) { return j; } else { return k; } } I think that works, but is t...
Wildfowl asked 9/2, 2010 at 23:0

4

Solved

I want to find the minimum of a list of tuples sorting by a given column. I have some data arranged as a list of 2-tuples for example. data = [ (1, 7.57), (2, 2.1), (3, 1.2), (4, 2.1), (5, 0.01), ...
Heinie asked 10/2, 2013 at 20:13

2

Solved

Goal is to minimize a function over a range of input values. Performance matters. Unfortunately, the ranges::min() algorithm recomputes the output for the live optimum over and over again. It seems...
Neocene asked 5/12, 2022 at 21:8

8

Solved

I want to get the name of the employee who has the minimum salary. Is there a way to do this using only one query? I have given my query below, it doesn't work because the having clause requires a ...
Hailey asked 4/11, 2013 at 4:36

© 2022 - 2024 — McMap. All rights reserved.