22 Topics
|
|
The following SQL query would return 1 record with a min(unit_cm): select id, name, category, min(unit_cm), unit_Cost, unit_price, unit_costPerc from ( SELECT a.id, b.name, e.name as 'category', (d.unit_price - d.unit_cost) as 'unit_cm', d.unit_cost, d.unit_price, ((d.unit_cost/d.unit_price)*100) as 'unit_costPerc' FROM menu_items a, item b, menu c, price d, categories e where a.item_id_fk … |
|
Hi, I have a table `id - Product_Name - Price - image` Some value like : `1 - My Product A - 50 - mpa.jpg` `2 - My Product B - 10 - mpb.jpg` `3 - My Product A - 40 - mpc.jpg` `4 - My Product C - 20 … |
|
|
Hi, How can i find the maximum/minimum of a data every 24 hours. My Python delimited txt file has over 2 days worth of data This is a snippet of how my txt file data look like: TimeStamp,Irradiance,AMB_Temp 21/7/2014 0:00,5.6,25.6 21/7/2014 0:01,4.6,24.6 21/7/2014 0:02,5.6,22.6 21/7/2014 0:03,4.7,25.6 21/7/2014 0:04,5.3,24.6 21/7/2014 0:05,5.2,25.6 … |
i need to find a min and amx of the table and so far i can do the min of row 1 but nothing after that -------------------------------------------------------------------- |Name | A | B | C | D | E | -------------------------------------------------------------------- | 1 | 1.0 | 2.0 | 3.0 | 4.0 … |
|
I'm making a class dataset. In it, I'm trying to set the minimum max and the mean. In my given test, I am asking the user to input as many grades as they would like so what I did, for example in minimum is this.. class Dataset(object): def __init__(self, grade): … |
|
I have a problem that includes finding the maximums and minimums of certain variables in sequence. I want to nest the max() and min() functions as follows. $variable5 = min(max(($variable1 - $variable0), 0), $variable3); The PHP manual says/suggests that this type of nesting is possible. However, the code doesn't run … |
|
> hey guys, how to get min value in array 2D except value zero '0'and also key ? > i've try use min and array_filter function to solve it > can you help me?please Array ( [0] => Array ( [0] => 0 [1] => 6 [2] => 4 ) … |
|
Hello, I am trying to start implementing functions from a class into my Calculator just to get used to the idea of it. when I tried calling for my min max functions into my calculations function it is spitting out an error arguement of type "float" is not compatable with … |
|
Hi I would like to write program that calculate the sum of all integers from a minimum number up to the maximum number.by using the following formula? sum = 1/2 * number of integer * (minimum numbers + maximum number) How can I do it? |
|
Hey everyone need some help again with finding the min and max from a text file. its my college lab assignment. here is my code till now. #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout; fout.open("Text.txt"); ifstream fin; fin.open("Lab6.txt"); float c; int count = 0; float … |
|
I am trying to find the minimum number when the user enters any 5 numbers I am not sure why this code is not working, every time I run this function I always get 0. Can someone please tell me what is wrong! int i; int num1 = 5; int … |
|
Good day to every one. First here is my code so far import java.io.*; public class Program2 { public static void main (String[]args) throws IOException{ BufferedReader bv = new BufferedReader (new InputStreamReader(System.in)); String a, b, c, x; Float d, e, f, g, h, i, j, k, l, m, ave; System.out.println("ENTER … |
|
package maxmin; import javax.swing.JOptionPane; public class MaxMin { public static void main(String[] args) { final int Tnum = 5; int num[] = new int[Tnum]; for(int i=0; i<num.length; i++) { String numstring = JOptionPane.showInputDialog(null,"Please enter number: ","User Input", JOptionPane.QUESTION_MESSAGE); num[i] = Integer.parseInt(numstring); } int max = num[0]; for(int i=0; i<num.length; i++) … |
|
I'm getting an error with this code. Both the findMax and findMin lines in main say "Invalid conversion from 'int' to 'int*'". What does it mean? #include <iostream> using namespace std; int findMax(int[],int); int findMin(int[],int); int main () { int max, min, x; findMax(max,x); findMin(min,x); return 0; } int findMax(int … |
|
I have a confusion of how to put that max and min in main method so it would run. PS: there might be mistakes ***The goal is to create a method that enter any numbers by user and it suppose to show the Max and Min.*** **PLEASE HELP~! what is … |
|
I have the following input and my program is not running: 1 3 2 1 3 7 8 [CODE] #include<iostream> #include <cstdlib> using namespace std; int main() { int arr[7], min, i=0, j=0; for(int i=0; i<7; i++) { cout<<"Enter value at arr["<<i<<"]: "; cin>>arr[i]; } min = arr[j]; for(; i<7; … |
|
Hello people, I've got a 2-d array, the first row has a string in each position, the second has a number in each position returned by a function that run on the strings.I run the mutatedstring function, run the matchmutated and put the values into the array, offspring times. Then … |
|
hi i am new here and i registered because i couldn't find the answer in google search my problem is that i could not find max and min of two arrays and the average too [CODE]#include<iostream> using namespace std; int array1[]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; … |
|
Hey, I'm studying for a final exam and I came across an old question asking to give an algorithm that runs in [TEX]O(logn)[/TEX] and deletes an arbitrary element from an [TEX]n[/TEX] element [B]Min-Heap[/B] if given its index. I was thinking the right approach would be to use Hash table for … |
|
I'm trying to find max and min values from a text file which contains data in rows and columns. But I want to create a script which will skip the first couple of lines and calculate the max and min from there on. I am aware for the max and … |
|
|
Hey guys, My lecturer told me that when I have solved a problem, I should always look for ways to improve it. I was wondering if it is okay to post my code here and ask the community to comment and tell me if it can be improved, but I … |
Hi! I'm trying to find min variance (both value [U]and[/U] index). I have x# of product defects tracked over y# of days. prod1 prod2 prod3... Day1: 1 1 1 Day2: 1 2 2 I have arrays that store max & min defects, by product#. minVar = maxDefect[]-minDefect[] gives me the … |
The End.