43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for kat-spn

Hi I have only recently started using c# in my first year of university. I have done a little vb before but pretty much a noob. I have to write a simple console application that counts how many coins are required to make up a particular number given by the …

Software Development
Member Avatar for Chaitanya Dhote
0
956
Member Avatar for RockT

Maybe this is the simplest thing ever but i'm a beginner trying to learn at least 1 language. How come the Script below keeps displaying the Else message until it finds the string? I was expecting for it to display 1 single Box whether it was found or not? why …

Software Development vb.net vbscript
Member Avatar for RockT
0
106
Member Avatar for Macilath

Howdy, I have a few questions regarding the use of ctime within a class. I followed the example on [URL="http://www.cplusplus.com/reference/clibrary/ctime/strftime/"]http://www.cplusplus.com/reference/clibrary/ctime/strftime/[/URL] When the program is like this, it works: [CODE] #include <ctime> #include <iostream> using namespace std; int main(){ time_t current_seconds; current_seconds = time(NULL); //Fills current_seconds with the number of seconds …

Software Development c++ oop storage
Member Avatar for Macilath
0
690
Member Avatar for QQnoobie

Trying to define a function that dynamically creates a Student object and then prompts the user for the info and returns pointer to a Student object. [CODE]class Student{ private: string firstName; string lastName; string aNumber; double GPA; public: Student (); Student (string f, string l, string idNo, double gPoint); string …

Software Development c++
Member Avatar for QQnoobie
1
141
Member Avatar for geeksforgeek

explain the output:-- [CODE] int main(void) { int a=10,b; a=a+b-(b=a); printf("%d",a); } [/CODE] I am not understanding it. the precedence of bracket() is greater so b is assigned to a so expression becomes- a=a+a-a which should be equal to a but it is not why?

Software Development c
Member Avatar for geeksforgeek
0
204
Member Avatar for phorce

Hello, I am working on an algorithm that checks to see if a value is in an array, however, it doesn't seem to want to work .. It will display that the first number is there but nothing else.. Any ideas? Heres the code: [code] #include <iostream> using namespace std; …

Software Development algorithm c++
Member Avatar for gerard4143
0
335
Member Avatar for blt007

Ive been having trouble solving this please help, yea its hw but im using this as a last resort as its due in 2 hours. [CODE] // Search a dictionary file for the word input by the user. // //////////////////////////////////////… #include<iostream> #include<string> #include<fstream> using namespace std; int main() { string …

Software Development c c# c++
Member Avatar for blt007
0
630
Member Avatar for cdea06

So I'm trying to add a while loop so that the program continues to ask for the user to enter a new string phrase after the previous one is counted until the user enters the phrase "quit". However, for some reason if you enter anything but "quit" it just produces …

Software Development java
Member Avatar for Taywin
0
225
Member Avatar for marvolo1300

[CODE] int a [0] = int b [1]; [/CODE] I get this error. [QUOTE]Type mismatch: cannot convert from int to int[][/QUOTE]

Software Development java
Member Avatar for marvolo1300
0
136
Member Avatar for warlord902

I want to make node heights of JTree nodes to differ. I mean like the parents have different node height and childs have different node height. I tried to put myJTree.setRowHeight(30) while adding nodes but it doesn't work because it does not work for a single node but for the …

Software Development java
Member Avatar for mKorbel
1
982
Member Avatar for pradeep_java

How can I store a number with 10^6 digits in Java? Would BigInteger be the most appropriate while considering performance issues like memory and speed

Software Development java
Member Avatar for JamesCherrill
0
1K
Member Avatar for aero31aero

Everytime I run this program and enter a new record, it gets terminated on these statements: [CODE] stud.pcent=((stud.mhin+stud.meng+stud.mmat+stud.msci+stud.msst)*100)/(mm.hin+mm.eng+mm.sst+mm.sci+mm.mat); fwrite(&stud,recsize,1,file); [/CODE] The whole program is this. It is only partially complete. [CODE] #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #define UARROW 72 #define DARROW 80 #define ENTER 13 #define ESCAPE 27 int key; …

Software Development c++ file-system open-source
Member Avatar for aero31aero
0
195
Member Avatar for Captain_Jack

I'm writing a small app to collect IE command diag. The problem is it's not waiting till the process finishes and it's errors out in the next line. My goal is to copy the log and paste it under a folder in Desktop [CODE]Try Process.Start("C:\Program Files\Internet Explorer\iediagcmd.exe") My.Computer.FileSystem.CopyFile(USERPROFILE & "\Desktop\IEDiag.cab", …

Software Development vb.net
Member Avatar for Captain_Jack
0
1K
Member Avatar for syjytg

I have the code [CODE] import sound def rem_vocals(snd): '''Return a copy of the original sound with vocals removed. The original sound is unmodified. The number of samples in the copied sound is the same as the original file.''' new_song=sound.copy(snd) for samp in new_song: left=(sound.get_left(samp)) right=(sound.get_right(samp)) result=(left-right)/2.0 Left=sound.set_left(samp, int (result)) …

Software Development python
Member Avatar for syjytg
0
343
Member Avatar for RenanLazarotto

Hello guys! This is my current code: [CODE]using System; using System.Drawing; using System.Diagnostics; using System.Windows.Forms; namespace Finalizador_de_Processos { public partial class Form1 : Form { int IndexProcesso = 0; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { ListaProcessos(""); } private void ListaProcessos(string name) { if (textBox1.Text …

Software Development listview
Member Avatar for RenanLazarotto
0
118
Member Avatar for asd1234

HI, At the moment I'm facing a problem. I have a datagridview1 in FORM1 and datagridview2 in FORM2. I want to duplicate the data in datagridview1 to datqagridview2 in another form. The code I used is: FORM1: [CODE] OdbcCommand bcCom2 = new OdbcCommand(); bcCom2.CommandText = "" + content + ""; …

Software Development dataset
Member Avatar for Mitja Bonca
0
126
Member Avatar for Cross213

What's wrong with this code, I'm getting LNK errors [CODE]#include "Queue.h" int main() { Queue <int> q; // q is an object q.showQ(); q.insert(72); q.insert(36); q.insert(43); q.showQ(); q.remove(); q.showQ(); return 0; } [/CODE]

Software Development c++ queue
Member Avatar for Cross213
0
153
Member Avatar for minimi

It compiles and run but I'm stuck on the last part - I can't figure out how to iterate through the LinkedList and delete all students whose birthYear is greater than 1995 (print only students whose birthYear is less than 1995). I have to iterate after inserting all records into …

Software Development c linked-list
Member Avatar for Narue
0
181
Member Avatar for darkelflemurian

Hello everyone I have the following issue and i tried google but no success. I'm tired of this silverlight thing but i have no choice. here is the problem: I have a datagrid which populates itself from a database doing this [CODE] void svr1_getInformationCompleted(object sender, getInformationCompletedEventArgs e) { dgv.ItemsSource = …

Software Development
Member Avatar for darkelflemurian
0
167
Member Avatar for MattD00

I have set-up a tab control and have buttons set up to add and remove the tabs. I want to place a text box into all the tabs, so when a new tab is added a text box is already placed inside the tab. I am not sure on how …

Software Development vb.net
Member Avatar for NetJunkie
0
417
Member Avatar for zifina

how to search if a file is present in the computer in c sharp?i need to find out if pdf reader is installed or not in a pc...please help..thank you

Software Development adobe pdf
Member Avatar for zifina
0
1K
Member Avatar for zachattack05

How do you personally organize your methods, event handlers (kinda the same), properties etc... in your classes? I've been grouping things by type using regions and then alphabetizing them within the regions, but I was just wondering what other people do if there is a standard?

Software Development
Member Avatar for zachattack05
0
138
Member Avatar for RenanLazarotto

Hello guys! I've followed this: [url]http://www.codeproject.com/KB/miscctrl/cutebutton.aspx#[/url] for creating my first custom control. But, I want something more visual. I want to use images as my button, with normal, hover and clicked states. But I don't know how to do it. can someone help me? Also I want to do it …

Software Development
Member Avatar for RenanLazarotto
0
120
Member Avatar for sunn shine

iv taken a list of bakery items from user in doubly linked list.. but remove func isnt working................ :(

Software Development c++ linked-list
Member Avatar for Taywin
0
297
Member Avatar for lbgladson

I have an assignment for school...Write a program CurrencyCOnverter that asks the user to enter today's price of one dollar in euro. THen the program reads U.S. dollar values and converts each to euro values. I have the following code. It works great until I start putting the loops and …

Software Development java
Member Avatar for lbgladson
0
727
Member Avatar for TheComputerGuy

I'm having issues with the abstract class idea...I've attempted to use Eclipse, but this time the IDE is just messing it up. I've got the files uploaded. They should be attempted to be compiled as this 1. Container 2. Base Container 3. Height, and color exception 4. Round and square …

Software Development ide java
Member Avatar for TheComputerGuy
0
136
Member Avatar for Simon180

like the title says how to calculate 10 days from a date with delphi, am after simple way to get 10 days trial from current date of usage can anyone help thanks :)

Software Development delphi pascal
Member Avatar for Simon180
0
147
Member Avatar for tapandesai007

I want to have one windows form with one progress bar on it to appear with the progress bar getting filled upto maximum to give some visual loading application type of effect. I have written some code to do this task, and it worked fine in one of my previous …

Software Development
Member Avatar for tapandesai007
0
1K
Member Avatar for stereomatching

At first, I wrote something like this [code] template<typename T, size_t size> inline size_t const sizeof_array(T const [size]){return size;} [/code] but if failed, then I find a solution form the other place, like this. [code] template<typename T, size_t size> inline size_t const sizeof_array(T const (&)[size]){return size;} [/code] what is the …

Software Development c++
Member Avatar for vijayan121
0
182
Member Avatar for techlawsam

Getting some errors at least this time I know why..seems like I am not declaring the methods inside my classes I tried rearranging the method and then inserting all my code into a class but Im still getting all those errors in the bottom. If you guys can tell me …

Software Development oop
Member Avatar for arunkumars
0
559
Member Avatar for sathya88

how to free memory of byte array... code[CODE]for(int j=0;j<count;j++){ buffer=null; //[COLOR="Red"]free the memory by set as a null but not working????? shows array index out of bound exception for the second time[/COLOR] buffer= new byte[size]; //byte mem alloc temp2=di.read(buffer,total,size);// read buffer total=total+temp2; fo=null; ds=null; fo= new FileOutputStream(flist[j]); ds= new DataOutputStream(fo); …

Software Development java motherboards-cpu-ram
Member Avatar for masijade
0
8K
Member Avatar for gahhon

i just met up a problem with array. [CODE] int[] num = new int[10]; [/CODE] this is everytime we declare and intialization one, how about to declare and intializate with unkown size?

Software Development java
Member Avatar for cwarn23
0
122
Member Avatar for johnhuge

hello, i have tired to sort my link list but unfortunately i can't seem to get it working. The problem i having with the sort function is that it will sort the function when i enter a member to the list at the end except for the head. Also when …

Software Development c linked-list
Member Avatar for johnhuge
0
125
Member Avatar for VB 2012

Hi guys sory for being ooff grade 9 was a little ruf and yet gr 10 its still the same anyway>For my question I ve got a picture box and in some size modes we all know you cant see everything so aamm then i fought about scrolling and i …

Software Development vb.net
Member Avatar for NetJunkie
0
170
Member Avatar for Ryden

Hello, I was asked to write a program that;s

Software Development java
Member Avatar for Ryden
0
96
Member Avatar for sirlink99

I have an array of cards. It looks like this [CODE] String cards[][] = {{"Spade", "Heart", "Club", "Diamond"}, {"1","2","3","4","5","6","7","8","9","10","J","Q","K"}}; [/CODE] how would I get the suit and the "rank" of the card. I have tried [CODE] System.out.println (cards[1][5] + " of " + cards [1]); [/CODE] but that gave me …

Software Development java
Member Avatar for Taywin
0
224
Member Avatar for trantran

[CODE] class C{ friend class F; private: fct1(){} fct2(){} fct3(){} public: fct_for_everyone(){} }; class F{ }; [/CODE] F is a friend of C, so it has access to fct1,fct2,fct3. But in real life, friendship has limits! You don't want to reveal everything! So is there a way in C++ to …

Software Development c++
Member Avatar for mike_2000_17
0
161
Member Avatar for getmet

I cant see to figure out what im diong wrong here... many errors [CODE]public class Card { private String suit; private int face; public static void main(String[] args) { Card allSuit[] = new Card[4]; for (int i = 0; i<allSuit.length; i++) { allSuit[i] = new Card(); } allSuit[0] = new …

Software Development java
Member Avatar for Ezzaral
0
203
Member Avatar for Tcll

does anyone have any note on rewriting C/C++ programs in Python?? google and bing give me the exact opposite, and I've got a headache from searching... please note that I can't read C++ if you need the program I'm rewriting, please let me know

Software Development c++ python
Member Avatar for JoshuaBurleson
0
2K
Member Avatar for justMarshall

I've created a user control with a simple text box and a corresponding label and added a few custom control properties. When added to a form, I'm trying to loop through all control of this type and evaluate the custom property. In the below, the cntl.MyCustomProperty is not recognized. I …

Software Development vb.net
Member Avatar for justMarshall
0
228
Member Avatar for bigredaltoid

Disclaimer: I am not looking for a full answer to this lab, only hints. I know people get frustrated when others ask to do their homework for them. ;P Hey guys - first post here, although I have used this website many times to assist me with my Programming classes. …

Software Development python
Member Avatar for TrustyTony
0
405
Member Avatar for bibiki

Hey there, I built the following app; A frame that with three sections inside it. Each section is actually a panel. The first panel is a form I use for saving soccer matches on my database; The second holds only one button that reads textfields from the form above and …

Software Development java
Member Avatar for bibiki
0
557
Member Avatar for getmet

i get no GUI when i run! import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Calculator { private JTextField resultTF; private JButton calculateB, numbersB[] = new JButton[11]; public void driver() { //Create Window JFrame calc = new JFrame("Calculator version 1.0"); calc.setSize(500, 500); calc.setDefaultCloseOperation(calc.EXIT_ON_CLOSE); //Get the content pane (object of type …

Software Development gui java java-swing
Member Avatar for JamesCherrill
0
208
Member Avatar for M.S.

Hi All How can I select some random names from a list, so that in next time, those previously selected names become omitted from the list? for example, say we have 100 names in test.txt file, and we want to select 3 names randomly. then by recalling the selection function, …

Software Development python
Member Avatar for M.S.
0
6K
Member Avatar for Will Gresham

Hello all, I have an issue with a class I am writing which is supposed to be able to multiple 2 matrices together. The issue I am having is not the actual multiplication (That bit works, thanks for the pointers yesterday). The problem, or so I assume, is with my …

Software Development c++ matrix-multiplication
Member Avatar for Fbody
0
157
Member Avatar for JoshuaBurleson

Just fooling around I came across an issue updating a digital-clock like label. This: [CODE]self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock=ttk.Label(self,text=self.now) self.clock.pack() while True: self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock['text']=self.now[/CODE] simply freezes the program, I've managed to get it to update on certain events like the user hitting a button but …

Software Development python tkinter
Member Avatar for JoshuaBurleson
0
217
Member Avatar for Zssffssz

Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex")

Software Development c++
Member Avatar for Narue
0
205
Member Avatar for Zssffssz

Sorry about the typo in title. Ok my school is addicted to making us mad and have blocked command promp that I brought my copy from home on a floppy disk and it blocked me. So what I need is a few alternatives for these: cls - clears the screen …

Software Development c++
Member Avatar for Narue
0
139
Member Avatar for fullarmorzz

please help me. my program is working but not displaying the table but i followed the syntax for the two-dimensional array. how come the program does not display the table? here is the code. :D [CODE] #include<stdio.h> #include<conio.h> main() { int x[5][5],a,j; for (a=0;a<=5;a++) for (j=0;j<5;j++) x[a][j]=(a*4)+j+1; for (a=0;a<=5;a++) for …

Software Development c
Member Avatar for fullarmorzz
0
94
Member Avatar for rotten69

Hi everyone, I am doing a Java course at uni at the moment and it kinda doesn't make you become a real programmer with the confidence that a programmer should have. I really want to program in Java and any language(not python though because it is not a user-friendly programming …

Software Development java
Member Avatar for rotten69
0
191

The End.