199,114 Archived Topics
Remove Filter ![]() | |
Hi all, I'm looking for a function that releases the CPU for the current executing thread. What I'm doing is implementing a multi-threaded approach to sum table calculations, and using OpenMP for multithreading. Here's the problem: I have a thread that depends on a number of other threads to finish … | |
I am new to this website, and coding as well, so please bear with me. I have a program that i'm trying to fortmat the output into a single line. The output should read : HHHHHTTTTT Number of Heads: 5 Number of Tails : 5 where the values change per … | |
i am trying to make a program that takes an object oriented approach to calculating the miles per gallon that your car gets. this is early in the process an i am aware that alot of stuff is missing. i am just trying to get it to work enough that … | |
Hello, I'm new to C and having this problem. What I need to do is add a single integer (0-9) to an (obviously char) string. More specifically, I want to add the value of a function that returns an integer (0-9) to a string. I don't want to change the … | |
Heya guys. I'm having a real problem with one of the examples on my java homework and was hoping one of you guys/gals could help. I need to write a program that allows the input of five numbers. Then the final output line(s) need to say which is the highest … | |
I'm getting the same very large number for item and for each element in the array after that for loop is done. Why am i not pulling the 6 numbers from my input file? Thanks. [code=c] #include <iostream> #include <fstream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) … | |
I have a quick question regarding precision printing output to cout. I need a way to print a MINIMUM number of decimal place digits to cout and also possibly have a maximum number of decimal places printed. Also, I need a way to "undo" if you will a call to … | |
Hi when I send 1000 byte with socket.send , I always recieve 1000 byte with socket.recieve. I know it shouldn't be true for general but because 1000 bytes is a small amount can we be sure that it will not fragmented? I tested it in visual studio and until 8KB … | |
I have the following driver for my template class the parameter being passed to the template is another class, the error I get is Error line 28 : templateclass.h std::ostream<<ballteam is illegal driver.cpp line 30 Where instationating templateclass<ballTeam>::print const () driver [code] #include <iostream> #include <fstream> #include "arrayListTypeT.h" #include "ballTeam.h" … | |
Student Problem: "I am trying to get the code below to compile which is from my textbook [I]"C++ How To Program (6th Edition)"[/I] Fig. 4.9. However, I keep getting the "Fatal Error LNK1561: Entry Point Must Be Defined" every time I try to build the code." What I Know So … | |
Hi, I am trying to use strings, and even a simple program like this doesn't work. [CODE]#include <iostream> #include <string> int main() { string Hello; Hello = "Hello world!"; cout << Hello; cin.get(); }[/CODE] I am using Borland C++ 5.0, and it gives me this error. "String does not name … | |
In my c++ book they give a program that finds the prime numbers between 1 and 100. The problem I am having trouble understanding is the logic of the second for loop. I know what it does but not how, if that makes any sense. [CODE] #include <iostream> using namespace … | |
I want to allow certain characters to a string For example I want strA to contain either 'A' or 'B' or 'C' or 'D' How do I do that, help would be greatly appreciated. Thanks strA = 'A' or 'B' or 'C' or 'D' | |
I have to write a program that diaplys a tic tac toe board with random x's and o's. I have having severe issues with the random part. I also dont know what to put for arguments in the JButton methods, but I think my issues are realted. Any and all … | |
Hi, I've been writing a program that encrypts and stores passwords (it's for uni, I'm a newbie), and I'm having a problem with some misbehaving variables. I hope someone can shed some light on it for me. :) I have a function which takes a string as a parameter and … | |
Hi... Can anyone tell me (from scratch as I've not done this before) how I can stream live through modem-to-modem connection. The modem here refers to dial-up modem (PSTN modem), there is no internet/lan involved. It will be 2 programs, the first is to transmit real-time video from webcam, and … | |
Hi, I'm looking for help writing a program to check an input file for errors in its pattern. Basically, I've got a file of thousands of lines like this: "70 20000731 210202 19 36005 354 55.369 -37.207 -54 0.847 491 0.981 0.985 278977" I have no trouble opening the file … | |
I'm having a tough time figuring this out. we need to fill in the blanks [CODE]import ____________ def wordCount(): lineCnt = 0 wordCnt = 0 charCnt = 0 list = [] ______________ = _______________("Enter the filename : ") file = ________(filename, __________) for _________ in file: ____________ += 1 list … | |
Hello, I've attached my code, I keep getting the Debug Assertion failed, Expression: string subscript out of range error I can't find any errors in my logic and code for the functions, but obviously something is wrong, no matter where I put breaks, i still get the error when debugging. … | |
N00B. I keep getting a segmentation fault when I try to substitute a word with another. I'm using this tutorial as an example but don't seem to get it right: [url]http://www.cplusplus.com/reference/clibrary/cstring/strstr/[/url] [CODE]#include <stdio.h> #include <string.h> void REPLACE(char STRING[]) { char *MONTH[] = {"January","February","March","April","May","June","July","August","September","October","November","December"}; char *MES[] = {"Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"}; int B = … | |
hey guys.. I wana implement a stop watch in python... The timer turns on when my program starts and continuesly shows the time spent until the end of the program.. Can someone please help me with this..?? | |
hi all i need some help with time.h for in the following: i want to make a programme in which while time is 12:00 PM, It prints a Web-page USING time.h thx,,,, kim00000 | |
![]() | I am trying to add a path to sys.path fix an error importing numpy. If I do: [CODE]import sys sys.path.append('/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages') print sys.path[/CODE] then path that I just added shows up and import numpy works. However, if I restart IDLE and try to import numpy again, I get an error. How … |
I have an assignment to write a program using 1D and 2D parallel arrays with input coming from a .data file given to us. I am nearly a complete novice with writing code and right now I am having a very hard time getting my program to write any values … | |
I am trying to get a grand total from a shopping cart page and am not sure how to do that. I have the total that loops through each section but I want to display the grand total from all of those sections at the bottom of the page. Can … | |
As I am new to MySQL, I dont know how to connect my jsp page to the MySQL Database. So please help me by giving some code on how to connect. I have downloaded driver for Java named as Connector/J. MySQL version is 5.0. In this line con = DriverManager.getConnection("jdbc:mysql://localhost/JSP_MYSQL?user=root&password=admin"); … | |
I AM HAVING A HARD TIME WITH STRINGS. I DO NOT FULLY UNDERSTAND IT. THIS IS FROM A BASIC INTRO C++ CLASS HW PLEASE HELP THIS IS THE QUESTION Write a program that uses cin to read a given name (like Louis) and a family name (like Armstrong) into two … | |
I am trying to create a 2d array list but it is giving me a compiler error pointing at the first line of the function. I don't really get what is causing the problem. I am pretty good in C++ but Java has some new rules that I am trying … | |
aslmolikum im new member here, hope u ppl ll welcum me warmly, i m student of MIT, im having problems in C++ so i want to learn from here, plz help me out,..... | |
Hi, Can some one tell me how to create elements like (text, tables) in memory, then edit them in memory and finally print it on a file. Thanks, K | |
{-='Reads ten integers and prints the first and the last on one line using Dev-C LaNGuaGe'=-} | |
My code is [CODE]def is_base_pair(str1, str2): if lens(str1) == 1 and lens(str2) == 1: if (str1 == "A" and str2 == "T") or (str1 == "G" and str2 == "C") or (str1 == "T" and str2 == "A") or (str1 == "C" and str2 == "G"): return True else: return … | |
Hi I have a pointer generated in a method. And this pointer is input to another object. So at what point I have to delete this pointer? [CODE] method() { TEnemyCharacter *tenemyCharacter = new TEnemyCharacter(this); } [/CODE] So how to delete this tenemyCharacter. I cannot use delete tenemyCharacter; at the … | |
I am writing a script to add and edit listings in a realestate site. For some reason I can't get the variables from the url to recognize properly. heres the "problem" part of the script: [CODE] <?php require_once "../dbconnect.php"; // include the database information // if the 'mode' is set … | |
how do i get started with MySQL and get the command prompt like MySQL monitor to write the command for creating a database in MySQL? | |
Hey guys I'm a bit confused here as I haven't edited a renderer before. My situation is that I have a custom object that I have created. It has a few jLabels, textboxes, and a combo box. And what I'm wanting to do it make it display on a jList. … | |
I have a dicationary [code=python] x={'symbol':LTV,'user':derek,'where':home,'time':night} [/code] Obviously when u print it the dictionary doesnt keep the order you put them in. how do i have a dictionary that has it the way i input them? I looked online, but not sure to you cmp, lambda, etc? Thanks for the … | |
Hello, Ihope to find some help in here, i have the following diagram [URL=http://img143.imageshack.us/i/13503390.jpg/][IMG]http://img143.imageshack.us/img143/6704/13503390.th.jpg[/IMG][/URL] and i want a query which return Emp_ID, Pro_ID note; i can get these values but by 2 queries as the following; [code=sql]select Pro_ID from Projects where Dep_ID in (select Dep_ID from Departments where name = … | |
I want to check by a c program that in a system Microsoft Visual studio Runtime is present or not. The system might not have complete package of Microsoft Visual studio but we can run a c or c++ program using Microsoft Visual studio Runtime(MVSR) I want to know that … | |
Return the longest odd-length palindrome centered at the int index in the str. Assume that the index is valid, that the length of the str is at least one, and that there are only lowercase letters: no punctuation, spaces, or uppercase letters. I just want to know what this question … ![]() | |
hi! i'm trying to write the code to open the file and read the contents and write to another file with uppercase but the problem i'm having is path problem everything seems pretty fine but it says Steam != NULL , as long as i know its could'nt locating the … | |
I know how to handle multi-dimensional arrays, but whats the best way to represent them on a form?? Not sure how best to describe the problem : / Its an order form. Each row represents a product, each column represents the week we're ordering for. The problem is the order … | |
I am reading in files containing 238 x 1 feature vectors. Attempting to grab the first 2 numbers in each file to create a 2d plot using numpy. I've got a decent start, just am stuck on how to fill the np array that I want to plot. [CODE] import … | |
Hi, I have a computer that has Win-2003 and SQL Server 2005 Installed. I checked my client and server both are giving the response to each other using ping their address. I created a string as: ---------------------------------------------------- Public conn As New ADODB.Connection Public rs As New ADODB.Recordset Sub main() Set … | |
I have tomcat 6.0.18 running on my laptop. Tomcat is installed under my /home/xxx/bin directory. However, after I start tomcat, I'm unable to connect to tomcat through my browser but my eclipse is able to do so. I do not get any error message, the browser just keeps on trying. … | |
hi all i am using VB6 and is writing a code for a maths project. learners have to enter an answer into a textbox and press enter to mark the given answer. i am currently using a command button to mark the answer, but it is time consuming. the idea … | |
Hi.. I have 3 JPanels. (one) JPanel contains the scrollpane and the (two) JPanel contains a JButton. I am adding (one) + (two) into (combine) JPanel and then adding to the frame.Now I am really having a hard time align the scrollpane and the Jbutton. scroll pane is coming squeezed … | |
I'm stuck trying to get a C# USB MIDI link to an Audio Mixer. Is there some sort of C# class or API that I can use to send and receive MIDI commands? Thanks. | |
hi All, I m new to c#.I m using a HTML table in web browser control and wants to get the rowid of the clicked row in HTML table.bt dont have any idea how to get. IS there any method for getting the row id of the clicked cell. Please … | |
HI, Today im tying to build a game program,im not really stuck on the coding aspect but its the concept of the 2 players in the game that is confusing me. For a starters, the game has 2 players.Player one goes first,after their go its player twos turn and so … |
The End.