64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for vartikachandra

code:: [code] import java.io.*; import java.util.*; public class Global{ public static int flag=0; } interface filebackedfifoqueue { void put(String msg); String get(); } public class trying{ public static void main(String args[])throws IOException{ int ch=1; String msg; msg = new String(); while(ch!=0) { BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\nMenu"); System.out.println("\n0.EXit"); System.out.println("\n1.Publisher"); System.out.println("\n2.Subscriber"); …

Member Avatar for vartikachandra
0
111
Member Avatar for mrpoate

Hi, I'm currently working on a project in Python 2.6.1 using the Tkinter interface, and being new to both Python and Tkinter I've quickly found a problem that keen internet trawling hasn't seemed to help. I'm sure its not a particularly difficult problem or anything, but instead of spending probably …

Member Avatar for mrpoate
0
135
Member Avatar for Teethous

Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. …

Member Avatar for Comatose
0
108
Member Avatar for Manutebecker
Member Avatar for Manutebecker
0
112
Member Avatar for ademsaykin

[code] #include <iostream> using namespace std; struct Mytime { int hours; int mins; }; int timecmp( Mytime t1, Mytime t2 ) // compares two Mytime values { if (t1.hours == t2.hours) { if (t1.mins == t2.mins) { return 0; // returns 0 if times are same } else // mins …

Member Avatar for Murtan
0
189
Member Avatar for ryan311

hi can anyone help me about my problem how can i come up w/ this solution for example 1 + 2.00 the answer should 3.00 or like this 1.35+2.00 the answer should 3.35 how can i do this?

Member Avatar for QVeen72
0
118
Member Avatar for LTT

Hello! Wondering if someone could give me a hand.. Im looking to make a form kind of like this one.. "http://www.nvidia.com/Download/index.aspx?lang=en-us" Where the fields change depending on what is slected.. I would like to link the values of the of the form to a mySQL DB. So the form when …

Member Avatar for LTT
0
241
Member Avatar for culebrin

Greetings folks, I need to load a word document file into a RichTextBox component, It can't be done directly, so, I need first, convert it to a RichText Format File and then load it to the component. Any Ideas? Thanks Omar

Member Avatar for Comatose
0
419
Member Avatar for oblivion4

Hi, I'm pretty new to windows programming, and I'm trying to learn from an example. However, I'm encountering some compiler errors that I think are caused by my strings not being made up of wide characters. (correct me, i could very easily be WAY off) winMain() requires parameters of the …

Member Avatar for oblivion4
0
125
Member Avatar for mr_scooby

I have an array which collects a name and a mark,I want to use a method to get the total of the array, I assume this can be done I have googled it but it doesn't really give me an answer. heres Main [code] static void Main(string[] args) { Student[] …

Member Avatar for ddanbe
0
162
Member Avatar for gokcer

I am doing a Java project and in my gui I want to use Buttons. I want to put a class' internal parts code as a button action. Because the class Throws Exception when I copy the contents of the class under the button definition I encounter unreported exception error. …

Member Avatar for gokcer
0
132
Member Avatar for TobbeK

This has probably a simple solution, but i cannot find any obvious wrong. This is a simple button event and the supposed output in Label5 should be: One Two Three. Now, I can only get "Three", the last value in the array. [code] protected void Button4_Click(object sender, EventArgs e) { …

Member Avatar for TobbeK
0
136
Member Avatar for atman

[CODE] #include<stdio.h> #define COUNT 5 void enter(int *p_arr); void report(int arr[], int count); int main() { int arr[5]; int i; for(i=0; i < COUNT; i++) { enter(&arr[i]); } report(arr, COUNT); } void enter(int *p_arr) { int i; int insert; printf("\nplease enter the number:"); scanf("%d", &insert); p_arr[i]=insert; } void report(int arr[], …

Member Avatar for atman
0
122
Member Avatar for Mighty

I am currently taking a C++ program at my college and it all just seems foreign to me. I am having some trouble with this problem.. The Yukon Widget Company manufactures widgets that weigh 9.2 pounds each. Write a program that calculates how many widgets are stacked on a pallet, …

Member Avatar for Mighty
0
352
Member Avatar for leeba

I have two strings s1 and s2. I have to check what is the largest occurence of letters in s2 that are in s1. For example: s1="xyz" s2="abxyryxzycx" it would then return 4 since "yxzy" is the largest substring with all the letters in s1. It has to be recursive. …

Member Avatar for quuba
0
97
Member Avatar for scru

Is there a way to add a directory to the locations that python look at when you call __import__ ? I need to import some scripts from a user folder at runtime, and since __import__ doesn't accept absolute file names, I'd like to try this. Copying the script to the …

Member Avatar for scru
0
143
Member Avatar for barbz
Member Avatar for barbz

[CODE] import java.io.*; import java.util.*; public class Palindrome { public static void main(String[] args) throws IOException { char letter; String reversed,NEW; Stack S = new Stack(); BufferedReader stndin=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a word: "); String word=stndin.readLine(); for(int i=0; i<word.length(); i++){ letter = word.charAt(i); //this line should cut the 1st letter …

Member Avatar for barbz
0
177
Member Avatar for MDGM

Hi, Im having a wierd problem with my mysql query: I have entries in my database with a rating (out of 10) and a timestamp, and I want to pull out the highest rated entry from the past 30 days. These are the entries I have: [CODE]Primary key ----------------- Rating …

Member Avatar for MDGM
0
111
Member Avatar for EAnder

I know the codes not the best well written but the only problem I'm having(besides the interpreting of the macro commands, the one here is just a base for me to work on) is how the UpdateLabels.start() method returns: [code]Traceback (most recent call last): File "C:\Users\Erik\Desktop\Stuff from last Night\MouseMacro.py", line …

Member Avatar for Ene Uran
0
118
Member Avatar for tuse

Hi! I am trying to initiate a client-server talk but for some reason it is not working. The server starts running, but when I start the client nothing happens. Please point out the mistake in my code- Server- [code="java"] import java.io.*; import java.net.*; public class MyServer { public static void …

Member Avatar for tuse
0
115
Member Avatar for revenge2

hello again, Ive got the basics under my belt and ready to start making things happen:D. I want to experiment with different things so could you show me to some good tutorials on some of the following things. 1. sending and receive messages through the internet-what library/Mod should i use? …

Member Avatar for Ene Uran
0
106
Member Avatar for 3pid

hey! I`m a beginner in Java and I want to write a program that use try and catch method to send a msg if the average it calculate is not in [0-20] I have already write this code but it always print 0! what is wrong with my code?!!! [ICODE]using …

Member Avatar for 3pid
0
100
Member Avatar for dron

Hello, What SQL query should I use, in order to copy records from one table to another, both of the same schemas, in such way that only records that don’t already exist in the destination table will be copied? For example: Table A – Destination table ****** Col1 Col2 Col3 …

Member Avatar for johnny.g
0
300
Member Avatar for mattwaab

Hey, i am working on a project in which i am making a minesweeper game. The game part was written by my prof. all i had to do was make the class and header to run the background of the game. I have done so successfully, but i am having …

Member Avatar for mattwaab
2
255
Member Avatar for mahdiahmadirad

Hi, Guys I am a beginner please help me. I wrote something like this: [CODE=cplusplus] #include <iostream.h> #include <string.h> #define number 1 #define length 35 char student[number][length]; int i,j,k; char *BlankImprover(char *); void InsertInfos(void); void main(){ InsertInfos(); for(i=0;i<number;i++) for(j=0;j<15;j++) cout<<student[i][j]; } void InsertInfos(){ char name[15]; for(i=0;i<number;i++){ cout<<"Enter Student Number <"<<i+1<<"> …

Member Avatar for mahdiahmadirad
0
97
Member Avatar for britto

can anyone tell me the code how to create a textpane with scrollbars inside a tabbed pane.....and i should save the text in a file on button click....

Member Avatar for britto
0
590
Member Avatar for orwell84

Is there any way that I can get PERL to give me the elapsed time that it took to calculate something? I'm trying to make my algorithm for finding prime numbers more efficient, and obviously I can't tell the differences in the time it took to generate the list, so …

Member Avatar for orwell84
0
159
Member Avatar for AllenB

Hello, I am creating a client/server application that verifies math equations for addition, subtraction, and division. I think I just need someone else’s eyes to possibly see where I am going wrong with this. Everything seems to be working fine except for one variable. This is the String serverAnswer variable …

Member Avatar for AllenB
0
138
Member Avatar for nellyznell

I have all my code for this. I have the code to read a txt file, write a txt file, convert the infix to postfix and evaluate it. I am now just having trouble putting it all together. I need it to read the text from a file convert each …

Member Avatar for nellyznell
0
642
Member Avatar for jrdark13

The code below I have a problem... When you hit enter on a text field firefox stays at the same page because I have returned false; (I assume) but IE still submits the form normally. What am I doing wrong? [CODE=javascript] window.onload = function() { var form = document.getElementById('keyword'); var …

Member Avatar for jrdark13
0
155
Member Avatar for shazzy99

Is there any way to insert an empty line in a string type variable. string textFile = "abc"; textFile = textFile + string.Empty; textFile = textFile + "def"; This is what I'm trying. But the string.Empty has no effect. This also neither works textFile = textFile + "\n"; Any suggestions?

Member Avatar for ddanbe
0
4K
Member Avatar for VBNick

Hi, I'm trying to make 3D clipping for my 3D projection program, and I am having trouble with the FOV calculations. The problem is that I set FOV to 45, but a point placed at 45 degrees from the camera does not appear at the edge of the viewport. I …

Member Avatar for VBNick
0
154
Member Avatar for wendas

When building classes I thought if I just added an enum to the parameter list it would pop up the list of the enums, sort of like intellisence.. But I clearly am missing something.. [code] public enum eFullWeekDays { Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = …

Member Avatar for nelis
0
104
Member Avatar for serkan sendur

can you please give me an article address which tells when to use stack and when to use heap, how to use them properly and the performance issues related to usage. Thanks

Member Avatar for serkan sendur
0
108
Member Avatar for Marija-

Hi! I have a problem to make a list of students (i know how to put all the input and to calculate the average of the students grades) but i don't know how to put the students in new list arrayed by their average form biggest to smallest and if …

Member Avatar for Narue
0
130
Member Avatar for ssreevidya.m

Hi, I stored a file in the folder taht selected using file upload control. When I tried to view this content from that folder I got an error like this. Cannot find the C:\Documents and settings\Terapc\LocalSettings\temporary Internet Files\Content.IE5\6AJ9DNHZ\name.txt file Do you want to create a new file? The code I …

Member Avatar for nhauck
0
86
Member Avatar for serkan sendur
Member Avatar for serkan sendur
0
76
Member Avatar for arun_lisieux

QUESTION: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? I was trying to solve this problem. I was previously suggested to use the "Sieve of Eratosthenes" Method to find the prime nos. [url]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/url] I came up …

Member Avatar for arun_lisieux
0
288
Member Avatar for giovany

how do i learn programing?eventhough how hard i try to understand the languages, i can not absorb it, pls help me about it

Member Avatar for giovany
0
87
Member Avatar for l_03

[CODE] import javax.swing.*; public class A { public static void main (String args[]){ String ask = JOptionPane.showInputDialog("Enter"); if(ask.equals("hello")){ System.out.println("ok."); main(args); }else if(isRepeat(ask)){ System.out.println("Invalid,string has been repeated."); System.exit(0); } } public static boolean isRepeat(String ask){ if(ask.equals("hello")){ return true; }else{ return false; } } } [/CODE] Hello, I am having problems with …

Member Avatar for ahihihi...
0
176
Member Avatar for ddanbe

I have a class derived from a TableLayoutPanel and if I have more than 3 rows or columns I don't show them directly, I add(I let the object add) scrollbars so I can reach the other cells. I have code that works perfectly,but... [CODE=csharp]public void CalculateSize() { const int cMaxCol …

Member Avatar for LizR
0
114
Member Avatar for c_Newbie

hi all, i used the search function, but the threads i found didnt really help me much since i am quite a newbie and didnt understand how it worked. so what i am trying to do seems simple but it doesnt work. i have a textfile with a single line …

Member Avatar for c_Newbie
0
112
Member Avatar for adam291086

I am trying to construct a class and call upon some functions within that class, but nothing is returned, somehting should definitely be returned [CODE] #!/usr/bin/python import cElementTree as ET import urllib2 import MySQLdb print "Content-type: text/html\n" class xml: @staticmethod def find_text(element): if element.text: yield element for subelement in element: …

Member Avatar for adam291086
0
172
Member Avatar for vb.babyboy

hi everyone, im very new to vb.net. i have a textbox and a save button on my form. i have already connected the database to my application... pls can any1 tell m how do i save the data in the textbox to my ms access databse when i click on …

Member Avatar for vb.babyboy
1
162
Member Avatar for starsinthesky

i cant figure out what's wrong with my code. can anyone help me pls? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyGUI implements WindowListener, ActionListener { public void windowClosing(WindowEvent e) { System.exit(0); } public void windowClosed(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowOpened(WindowEvent …

Member Avatar for starsinthesky
0
112
Member Avatar for Datsun90

Hi all, I have created a simple SQL Server database by Visual Studio 2005, with one table 'Friends' that has just ID, Name, Phone, Email. Then created a datagrid to this table (just by dragging the table name from the 'Data Sources' explorer to the form. When I run the …

Member Avatar for Datsun90
0
160
Member Avatar for FrancisC07

hi guys! i need help ! what's wrong of this code?? this program will input five names and will output the five names i inputed. but when i run this program and i inputed a five names. It couldn't give me the exact answer.. the output should be this: please …

Member Avatar for MyRedz
0
98
Member Avatar for ezkonekgal

In a queue, where elements in integers are added, how do i do this: Inside the queue: 1 2 3 5 6 8 when I want to add a number, say 4, the output should be like: 1 2 3 [B]4[/B] 5 6 8 in which it inserts in between …

Member Avatar for ezkonekgal
0
156
Member Avatar for clutchkiller

Is it possible to declare something like [code=C++] string blah[51] [/code] The way I would assume this would function is that each elements of the blah array would be a string, or is this not possible? Thanks Edit: just tried this in dev c++, and it didn't give me any …

Member Avatar for clutchkiller
0
90

The End.