132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Lukezzz

I use rand() to generate random numbers between 0-50. However when I use the code, as I have seen it, rand() doesn´t truly generate random numbers. It seems that everytime I restart the application, it generates the same random numbers everytime. It seems that there is any mathematical sequence the …

Software Development c++
Member Avatar for DavidB
0
142
Member Avatar for vartikachandra

i have made the following code... but i am having problems in accessing it.. [code] //structure for queue struct queue{ int items[MAX]; int front; int rear; }; //decleration of the queues :que_term for the values printed on the terminal struct queue que_mul2,que_mul3,que_mul5,que_sort,que_write,que_term; //initializing the queue void InitQueue(queue &q) { q.front=0; …

Software Development c queue
Member Avatar for vartikachandra
0
305
Member Avatar for theories

In all of the projects I've created in my college classes I've always declared the variables that will be used in multiple methods (passed by reference) in my main method and then passed as needed, allowing for the main method to be nothing more than a control for what variable …

Software Development c++
Member Avatar for ArkM
0
88
Member Avatar for PhiberOptik

I guys, I am working on a program that does remote desktoping and I am finding the biggest issue is that most people have routers which block most ports. What port do you recommend to create the least amount of difficulties with routers. (This program will be used for technically …

Software Development java
Member Avatar for PhiberOptik
0
94
Member Avatar for Lukezzz

If I have a backgroundWorker that has executed like this: [code] backgroundWorker2->RunWorkerAsync(); [/code] If I now want to cancel this, I have put this line of code at the very last line in the _DoWork event of the backgroundWorker2. I am not sure if that works or if it is …

Software Development c++
Member Avatar for Lukezzz
0
139
Member Avatar for ItecKid

Hello, If I have code like such: [code=c++] map <string, map <string, int> > foo; map <string, map <string, int> >::iterator bar; [/code] How to access the value of the nested map? Normally I access a map's value like such: [code=c++] bar->second; [/code] To that end, I tried doing this …

Software Development c++
Member Avatar for ItecKid
0
2K
Member Avatar for lllllIllIlllI

Hi I have a sorting applet that implements Bubble Sort and Insertion sort, and i have a couple of classes in my program. I made it using netbeans and i have no main class, and when i run it using this code: [code] <html> <applet code=Sorter.class width=800 height=300> </applet> </html> …

Software Development java java-netbeans
Member Avatar for lllllIllIlllI
0
368
Member Avatar for denniskhor

[CODE]{ String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ]"); jTextArea2.append("Part of Speech Result:\n"); String patternKGN,patternKPF,patternKK,patternKNA,patternKPA, patternKPC,patternKPK,patternKS; for(int i = 0; i < POS.length; i++) { try { File readKGN = new File("KGNLibrary.txt"); FileReader outKGN = new FileReader(readKGN); char[] buf = new char[(int)readKGN.length()]; outKGN.read(buf); patternKGN = new String(buf); …

Software Development java
Member Avatar for denniskhor
0
120
Member Avatar for denniskhor

[CODE] String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ,\n]"); jTextArea2.append("Part of Speech Result:\n"); String patternKGN,patternKPF,patternKK,patternKNA,patternKPA, patternKPC,patternKPK,patternKS,patternKNK; for(int i = 0; i < POS.length; i++) { if (POS[i].equals(POS[i].toUpperCase())) { jTextArea2.append(POS[i].toUpperCase() + "/KNK" + " | "); } }[/CODE] i ady split the input with "[-.!? ,\n]", for example …

Software Development java
Member Avatar for denniskhor
0
99
Member Avatar for drjay1627

if we use queue from c++ stl, we don't need //void enqueue(struct queue *q, int a) //int dequeue(struct queue *q) functions? my TA has it on the slides but since the c++ queue has push and pop enqueue and dequeue isnt needed, right?

Software Development c++ queue
Member Avatar for drjay1627
0
69
Member Avatar for stewie griffin

This is my code: [code]public boolean SetYear (String year) { if (year.matches("[0-9]{4}")) { _year=year; return true; } return false; }[/code] Instead of return false I want to make a runtime error with my massage. Something like "the value must be 4 digits" How can I do it?

Software Development java
Member Avatar for Ezzaral
0
171
Member Avatar for shevy24

hi there,I'm stucked in trying to right the correct code for this assembly program, when i try to run it on DOS it's saying "EXTRA characters on line", i can send u the code if u wish to check......

Software Development assembly
Member Avatar for rahul8590
0
545
Member Avatar for artemis_f

I have the following code (this is just an example that I thought of for the concept I am having trouble with) [CODE]String fileName = "example3.txt"; Reader reader = new Reader(); ArrayList<String> vertices = reader.getVertices(fileName); Matrix m = new Matrix(vertices); Matrix m2 = m; m.setEdges(fileName); m2.print(); m.print();[/CODE] what I want …

Software Development java
Member Avatar for artemis_f
0
117
Member Avatar for heysebas

Hi guys, I'm writing a Java programme, one with GUI for a project in college. We separated the work into a few guys doing a few standalone Java classes. These standalone Java classes are run by doing the usual: java -jar XXX.jar through the console. The functions of the class …

Software Development gui java
Member Avatar for JamesCherrill
0
1K
Member Avatar for kunal123

hii all, im trying to connect remote sq server using in c++ using CDatabase class. im getting an sql error Connection Failed SQL State '01000' SQL Server Error 14: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()). SQL State '08001' Connection Failed SQL Server Error 14: [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection the …

Software Development c++ sql
Member Avatar for MrSpigot
0
164
Member Avatar for rahul8590

i am working on image processing , which intially i used to do using MATLAB . but now i have been told to do using using JAVA or C++ programming ,. Since i know the fundamentals of C++ i guess i would be the right choice But the problem is …

Software Development c++ image
Member Avatar for Nick Evan
0
242
Member Avatar for jessica2009

[code=python]def main(): print (" PC : Hi there.whats your name?") userit = raw_input (" user :") print (" Pc : Nice to meet you " ) , userit , userit = raw_input(" Do you like python? (A=its Great, B=its Ok, C=its Rotten)") if userit == A: userit = userit.upper() print …

Software Development python
Member Avatar for woooee
0
139
Member Avatar for Miyuki Suzuki

Hello again, today is just not my day :( I had a problem with speed this morning and got help that totally solved it, so here goes hoping for some more help. [B]background:[/B] I have an ejb that picks up a file, copies it and the has to process the …

Software Development file-system java
Member Avatar for Miyuki Suzuki
0
147
Member Avatar for kerek2

Hi alls, I need help from u all regarding this matter... I need to create simple program where the text can be display into cursor are piointed...it mean when i open notepad or wordpad...the text automaticly display when the cursor r there....anyony can help me?..

Software Development vb.net
Member Avatar for Teme64
0
68
Member Avatar for K?!

Hi all We have to create a program that will require a lot of database interaction. I would like to create a JList with all events where a user can select an event he would like to edit. Is there a good way to store ID's into the list and …

Software Development java
Member Avatar for K?!
0
116
Member Avatar for RoselineM

can anyone help me with this output: ^^^^^#^^^^^ ^^^^###^^^^ ^^^#####^^^ ^^#######^^ ^#########^ ########### i have done the following so far & am struggling to continue: #include <iostream> using namespace std; //Function draw shape void displayRow(int sizeP) { for(int i = 1; sizeP - i + 1; i++) cout << '^'; …

Software Development c++
Member Avatar for DangerDuke
0
128
Member Avatar for denniskhor

[CODE] private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) { String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ]"); jTextArea2.append("Part of Speech Result:\n"); for(int i = 0; i < POS.length; i++) { if (POS[i].equals("makan")||POS[i].equals("kerja")) { jTextArea2.append((POS[i] + "/KK" + " | ")); } else if (POS[i].equals("sakit")||POS[i].equals("cantik")) { jTextArea2.append((POS[i] + "/KS" + " …

Software Development java
Member Avatar for denniskhor
0
99
Member Avatar for tomtetlaw

idk why i get this error i just do here is the code i have: [code=c++] #include "includes.h" int main() { } [/code] here is the error: c:\documents and settings\tom\my documents\visual studio 2008\projects\c++ tutorial\c++ tutorial\main.cpp(3) : error C2143: syntax error : missing ';' before 'int' any ideas?

Software Development c++ visual-studio
Member Avatar for tomtetlaw
0
155
Member Avatar for PRATS 1990

Hello people, Whats the use of switch(ch) in c?

Software Development c
Member Avatar for csurfer
0
116
Member Avatar for PinoyDev

Good day! I want to check all txtbox and combox(style=2) in a form when the user click save. If one textbox or one combobox is not fill in then i will show a message that cannot submit. One or more fields requires entry.I dont know whats wrong with my code …

Software Development visual-basic
Member Avatar for koolsid
0
87
Member Avatar for shadwickman

Hello, I've loved Python ever since I picked it up a couple years ago, but I have a question about the proper way to do something. There's a way of condensing an if/else conditional that has 2 options (True, False), for simple things. Assume that [icode]playerWins[/icode] is a boolean: [code=python] …

Software Development python
Member Avatar for shadwickman
0
116
Member Avatar for add4

Hi there, i am trying to create multiple clients connecting to the server. But the problem is that I can't set the Socket() constructor time.i.e by default the constructor waits to listen for 20 sec. My clients are many so that the time taking for those is hi. So that …

Software Development client-server java
Member Avatar for JamesCherrill
0
109
Member Avatar for turbomen

To design a program that works out the powers of numbers. For example 3^5 = 3*3*3*3*3 = 243 2^3 = 2*2*2 = 8 Please help me again?

Software Development pascal
Member Avatar for m610
0
91
Member Avatar for jschri4

string rating(bool ozone, bool no2, bool so2) { string result; int count = 0; if(ozone == true) { count++; } if(no2 == true) count++; if(so2 == true) count++; if(count == 3) result = "Gold Star"; if(count == 2) result = "Silver Star"; if(count == 1) result = "Ok"; if(count == …

Software Development c++ file-system
Member Avatar for Zhujy
0
81
Member Avatar for javaman2

hello again, i hate to be a bother but this is the third day im working on this assignment and i need a little help ill point out the 2 lines im having trouble with in my driver program(driver1) but ill supply you with the class definition and the driver …

Software Development java
Member Avatar for javaAddict
0
225
Member Avatar for Miyuki Suzuki

Hello everyone, I am having some difficulty with file handling, I hope someone can help. Here is the background: 1) I have to read a .dat file, file size varies from 692kb to 109.742kb with the following format of data: eg : ID|flag 1|y 2|y 3|y 4|y 4.37777451|y 5.52625317|y 2) …

Software Development file-system java
Member Avatar for Miyuki Suzuki
0
106
Member Avatar for crumpet

Hi, I'm trying to create a "command line" in Python, which makes a user input a certain command and its associated data, without the use of brackets. So the user would input: >>> test 1 2 3 So it would carry out a command: [CODE=python] def test(firstnum,secondnum,thirdnum): return firstnum,secondnum,thirdnum [/CODE] …

Software Development python
Member Avatar for crumpet
0
154
Member Avatar for PinoyDev

I have created a flash system manual which is located relative in my program path at folder named manual. When the user click [I]play[/I] i will play the flashmanual.swf in a folder named manual relative to my program. I have coded it below but it returns error: Please help. [code=vb] …

Software Development flash visual-basic
Member Avatar for PinoyDev
0
86
Member Avatar for ckillackey

Ok, I have a homework problem that I'm needing some help with. The program has to Allow the user to specify the number of integers to be inputted into the array read a data set of number of integers into the array Determine the sum find the largest integer and …

Software Development dataset java
Member Avatar for sillyboy
0
119
Member Avatar for Tank50

Hi guys I have a problem in my project.Below I mention the coding I wrote it for testing purpose. In below coding the second while loop never run,only [CODE] SqlDataReader reader = DbCon.Get_Invoices(); int x = 0; while (reader.Read()) { x++; [B][COLOR="Red"] 1[/COLOR][/B] } MessageBox.Show(x.ToString()); chart2.DataBindCrossTable(reader, "ExecutiveCode", "Date1", "Total", ""); …

Software Development dataset
Member Avatar for Tank50
0
149
Member Avatar for smithu.simi

Hello, i need to use fork() for the below problem Problem statement is program would accept various 2d arrays as inputs as long as the user wishes to enter.. Every individual sum of the array is calculated and sum of each array becomes the element of a resultant array and …

Software Development java
Member Avatar for BestJewSinceJC
0
112
Member Avatar for DisembodiedLoaf

I have two programs I've been working on for my class but I keep getting different errors. First one: Write a boolean function called isTriangle that receives three numbers and returns true or false based on whether or not the numbers are possible lengths of a triangle. If the sum …

Software Development python
Member Avatar for shadwickman
0
181
Member Avatar for phalgun_g

hello everyone.. I have been given an assignment to do a mini project in my college using C.As such im in dire need of ideas for the same. I need ideas for programming games,innovative programs etc.. till date they have taught us C pointers structures & arrays.. So ill have …

Software Development c
Member Avatar for MosaicFuneral
0
161
Member Avatar for Barefootsanders

HI, I'm trying to write an application in C++ that has two things - a TCP server (listen server) as well as a TCP client where it can send to other TCP servers. I currently have both parts set up simultaneously. I did this by calling fork() and having the …

Software Development c++ client-server
Member Avatar for Duoas
0
130
Member Avatar for rabbithaveit

Iv used arrays to store usernames Iv stored the array data in a procedure called "Usernames" But im wondering if its possible to then use the arrays to do a crosscheck validation for a login. Iv done some extent of research and Im either typng it wrong...Or I dont know …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
203
Member Avatar for jschri4

Im suppose to read in a file (which it isn't doing) and get numbers form them to see if they pass or fail certain specifications. Can someone help? the exact specifications are: The company you work for, Acme Environmental Monitoring, runs sensors to test air quality at different locations. These …

Software Development c++
Member Avatar for SeeTheLite
0
175
Member Avatar for mike6850

Getting back to coding after15 years. Looking to purchase VB4 Language Manual to help me remember all that I've forgotten. Thanks for any help.

Software Development visual-basic
Member Avatar for vb5prgrmr
0
51
Member Avatar for jspeakers

Hi, I am not that great with C++ but I am trying to write code that will be able to import 2 wave files I have - the first file is my sine wave sweep file the second is my impulse response of the room. Once imported I wish to …

Software Development c++
Member Avatar for nucleon
0
400
Member Avatar for Danny_501

Hi all, i asked this question a few days ago bit its still unsolved. I'm reading a text file of strings, line by line, and storing them into an array. when i try and print them using this function: [CODE=cpp]template < typename T > void printArray(T * const array, int …

Software Development c++
Member Avatar for Danny_501
0
98
Member Avatar for firebolt

how would you code this then: when you drag the scroll bar, the value changes as you DRAG thanks

Software Development visual-basic
Member Avatar for abu taher
0
84
Member Avatar for rEhSi_123

Hello everybody! I am creating a Book library system in C++. I created a login class where the user types in a username and password and if successful is able to log into the menu system. Now, everything goes well unless and untill the user types in the right credentials …

Software Development c++
Member Avatar for SeeTheLite
0
5K
Member Avatar for GDICommander

Hello, everyone! I am using Xalan to parse a XML document. This is a glimpse of what I do: [CODE] std::string fileNameStr = fileName.Tofilename(); XalanDOMString strFileName(fileNameStr.c_str()); LocalFileInputSource srcFile(strFileName.c_str()); XalanDocument* document = parserLiaison.parseXMLStream(srcFile); [/CODE] What I want to do is to know the encoding of the source document. There is no …

Software Development xml
Member Avatar for GDICommander
0
120
Member Avatar for shea279

Does anyone know how to use let the user define a custom hotkey with the control IDC_HOTKEY, then register it on a system wide scale, so it sends a message back to the application when its pressed? And I have googled, without much luck.

Software Development c++
Member Avatar for shea279
0
104
Member Avatar for Zcool31

What is the platform independent method to get functionality provided by windows.h?

Software Development c++
Member Avatar for Ancient Dragon
0
66
Member Avatar for iTsweetie

Hi all, I've been instructed to write a program that inputs a dollar amount to be printed on a check, and then prints the amount in a check-protected format with leading asterisks of necessary. Nine spaces are available fore printing an amount (max of $99,999.99). The program looks like this: …

Software Development c++
Member Avatar for iTsweetie
0
138

The End.