28 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for JohnMcPherson

Hello, I am trying to compare a double to be within various ranges, but the comparison is not working correctly. Rounding precision is not a concern, because if the value will match the boundaries so rarely, and it is rounding up to the higher range is acceptable. Below is the …

Member Avatar for JohnMcPherson
0
209
Member Avatar for Centorpe

I have two items which can be selected from two seperate comboboxes. I need to populate a 3rd combobox with range calculated from selection of first two. Default for this 3rd box must be 0 with plus and minus range. A little help would be much appreciated.

Member Avatar for Centorpe
0
252
Member Avatar for abaddon2031

SO im working on a python code that reads a csv file with 1600 entries roughly and i am splitting them up on the collum value of pc numbers. I keep getting a error that states " Traceback (most recent call last): File "C:\Users\HatterX\Desktop\test\test25", line 50, in <module> data.sort(key=lambda x: …

Member Avatar for abaddon2031
0
467
Member Avatar for tanatos.daniel

I would like to do something like this: comboBox6.Items.AddRange(new IEnumerable<int> { Enumerable.Range(1,8).ToArray() } ); (add numbers 1 to 8 to ComboBox Items using an IEnumerable object), but i can't figure out how. Thanks.

Member Avatar for castajiz_2
0
335
Member Avatar for taekiewzz

I want to filter my datagrid view in my winform with a date range. I have 2 label with StartingDate(lblStart) and EndingDate(lblEnd) which is called from the datepicker on another form. Filter = "(DATE >= '" + Convert.ToDateTime(lblStart.Text).ToString("dd/MM/yyyy") + "' and DATE <= '" + Convert.ToDateTime(lblEnd.Text).ToString("dd/MM/yyyy") + "')"; And this …

Member Avatar for FenrirMX
0
2K
Member Avatar for SLMQC

Using Visual Basic 10, and I am trying to identify min/max statistics and display the results. My calculations are working, but the display is not (line 68 & 80). With the way the code is written now, I don't get the error but my results are displayed as "The minimum …

Member Avatar for SLMQC
0
407
Member Avatar for ehpratah

Hi need some help suggestion I am trying to search data form two date range but it seems not working properly when i search for $from_date = "2013-04-01"; $to_date = "2013-04-04"; $query = mysql_query("SELECT * FROM date WHERE Date between '" . $from_date . "' AND '" . $to_date . …

Member Avatar for ehpratah
0
297
Member Avatar for 2mhzbrain

WHERE Category = '" + CategorySorter.Text + "' AND DateAdded = '" + DateValue("DateEnd.Text") + "' " thats my query and its not working, if the user input a date(like this 12/25/12) in DateEnd.Text, i want to confirm if it is existing on a database

Member Avatar for AndreRet
0
254
Member Avatar for mbarandao

Hello all: I have the following mysql query statement: SELECT COUNT(*) as ttl_rows FROM (SELECT DISTINCT(date(timeentry)) AS day, COUNT(*) AS total FROM history where MONTH(CAST(timeentry as date)) = MONTH(NOW()) AND YEAR(CAST(timeentry as date)) = YEAR(NOW()) GROUP BY DATE_FORMAT(timeentry, '%d') ASC) as ttl_row the statement performs a search for all records …

Member Avatar for mbarandao
0
452
Member Avatar for darkeclipse8

My professor asks me to program the Game Of Life with some required and I find unnecessary classes. But anyhow as I am coding and running the program midway I run into this problem void Life::setup_grid() { cout << "Size of Grid: " << grid.size() << endl; cout << "rows: …

Member Avatar for NathanOliver
0
386
Member Avatar for jay.barnes

Hello! I've got a question here that has me scratching my head - I've got a table of IP addresses. Each octet has its own field (OCT1,OCT2,OCT3,OCT4). The first two octets are fixed, and will never change (so, the IP addresses on my table are between X.Y.0.0 and X.Y.255.255). As …

Member Avatar for jay.barnes
0
307
Member Avatar for andywyndom

I am wondering if anyone wants to try and better this code sample. Here is the request: Given a range of dates (start, end) return all rows that cross that range where the rows contain a start and end date. This appears to work. I just wonder if anyone else …

Member Avatar for andywyndom
0
188
Member Avatar for SmackTubby

So, I am fairly new to C++ programming, so if you can help me, please try to keep it simple...I'm still learning. What I'm trying to do is assign a score to a grade letter (A,B,C,D,F) and then display it. This is what I'm have: [CODE]string lettergrade1; string lettergrade2; if …

Member Avatar for SmackTubby
0
220
Member Avatar for pwolf

Create a function generateNumbers(num) that takes in a positive number as argument and returns a list of number from 0 to that number inclusive. Note: The function range(5) will return a list of number [0, 1, 2, 3, 4]. Examples [CODE] >>> generateNumber(1) [0, 1] >>> generateNumber(10) [0, 1, 2, …

Member Avatar for TrustyTony
0
2K
Member Avatar for pwolf

so im trying to make it so that pressing enter without inputting any value, will break the loop, however, an empty string can be used because of [ICODE]for i in range(len(x_str_array)): x[i] = int(x_str_array[i]) bit.[/ICODE] [CODE] 'Exercise 7.3' # modified program from exercise 7.2 a=1 z="" while x !=z: x_str …

Member Avatar for pwolf
0
208
Member Avatar for ak24

I'm trying to determine the minimum range of floating-point types. It's easy when using values from standard headers: [CODE]#include <stdio.h> #include <float.h> main() { printf("Minimum range of float variable: %e\n", FLT_MIN); printf("Minimum range of double variable: %e\n", DBL_MIN); return 0; } [/CODE] This code gives the following output: Minimum range …

Member Avatar for Adak
0
231
Member Avatar for abc_123abc

hh.. how can i get the value accumulated from the date i select from datetimepicker1 to datetimepicker2 in vb.net and mysql? the value here refers to the daily sales and i need to find the total sales between the range dates that i choose.. please help me..as im beginner and …

Member Avatar for gd740
0
3K
Member Avatar for shandoosheri

hi how can i include a range of numbered files like file1.php,file2.php,file4.php i have tried this code but it didn't work [CODE]<?php foreach (range(0, 7) as $fileno) { include "files/file" + $fileno + ".php";}?>[/CODE]

Member Avatar for cwarn23
0
116
Member Avatar for iefilec

hi. i just want to ask how can i populate a listview n vb.net that has a is limited by a date from and date to. i have a datetimepicker for start date and datetimepicker for end date and i want do list all the entry of my database in …

Member Avatar for MartinPlatt
0
465
Member Avatar for WolfShield

So, I am working with some code I don't understand. Here is the file: [CODE=Python] import sys import os def change_ext(directory, old_ext, new_ext): for f in os.listdir(sys.argv[1]): base, ext = os.path.splitext(f) if ext[1:] == sys.argv[2]: os.rename(f, "%s.%s" % (base, sys.argv[3])) if __name__ == '__main__': if len(sys.argv) < 4: print "usage: …

Member Avatar for WolfShield
0
428
Member Avatar for tigerra80

My assignment is to write a golf program that tallies the scores and prints out names and final scores in this format: Player4:21, Player2:33 etc etc. My question is can you use the range function to assign input to the proper variable name in Python 2.7. Here's what I have …

Member Avatar for sneekula
0
2K
Member Avatar for spe_eddy

[CODE]testingdays = testingData.getMeasurements() for day in testingdays: dayValues = [] dayValues[0].append(day.tempMean) dayValues[1].append(day.tempMax) dayValues[2].append(day.tempMin) dayValues[3].append(day.dewPoint) dayValues[4].append(day.humidMean) dayValues[5].append(day.humidMax) dayValues[6].append(day.humidMin) dayValues[7].append(day.pressure) dayValues[8].append(day.meanWindSpeed) dayValues[9].append(day.maxWindSpeed) dayValues[10].append(day.maxGustSpeed) dayValues[11].append(day.visibility) [/CODE] this is my code and when i try to run it i get the error message: "Traceback (most recent call last): File "main.py", line 166, in <module> …

Member Avatar for TrustyTony
0
3K
Member Avatar for BaSk

I'm trying to run a date range query which works, but I also need to get data outside of the date range inside of the same query which I get to work. The issue I'm having is when the start date is in say 2011 and the end date is …

Member Avatar for BaSk
0
244
Member Avatar for mrar85

hello someone out there...help me with algorithm to determine range of marks!! here is my code so far [ICODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> struct stumarks { int studentid; int progassn; int lab; int test; int exam; char seperator; double finalmark; } stumarks[9]; using namespace std; int main() …

Member Avatar for mrar85
0
1K
Member Avatar for Toikkala

Hey, i need to make app that should take 10 chars from list. I tried it with range command but it's not working. [CODE] list = 'abcdefghijklmnopqrstuvxyzo' for list in range(10): print list [/CODE] And this code just prints numbers 0 to 10. So, is there some other command that …

Member Avatar for TrustyTony
0
225
Member Avatar for Rickay

For a program I am working on, I need a way to use an if function for a variable, if the variable is within a certain range of numbers. i.e. [CODE]if(x == 1-5) // meaning if x is from 1 to 5 //do something... if(x == 6-10) // i.e. if …

Member Avatar for jonsca
0
133
Member Avatar for echellwig

Hi, I am having some trouble using the int function on an element of a list. My code currently looks like this. [CODE]for j in range(int(L)): for k in range(int(Allele[j])): alleleslocus_j.insert(k,loci.readline())[/CODE] where Allele is a list of length L inputted by the user. I am having problems with the second …

Member Avatar for echellwig
0
175
Member Avatar for SimonLeefe

I have an Excel workbook containing named variables across several worksheets. In one of these worksheets I have a "run solver" button, which kicks off a VBA routine. The first thing this routine does is allocate values of variables picked up from the workbook to local variables inside the VBA …

Member Avatar for SimonLeefe
0
529

The End.