132,726 Archived Topics
Remove Filter ![]() | |
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++ | |
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; … | |
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++ | |
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 | |
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++ | |
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++ | |
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 | |
[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 | |
[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 | |
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 | |
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 | |
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 | |
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 … | |
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 … | |
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 … | |
[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 | |
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 | |
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 | |
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 | |
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++ | |
[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 | |
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 | |
Hello people, Whats the use of switch(ch) in c? Software Development c | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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++ | |
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++ | |
how would you code this then: when you drag the scroll bar, the value changes as you DRAG thanks Software Development visual-basic | |
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++ | |
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 | |
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++ | |
What is the platform independent method to get functionality provided by windows.h? Software Development c++ | |
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++ |
The End.