I want to show the total qty of these query (total qty from datagridview where ActualQty value will update the values of Used Column) `SELECT COUNT(Software) AS ActualQty FROM tblswlogs WHERE Software='MS EXCEL'` and (**Total** will appear in textbox) `SELECT MAX(used + initialqty) As Total FROM tblswlist WHERE Software = 'MS EXCEL'`

Member Avatar
Member Avatar
+0 forum 1

How to get min/Max value of a all column in a two-dimensional arra so for example, lets say you have the following 2d array: 1 2 3 4 5 6 7 8 9 Than the out put should be: -- col 1 -- min value at col 1 is 1 max value at col 1 is 7 -- col 2 -- min value at col 2 is 2 max value at col 2 is 8 -- col 3 -- min value at col 3 is 3 max value at col 3 is 9 public static void col(int[][] array) { for …

Member Avatar
Member Avatar
+0 forum 1

create table dummy{id int ,invoice int } insert into dummy values(191,10),(192,11),(193,0); I have to update 193 with invoice 13 but i want to fetch max invoice and then increment invoice by 1 for 193 . i had tried update dummy set invoice=(select max(invoice) from dummy)+1 where id=191. It wont work Thank you

Member Avatar
Member Avatar
+0 forum 3

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 . . . 22/7/2014 23.59,5.6,24.5 i know how to display it over 2 days but within 24 hours period this is the code for displaying the max/min value over 2 days: long_title = 'Irradiance, AMB_Temp vs Time Graph at {} \n Max Value: {:.2f} at {} \n Min Value: {:.2f} …

Member Avatar
-1 forum 0

Hi Guys, I'm Using Python 2.7.3 This is my txt file: TimeStamp,Irradiance 21/7/2014 0:00,0.66 21/7/2014 0:00,0.71 21/7/2014 0:00,0.65 21/7/2014 0:00,0.67 21/7/2014 0:01,0.58 21/7/2014 0:01,0.54 21/7/2014 0:01,0.63 21/7/2014 0:01,0.65 21/7/2014 0:02,0.64 21/7/2014 0:02,0.63 21/7/2014 0:02,0.63 21/7/2014 0:02,0.64 . . . . 22/7/2014 23:57,0.53 22/7/2014 23:58,0.69 22/7/2014 23:58,0.61 22/7/2014 23:58,0.65 22/7/2014 23:58,0.59 22/7/2014 23:59,0.63 22/7/2014 23:59,0.67 22/7/2014 23:59,0.68 22/7/2014 23:59,0.58 How can i find the average/mode/max value of my txt file data and display it My program is using the data above and letting user to choose from time & to time then plot the user selected criteria (which i had done) …

Member Avatar
Member Avatar
+0 forum 5

I need to find the largest height & width values in a directory. I've tried to use: if ($handle = opendir('path/to/image')) { while (false !== ($file = readdir($handle))) { if (preg_match('/(jpg|gif|png)/', $file )) { $images[] = $file; list($width, $height) = getimagesize('path/to/image/'.$file); $max_w = max(array($width)); $max_h = max(array($height)); } } closedir($handle); } `$max_w` returns the last image in an arrrays size, as it does in a foreach statement. This works: `$max_w = max(array(135, 100, 150, 101));`, but it reads as a string above. How do I get the width into an array so I can get the max value?

Member Avatar
Member Avatar
+0 forum 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 | 5.0 | | 2 | 6.0 | 7.0 | 8.0 | 9.0 | 0.0 | | 3 | 1.1 | 2.2 | 3.3 | 0.1 | 0.3 | -------------------------------------------------------------------- def minimum(y,l): for y in l: if y == 1: i= 0 w=(l[i],l[i+1],l[i+2],l[i+3],l[i+4]) a= min(l[i],l[i+1],l[i+2],l[i+3],l[i+4]) eli f y == 2: …

Member Avatar
Member Avatar
+0 forum 2

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): self.grade=[] def min(self): try: if int(input)<= self.grade: return int(input) except: pass using this test, from Dataset import Dataset def main(): print('This is a program to compute the min, max, mean and') print('standard deviation for a set of numbers.\n') while True: xStr = input('Enter a number (<Enter> to quit): ') if …

Member Avatar
Member Avatar
+0 forum 3

Hello Community, I was wondering if there is a way to limit users on how many database entries they can insert then once they have reached 100 (Max entried) entries it will delete old entries. So if the user has reached 100 entried and they try to insert another entry it will delete and old entry to make room for there entry.

Member Avatar
Member Avatar
+0 forum 7

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 correctly. It only runs correctly when I split up the nesting as follows. $variable2 = max(($variable1 - $variable0), 0); $variable5 = min(variable2, $variable3); I have not been able to find any other examples of what I want to do. Does anyone have experience with this? Can you offer any suggestions? …

Member Avatar
Member Avatar
+0 forum 2

i am using http://bojanmauser.from.hr/bvalidator/ this script to validate my form, now i am stack with a problem, want to set max file limit for image file upload. but i am unsuccessful everytime, can anybody help me to get rid of this, advance thanx to all, who is reading this discussion and give a helping a hand to solve this problem...

Member Avatar
Member Avatar
-1 forum 7

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 parameter of type "float". I have tried everything I could think of which is probably not much since i've only been doing programming for maybe 2-3 weeks XD. But want to thank you all in advance for the help. header file #pragma once class calc { private: int Size; float …

Member Avatar
Member Avatar
+0 forum 5

does anyone know how to make syntax of max if in vb excel 2007? (not formula)

Member Avatar
+0 forum 0

I just uploaded my current project on a free PHP hosting website and when i and my friend visited the website i got from PDO (MySQL) the error SQLSTATE[08004] [1040] Too many connections. I use a Singleton class to manage the PDO (so i create only 1 PDO instance to do the queries). I do not close the PDO (set the PDO = null) since i read that the PHP does it by itself at the end of script execution. I checked the mysql max_connections and it is set to 150. Isn't it a little weird to show this message …

Member Avatar
Member Avatar
+0 forum 4

I am trying to make this table behave. I want it to stay within 80% of the page. I want each column to be a fixed width. I want it to show all without scrolling right. Its fine if it gets super long. I also want the title bar, with the column names... to always be on top, maybe they call that floating.. idk Can someone PLEASE help me clean this up ? Below is the CSS file... body { margin:10en; padding:0; height:100%; width:80%; text-align: center; margin-left: auto; margin-right: auto; } #container { min-height:100%; position:relative; height:100%; } #header { background:#009900; …

Member Avatar
Member Avatar
+0 forum 3

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?

Member Avatar
Member Avatar
+0 forum 8

I'm writting a program that will take a file as input and go through the list of numbers in the file and return the max number uing recusions. I'm not very good with recursions here is what I have so far. Also I'm not allowed to use the max command. def Mymax(lists): if (len(lists[1:])>0): return def main(): fname = input("Enter filename: ") infile = open(fname, "r") data = infile.read() for line in data.splitlines(): print(eval(line)) main()

Member Avatar
Member Avatar
+0 forum 5

i want to query my database using php count to count the number of values in a table then count which value appears more times than the others. Im new to this kind of thing.

Member Avatar
Member Avatar
+0 forum 3

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 sum = 0; float mean = 0; float min = 0; float max = 0; float range = 0; //<<<<<they al have to be float because the text file has float numbers>>>> while (fin >> c) { count++; sum += c; mean = sum / count; } cout << "Total …

Member Avatar
Member Avatar
+0 forum 6

I admit it's a part of an assignment but I don't understand what the assignment require in this part. This program is supposed to read 10 numbers from the keyboard and then the application findMax will take one single command line argument. If you invoke findMax 1, it will print to the screen the largest number amongst the ten numbers. If you invoke findMax 2, it will print to the screen the second largest number amongst the ten numbers. If you invoke findMax 3, it will print to the screen the third largest number amongst the ten numbers. What does …

Member Avatar
Member Avatar
+0 forum 12

Is there a way to set Max date in Java for the calendar control or restrict the user from selecting the future dates?

Member Avatar
Member Avatar
+0 forum 3

I have been googling this and have read close variations of the following issue from others. It seems that if you are running MS office 2010 Excel and go to delete a group of rows, sometimes below where you are working a blank row will appear at maxamim height size and also several other rows will end up hidden. This doesn't happen every time but only every few times you perform a delete of some rows. You can restore the hidden rows by using the "unhide rows" tool and restore the huge row back to normal. This only seems to …

Member Avatar
+0 forum 0

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 FIRSTNAME: "); a = bv.readLine(); System.out.println("ENTER LASTNAME: "); b = bv.readLine(); System.out.println("ENTER COURSE: "); c = bv.readLine(); System.out.println("------ GRADE -------"); System.out.println("SUBJECT1 : "); x = bv.readLine(); d = Float.parseFloat(x); System.out.println("SUBJECT2 : "); x = bv.readLine(); e = Float.parseFloat(x); System.out.println("SUBJECT3 : "); x = bv.readLine(); f = Float.parseFloat(x); System.out.println("SUBJECT4 : "); …

Member Avatar
Member Avatar
+0 forum 3

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++) { if(max<num[i]); max = num[i]; } int min = num[0]; for(int i=0; i<num.length; i++) { if (min>num[i]); min = num[i]; } String MaxMin = "The array are : "; for(int i=0; i<num.length; i++) { MaxMin = MaxMin + num[i] + " "; } MaxMin = MaxMin + "\nThe largest number …

Member Avatar
Member Avatar
+0 forum 18

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 a[], int n) { cout << "How many numbers would you like to enter? "; cin >> n; int max; max=a[n]; for(int i=0; i<n; i++) { if(max>a[i]) max=a[i]; } return max; } int finMin(int a[], int n) { cout << "How many numbers would you like to enter? "; cin …

Member Avatar
Member Avatar
+0 forum 4

Hi all, i have a table like below Id Names 1 Sanjay, Anu, Rock 2 Mohamed, Asif, Selva, Manoj, Booker T 3 Jerrico, Cena 4 Amala How do i select MAX LENGTH OF STRING from column in the table, I need the result like, 2 Mohamed, Asif, Selva, Manoj, Booker T Is there any query for that ??

Member Avatar
Member Avatar
+0 forum 5

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 wrong with this?** public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("How many numbers will be entered?"); int num = scanner.nextInt(); double[] grades = new double[num]; for(int i = 0; i < grades.length; i++) { System.out.println("Enter an integer: "); grades[i] = scanner.nextDouble(); } } public static int …

Member Avatar
Member Avatar
+0 forum 10

I have to write a program that will decode a Ceasar cypher with any possible rotation length on a long string that will be imported into the program. I'm trying to figure out some pseudo coding on how I want to tackle this problem but there is one key thing that I cannot figure out. I have no clue how to go about writing a function that will find the largest occurrence of a letter in a string, and use that percentage of occurrence to find the amount shifted from a standard percentage of letter usage in the English language. …

Member Avatar
Member Avatar
+0 forum 6

My teacher has assigned us a HW to do and I can not seem to figure out how to group the results the way he wants them. What we have is a database of properties and owners. He wants us to generate a report that contains only the Owner names who have the most properties for rent per branch office respectivly. There are 9 branches and this is what I have so far [CODE] SELECT bNo, fName || ‘ ‘ || lName Owner, COUNT(pNo) properties FROM Property NATURAL JOIN Staff GROUP BY bNo, fName, lName ORDER BY bNo; [/CODE] This …

Member Avatar
Member Avatar
+0 forum 2

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}; int array2[]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int a; int print_menu() { int choice; cout<<"#----------------------------------\n"; cout<<"# Manipulation of arrays #\n"; cout<<"# #\n"; cout<<"# BY MAFD #\n"; cout<<"#----------------------------------\n"; cout<<"# 1. Read Array 1 #\n# 2. Read Array 2 #\n"; cout<<"# 3. Max_min_two_arrays #\n# 4. sum_two_arrays #\n"; cout<<"# …

Member Avatar
Member Avatar
+0 forum 3

The End.