43,549 Solved Topics
Remove Filter ![]() | |
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 | |
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 … | |
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 … | |
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++ | |
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 | |
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; … | |
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 … | |
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 | |
[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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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] | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
iv taken a list of bakery items from user in doubly linked list.. but remove func isnt working................ :( Software Development c++ linked-list | |
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 | |
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 … | |
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 :) | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
| |
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 | |
[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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex") Software Development c++ | |
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++ | |
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 | |
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 |
The End.