43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for rena0514

my teacher wants the tictactoe game to have a button called play that resets the tictactoe game my button doesn't work....what did i do wrong? [CODE] //TicTacToePanel.java Author Carien Anderson //Represents tic tac toe game board and allows peer to peer competition import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.JOptionPane; …

Software Development java java-swing peer-to-peer
Member Avatar for javaAddict
0
2K
Member Avatar for appunu

ALl i need to find is the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6).I have coded with some logic and i could able to find the sum til this part 12345=>1+2+3+4+5=15 but i couldn able to carry on after that plz …

Software Development c puzzle
Member Avatar for appunu
0
174
Member Avatar for elvis1

Hi guys, I am a complete newbie (but learning slowly). I am trying to make a script to check for proxies that are contained in a file using a regex. Fact is that I lack of knowledge and I do not know how to make it go. This is my …

Software Development file-system python regex
Member Avatar for elvis1
0
192
Member Avatar for newbiec

Hello! I'm working on a project for class (Assembly Intel 8086) and am having trouble figuring out my problem with this program. The project is to set-up to find GCD of two numbers. However, I can't figure out why the division loop I have isn't working properly. I have the …

Software Development algorithm assembly
Member Avatar for Juniahh
0
4K
Member Avatar for ptaylor965

Hi, Could you please show me how to get 1.9 to show with two decimal places (1.90) you can use [CODE]Math.Round(1.99999999, 2)[/CODE] if you want to bring the decimal places down to two but how do you increase from zero or one decimal place up to two? Thanks Peter

Software Development vb.net
Member Avatar for kvprajapati
0
39K
Member Avatar for aiosarem

Hi, I'm trying to learn the in's and out's of using the send and recv functions of a socket in C and I've hit a bit of a road block! I'm trying to send an integer from one system to another, however one system is big endian (the client) and …

Software Development c c# c++ client-server
Member Avatar for aiosarem
0
6K
Member Avatar for anjaliua

I have created an owl ontology using protege.Is dere any way to query the owl ontology n give the results to python code??

Software Development python
Member Avatar for merchise
-1
420
Member Avatar for luttinj

I am making a basic quiz show in Java and I have successfully made the first question. Now when I went ahead and made my second question I encountered this problem. When I run the program there are no errors with it, but it will not let me input a …

Software Development java
Member Avatar for moutanna
0
186
Member Avatar for cdominguez13

I have this code so far: //Carolina Dominguez //Assignment 7 public class Student { private String fname; private String lname; private String studentId; private double gpa; public Student(String studentFname,String studentLname,String stuId,double studentGpa) { fname = studentFname; lname = studentLname; studentId = stuId; gpa = studentGpa; } public double getGpa() { …

Software Development java
Member Avatar for moutanna
0
134
Member Avatar for eleonora

I do have a problem with my connect four code ; it doesn't check whether there is a winner even though the function its okay :-/ Can anyone help me to solve my problem ??? [CODE=python] import random board = dict() rows,columns = 4,4 def game(): choose_player() #MAKE BOARD FUNCTION …

Software Development python
Member Avatar for TrustyTony
0
3K
Member Avatar for phummon

Hi everyone, I'm a relative beginner to writing UNIX scripts. In the past, I've been able to hack together simple scripts. Now I need a script which a little more complex than I'm used to, and I really need help. I'm up against a tight deadline and am growing desperate, …

Member Avatar for phummon
0
167
Member Avatar for cdominguez13

Hi, I was asked to write a class that represents a Student The Student class has the following attributes: first name String // May be 2 words: Mary Ann last name String // May be 2 words: Smith Jones student ID number String gpa double // Range 0.0 to 4.0 …

Software Development java
Member Avatar for cdominguez13
0
137
Member Avatar for ceyesuma

Hello Could someone tell me what derby requiers to make this conn? [code] public boolean createDatabase() throws FileNotFoundException, IOException { boolean createdDb = false; Connection conn = null; String dbURL = getDbURL(); String user = ModelUtils.getXMLResource("user"); String password = ModelUtils.getXMLResource("password"); System.out.println("in CreateDatabase:try:dbURL FROM XML properties: " + dbURL); System.out.println("in CreateDatabase:try:dbURL …

Software Development apache java xml
Member Avatar for ceyesuma
0
125
Member Avatar for Violet_82

Hi there, I am trying to get my head around the bubble sort but I don't seem to get it. Now I have a program written by somebody which performs a bubble sort and I am trying to understand it but no much success. Here is the code: [CODE]#include <iostream> …

Software Development c++
Member Avatar for Violet_82
0
253
Member Avatar for passionatecoder

Dear All, I am very new to programming and really appreciate if you can help. I am using XCode as editor My code is below: [CODE] int main (int argc, char * const argv[]) { char a[10][25]; char *ptr_a; ptr_a = (char *)a[10][25]; for (int index = 1; index < …

Software Development c c# c++
Member Avatar for Fbody
0
654
Member Avatar for P00dle

I've written the code already, and it compiles, but gets the following runtime exception: [COLOR="Red"]java.lang.IllegalThreadStateException at java.lang.Thread.start(Thread.java:595) at threads.ThreadStarter.run(ThreadStarter.java:52) at java.lang.Thread.run(Thread.java:619)[/COLOR] I've higlighted the line that throws the exception. I have no idea what's wrong, my knowledge in threads is sadly lacking. If anyone could help me out it would …

Software Development java multithreading
Member Avatar for moutanna
0
174
Member Avatar for luttinj

Hey, I am trying to use this program, it is supposed to ask one multiple choice question of the user and get the response. For some reason it will not work for me. I am using Ready to Program by HoltSoft. Please help me. [CODE]import java.awt.*; import java.applet.*; import java.io.*; …

Software Development java
Member Avatar for luttinj
0
120
Member Avatar for Kruptein

I'm working on an add-on system, which is till now going pretty good. no I need to assign an id to a menu item, but I don't know which are all in use (by other addons f.e.) so is there a way to either: -get a random integer that isn't …

Software Development python
Member Avatar for Kruptein
0
147
Member Avatar for zachattack05

I have been working on a form that reads records from a SQL database. I have the binding working in that it populates all of the fields with the correct data. But if I am viewing record 1 and record 2 changes while I'm looking at 1, then browse to …

Software Development dataset
Member Avatar for zachattack05
0
128
Member Avatar for tquiva

Hi everyone. I just finished creating a program similar to minesweeper, but it's called miensfeld. The rule of the game are stated in the intro of the program. I was just wondering if anyone would mind checking it out for me? I just can't seem to compile it. But please …

Software Development c user-interface
Member Avatar for jephthah
-1
617
Member Avatar for kdott

ok, so i have an int[][] that i need to be printed out into a file. it needs to be printed line by line with each number seperated by a comma. how does this look? im not getting any output... [CODE]import java.io.*; import java.util.*; public class TestingII { public static …

Software Development java
Member Avatar for javaAddict
0
5K
Member Avatar for GAME

Is there anything im doing wrong? [code] void SaveProxies() { string[] items = new string[Proxies.Items.Count]; Proxies.Items.CopyTo(items, 0); string saveValue = string.Join(",", items); Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.Proxies = saveValue; } void LoadProxies() { string[] items = Share_Cash_Downloader_v0._2._9._5.Properties.Settings.Default.Last.Split(','); foreach (string str in items) Proxies.Items.Add(str); } [/code] I use LoadProxies to load the save, from the …

Software Development
Member Avatar for farooqaaa
0
117
Member Avatar for Perlhelp

Hi, I want to search the log file for a string and extract all data until the end of that line where the search string is found. For example: A line in the file reads like below: [28/04/2010 11:17:53 GMT]PositionPoolCalculation.java(339):getPosCalculation[INFO]BUNP: B123456:1234567:ABCD ANP: B123456:1234567:ABCD:2 post LCN: DESabcdefgh I want to search …

Software Development perl seo
Member Avatar for Perlhelp
0
137
Member Avatar for the_preface

I'm writing a program that reads information from three seperate classes. Here is my code: [CODE] public class Animal { protected int id; protected String type; protected double mass; //------------------------------------------------------------------------ // Sets up an animal with the specified ID number, type and weight. //------------------------------------------------------------------------ public Animal (int animalID, String animalType, …

Software Development display java
Member Avatar for the_preface
0
150
Member Avatar for koved

i want to know what is the code written in header files.(how a functions works) is that possible for e.g. i created my own version of [U]sqrt[/U] function in .C now i want to know the difference b/w my code and sqrt function code. i want to check how efficiently …

Software Development c
Member Avatar for 0x69
0
81
Member Avatar for steveh44

Hello, I'm playing around with recursive loops in order to better understand how to iterate though directories. I've used the .Net methods 'GetDirectories("*.*", SearchOption.AllDirectories)' in 'foreach' loops to iterate through the file system but many examples i've seen use recursion techniques to do the same thing. So knowing nothing of …

Software Development
Member Avatar for Sodabread
0
578
Member Avatar for naseerhaider

Why I can't get this program complied ? I am geting " 20 expected unqualified-id before '{' token " [code] #include <iostream> using namespace std ; int answer(int num[] ,int num ); main () { int ary[10] ; cout << " Please Enter 10 integer values" << endl ; for …

Software Development c++
Member Avatar for naseerhaider
0
120
Member Avatar for justaguy101

Hi guys! I have a problem calling the numpy.random.hypergeometric function with certain values. It seems like if the values hit in some certain range the program stalls and never finishes. I get no errors or anything and also a wxpython GUI that i have calling this function crashes with no …

Software Development gui operating-system python
Member Avatar for justaguy101
0
555
Member Avatar for BLUEC0RE

Hey guys, I am having a problem. When loadPref is executed, it opens, reads, and saves properly. But it crashes shortly after when the system call system("cls") happens. I do not understand why, any help? I removed most of the code that is not involved. Tests / Outcomes Removing loadPref …

Software Development c
Member Avatar for BLUEC0RE
0
653
Member Avatar for alabandit

I need to monitor a number of folders over a period of time. so i pass the files in each folder to a list of list. [CODE] import os path_to_watch = [] path_to_watch.append("/path1/") path_to_watch.append("/path2/") path_to_watch.append("/path3/") before = [],[] for item, folder in enumerate(path_to_watch): print "i am here", item, " : …

Software Development python
Member Avatar for TrustyTony
0
247
Member Avatar for dre-logics

I want a row to add data grid view that is linked to dataset and datatable. Aftet that I want to that [COLOR="Red"]new row [/COLOR]in the first cell i want to put a new value (data) [CODE] myConn.Open() myCommand1.CommandText = "select * from groups" myCommand1.Connection = myConn myAdapter1.SelectCommand = myCommand1 …

Software Development dataset vb.net
Member Avatar for dre-logics
0
164
Member Avatar for etisermars

hello, i have a simple question: how can i make 2 variables to have the same address. For example, if i write: [CODE]int a = 10; int &b = a;[/CODE] everything goes ok "a" and "b" have the same value and the same address but what ai need is: int …

Software Development c++
Member Avatar for Fbody
0
3K
Member Avatar for SuperTaejin

I want to make a program that control powerpoint slides for example, when I start power point in presentation mode as I click the button, then slide goes to next. And when I click one more, then go next slide. I don't know how to send message to powerpoint in …

Software Development office-suite vb.net
Member Avatar for SuperTaejin
0
202
Member Avatar for soUPERMan

Hey, i dont get any compile errors on this code but when i run it i dont get an evaluated value, what have i missed??? [CODE] import java.util.Scanner; import java.util.StringTokenizer; import java.lang.Math; public class main { static Stack<String> stack = new NodeStack<String>(); static final String operators = "+-/*^"; static Scanner …

Software Development java queue
Member Avatar for soUPERMan
0
110
Member Avatar for CipherPol9

Hello I created a database on Access with two tables, [icode]Table1[/icode] and [icode]Table2[/icode]. My question is, it is possible to join the columns from [icode]Table2[/icode] in [icode]Table1[/icode]? If it is possible. What do i have to do? Thanks

Software Development vb.net
Member Avatar for CipherPol9
0
73
Member Avatar for kayjenx

So I have a database (for tracking customer applications through to approval etc.) in MS Access form & and all (but access just isnt the best way to do this for many reasons I wont get into). I have looked at lots of programming language and decide that VB was …

Software Development microsoft-access vb.net visual-basic
Member Avatar for kvprajapati
0
185
Member Avatar for P00dle

Ok, so I wrote a very simple programme, just to practice multithreading. I know it can be coded better, but I'm still learning about this, so please be lenient. This is my code so far: [CODE]package threads; // Create a thread import java.io.File; class threads implements Runnable { // This …

Software Development java multithreading
Member Avatar for P00dle
0
141
Member Avatar for tayspen

How can these be done. For example running a shourtcut thats path is this C:\app.exe -sync will run a certain part of the application(the sync function). Do i need to make a seperate application. Also say i have a program that plays music files. then i have a music file …

Software Development
Member Avatar for kvprajapati
0
195
Member Avatar for pateldeep454

[B]Card.java[/B] [CODE] package poker; public class Card { int suit; int rank; public Card () { suit = 0; rank = 0; } public Card (int s, int r) { suit = s; rank = r; } public int getSuit () { return suit; } public int getRank () { …

Software Development java
Member Avatar for javaAddict
0
214
Member Avatar for gorbulas

Is there any problem with manipulating very long strings? When I say long, I'm meaning like over 100,000 characters long. I'm using examplelongString = data.readline() to get it from an html file. I then use examplelongString .find('text to find') to search for stuff. I've been trying to do it, it …

Software Development python
Member Avatar for TrustyTony
0
6K
Member Avatar for zpk1

Hi all, I am trying to have a recursive sort on my xml data, but can only manage to sort the first layer..and not as what i want too :( , been trying to do this for a couple of weeks :confused: I would appreciate it if anyone could help …

Software Development xml
Member Avatar for zpk1
0
142
Member Avatar for ChargrO

Hello, im currently working on a program and im trying to create a cascade, This cascade code works by itself but i want to implement def hello and def toggle into def __init__(self, master=None), at the moment im getting and error "UnboundLocalError: local variable 'submenu' referenced before assignment" does anyone …

Software Development python tkinter
Member Avatar for TrustyTony
0
472
Member Avatar for leviathan185

Hi All, I have been doing a little VBA in excel and I am tring to work out how to add 2 hour {or any amount of time} to the current time. Google has failed me in finding the answer, most of the things i have found is formulas but …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
320
Member Avatar for bryann

Hi i know this may sound a bit silly but i have looked through some websites but can't really find exactly what the difference is between "=" and "==" For example [CODE]if(x==0) execl(“/bin/ps”, “ps”,”-eal”,NULL)[/CODE] how is that different from [CODE]if(x=0) execl(“/bin/ps”, “ps”,”-eal”,NULL)[/CODE] thanks

Software Development c
Member Avatar for bryann
0
111
Member Avatar for Mr.B

Hello All, I am a little new to .NET Developing, and have learned a great deal recently, but I'm stuck with something. I come from an ASP Background, so please excuse my ignorance ;-p I'm trying to subtract 2 variables, but they don't seem to 'see' one another. I can …

Software Development vb.net vbscript
Member Avatar for Mr.B
0
113
Member Avatar for zachattack05

Can you do that? I can't seem to get it to work. [CODE=C#] lblfiledate.DataBindings.Add("Text", bindsrc, "filedate"); [/CODE] Doesn't work.

Software Development
Member Avatar for zachattack05
0
73
Member Avatar for krishnisilva

hi, i have a method that get the firstname and the lastname of an employee in the database and merge it together and then put it to an array and returns the array how can i return the array from the method. the code is below. C# Syntax [CODE]//This methods …

Software Development
Member Avatar for krishnisilva
0
3K
Member Avatar for ziyakhan10

the program runs successfully but the final output comes out in the form of an infinite loop...please help [CODE] #include<iostream.h> #include<fstream.h> #include<conio.h> #include<stdio.h> struct emp { int eno; char name[20],desig[20]; float sal; }e; void main() { clrscr(); ofstream f1; f1.open("emp.dat",ios::app|ios::binary); char ch='y'; while(f1) { if(ch=='y'||ch=='Y') { cout<<"Enter the name"<<endl; gets(e.desig); …

Software Development c++ ios programming-construct
Member Avatar for ziyakhan10
0
193
Member Avatar for 3cats

I think I understand functions but maybe not. I am getting an error on my open files function. I looked around a bit and didn't find any answers. The compile dies on line 36 'char' should be preceded by ')' I don't know whats wrong. Any help would be appreciated. …

Software Development c c# c++ file-stream
Member Avatar for 3cats
0
223
Member Avatar for jonb7

I am trying to show a diff in two files from a daily script. i am unable to get it to read the files correctly and show what is different. example of the files is - <ad_xml> <group name="group1"> </group> <group name="group2"> <user> <name>user1</name> </user> <user> <name>user2</name> </user> <user> <name>user3</name> …

Software Development python xml
Member Avatar for TrustyTony
0
1K

The End.