199,113 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for SpyrosMet

Hi everybody. I need to pass the value of a pointer to a struct for a server program to a client program. my code is the following for the server: [CODE] write(ns, &fixedparkpnt, sizeof(fixedparkpnt)); write(ns, &fixeddriverpnt, sizeof(fixeddriverpnt));[/CODE] and for the client: [CODE] read(sock2, &fixedparkpnt, sizeof(fixedparkpnt)); read(sock2, &fixeddriverpnt, sizeof(fixeddriverpnt)); [/CODE] sock2 …

Member Avatar for SpyrosMet
0
156
Member Avatar for Kniggles

anyone know how to make the colour text box w2 change to a random colour when button clicked please ? [CODE] </html> <FORM NAME = frmOne> StartA X: <INPUT TYPE = Text NAME = x SIZE = 5 value ="0"> Two B Y: <INPUT TYPE = Text NAME = y …

Member Avatar for ko ko
0
204
Member Avatar for andrewliu

Hello, I have a login form and a user can register their email address. But I was wondering how do I only allow certain email domains able to register? Like if I only want @gmail.com or @yahoo.com only This is my code right now [CODE] /* Email error checking */ …

Member Avatar for andrewliu
0
151
Member Avatar for birdlover2010

Hello, I am a current Java student and am having a problem when I run my compiled program from an in chapter lab assignment called "Stock Tracker". I receive a message from a dialog box "Cannot locate sun.jdbc.odbc.jbcOdbc Driver. Class not found exception creating database object. Following are a list …

Member Avatar for ~s.o.s~
0
274
Member Avatar for kuchick32

[code] #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main () { char out_file_name[15]; cout<<"Enter the name of your output file: "; cin>>out_file_name; ifstream input; ofstream output; cout<<"Begin editing files.\n"; input.open("Input.txt"); if (input.fail()) { cout<<"Input file opening failed.\n"; exit(1); } output.open("output.txt"); if(output.fail()) { cout<<"Output file opening failed.\n"; exit(1); …

Member Avatar for kuchick32
0
189
Member Avatar for AlvinLiu

[CODE] public class Reservation { private String firstname; private String lastname; private String address; private String name; private int licenseN; private String date; private int daysN; private String type; public Reservation(String f,String l,String a,int lpn,String dt,int nd,String tp) { firstname = f; lastname = l; address = a; licenseN = …

Member Avatar for AlvinLiu
0
2K
Member Avatar for jamesonh20

So I have a working media player that I built in C# with MSVS 2008. I have a feature that loads pics into a pictureBox. How can I possibly manipulate the bounds of the box to make it a circle, or an abstract object? I am aware of how to …

Member Avatar for kvprajapati
0
77
Member Avatar for chupoi

Hi there ! I have a tree view control and a button in Form1. The button takes me to Form2 which has a text box and a save button. What I'm trying to do is get the button on Form2 to add what i have typed in the textbox as …

Member Avatar for kvprajapati
0
140
Member Avatar for Barnifericus

Ok so Im trying to create a constructor that reads input from a text file. Which I got it to do. Then adds the information to a LinkedList. [CODE] public class CourseCatalog<T> { private BufferedReader read; private LinkedList<Course> catalog; public CourseCatalog(String filename) throws FileNotFoundException { catalog = new LinkedList<Course>(); try …

Member Avatar for jon.kiparsky
0
114
Member Avatar for nope3d

Can anybody help me how to transfer the inputting of my numbers from left to right... Well here is my program.. [code] import java.awt.*; import java.awt.Container; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; public class Calculator2 extends JPanel implements …

Member Avatar for Nishkalank
0
201
Member Avatar for ace8957

Hi all, So I'm working on this program to use a circular doubly linked list to implement a queue class. It went fairly well, but I'm stuck on the copy constructor, which causes runtime errors whenever I try to test it. Nonetheless, I really don't see what I am doing …

Member Avatar for caut_baia
0
2K
Member Avatar for BLUEC0RE

I have numbers represented as chars (eg. '11.27') I want to type cast it to a double but im getting "pointer value used where a floating point value was expected". Any ideas?

Member Avatar for BLUEC0RE
0
71
Member Avatar for itwebguy

I am using a FileUpload control to allow the user to import the contents of an Excel spreadsheet into an DataAdapter and then import into an Oracle database table. This works great when I use a local filesystem project. However, when I try to run this on the server, I …

Member Avatar for kvprajapati
0
121
Member Avatar for beggers23

I need to write a Python Turtle graphics program to output an n-pointed regular star, where n is an odd integer from 5 -to- 99 input by the user in answer to a question prompt. Also, my program should NOT contain separate code for each different star please help! ASAP!!

Member Avatar for beggers23
0
108
Member Avatar for HoneyBadger

Hi guys, I am trying to iterate through a list. This is my code: [CODE] #assume this is the list: list1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] def iter_list(a): for s in a: return s #here it is when it runs: print iter_list(list1) a [/CODE] why doesn't it …

Member Avatar for HoneyBadger
0
112
Member Avatar for Behumat

Hi everyone! I'm both new here, and new to programming. I'm still learning how it all fits together, and have been putting together a simple assignment, but I've gotten a little stuck, and so far the book hasn't been a help. I know it must be something simple, but for …

Member Avatar for Kremlan
0
159
Member Avatar for linezero

I was trying to get this work, but couldn't find a way to work this out. I'm new to vb.net. In a text box, the user enters a number for example a 9 digit number. I want the user enter to enter a 9 digit number that is starting from …

Member Avatar for codeorder
0
129
Member Avatar for Awesomeness

I have a tree, and I want to find the depth of it. For example for this tree: [CODE]0 root / \ 1 5 1 / \ 2 1 3 | 3 2[/CODE] It should give a depth of 3. [CODE] public int getDepth() { int maxDepth = 0; if(this.hasChildren()) …

Member Avatar for Awesomeness
0
112
Member Avatar for linezero

how to validate a text box to accept only alphabets and numbers. no special characters. in vb.net i have tried the following code but it doesn't allow numbers but it allows alphabets only [CODE]Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _ …

Member Avatar for kvprajapati
0
3K
Member Avatar for vnorbi

Hello everyone! I'm making a tetris program, and now I'm stucked a bit. I have to use the simple getch() function, but in a special way. I need to use it for exact time, and when the time is up, I need to break the function, even if I haven't …

Member Avatar for WaltP
0
232
Member Avatar for The_Prince

I am a bit confused how to read this data and extract the information I want and eventually store into an array/vector etc ( which i will know how to do. I'll present what the text file says below. (Note that somehow everything is on one line on the text …

Member Avatar for WaltP
0
222
Member Avatar for gus7984

Hello, I'm getting an error when I try to compile the code and I do not know how to solve the problem. Please help! The assignment asks me to create a BOOLEAN function that can check if the graph is connected or not. So I decided to use DFS approach …

Member Avatar for chiwawa10
0
132
Member Avatar for dantheman50_98

Hi There, Im been using the opencart system to build an ecommerce site and one thing has been causing a great deal of hassle. When one adds a product image to the site, if it has a height lower than that specified in the opencart admin, whitespace is added to …

0
121
Member Avatar for ewander

can anyone help me with this? . Given the Java String variable assignment String sentence = "This is a sample sentence"; what will the following sequence of Java statements print? Explain why Java will print this result. String x = sentence.substring(4, 10); System.out.println(x); thanks a lot!!!

Member Avatar for griswolf
0
90
Member Avatar for peter_budo

1. Keep It Organized - Do not hijack old threads by posting a new question as a reply to an old one 2. Keep It Organized - Do provide evidence of having done some work yourself if posting questions from schoolwork assignments 3. [URL="http://www.daniweb.com/forums/announcement8-2.html"]We only give homework help to those …

0
108
Member Avatar for zachattack05

If I add an imagelist control to my project it asks me to select images from the hard disk. When my application is compiled and distributed are the images I selected serialized and/or compiled into the exe? or do the images need to reside on the end-user computer in the …

Member Avatar for zachattack05
0
77
Member Avatar for mole363

Hello there, I am trying to develop a web site and I am asking this: Let's say that I own [url]www.mydomain.com[/url]. Now if I type [url]www.mydomain.com/whatever[/url] I want this site to be linked to [url]www.mydomain.com[/url] and pass the string "whatever" as a parameter. So If I type [url]www.mydomain.com/john[/url] the website …

Member Avatar for Brillig
0
131
Member Avatar for d_a_r_k

Hello, I'm working on some project and I need your help guys. I'm just a beginner. I searched the forums for a related topic but couldn't found any resolved answer. So how can I make start my external application "DXSETUP.exe" at center screen position using this code? Thanks. [CODE]Private Sub …

Member Avatar for AndreRet
0
3K
Member Avatar for mynameisshafiq
Member Avatar for Finki

I just want to know if this is done right. And some suggestions on the commented line. [CODE]msg = ... import re msg = re.sub("[^\w ]", " ", msg) names = [] for x in msg.split(): if (x[0].isupper()) and not (x[1].isupper()):# I think this should be done in a different …

Member Avatar for TrustyTony
0
2K
Member Avatar for oggiemc

Hi, Im getin the following error when i try the code below..Anyone tell me whats wrong?? (name is defined in animal class).. 52 C:\Dev-Cpp\oopAssign1.cpp no match for 'operator>>' in 'std::cin >> name' [code=c++] void Animal::arrayDisplay(){ string name[3]; cout <<"Input 3 names:" << endl; for(int i=0; i<3; ++i){ cin >> name; …

Member Avatar for oggiemc
0
118
Member Avatar for Kniggles

`[CODE]<form action="ScoreCardAlpha.php" method="post"> A: <input type="text" name="$X" /> B: <input type="text" name="$Z" /> C: <input type="text" name="$W" /> // read input data on $W , $X and check to see if (it or they{1,2,3 and byond}) has http// if so save after // // check all data for hacks. <input …

Member Avatar for mschroeder
0
208
Member Avatar for Pundia

Hi everyone, I'm in this proyect where I need an area in the form where I can place just dots, then join these dots with an straight line between them. How can I do that? I placed a Picturebox to see functions there but nothing is clear. Any help would …

Member Avatar for codeorder
0
223
Member Avatar for Finki

Hi. I'm new in python and I need some help. I need to make a program that does this: You put in a sentence, then the program puts it in a list. Words can be with one or more spaces; if there are more than one, the program should recognize …

Member Avatar for Finki
0
100
Member Avatar for Psyenyde

Hey everyone, my first post here, so lets see if I do this right. So I have this assignment that links a fibonacci.c, fib.h, and fib.s file. The assignment is supposed to be done by compiling all of the files, then running ./fibonacci <n> where <n> is the n'th term …

Member Avatar for Psyenyde
0
519
Member Avatar for plasticfood

[CODE]public double returnTotalFine(){ if (parkingmeter.returnPurchasedMins() >= parkedcar.returnMinsParked()){ fine = 0; } else if (parkingmeter.returnPurchasedMins() - parkedcar.returnMinsParked() <= 60){ fine = 25; } else{ fine = (25 + (10 * (parkedcar.returnMinsParked() / 60.0))); } return fine; } [/CODE] this is the toString method from the same class as above: [CODE]public String …

Member Avatar for plasticfood
0
60
Member Avatar for shasha123

Build a program that determines monthly payments for a loan. please add problem statement and pseudo code? Use these parameters: (1)Loan amount as a float (2)Number of months for the loan as an integer (3)Monthly interest rate expressed as a decimal as a float. Please do not pass the annual …

Member Avatar for Fbody
0
82
Member Avatar for sravan953

Here's the pattern: [CODE]******* ***** *** * ** *** ***** ********[/CODE] Here's the code I used to get only the first part(the up-side down triangle): [CODE] class hourglass { static void pattern() { for(int j=1;j<=4;j++) { for(int i=1;i<=j;i++) { System.out.print(" "); } for(int i=7;i>j;i--) { System.out.print("*"); } System.out.println(); } } …

Member Avatar for Ezzaral
0
697
Member Avatar for cmhampton

Has anyone ever tried returning a ColdFusion structure through a web service? The WSDL type CF assigns to this is apachesoap:Map, but when I consume this in VB.NET, the data is null. I have converted the entire thing into a JSON string, and that seems to work, but it requires …

Member Avatar for Ragen
0
636
Member Avatar for fx5500

Hi, Im working with an excel file. For exampler there is 500 rows in the sheet and 4 columns in the sheet. First 3 columns have data but 4th columns is empty. I want to write this column's all rows' "1. row", "2. row", "3.row"... My codes below.. How can …

Member Avatar for Cort3z
0
104
Member Avatar for divakar.it

Hi, I am currently developing a tool in VB 6.0. I am facing a problem when i generate reports in Excel format. The issue description: - When I click the 'Produce report button', the vb code will run a query and fetch the record into record set - and then …

Member Avatar for AndreRet
0
109
Member Avatar for lewisco

I have a multiline text box which is used to enter barcode numbers into. I have a barcode scanner and all the barcodes will end in L2, L3 or L4. Once a barcode is scanned in I need VB to detect either L2, L3 or L4 then go to a …

Member Avatar for codeorder
0
1K
Member Avatar for someone5

Hi, I wanted to know how you can link two list Boxes together. This is what I'm trying to do: [B]I'm creating two list boxes, list box A and list Box B. List Box A is a list of different departments. When the user clicks on a particular department, the …

Member Avatar for someone5
0
208
Member Avatar for crossbow25

[CODE] #ifndef VECTORBINARYTREE_H #define VECTORBINARYTREE_H template<typename Object> class ArrayVector{ private: int capacity; int sz; Object* a; protected: void overflow() { capacity*=2; Object* b=new Object[capacity]; for(int i=0;i<sz;i++) b[i]=a[i]; delete []a; a=b; } public: ArrayVector(int initCap=16){ capacity = initCap; sz=0; a = new Object[capacity]; } int size() const {return sz;} bool isEmpty() …

0
88
Member Avatar for Dhruv Gairola

hey guys, just one question- how do i get netbeans to import a whole folder (containing numerous java files)? the only option i currently get is to import eclipse projects.

Member Avatar for Dhruv Gairola
0
140
Member Avatar for xq1

Hi, I am new to PHP and am trying to construct a page that will select files from a directory either manually or based on a time period in which the file was created. First of all, does anyone know of where I can get code that will do that? …

Member Avatar for xq1
0
164
Member Avatar for aaronmk2

My profesor added this line of code to a bubble sort saying that it made it more efficient by tracking the last swap. I don't understand how this would work [CODE] void bubble_sort(int a[], int n){ while (0<n-1) { int last =0; for (int i=0; i<n-1; i++) { if (a[i]>a[i+1]) …

Member Avatar for Fbody
0
3K
Member Avatar for vbx_wx

[code] package cls; public class main34 { public static void main(String[] args) { for(int i = 2; i <= 100; i++) { for(int j = 2; j <= i; j++) { if(i % j == 0) { break; } else { System.out.println(i + " "); } } } } } …

Member Avatar for apines
0
88
Member Avatar for ayetar

Dim A, B, C As Integer Dim jam As Timer Private Sub Command1_Click() A = Text1.Text B = Text2.Text C = Text3.Text End Sub Private Sub Timer1_Timer() If Time = TimeSerial(A, B, C) Then shutdown.exe -t End If Text4.Text = Time End Sub

Member Avatar for AndreRet
0
128
Member Avatar for FumarMata

Hello I want to pass a bidimensional vector to the constructor of all instances of [ICODE]MyClass[/ICODE]. All instances must use and share and modify the same vector. And I want to keep a reference to that [ICODE]main_vector[/ICODE] to use it later in the program I am passing it by reference …

Member Avatar for Fbody
0
201

The End.