64,152 Solved Topics
Remove Filter ![]() | |
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; … | |
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> … | |
[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); … | |
[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 … | |
Hey Everyone, First post to the forum so go easy on me... So here's the deal... I am writing the php/mysql for a page that updates my database with the values of a member who's membership details have been edited. I am having problems getting the values to update into … | |
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? | |
I have my code in a .CS file. I've writen a ton of methods, which work fine and had lots of seccess including code in this file. I have also been able to declair sql objects at the class scope with no problem. My problem is that everytime I try … | |
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 … | |
I have created image button at run time. But I want to know when I will click on this button then its click function will get call.How to create click event of this image button. I have tried [code]Function bindgrid() { Buttonname.click+-new ImageClickEventHandler(Buttonname_click); } Protected void Buttonname_click(object sender, ImageClickEventArgs e) … | |
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 … | |
Hi I want to display results which are retrieved from the database in the following format: 1 2 3 4 5 6 7 8 9 ........ ....... ..... based on the mysql_row_count() dividing the results into 3 columns and n rows. [code=php] $result1 = mysql_query("SELECT * FROM table2"); $row = … | |
[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" + " … | |
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 … | |
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] … | |
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? | |
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 … | |
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) … | |
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] … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Background - this code adds & deletes file inputs from the screen as well as adds & deletes them from an array that will be used in the uploading process. I'm having trouble splicing the correct value from an array. In the remove function, I think it is always removing … | |
Okay, I'm trying to have a linked list autonomously delete itself, however, the destructor function I am using doesn't seem to work, it just keeps constantly looping, until the program just ends itself. Here's the function: [CODE]node::~node() { if(this->next != NULL){delete this->next;} delete this; }[/CODE] Basically, this should run through … | |
Hi, I have the following Javascript code for loading my Google custom search: [CODE=javascript]Search = '<form action="http://www.ututorial.net/search" id="cse-search-box"><div><input type="hidden" name="cx" value="partner-pub-3996237323979957:tenb6ft9bbh" /><input type="hidden" name="cof" value="FORID:10" /><input type="hidden" name="ie" value="ISO-8859-1" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>'; function set() { document.getElementById('Search_Content').innerHTML = Search; }[/CODE] This works fine … | |
I need to write a program that asks a user for their new password, to check that they have entered it correctly they must verify it by entering it again. If the two passwords matach then you accept the change and tell the user that they have been successful on … | |
[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 … | |
Question: I am to write a comparison program that outputs true mathematical statements. Ask the user for two numbers, and then output one of the following statements number1>number2 number1<number2 or number1=number2 The user must also be able to keep running the program with different numbers, when they have finished running … | |
Hi all! I am racking my brain trying to figure out why my code is not working for this TicTacToe board assignment. I keep getting the following error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3 at TTTBoard.makeMove(TTTBoard.java:79) at TTTGame.main(TTTGame.java:59) Java Result: 1 The assignment calls for a 3-by-3 2-dimensional array of … | |
hi guys, i downloaded eMbedded Visual C++ 4.0 and when i run setup.exe it asks for a serial number, where can i find it? thanks | |
A positive integer is entered from the keyboard. If it's even, all even integers from 2 up to and includng the entered integer are displayed. If odd, all odd integers from 1 up to and including the entered integer are summed, and the sum displayed. Please help me again. | |
Hello everybody! There's something I can't figure out myself. I'd like to use an hscrollbar for setting a float value. The float would be from 0 to 1, like 0.02, etc. So I'd use the integer value of the hscrollbar, and divide it by 100. But if try it, I … | |
Hi, I am basically writing a program that reads in ASCII files exported from 3ds max in order to reproduce an object in OpenGL. My code works fine for one object and I've even got it working for two as long as the second object contains less vertices/facet windings than … | |
I am trying to use a variable to refer to a column of a fetch_array. Problem is it is not working: [code=php] $table_field = "name"; $result = "select * from table"; while($myrow = mysql_fetch_array($result); $text .= $myrow[$table_field] . ", "; // Note: if I use 'name' it works fine... } … | |
Hello all! I have yet another question. Since I'm making good progress in learning C# I'd like to learn some new stuff that I have been putting off and to clean up my code. As such it seemed like a good idea to try and create a frontend for a … | |
Hey guys I am having a problem knowing where to start on writing this Leap Year program that wants a day number output. Here is the scenario: Write a function [I]dayNumber[/I] that returns the day number (1 to 366) in a year for a date that is provided as input … | |
hi everyone, i need help with an assignment that i'm having trouble with. I need to create a class called Money whose objects represent amounts of money, with two instance variables of type int for the dollars and cents in the amount of money i got the constructors down but … | |
Hi Once I complie below coding part,it give me error meassage.The Error Meassage is Error . [COLOR="Red"]The name 'CurrentOutLet' does not exist in the current context[/COLOR] BelowI write my coding [CODE]. public SqlDataReader Current_outletReport(string code, string startdate, string enddate) { try { SqlDataReader CurrentOutLet; SqlConnection con; string str = "SELECT … | |
I'm trying to write a simple deque program that lets you add/delete numbers and display them at will. The code is as follows. User.cpp: [code] #include <iostream> #include "Doth.h" using namespace std; int main() { char choice='m'; int n; Deque call; while(choice!='q'||choice!='Q') { cout<<"Menu:"<<endl; cout<<"[A] Add to the front"<<endl; cout<<"[B] … | |
Hi, I'm not sure if this shpould be in PHP or here so apologies if I'm in the wrong place. I'm trying to encrypt a password and insert it into my database along with other data. Everything works when I remove the md5 password encryption. It doesn't work when I … | |
Hi Everyone, New ASP.NET (C#) programmer here. Have a quick question that I'm sure you all will laugh at me for asking :) I'm using a Master Page to control my site's pages. On the master page I have a User Control that consists of two Labels, one for success … | |
Hi all, I'm working on a programming assignment for class and after trying a few things on my own I got stuck. Basically my function will take a string and count the number of times each word in the string occurs in the string. For example this string: The brown … | |
Dear All, I want to open another exe file in my C++ program. Let the exe file be A.exe. So I used shell execute inside my C++ program to open the file but as A.exe writes in a file certain data that I will use in the next step of … | |
Hey every1, M new to this community, hope you'd help me out. I gotta develop a mini projecy on media player that could be online and play various formats. I know that i'bve to include certain codecs, of which i'ven't got ne slightest idea. Can any one pls help me … | |
[ATTACH]9572[/ATTACH] Hello basically ive parsed a website's data into an object. I wrote it to file and read it back in to write to a dictionary. but when i read it in it reads it like 3 times. so im a bit confused as to why ad would like to … | |
Running this file returns the error: Exception in thread "main" java.lang.NullPointerException at Packet.<init>(test.java:20) at test.main(test.java:46) here: line 20 : this.data[i][j] = data[i][j]; line 46 : Packet packet = new Packet(4,data,count,column); can anyone help ma how to create this constructor that accepts String[][] ? [code] class Packet{ int op_code; String[][] data; … | |
Alright, I need to create an N-ary tree that contains a list of words all of the same length so that we can create a word ladder from it. Given a word (like cat), we are suppose to put that as the root and from a dictionary we are given, … | |
please help i think d error is in inputtin d values into d linked list! D files are attached |
The End.