43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for sab786

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
Member Avatar for sab786
0
129
Member Avatar for pltndragon

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++
Member Avatar for NathanOliver
0
2K
Member Avatar for revski

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
Member Avatar for FlamingClaw
0
134
Member Avatar for nccsbim071

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
Member Avatar for nccsbim071
0
247
Member Avatar for dzhugashvili

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++
Member Avatar for dzhugashvili
0
124
Member Avatar for maresi

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
Member Avatar for maresi
0
208
Member Avatar for wingers1290

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" …

Software Development c c# c++
Member Avatar for wingers1290
0
230
Member Avatar for Questions???

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
Member Avatar for Questions???
0
936
Member Avatar for CoolGamer48

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++
Member Avatar for Sepiantum
0
496
Member Avatar for DoEds

//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
Member Avatar for DoEds
0
100
Member Avatar for kevintse

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
Member Avatar for kevintse
0
314
Member Avatar for seakayaker

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++
Member Avatar for daviddoria
0
141
Member Avatar for farooqaaa

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
Member Avatar for Ramy Mahrous
0
141
Member Avatar for agent154

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
Member Avatar for Ramesh S
0
113
Member Avatar for MrNoob

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
Member Avatar for MrNoob
0
149
Member Avatar for BestJewSinceJC

[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
Member Avatar for ~s.o.s~
0
134
Member Avatar for buchanan23

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
Member Avatar for buchanan23
0
2K
Member Avatar for Dajer

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
Member Avatar for lighthead
0
458
Member Avatar for Darkangelchick

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
Member Avatar for Progressivism
0
145
Member Avatar for laghaterohan

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
Member Avatar for laghaterohan
0
347
Member Avatar for wingers1290

Hi, Does anyone no if it is possible to remove controls like a textbox during runtime?

Software Development c c# c++
Member Avatar for ddanbe
0
159
Member Avatar for wingers1290

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() …

Software Development c c# c++
Member Avatar for wingers1290
0
102
Member Avatar for SoulMazer

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
Member Avatar for SoulMazer
0
1K
Member Avatar for gingank

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
Member Avatar for vb5prgrmr
0
124
Member Avatar for gingank

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
Member Avatar for 9884616532
0
304
Member Avatar for pltndragon

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++
Member Avatar for pltndragon
-1
2K
Member Avatar for Stefano Mtangoo

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
Member Avatar for Stefano Mtangoo
0
69
Member Avatar for wingers1290

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

Software Development c c# c++
Member Avatar for wingers1290
0
86
Member Avatar for wingers1290

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 …

Software Development c c# c++
Member Avatar for wingers1290
0
2K
Member Avatar for agent154

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
Member Avatar for agent154
0
359
Member Avatar for NickMalone85

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
Member Avatar for serkan sendur
0
80
Member Avatar for osmano807

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++
Member Avatar for osmano807
0
81
Member Avatar for Alva1

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++
Member Avatar for Alva1
0
178
Member Avatar for Egypt Pharaoh

How Can I make a Botton in windows control library

Software Development
Member Avatar for sid78669
0
116
Member Avatar for rciprogrammer

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
Member Avatar for rciprogrammer
0
6K
Member Avatar for tdeck

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
Member Avatar for lighthead
0
160
Member Avatar for hughesadam_87

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
Member Avatar for tdeck
0
21K
Member Avatar for wingers1290

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 …

Software Development c c# c++
Member Avatar for Antenka
0
401
Member Avatar for Rockpile

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++
Member Avatar for Rockpile
0
181
Member Avatar for chaines51

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++
Member Avatar for chaines51
0
441
Member Avatar for pltndragon

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++
Member Avatar for pltndragon
0
423
Member Avatar for colmcy1

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++
Member Avatar for tux4life
0
646
Member Avatar for Lensva

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
Member Avatar for Lensva
0
543
Member Avatar for buchanan23

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
Member Avatar for buchanan23
0
174
Member Avatar for pluring

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() …

Software Development python tkinter
Member Avatar for pluring
0
2K
Member Avatar for zachabesh

[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
Member Avatar for zachabesh
0
92
Member Avatar for Dream2code

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
Member Avatar for Dream2code
0
126
Member Avatar for GotCake

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++
Member Avatar for GotCake
0
150
Member Avatar for Yaserk88

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++
Member Avatar for Yaserk88
0
2K
Member Avatar for Dan08

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
Member Avatar for Dan08
0
224

The End.