64,152 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; …

Member Avatar for javaAddict
0
2K
Member Avatar for rambok4

What is the problem with the following login code? [code] Dim conn As SqlCommand = New SqlCommand("Data Source=RAHUL-034890AF0\SERVER2005;Initial Catalog=user_accounts;Integrated Security=True") conn.Prepare() Dim command As Data.SqlClient.SqlCommand = New Data.SqlClient.SqlCommand("select", conn.Connection) command.Parameters(1).Value = txtusername.Text command.Parameters(2).Value = txtpass.Text Dim i As Integer = command.ExecuteNonQuery conn.BeginExecuteNonQuery() If Page.IsValid Then Response.Redirect("~/salesbill.aspx") Else Lblerror.Text = "Username …

Member Avatar for kvprajapati
0
240
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 …

Member Avatar for appunu
0
174
Member Avatar for pradeepktg

Hi All, How to store the resultset value in a array? I have a field "prodvalue" in DB Table, now i want to store this "prodvalue" in array. Am able to print the values of "prodvale" in jsp, but not able to store in array. Pl. find below the code, …

Member Avatar for pradeepktg
0
7K
Member Avatar for ds2r

Hi guys, mysql noob here. :) So here's my problem. I have 2 tables, Order(order_id,product_id) and Product(product_id,product_name). For one order, I can have many products. So my question is how can I auto increment order_id? When I insert multiple products in the order table, it generates an order_id for each …

Member Avatar for ds2r
0
134
Member Avatar for Erco21

Hi! I created a button and a textbox using javascript, now i want to make that when my button is pressed it gets the value from my textbox, and puts it in another textbox (got that sorted) only thing i cant find anywhere is how to make a button to …

Member Avatar for Erco21
0
372
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 …

Member Avatar for elvis1
0
192
Member Avatar for InsaneVr6

I wrote a script that will take data and post it to a database no problem, but at the same time I need the data to be emailed to two different email addresses and I never get an email. My code looks pretty solid and I am not sure what …

Member Avatar for InsaneVr6
0
167
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 …

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

Member Avatar for kvprajapati
0
39K
Member Avatar for paragouldgamer

Ok so I am a rookie in php and working on populating drop down lists from a mysql database. I have a drop down list working that contains words, but my drop down list for my date refuses to work and I don't know what the difference between them should …

Member Avatar for paragouldgamer
0
113
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 …

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??

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 …

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() { …

Member Avatar for moutanna
0
134
Member Avatar for azegurb

here i dont understand what does this function do. any can explain it to me thanks beforehands [CODE]function query($qry) { if(!isset($this->database_link)) $this->connect(); $result = mysql_query($qry, $this->database_link) or die("Error: ". mysql_error()); $returnArray = array(); $i=0; while ($row = mysql_fetch_array($result, MYSQL_BOTH)) if ($row) $returnArray[$i++]=$row; mysql_free_result($result); return $returnArray; } } [/CODE]

Member Avatar for LethargicCoder
0
97
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 …

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 …

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 …

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> …

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 < …

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 …

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.*; …

Member Avatar for luttinj
0
120
Member Avatar for Hypalink

I'm looking for a solution. I am developing a "user profile" php file which will render to the current user their profile information. The info rendered and seperated into different divs (styled with css) will be in the form of html/php. However, if no information exists in a specific field …

Member Avatar for Hypalink
0
127
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 …

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 …

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 …

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 …

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 …

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 …

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, …

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 …

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 …

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 …

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 …

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 …

Member Avatar for BLUEC0RE
0
653
Member Avatar for whiteyoh

Hi all, Im wanting to have an "upload picture" button, that on clicking will upload the picture into a directory, but then capture only the filename of the picture to be stored in the database. This is for creating a catalogue entry. Im fine with the form information and disabling …

Member Avatar for whiteyoh
0
82
Member Avatar for phingko

Hi guys, I'm using ajax to display the xml file. On my html i put [CODE]<body onload="sendRequest(Display)">[/CODE] so everytime users go to the main.html, all the information in xml will be displayed after transformed by XSL Now the problem is it gets the error [I]Display is not defined[/I] While i …

Member Avatar for phingko
0
362
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, " : …

Member Avatar for TrustyTony
0
247
Member Avatar for qariella

Hi, i have a big problem trying to make my table sort things.. Table information is cooming from mysql db.. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Min telefonbok</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <h1>Telefonbok</h1> <form id="form" method="post" action="phonebook.php"> <fieldset> <legend>Skapa ny kontakt</legend> <table> …

Member Avatar for qariella
0
174
Member Avatar for Erco21

Hi! I want to insert an elelent (textbox) under another textbox that already exists, and then retriever the value from it for later use i tried with this, but no success: [CODE]function newtxtbox(){ var box = document.createElement("<INPUT TYPE='TEXT' NAME='RADIOTEST' VALUE='First Choice'>") document.body.insertBefore(box, existingbox); } [/CODE] Thanks in advance!

Member Avatar for fxm
0
131
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 …

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 …

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 …

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 …

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

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 …

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 …

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 …

Member Avatar for kvprajapati
0
195

The End.