199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ylchen

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 …

Member Avatar for Ancient Dragon
0
89
Member Avatar for Nixriq

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 …

Member Avatar for Clinton Portis
0
132
Member Avatar for gibson.nathan

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 …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for gebbit

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 …

Member Avatar for themoon49
0
2K
Member Avatar for jennaNalpak

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 …

Member Avatar for BestJewSinceJC
0
166
Member Avatar for kingcrim05

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[]) …

Member Avatar for Ancient Dragon
0
118
Member Avatar for r30028

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 …

Member Avatar for r30028
0
139
Member Avatar for programmer.code

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 …

Member Avatar for sknake
0
114
Member Avatar for power_computer

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" …

Member Avatar for power_computer
0
142
Member Avatar for EngneerNitemare

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 …

Member Avatar for Grn Xtrm
0
104
Member Avatar for Doughnuts

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 …

Member Avatar for Doughnuts
0
127
Member Avatar for fragtech

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 …

Member Avatar for mrnutty
0
541
Member Avatar for mms6

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'

Member Avatar for mms6
0
89
Member Avatar for treyd

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 …

Member Avatar for BestJewSinceJC
0
164
Member Avatar for DMC[au]

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 …

Member Avatar for DMC[au]
0
270
Member Avatar for dwiest

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 …

0
330
Member Avatar for jmoran19

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 …

Member Avatar for jmoran19
0
113
Member Avatar for scrace89

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 …

Member Avatar for vegaseat
0
385
Member Avatar for hezfast2

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. …

Member Avatar for StuXYZ
0
540
Member Avatar for raigs

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 = …

Member Avatar for Aia
0
98
Member Avatar for rush_ik52

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..??

Member Avatar for snippsat
0
824
Member Avatar for abdelhakeem

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

Member Avatar for abdelhakeem
0
173
Member Avatar for bdesc100

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 …

Member Avatar for vegaseat
0
4K
Member Avatar for LSUchemist

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 …

Member Avatar for jonsca
0
96
Member Avatar for mldardy

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 …

Member Avatar for mldardy
0
372
Member Avatar for Dhruv Shah

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"); …

Member Avatar for masijade
0
2K
Member Avatar for aznswti85

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 …

Member Avatar for IT seeker
0
162
Member Avatar for chunalt787

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 …

Member Avatar for chunalt787
0
4K
Member Avatar for IT seeker

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,.....

Member Avatar for IT seeker
0
80
Member Avatar for skrithikaa

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

0
92
Member Avatar for clarence_cool03
Member Avatar for ravishkkumar
0
137
Member Avatar for mms6

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 …

Member Avatar for vegaseat
0
132
Member Avatar for sbmcdeshan

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 …

Member Avatar for sbmcdeshan
0
150
Member Avatar for verbob

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 …

Member Avatar for verbob
0
177
Member Avatar for romilc

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?

Member Avatar for romilc
0
93
Member Avatar for KirkPatrick

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. …

Member Avatar for Ezzaral
0
201
Member Avatar for msaenz

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 …

Member Avatar for vegaseat
0
169
Member Avatar for Moody1

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 = …

Member Avatar for Moody1
0
125
Member Avatar for ankur_

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 …

Member Avatar for Ancient Dragon
0
207
Member Avatar for Kolz

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 …

Member Avatar for masterofpuppets
0
163
Member Avatar for j_cart007

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 …

Member Avatar for j_cart007
0
138
Member Avatar for Geekitygeek

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 …

Member Avatar for Geekitygeek
0
197
Member Avatar for bol0gna

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 …

Member Avatar for bol0gna
0
354
Member Avatar for r_k46211

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 …

Member Avatar for AndreRet
0
128
Member Avatar for deepak.marur

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. …

Member Avatar for deepak.marur
0
153
Member Avatar for adamsn

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 …

Member Avatar for adamsn
0
138
Member Avatar for Web_Sailor

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 …

Member Avatar for KirkPatrick
0
150
Member Avatar for suncity

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.

Member Avatar for suncity
0
71
Member Avatar for manjusaharan

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 …

Member Avatar for isozworld
0
1K
Member Avatar for StaticX

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 …

Member Avatar for StaticX
0
82

The End.