64,152 Solved Topics
Remove Filter ![]() | |
I know C++, but I'm trying to learn C. Anyways, what am I doing wrong here. If I delete the line with 'scanf', it will compile so obviously I'm doing something wrong there. Anyways... [CODE]#include <stdio.h> int main() { int x; printf("enter a number\n"); scanf("%d", &x); printf("Your number is: %d\n", … | |
need a[CODE][/CODE] in C that converts any given BCD to GRAY Code, and any given GRAY to BCD. I am a started so little halp ;) | |
Here is the code I have so far. I'm not sure how to proceed from here. My goal is to make a program that outputs the probability of n amount of coin tosses, where n is the user input. [CODE]import java.util.Scanner; public class toss{ public static void main(String[] args){ Scanner … | |
I tried to use the code on MSDN to create Rawinput but i kept getting this error: RAWINPUTDEVICE was not declared in this scope. I am writing in c++ and direct x and i am using Code Blocks [ICODE] void RawInput(void) { RAWINPUTDEVICE Rid[2]; //keyboard Rid[0] .usUsagePage = 1; Rid[0] … | |
Im an AP computer science studen (we started two weeks ago so I dont know much). For homework we had this problem: " Write a program that will let you enter your gender (M or F) and your height in inches and will then tell you wether you are tall,medium … | |
I'm programming a program that add feet and inch together(assume feet and inch are integer). I run into a compiler error. I know the problem is I'm missing the returning statement. But I don't know what to return. [CODE]public class Distance { private int feet; private int inch; public Distance() … ![]() | |
I just finished a program, it worked perfectly, then I changed a bit of it, and now it won't work at all, even if I change it back. [CODE]self.secret_txt = Text(self, width = 35, height = 5, wrap = WORD).grid(row = 3, column = 0, columnspan = 2, sticky = … | |
hello, i started programming again after a while and i made this just to pass time/relearn the basics and stuff there is a weird issue that i can't figure out, when i input row 0 column 2 or row 1 column 2 it will fill the spot for both the … | |
Ok, working on a blog engine. Small and somewhat unimpressive, basically following along with a tutorial. The tutorial basically has me write a little MySQL to query some test fields that we filled in manually. And here is what I get. (see attachments) The first one shows the read out … | |
hi i have a datetime picker in user control form in C#. when i load the user control i want the datetime picker to disply no value in the datetime picker box. the code is below. [CODE] dpEDate.Format = DateTimePickerFormat.Custom; dpEDate.CustomFormat = " "; [/CODE] and when the user control … | |
I'm try to make a program that will ask a user to input a string then the string gets masked (by asterisks) and later, guess every letter (character) of the masked word until the string is fully unmasked (a la Hangman). But my problem is, after the first unmasking, the … | |
Hey, I need to know what identifier i can use instead of string that will output all of the words that you type in the program. For example: if i was to use string ans1; cout <<"How are you?: "; cin >>ans1; and for my answer i typed "very good"...it … | |
I'm having an issue displaying images in tkinter, I've tried the methods suggested by effbot and a couple other sources to no avail. Here are a couple ways I've tried so far:[CODE] gmail=PhotoImage('gmail.gif') self.glab=Label(self,image='gmail.gif') self.glab.image=gmail self.glab.grid(row=3,column=4) gmail=PhotoImage('gmail.gif') self.glab=Label(self,image=gmail) self.glab.image=gmail self.glab.grid(row=3,column=4) self.glabim=PhotoImage('gmail.gif') self.glab=Label(self,image=self.glabim) self.glab.grid(row=3,column=4) gmail=PhotoImage('gmail.gif') self.lab=Label(self,image=gmail) self.lab.image=gmail self.lab.pack() [/CODE]the last one … | |
Hi, I got a doubt about for loop while i was thinking about time complexity.... Is increment operation in for loop a two steps operation i.e., increment i and assign it the i or an one step operation just like just incrementing it? Is there any pointer operation involved in … | |
Hey. I'm creating a second degree equation solver in the windows form application.(In the form ax^2+bx+c= 0) And the basic programming is complete but I'm having problems making it bullet proof, in case the user type in the wrong number and type in a =0. So basically i have an … | |
hi friends how to send post value in url code is: header('Location:edit_products.php?catid=$_POST[catidHd]&catname=$_POST[catnameHd]'); the $_POST[catidHd] value coudnt taken how to give this $_POST[catidHd] in url tnx | |
i am fixing something and i have that fuction in it [CODE]bool DeckOfCards::checkFlush(const Card checkCards) { counter=0; cardCheck=" "; for(int x=1;x<5;x++) { cardCheck=checkCards.suits[x]; for(int y=0;y<5;y++) { found=hand[y].find(cardCheck); if(found!=string::npos) { counter++; } } if(counter==5) { return true; } counter=0; } }[/CODE] it goes here: [CODE]bool result=false; if((result=checkFlush(checkCards))==true) { return winner=5; }[/CODE] … | |
This question is in regards to the little dynamic image that you can link to in your Daniweb profile (see profile page, bottom right). I was curious how Daniweb is set up to dynamically create these images. I would like to do something similar on my site. Could Dani share … | |
Hello Everyone Currently, I am using system("dir") method to call system calls. I want to know any other method for system calls in VC++ 2008. How can I call system call in VC++2008 without using system(" ") method? Any help would be appreciated Thanks | |
i have a problem in VB6. i have a frmMain, DataEnvironment and Datareport. My form have thirty (30) textboxes to fill-in. at first it all works fine since i filled in only few txtboxes, but when i filled-in all textboxes with many data i could not save the data anymore... … | |
hi frns how to remove & and space from a string.i just gn in url. wn i get this name using request only the door comes rest will be cut.how to remove & and space prod.php?name=Door%20&%20Window%20Hardware tnx ![]() | |
i want to listview editable it's possible?? please help | |
Hi, I have a MySQL database and an array with ID's. For example: $q = array(4,7,9,34,12,3,...etc); The ID count in array can be over 100. What's the best way to select only those rows matching those ID's in array? The usual SELECT * FROM table WHERE ID = '$q[0]' OR … | |
Hi, I am trying to generate javadoc from the file "C:\Program Files\Java\jdk1.6.0_26\src.zip" by using the command "javadoc". But I am not able to do it. How to use that command? | |
Hi, My application is in VS2008 coded in Vb.net I have a datagridView on one of my form.This is filled from the database at the load event of the form.The datagridView also has a column of type DatagridViewComboboxcolumn. This DatagridViewComboboxcolumn already has 4 values added to it in its collection … | |
If have a java program with 4 JTextField. In my JButton add, the event code goes like this: [CODE]add.addActionListener( new ActionListener() { //Handle JButton event if it is clicked public void actionPerformed(ActionEvent event) { try { String add = "insert into person (firstName,middleName,familyName,age) values ('"+inputs[0].getText()+"','"+inputs[1].getText()+"','"+inputs[2].getText()+"',"+inputs[3].getText()+")"; st.execute(add); //Execute the add sql … | |
![]() | Hi guys, I have the following coding and i would like to save it using save file dialog. Any idea? Thnx. [CODE] Dim numCols As Integer = dgvExp.ColumnCount Dim numRows As Integer = dgvExp.RowCount - 1 Dim strDestinationFile As String = "c:\username.txt" Dim tw As TextWriter = New StreamWriter(strDestinationFile) 'writing … |
In a library file (dll) I know you can modify an existing property and the exe continues running without recompiling. If you add properties to the dll class and if it isn't critical that the exe knows about them, would the exe continue working without recompiling? Personally, I'll bet not, … | |
I am having an issue in my project trying to developing a mail webservice but getting an error transport failed to connect to server. Below is the code... [code] protected void btnsubmit_Click(object sender, EventArgs e) { MailMessage mail = new MailMessage(); mail.From = "ruchi.dubey18@gmail.com"; mail.To = txtTo.Text.Trim(); mail.Subject = txtSubject.Text.Trim(); … | |
I have two projects: [B]SQLtesting [/B]and [B]Controls[/B]. Their physical locations are: C:\My Documents\Visual Studio 2010\Projects\SQLtesting\SQLtesting\ [forms reside here] C:\My Documents\Visual Studio 2010\Projects\Controls\Controls\ [forms reside here] The code shown below works fine. I run it from the project SQLtesting. It loads a listbox and a checkedlistbox with the controls found on … | |
Hey guys! I am kind of new to Java and am having issues understanding why this code will not run. Any advise would be greatly appreciated! Thanks in advance! [CODE] // Phone.java // Program creates a GUI that resembles a phone with functionality. import java.awt.*; import java.awt.GridLayout; import java.awt.event.*; import … | |
Hi. I have a system where a user fills out some information. There can be multiple answers, so I've made a script that adds a new text box if you click a button. My problem is, I don't know how to process it in PHP. The script will create a … | |
This topic is really hard for me to grasp. I tried making a program to test out operator overloading and I can't seem to get it to work. [CODE]#ifndef TESTCLASS #define TESTCLASS using namespace std; class testClass { public: testClass(double, double); friend testClass operator+(testClass& a, testClass& b); private: double num1, … | |
Hey everyone, this should be simple, but I keep running into errors so help is greatly appreciated. I have a large class, call it class A, which has several methods. Most of these methods modify data. [CODE]ClassA() def __init(X,Y,Z) ... .. def data_mod1(): ... def data_mod2(): ... [/CODE] I'm dealing … | |
I am having trouble debugging in sharepoint. It is acting like I am debugging a different dll than the one I made code for. When stepping through it will skip lines occasionally and randomly just stop debugging. Often it will start debugging then stop randomly and show any new breakpoints … | |
I want to make an application in vb.net which will allow user to use mouse in a different way. i.e Dwell Clicking. Suppose user moves mouse pointer at particular location and if the user doesnt move the mouse pointer from that location for 2 seconds then single click will be … ![]() | |
Hi, I have an XML file that I am trying to parse and then sort into an re-ordered list. Currently the XML file is ordered via date ascending i.e. oldest item first, newest last. I know how to parse an XML file using 'XMLNodeList - GetElementsByTagName' but what would be … | |
Hello friends..! I tried to implement HeapSort algorithm in Java. but I've got some problems. First I should say that I have tried to implement the algorithm mentioned in the book "Introduction to Algorithm". the first question is how we can maintain the heap size? The book doesn't help with … | |
Hey everyone. I've been contemplating something lately and I haven't been able to come to a conclusion, so I thought I'd see what you all thought about it. When checking for null (nevermind that we should try to not make something null in the first place), would it be better … | |
Hi all, I've declared a static int variable call Click=0; in the Pay.Designer.cs. then i just want to get the value of it in a button click of another form. But it says : [B]The event 'System.Windows.Forms.Control.Click' can only appear on the left hand side of += or -=[/B] It … | |
Hello, I have this code that's giving me some problems: [CODE]import java.util.Scanner; class Bæreevne{ public static void main(String[] args) { int avstand, vektTre, vektBetong; Scanner tastatur = new Scanner(System.in); System.out.print("Oppgi antall meter mellom søylene"); avstand = tastatur.nextInt(); vektTre = 3000 - 20*avstand*avstand; vektBetong = 7000 - 80*avstand*avstand; if (vektTre > … | |
I'm having trouble with the 3rd if statement of my code if(select == 3). Here, if the user selects '3', then they should be able to search for students (given that students have already been inputted), via their ID. The ID that is searched and the subsequent Name relating to … | |
well...i tried in google...but actually i didn't quite get it. :) [url]http://www.thinkage.ca/english/gcos/expl/c/lib/fflush.html[/url] in the above link they are saying, user should definitely NOT write code of the form [CODE]printf("Prompt: "); fflush(stdout); gets(s);[/CODE] but before we used fflush after printf...for example [URL="http://www.daniweb.com/forums/post1168561.html#post1168561"]here[/URL] jephthah gave a solution where he used fflush after … | |
Hi everyone.. I was going thru php interview questions and came across these doubts. [I]What does a special set of tags <?= and ?> do in PHP? - The output is displayed directly to the browser.[/I] I saw this in a blog written in 2005 is this still valid or … | |
hi, i wrote the following piece code to create a new bitmap file with random RGB values. I wanted to copy the header from the input file. the problem is it adds two additional bytes to 3rd and 4th (just after the magic number). i can't figure out why. // … | |
Hi guys, I'm wondering if anyone can help. I have surryussface flu and I just can't seem to concentrate at all. I need to be able to select a colour from a list like the attached image. I've managed to code it right up to the part where it can … | |
Hi all, I want to show Form2 when button1 of Form1 is clicked. how would i do it. this is what i was trying to do.But it is not working But it gives me an error ; The event 'System.Windows.Forms.Control.Click' can only appear on the left hand side of += … | |
Hi, i am creating a windows application in c# while making an exe i want to add setup of sqlexpress. how i can add this so it will install when package is install. I have add prerequisties in properties to add windows installer,.net framework,sqlserver but it seems to be not … | |
Hi! I am coding a quite simple php form where many of the input forms are going to be filled with numbers. Is there a simple way I could get the numbers separated by thousands? Like the form showing 100 000 instead of 100000? Thanks in advance! |
The End.