132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for hcredence

Basic structure of main.c: int main () { Open the file data.txt and obtain the file handler fh; Create a thread my_thread using pthread_create; pass fh to my_thread; Wait until my_thread terminates, using pthread_join; Print out how many lines exist in data.txt. } Basic structure of thread_function.c: void *count_lines(void *arg) …

Software Development c data-structure
Member Avatar for Arcaiz
0
116
Member Avatar for locked_twilight

package MyJava; //change package name according to what the name of the package //the class would be installed to import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class [B]Calculator[/B] extends JFrame implements ActionListener{ private JTextField displayText = new JTextField(30); private JButton[] button = new JButton[16]; private String[] keys = …

Software Development java java-swing
Member Avatar for locked_twilight
0
953
Member Avatar for lancevo3

I am working on a doubly linked list assignment for my class and I am getting a segmentation fault on my test for the copy constructor. I don't know if the problem lies within my copyList method or my copy constructor logic. Any assistance be great. Here is my header …

Software Development c++ linked-list
Member Avatar for native
0
512
Member Avatar for Daiosmith

Hello all, I'm having some trouble with a project I am doing and I was wandering if anybody could help me/point me in the right direction. So the gist of what is happening is I have a program that is supposed to be flipping 2 coins independently of each other …

Software Development mathematics
Member Avatar for Rashakil Fol
0
297
Member Avatar for ritu verma

[code] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim lCount As Integer For lCount = 1 To 5 ListView1.Items.Add(lCount.ToString) Next If ListView1.Items.Count > 0 Then ListView1.Items(0).Selected = True End If [/code] I have even write the code to select the first node,i want first row …

Software Development listview vb.net
Member Avatar for ritu verma
0
4K
Member Avatar for mactavish

i am new in j2me programming and i want to code a file compression/decompression in series 40 phones. anyone could help me or could share their codes with me. thank you very much

Software Development java
Member Avatar for quuba
0
70
Member Avatar for Dixtosa

can you tell me what differences are between c & c++?

Software Development c++
Member Avatar for Dixtosa
0
147
Member Avatar for MrNoob

hi i m sorry for this noob question but there something i don't get i was reading abt File format like PE for example i was wondering how is C unverisal on MAC win and unix since they use diffrent file format does C takes care of each file format …

Software Development c unix
Member Avatar for MrNoob
0
318
Member Avatar for shroomiin

hello everyone. when working with objects, how would one specify that the input of negative numbers is not allowed in the constructor part of the code?

Software Development java
Member Avatar for Jocamps
0
122
Member Avatar for gretty

Hello I'm new to java & I am trying to convert a float to a string in my simple program. But I get an error on that line. Can you tell me why or what I need to do to fix it? Maybe I haven't imported the right things or …

Software Development java
Member Avatar for Jocamps
0
196
Member Avatar for axed

#include <iostream> #include <sstream> #include <fstream> #include <vector> #include <string> using namespace std; class PriceFeed { public: PriceFeed(vector<string>& tickers) { // init(tickers); } } int main () { vector<string> tickers; tickers.push_back("AAPL"); tickers.push_back("XOM"); //PriceFeed(tickers); PriceFeed pf = new PriceFeed(tickers); [COLOR="Red"]// Error on this line[/COLOR] system("pause"); //return 0; } Can you please …

Software Development c++
Member Avatar for axed
0
250
Member Avatar for ahsanmujtaba

hi everyone...can any one tell 10 advanteges and disadvanteges of c-language plzz urgent

Software Development c++
Member Avatar for crunchie
0
74
Member Avatar for royalbow

I have a calculator program and I want to add a progress bar. The progress bar is for visual effects only; I want it to animate for just enough time so that it will be noticed everytime I hit the "=" button. I'm a newbie in making forms and actually, …

Software Development c++
Member Avatar for royalbow
0
75
Member Avatar for brant_chen

[B]Why I can't compile a helloworld with Unicode supported by wxDevC++? [/B] I made a test programm. But I can only compile it by GCC compiler (library type is static lib) without wxwidgets Unicode support. If I checked the Unicode support at compiling setttings, it said ld error, can't find …

Software Development c++
0
141
Member Avatar for RoflNinja

Hey, ran into a little trouble with this, keep getting this error. I went over it many times, but can seem to find where the curly bracket is missing or if I have too many or so. [CODE]import java.lang.*; /** * Carries out the instructions from all the objects. * …

Software Development java
Member Avatar for quuba
0
176
Member Avatar for jmark13

Maybe someone can help me with this. I've been working with python for less than a week, and it's my first programming language. I'm looking to figure out some basic things in python for an algorithm I wrote in a pseudo-code. I'd like to know how I can take an …

Software Development algorithm python
Member Avatar for jmark13
0
175
Member Avatar for farsen

Hi. I want to compare two arraylists with each other, but not with the compare method. The problem is that i am using .net remoting, and i gotta keep a clients arraylist updated. And it would be a waste of bandwith to send the arraylist as an object over to …

Software Development
Member Avatar for farsen
0
193
Member Avatar for Sinh

Okay, we are on the third assignment in Java, Java, Java. I do not understand the book that well and while I have been searching google for something explained in simpler terms it hasn't came up. We have two files: OneRowNim2.java and Assign3.java The specifications were: You are to create …

Software Development java
Member Avatar for Sinh
0
179
Member Avatar for priya_esu

Hi, I need to copy a file from one location say c:\a\abc.txt to c:\b\abc.txt. I used the following below code #include <stdio.h> #include<fstream> int main() { if ( rename("c:\a\abc.txt","c:\b\abc.txt") perror( NULL ); system("pause"); return 0; } when i ran this code, the original file in the folder "a" gets deleted. …

Software Development c++ file-system
Member Avatar for WaltP
0
155
Member Avatar for sara_84

i found this code in C++ but i can't convert it from C++ to C, help me please i don't know C++. [code=cplusplus] #include <iostream> #include<stack> #include<stdio.h> #include <string.h> using namespace std; #define MAX 10000 /*class node{ int */ unsigned int graph[MAX][MAX];// = { { 0, 1 },// 0 1 …

Software Development c
Member Avatar for reyatata
0
990
Member Avatar for ankiwalia

Hi all, i am new to java servlets. i simply created a login form with username and password fields. now when i deployed it on tomcat server, after i click on submit button it gives the following error: java.sql.SQLException: Column not found codin of this login servlet is attached below. …

Software Development java sql
Member Avatar for ankiwalia
0
209
Member Avatar for ShadowScripter

Hi, [? 1] How do I create an API for a game? [? 2] If this subject is too hard for a novice/intermediate programmer, where do I best find tutorials/resources about API's? [1] I asked myself this question, as well as google, yet no easy answers or explanations popped up, …

Software Development api c++ gaming
Member Avatar for triumphost
0
214
Member Avatar for QuickBooksDev

In VB.NET 2005 what is the best way to get control when someone checks or unchecks a checkbox cell in a datagridview. I am getting conflicting results and it seems that either the current cell is the previous cell or the value is always false. I just want a way …

Software Development vb.net
Member Avatar for TomW
0
943
Member Avatar for vileoxidation

Hello, and thank you for taking the time to help me with this! I am working on a program that keeps information about staff members, such as volunteers and employees. The problem I am having is that when I run the program (everything compiles fine), I enter a members, and …

Software Development c++
Member Avatar for triumphost
0
164
Member Avatar for low1988

i am creating a bank application with connection of MS ACCESS Database which is already construct a table with the following statement [CODE] Statement stmt = con.createStatement(); stmt.executeUpdate("CREATE TABLE ACCOUNT " + "(AccName VARCHAR(32), AccNum INTEGER, Deposit FLOAT, " + "Balance FLOAT, Withdraw FLOAT)"); [/CODE] So everything works fine ,the …

Software Development java open-source sql
Member Avatar for javaAddict
0
128
Member Avatar for mostafadotnet

This is somewhat a simple project I wrote by getting help from google groups I always recommend. assemble this code using this command: [QUOTE]nasm -o 1.com 1.asm[/QUOTE]

Software Development assembly
Member Avatar for wildgoose
0
456
Member Avatar for kulrik

Im having trouble with this problem: The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula is: arctan(x) = x - x3/3 + x5/5 - x7/7 + x9/9 - x11/11 + . . . Write a …

Software Development java
Member Avatar for javaAddict
0
313
Member Avatar for abu taher

[CODE]Sub QryReport() On Error Resume Next Dim QryDef As QueryDef Dim str As String Set QryDef = dbase.QueryDefs("balancesheet") dbase.QueryDefs.Refresh If Err.Number = 3265 Then Set QryDef = dbase.CreateQueryDef("balancesheet") dbase.QueryDefs.Refresh End If str = "select * from [balancesheet]" & _ " where Date ='" & Dtpicker.Value & "'" QryDef.SQL = str …

Software Development sql visual-basic
Member Avatar for abu taher
0
146
Member Avatar for genDisarray

Having decided to brush up on my programming, I wanted to try and make a Yahtzee game, only console based. It is object-oriented for the most part. My trouble is with generating different numbers for each die. I will post my Dice class to help show what I am doing: …

Software Development c++
Member Avatar for vmanes
0
832
Member Avatar for Fragmad

Hi. (If you don't feel like explaining, please tell me what I need to read up on. Derived classes? Polymorphism?). I have got this assignment from school, in which we are handed a main.cpp file and we are supposed to write the class for it. But there's a few thing …

Software Development c++
Member Avatar for vmanes
0
116
Member Avatar for Nattynooster

Hi, I am trying to get my form to validate user input. If it is ready to complete an operation (Valid input) it affects a read-only text box with "Ready" if not "Not Ready" the values that are accepted are 1-9999, it needs to check multiple boxes aswel (The code …

Software Development vb.net
Member Avatar for TomW
0
133
Member Avatar for infinities

What's the simplest way of being able to build Qt Applications using C++? notepad? specific IDE? HOW do I do it? Can someone PLEASE walk me through it. I found instructions online for integrating MS Visual C++ with Qt. I ended up taking 5-6 hours out of my time to …

Software Development c++ gui ide qt
Member Avatar for jbennet
0
205
Member Avatar for ShadowZ00

So I have spent a few days now stuck on this problem. I have a file, at the offset &hd026 there is a name. This name can be any amount of characters long, this part is easy, already have something to do this and saves it into a textbox. Now …

Software Development vb.net
Member Avatar for ShadowZ00
0
88
Member Avatar for EDDYGATE

The c# code below can be used to capture the screen . Combined with the filesystemwatcher class ,this code can be used to monitor user activities on a computer.You can also add a timer to this method to capture the screen at regular intervals or you can use a simple …

Software Development client-server
Member Avatar for stephenca130
0
186
Member Avatar for shakilaf

Hi, I have a internet connection at home. I have installed Python2.6.1 on my laptop in C:\Python26 directory. I have written a script named "TestUtil_SendMail.py" and my intension is to send a mail to the given mail id. But when am running the script I am getting an error: "[Errno …

Software Development python
Member Avatar for Dan08
0
2K
Member Avatar for EntangledDesi

If I have a form that is to resemble a standard dialog box that prompts for a name and I need to display the name on the main form when the main form is first run, how do I do that?

Software Development display visual-basic
Member Avatar for EntangledDesi
0
96
Member Avatar for TigerGirl

Hi I have a method that has a reference to a linked list and an int that is the value. I want to recursively call that value to count and return how often that value is in the linked list. So, here is what I got: [CODE]public static int find(LinkedNode …

Software Development java linked-list
Member Avatar for TigerGirl
0
107
Member Avatar for lexusdominus

id like to write a function that checks if an object's variables have been changed. the only way i can think of is to create a duplicate object and compare each variable. im really lazy, and this seems like alot of effort. can anybody help me think outside the box? …

Software Development c++
Member Avatar for mrnutty
0
103
Member Avatar for oneat

I'm using netbeans graphic intarface to create my own JPanel. But I have a problem. When I change panel's layout in grid one I can only place cells on left and right side only of others. So instead of 2x2 I can only make 4x1. Do you know what shoyd …

Software Development java
Member Avatar for BestJewSinceJC
0
122
Member Avatar for khaos64

I've done a bit of searching but didn't come up with anything. Is there a way to use multiple placeholders and then use a list with as it assignment. i.e. [CODE] l = [1,2,3] l2 =['blah',50] print('%i isnt %i isnt %i which isnt %i' %(l[:],l2[1]))[/CODE] So if the first list …

Software Development python
Member Avatar for khaos64
0
118
Member Avatar for triumphost

Yes I know its a long code and it will get longer but there is a compiler error in the [COLOR="Green"]int main ()[/COLOR] First Visual C++ 2008 Express edition error [QUOTE] ------ Build started: Project: MAC ADDRESS, Configuration: Debug Win32 ------ Compiling... MAC ADDRESS.cpp warning C4603: '_WIN32_WINNT' : macro is …

Member Avatar for triumphost
0
771
Member Avatar for ardent23

I am creating a simple program, I really need the code for this..here is my situation.. For example if I input a student no. in a textbox to perform search option then click the search button, I want to see the info of the said student to appear from the …

Software Development vb.net
Member Avatar for TomW
0
172
Member Avatar for sravan953

Hey guys, I was just making a tiny program, where I need the user to enter numbers. My question is, how do get numbers? I tried: [code='python'] self.panel=wx.Panel(None,-1) self.n=wx.TextCtrl(self.panel,-1,"Number") self.get=int(self.n.GetValue()) [/code] -but that didn't work... so how do I do it?

Software Development python
Member Avatar for snippsat
0
683
Member Avatar for iamsmooth

So I have an interface program called: IstackInterface.java, which contains method declarations and it compiles fine. I put it in a package we call package abc. Now I have another java program called IArrayStack.java that says: [code] public class IArrayStack implements IStackInterface { // code goes here } [/code] But …

Software Development java
Member Avatar for BestJewSinceJC
0
149
Member Avatar for cjsnfernando

I want to select da MSCommunication control component in toolbox. can any one pls tell wat shall i do??????????? respond immediately!!!!!!!!!!!!!!!!!!!!

Software Development vb.net
Member Avatar for satheeshkumars
0
57
Member Avatar for C++NOOOB

Hi, I have class which has two bool vectors: [CODE] typedef vector<bool> my_bool_vector; class MyClass{ private: my_bool_vector bvec; my_bool_vector another_bvec; public: explicit MyClass(unsigned int size) : bvec(size, false), another_bvec(size, false) { } }; MyClass MyObject (10); [/CODE] I want to be able to access bvec and another_bvec in the following …

Software Development c++
Member Avatar for Dave Sinkula
0
157
Member Avatar for siddhesh123

Hi everyone, I am facing problems in updating controls using another thread created by another class (not Form1). I am able to update controls of main form by another thread if that thread was created by Form1 or main form, but when it is created by other class, i am …

Software Development client-server
Member Avatar for sknake
0
9K
Member Avatar for sxk

Hi can you please help me with the following code program as I am new to java. [B][U]Step1: define the interface named Ashape[/U][/B] write an interface called Ashape that defines: double DEFAULT_SIZE equal to 1.0 [by default it is constant] method calcPerim() that returns a double equal to the perimeter …

Software Development java
Member Avatar for javaAddict
0
120
Member Avatar for Mcdermid

I was hoping someone could give me the code to read and then to system print out the words in the text file. The textfile contains: One, Two, Three, I'm new to IO readers so this would help alot as I'm having trouble reprinting the information out.

Software Development java
Member Avatar for Jocamps
0
84
Member Avatar for pmennen

Sorry if this isn't the right place for this type of question (I'm pretty new to Python). If there is a better venue for this kind of thing, please let me know: I tried to run a few PyQwt demo, but it complained that there was no module named PyQt4. …

Software Development python
Member Avatar for vegaseat
0
2K

The End.