64,152 Solved Topics
Remove Filter ![]() | |
Hi. This is for a phonebook assignment. Part of the assignment involves searching a 2D array. This is the function that reads the phonebook file. [code] void getData(char name[][NAMESIZE], char telephone[][PHONESIZE], char zipcode[][ZIPSIZE], char address[][ADDSIZE], int& size); ~~~~~ void getData(char name[][NAMESIZE], char telephone[][PHONESIZE], char zipcode[][ZIPSIZE], char address[][ADDSIZE], int& size){ int … | |
Hi. I am attempting to update a Jtable with details of all the files on my computer. I am running Windows XP home edition version 2002 with service pack 3. Intel(R) pentium(R) 4 CPU 3.20 GHz [ICODE] for (int i = 0; i<r.size(); i++) { Vector v = new Vector(); … | |
Hello all, greetings! I'm python guy and I want to access Lame encoder from python. The big problem is I cannot find suitable lame bindings. After loooong googling and metacrawling, I found py-lame. The problem is, when I try to compile it in codeblocks, python.h is missing. I don't know … | |
In thread [url]http://www.daniweb.com/forums/thread157149.html[/url] I was asking for different alternatives for passing a node as a parameter to an XSL stylesheet called from Java using saxon. I set up on using the XdmNode object as a parameter for passing the parameter and here is a code extract: [code=java] // create a … | |
Ok, I have this dilemma reguarding the building of querries. I have a website that browses hotels. The user can select the region and the quality of the hotel via some dropdown boxes and then he is offered weather the search results should include certain options that the hotels should … | |
I have this assignment where I write certain lines from an input file. These lines I'm looking for in this case is only identified by its following line ("EOL"). It goes like (shortened): [CODE]while True: line = infile.readlines() if not line: break linesplit = line.split(",") line = line[:-1] if line … | |
Hi Guys, I have some confusing part in the sql command the question is i have 2 different query : a)[code=sql] Select SUM(T1.Amount+T2.Amount) as Total From TABLE1 T1 INNER TABLE2 T2 ON T1.ID = T2.ID[/code] b) [code=sql]Select Sum(Amount) as Total FROM TABLE3 [/code] the result if a) query is 100 … | |
Here is the code: [CODE]// All this has to do is take the "names.txt" file, and send it to "backwards.txt" // in reverse order, as an array. No idea why its not working, sent all necessary files with it. #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <ctime> using … | |
Here's the code: [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <string> #include <ctime> using namespace std; string getData(ifstream &fin, string array[]); //string getData(ifstream &fin, string array[]); This is what it SHOULD look like. void outputData(ofstream &fout, string array[], int numNames); //void outputData(ofstream &fout, string array[], int numNames) int main() { … | |
I'm working on an assignment and when I run the application I get the message Build Successful, but the Form doesn't show up on my screen. How do I make the Form appear? | |
I have rebuilt numerous navigational buttons into CSS (.button {backgroung-image ETC) to reduce the number of http requests. It works fine (better loading time and so forth) except that the images are "seen" as unsecured. My thought: Possibly move or copy the images in question from http to https. [B]But … | |
Here I am again with new problem. I want to do some calculation on each field row after row. The for loop which I tried is not giving me what I expected [ICODE]#sum each 5 fields over the raw: for step in range (6, N, 5): for i in range … | |
Hello, This is my first post on DaniWeb, so I hope I did it OK. Anyway, you'll notice that in the top of every window you have standard close button (the x in the red box). I was wondering if it was possible to remove at this runtime, using VB6, … | |
everything works fine on my app until I add a menu. Every button every field, everything ends up stacked in the top left corner. as soon as I set the menubar to the main frame and run it collapses. I have like 5 sizers that get added to a final … | |
[code] int numOfMonths = numOfYears * 12; float monthlyRepayments; float actualRate = (rate/100)/12; //monthlyRepayments = (borrowAmount*(pow((1+actualRate),numOfMonths))*actualRate)/((pow((1+actualRate),numOfMonths))-1); monthlyRepayments = (100000 * (pow((1+actualRate),180) * actualRate))/((pow((1+actualRate),180))-1); [/code] Ok this is the actual equation: (100000*(1+A1)^180*A1)/((1+A1)^180-1) btw A1 =0.06/12 So the commented line is original one I tried, didn't work. So I tried just putting … | |
I'm working on a project for school where we have to read from a voters database which is set up in the following manner: voternumber:voternama:havevoted Ex: 1253:Bill Simmons:false 3244:Steve Jobs:true I made this algorithm to search for a voter by ID number but for some reason it keeps coming up … | |
How do I change the icon of the exe. in console mode? (as part of the exe itself) :?: | |
Hey all, I apologize now for being a Noob. I'm using a Tutorial to learn VB6 (for starters) and everything was going great until just now... The assignment is to create a [URL="http://www.profsr.com/vb/vbless04.htm"]Weekly Payroll[/URL]. I have managed to figure out how to make the standard calc ( Hrs worked * … | |
hi im a noob in C#. just learning by my self. need to know how to assign values to variables. which we input normally in C we use scanf ne. but in C#. how we gonna assign | |
Hey I have a problem that annoys me a lot.... i want to extract all titles and songnames within a file, a *.pls file to be exact. ive read the entire file from beginning to end and ive splitted the text like so.. string[] titles = readpls.Split(new string[] { @"\n", … | |
Hi! In the following code- [code=php] <?php header('Cache-Control:no-cache'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action="<?php echo($_SERVER['PHP_SELF']);?>"> <p> <label>Name: <input type="text" name="txt" id="txt" value="<?php $_POST['txt'];?>" /> </label></p> <p> <input type="submit" name="b1" id="b1" … | |
| |
What is the best way to kill a number of PIDs that I've isolated from an external file? So far I've done grep PID badPids | awk {'print$2}' to get the list of bad PIDS to kill. I've searched through the man pages to no avail and I need to … | |
OK, just a quick question. What is a good sound library I can use to play files? On a slightly unrelated note, what is one I can use to generate sounds (tones, like 8 or 16 bit.)? I would very much prefer it to be open source and platform independent. … | |
hello, for one of my programs I need to acquire the decimal off of a number, for example, if a double has value of "123.45" I need an int to have the value "45". to do this, I have the following code [CODE] double value, tempValue; int decimalValue; value = … | |
How do I make a variable a random value between 1 and 10 each time the program loops? I want to have a "I'm thinking of a number between 1 and 10..." thing, and then you have to guess the number, but I don't want the number to be the … | |
Hi everyone, I am working on a checkbook balancer for school and my code looks like this: [B]def process(balance): trans_type= raw_input("Enter Deposit(d), withdrawal(w), print(p), or quit(q):") amount=input("Enter the amount:") if amount<0: print"You've entered an invalid number." if trans_type=="d": balance=int(balance)+int(amount) print"Your current balance is", balance elif trans_type=="w": balance=int(balance)-int(amount) print"Your current balance … | |
I have a program that asks for a knights coordinates and prints out all possible moves. That works. What doesn't work is if it is not a legal place for the knight (i.e. off the board) it prints an error but also prints coordinates for -1,-2. not sure why. Any … | |
Is it possible to have a dynamic operator? I know I could parse it out and find the symbol just wondered if it was possible. [code] string aString = "5"; int a = 5; int b = 6; string op = "<"; //want to do something like dynamically without checking … | |
I'm starting to learn c++. I use vista so lots of ide's dont work for me. Right now im trying visual c++ but things like cout are not understood when compiling. This may be a compiler issue. I all would like to know is a good basic (for beginers) ide … | |
ok, I have created a mobile application for a java enabled phone. I want to make the classic pong game with one paddle, and a number of blocks to break. I have managed to get the ball bouncing around the screen and off the block using a set of if … | |
I am trying to make a simple engine with WinAPI and I encounter this problem: [code] class Window { .... public: [COLOR="Red"]static HINSTANCE hInst;[/COLOR] .... }; .... .... .... int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; [COLOR="Red"]Window::hInst = hInstance;[/COLOR] .... .... } [/code] The … | |
The function that I am having a problem with is in the middle of this seperated from the rest of the code. [code=c++] #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception class -- cannot open input file { }; struct EdgeNode // Structure … | |
Hi , what are the steps to make a .net application launch automatically when the computer is booted.I am working with c# , so a solution in VS 2003/5/8 or links would help. Thanks - | |
Hi, i have the following script: [CODE] #!/bin/perl -w use strict; $ENV{"PATH"} = ".;" . $ENV{"PATH"}; print "Revesing the history file...\n"; print reverse <> history.txt > history_rev.txt; print "Reversing the XpressClients file\n"; print reverse <> XpressClients.txt > Xp_clients.txt; print "Parsing the XpressClients file...\n"; require 'Clients.pl' Xp_clients.txt > clients_file.txt; [/CODE] the … | |
I have a 2d char array and i need to find the position of a specific char in the array. what method can i use. return Arrays.binarySearch(this.matrixCopy, "S"); does not work it keeps returning -1 when there is an S in the array. | |
i have set up a mysql db for storing news articles to be displayed within a flash website. i have now been asked if i could add an image upload function to this section. i have created the upload page and i can upload the images to the db fine. … | |
Hi Everyone, I'm designing a database for a Motoring School and I've been given the following information: • Pupils book either a single lesson or a course of lessons. Pupils are allocated a particular instructor when they register with the school. Sometimes, pupils ask for their instructor to be changed. … | |
im beginner in visual basic can anyone help me please? i have 1 command botton and 1 picturebox my command button name is Switch every time i click my command button Switch the image in the picturebox change for example i have already an image in the picturebox Sunset image … | |
parseInt does not seem to be throwing an exception when I pass a letter of the alphabet to it. I assume this is because ASCII letters are treated as integers. So my question is, is there a method that will do this: boolean isLetter(); And if not, how do I … | |
is there any possibility to access server php ini file ??? if i enable to get work asp tags in php ,but it is not working in server... how do this possible??? thanks shanti | |
I'm new to link lists and have to write a few modified functions from the book to do additional things. I have to modify insert to insert by the 2nd number passed in and have it replace that position and move the number that was there up. It's inserting the … | |
I working on assignment to create bank management GUI with swing. Right now I'm messing with login. Instead of using JDialog as many may suggest to use I used JFrame. [attach]8150[/attach] In case of any error messages on login attempt I wanted to display error above all previously displayed content, … | |
Hello All, As plain as the question is: I'm compltely newbie in PHP but in near future I plan to study PHP. I now Learn Python and need to Get acquanted with PHP as well as C++. My Question is, IS THERE ANY FREE BUT LEGAL Books ready for download … | |
Hi guys, I'm having some problem with my C++ assignment. Can't get this part down. [CODE=CPP] class Date { private: static const int daysInMonth[13]; int monthNo, year, day; string month; bool validDate, leapYear; public: void displayDaysInMonth(); void displayDate(); void enterDate(); void verifyDate(); void displayOptions(); void ahqError() {cout << "Error! Enter … | |
I have created a page with a number of frames. One of the frames has a form with a submit button. On submit, I want to close the entire page (ALL the frames) and open the new page in a fresh window. How do I do that? | |
I have a programming assignment for CSCI180. The assignment is to create a recursive function power(base, exponent) that when invoked returns base ^ exponent. Everything compiles correctly and when i run the program i enter the base and exponent like prompted. But then the program stops working and i cannot … | |
I have a small WxPython app using the CalendarCtrl module, which works fine. I have it set to bring up a grid of times for a particular day's appointments when I click on one of the days. But I don't see how to detect which cell of a grid I … | |
Hey guys, I've got a fairly simple script which I'd like to convert (if possible) into a Windows DLL so that I may use it in conjunction with some of my .net projects. Is such a feat possible, if so where do I begin? I've read that there's a book … | |
Hello, I have an application where (and this is probably not how its done but something I'd like to do) the user clicks a button which brings up another form with 2 text boxes. The user enters text, and then clicks ok. The user entered text is then passed to … |
The End.