43,549 Solved Topics
Remove Filter ![]() | |
i have the following snip of data from i file i read in: li=[[4, 27, 6, 22, 0.81186094, 1.12214581, 2], [1, 9, 22, 28, 0.69887889, 0.989934, 2], [4, 27, 100, 30, 0.74796748, 1.04485376, 2], [6, 27, 22, 31, 0.91040724, 1.26681591, 2], [4, 1, 30, 45, 0.485223, 0.77061901, 2], [8, 27, … Software Development python | |
I have to drop the lowest score, and i can't include it in the calculation of the average. for input validation cant accept negative numbers for test score. #include <iostream> #include <iomanip> using namespace std; void arrSelectSort(float *, int); void showArrPtr(float *, int); void showAverage(float, int); int main() { float … Software Development c++ | |
Hi please help me. On my form i have a memo and 2 buttons, one is to load a .txt file into the form the other is to save. I want to use these buttons using the VistaSave and load dialogs. The save button i want to take the contents … Software Development pascal | |
I have a structure named "Card" in Codes.cs file which is located in Codes folder of project. The source code of this structure is as follows: [code=C#] struct Card { //Suit that this card belongs to private CardSuit suit; public CardSuit Suit { get { return suit; } set { … Software Development | |
alright, so I recently obtained a reference implementation of MD5. I benchmarked it, and it ran about 30% faster than OpenSSL's MD5. The function call is as such: [CODE]fast_MD5(unsigned char *pData, int len, unsigned char *pDigest);[/CODE] it worked great for a simple MD5 hash cracker, but I had trouble tweaking … Software Development c++ | |
Hi! I run Linux (easy peasy) on my netbook and have decided to encrypt the folder of my mail-client (in this case: evolution) via encfs. So I wrote a little shell-script that does all the necessary steps: [LIST] [*]ask for the password [*]decrypt and mount the directory [*]start evolution [*]umount … Software Development shell-scripting | |
Hi. I'm new to c# and have ran into a problem, I am using the following code to generate textboxes within a panel. [code] private void button1_Click(object sender, EventArgs e) { AddFields(); } private void AddFields() { if (textBoxIndex != 10) { TextBox field = new TextBox(); field.Name = "field" … | |
Hello, I am a student attempting to complete an assignment for school. The assignment is: Write an application called Palindrome.java that reads in a five-digit integer and determines whether it is a palindrome. If the number is not five digits long, display an error message dialog indicating the problem to … Software Development java java-swing | |
Hey, I download DarkGDK for Visual C++ 2008 Express (also downloading the correct version of the Direct X SDK). I just saved the SDK in some random directory, so when I try to execute the test code, i get an error telling me d3dx9.h can't be found. So, where do … Software Development c++ | |
//This program will ask the user for k, m and n. //k should not be equal to 1. //Output all numbers multiple by k between m and n. (ex. k=2,m=5,n=20 output should be 6 8 10...18) *problem* How to exit this program when the user assigned k to 1 ? … Software Development c | |
Well I am writing a program for Windows Mobile phone, I need to read text files in the program, the character sets (charset) of the files I am going to read are unknown, here I need to convert whatever text(Actually I probably only need to handle UTF-8, UTF-16 BE, GBK, … Software Development api c++ windows-api | |
Hi, I wonder if you could recommend a book that talks about methods for optimization (error function minimization) in conjunction with C++? In particular I am interested in methods for numerically minimizing a multi variable error function, e.g. f(x,y,z, ...). My applications are such that I know that gradient methods … Software Development c++ | |
By using Regex I've got links from an HTML Source. But now I want to save these links into a new array so that I can later use them. I mean, I want all the "m.Groups[]" in a new array. Here's my code: [CODE] String html = getSource(); r = … Software Development regex | |
What I mean by the subject is, is it possible to print out a string that is aware of the name of the variable it is stored in? For example... I'm reading right now about overriding a class's [icode]ToString()[/icode] method, and I want to know if there exists a way … Software Development | |
hey guys i know its kinda noobish not to understand them since i been coding for 1 month but there rlly some stuff which confuses me in multidimensional array and nested loops like here in this program I wanted to know if i sum up like in the array for … Software Development c | |
[CODE=Java]URL myurl = this.getClass().getResource("/SummaryReport.rptdesign"); File file = new File(myurl.getFile()); System.out.println("Name=" + file.getAbsolutePath()); [/CODE] The above code seems to get the resource. But I guess I am going about creating a file connected to that resource wrong? Because I cannot subsequently open a FileReader connected to that file. . I am … Software Development java | |
![]() | I am trying to set up 4 buttons that will move through my array in the GUI. I am entering 2 items and telling the GUI to spit out the 2nd record. If I can just figure out how to get the "First" button to work, I think I can … Software Development gui java java-swing ![]() |
hi friends i have a problem.these are some components that i have in my project: form1:datagridview1(dg1) , form2:datagridview2(dg2) when i clicked on cell on dg1, form2 will be opened.now i have to double clicked on the cell of dg2 to send its data to dg1 on form1(then form2 will be … Software Development | |
Hi im writing a program that returns whether an inputted number is prime or not, but Im kind of stuck... [CODE]import math def listfactors(n): # defining the function l = [] for i in range (1, int(math.sqrt(n))+1): if float(n)/float(i) == int(float(n)/float(i)): l.append(i) l.append(n/i) return l primeNum = int(raw_input("Enter number here:")) … Software Development python | |
hello, i am having a datagrid n a checkbox colmn in it.. I get the data in datagrid from the database ...after that when i check specific checkbox those row should be deleted from the datagrid / database ....i was writing the code for the same but am confused as … Software Development | |
Hi, Does anyone no if it is possible to remove controls like a textbox during runtime? | |
Help I need a quicker way to do this, its a combobox that assigns a number to whatevers selected and it takes up to much room and looks messy. [code] private void comboBox19_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox19.Items[comboBox19.SelectedIndex].ToString() == "Clear Float") { glassType10 = 200; } else if (comboBox19.Items[comboBox19.SelectedIndex].ToString() … | |
Hi, I am writing a script that aims to help a person keep a list of characters while reading a book. In doing this, I am writing to a file and checking it constantly, except I ran into a problem. Say I executed a code block such as the following: … Software Development file-system python | |
Hi guys i have a question need to ask. I create an application for filling up information. After filling if he want to update when press update and fill up active = from yes to No then it will remove the table 1 to table 2 by using the sql … Software Development visual-basic | |
Hi guys can you all help me with this. I need to sure will the this idea can be make in vb6. I have a update command button. When click then type the badge id , it will automatic get the data and show the employee name then the rest … Software Development sql visual-basic | |
The question is to write a program that dynamically allocates an array large enough to hold a user defined number of test scores. Once all the scores are entered the array should be passed to a function that sorts them in ascending order. Another function should be called that calculates … Software Development c++ | |
I have two classes, one inheriting wx.Frame and othe is wx.Dialog. I use the dialog to collect some info and I call its object in the wx.Frame class. The problem is, the dialog should return the value of its TextCtrl values and I have no Idea how to do it … Software Development python | |
Hi, Does anybody know how I can create a bunch of textboxes and buttons without having to write each one individually e.g [code] Button button1 = new Button; button1.Location = new Point(1,20); this.Controls.Add(button1); [/code] And then having to go onto the next one e.g button2. Please help | |
Hi, I am creating a program on behalf of my business and have become stuck in one particular matter. I am fairly new to C#. The application consists of the user entering data into a mixture of comboBoxes and textboxes, after the user has entered the data he clicks the … | |
OK, so I'm somewhat experienced in Java, and am learning C#. I'm currently on the topic of Inheritance and Polymorphism. What I read is that if a base class has a method that is marked as virtual, then the inheriting class has the choice to override that method if it … Software Development visual-studio | |
I've developed an Application for work that allows employee's to request vacation time off. I developed the application on a computer that had the .NET 3.5 Framework. I didn't realize until after I published the application that many of the computers do not have .Net 2.0. I fixed that problem … Software Development | |
Hello, I would like to know how to create a symlink in Windows, Linux is easy, just use [icode]symlink()[/icode], but Windows is complicated! Someone has managed this before? Software Development c++ | |
Hey, i was trying to make a multiplication word problem type thing and when hit debug it always says what my title is. Here's my code. [code] #include <iostream> void main(); { // Declare Variables!!! char name[15]; short quantity; float amount; float totalSale; cout << "Enter Customer's Name: "; cin.getline(name,15); … Software Development c++ | |
| |
How do I 'restore' my output (stdout) back to the terminal after redirecting it to a file. I want to be able to output to a file for a specific section of code, then close that file and put output back to the screen/terminal. [code=c++] fprintf(stdout, "This will go to … Software Development c++ file-system | |
As far as I can tell, this method is returning a blank line every other line, but I can't figure out why: [CODE] public static List<string> plain(string path, int num) { List<string> result = new List<string>(); StreamReader reader = File.OpenText(path); string line; int i = 0; while ((line = reader.ReadLine()) … Software Development file-system | |
Hey all, I have been reading some older posts on line/list manipulation, but don't quite understand exactly how to implement all of the tools that you guys are using (line.strip() for example) to get what I need. Essentially, I have a working program that iterates through data and outputs it … Software Development python | |
Hi, I am creating a program on behalf of my company and am stuck in one particular matter. I am fairly new to C#. At the moment I am creating a textbox, label and a button at the push of a diffrent button with the following code. [code] TextBox textBox6 … | |
Hello, I am new here.. I came here looking for help with some ACPP questions and found a couple. So now, hopefully, I can give back a little, but with a question! Here is my solution for ACPP Exercises 4-2 through 4-4 (sort of, I havent switched it to use … Software Development c++ | |
Is there ANY standards compliant way to get unbuffered input from the console without the characters being automatically displayed? because, although I can reset the buffer on cin to 0 with [icode]cin.rdbuf->pubsetbuf(0,0)[/icode], when I do this, it outputs all characters twice (because it outputs them by default once?) The reason … Software Development c++ | |
I'm supposed to dynamically allocate an array of integers. The function should accept an integet argument indicating teh number of elements to allocate. The function should return a pointer to the array. This is what i got so far. [code] #include <iostream> using namespace std; //Function prototype int *arrAllocator(int); int … Software Development c++ | |
Hey All, I am having a problem with the function "SetForegroundWindow". From googling I am readin that it does not work for MSVC 6 MFC on a vista machine???? I am trying to write code that will check if a window is open, if the window is open bring the … Software Development c++ | |
as far as i understand in order to sort a multidimensional array you have to make you own class that implements Comparator. the string which is to be sorted has the following structure: [0][0] filename1 [0][1]filesize1 [0][2]lastmodified1 [1][0] filename2 [1][1]filesize2 [1][2]lastmodified2 ... i want to be able to compare by … Software Development java | |
![]() | OK, so here is my problem. I have created this application that inventory's books & magazines. Everything compiles fine. I prompt the user at the beginning to pick the length of the array (stored in numBooks) then when it comes time to pass the array to the GUI, I get … Software Development gui java java-swing ![]() |
Hi! I'm very new to both python and Tkinter and would be thankful for some help. i want to search a text document for a word and print each line that match the searchword in a text widget. [CODE]def ladda(): fts = 'thefile.txt' file = open(fts,"r") text = file.readlines() file.close() … | |
[CODE=python]>>> mylist = ['bunnies', 'apples', 'animals', 'fruit', 'amsterdam'] >>> for x in mylist: print '--------------' print x if x[0] == 'a': print "Removing ",x mylist.remove(x) -------------- bunnies -------------- apples Removing apples -------------- fruit -------------- amsterdam Removing amsterdam >>> print mylist ['bunnies', 'animals', 'fruit'][/CODE] The output should be bunnies and fruit, … Software Development python | |
While we allocate memory using malloc/calloc.That much bytes is reserved by the program.When the program terminates and we didnot free it what happens exactly? How to check memory usage by a program by writeing a C program. Software Development c | |
I was wondering if there is a way to make specified code, most likely a function, run before the program quits out due to the user logging out etc. I'm writing a Win32 app with no window in Dev C++. (if that makes any difference) I've been searching a bit … Software Development c++ | |
High I am in Europe right now and here they treat their commas as decimals points. I am working with Visual express 2008 and I cannot find a way to read a file that has all commas for decimal points. I can read the numbers as a string, but than … Software Development c++ | |
Hi everyone, I'm doing some experiences with python in Windows Vista and I was wondering to know how to eject the tray of CDs. Thanks, Dan. Software Development python windows-vista |
The End.