199,114 Archived Topics
Remove Filter ![]() | |
[ICODE]import java.io.*; import java.util.*; class MyClass { public static void main(String s[]) { int a,b; a = Integer.parseInt(s[0]); b = Integer.parseInt(s[1]); System.out.print("Hello World \n"); } }[/ICODE] I'm getting the following error " Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at MyClass.main(Myclass.java:8) " Someone please help me out..... | |
Hello experts, I am trying to extract the abstract from the following XML code that appears as follow; [CODE] <abstract> <p> In eukaryotes, glutathione S-transferases (GSTs) participate in the detoxification of reactive electrophillic compounds by catalysing their conjugation to glutathione. GST is found as a domain in S-crystallins from squid, … | |
Hey everyone the program I am writing has to find the mode, max, and median from an array. I think I have everything except there is one error I cannot figure out, thanks in advance. [CODE] import TerminalIO.KeyboardReader; public class med { public static int MAX(int[] a) { int MAX … | |
I have a problem that i need to solve, and dont know how to do it. I have two arrays of 80 numbers (array[1..80] of integer) and i want to multiply them, saving the result in another array. I am beginner in pascal, learning it at school, so i have … | |
hy friend i want a simple example of keyborad event handling . how i call the the keylistener interface method which are implemented in another class, from main method of program. Second when i press any key from keyboard then the keycode and charachter are displayed thanks | |
Hello all I'm having a few issues with a Python program in that I am performing decimal calculations on and most values come up as desired, however every so often, when there is a very small decimal, the number is represented like "6.80E-7" rather than the desired "0.000000680". Here's a … | |
I am working on a site and I want to be able to query the appropriate table based on their location. For example, if they input they live in NY, it should query the NY table. If they input they live in CA, it should query the CA table and … | |
[CODE] SqlConnection cn; cn = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=J:\\Rcar\\motion\\db_image.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"); if (cn.State==ConnectionState.Closed) { cn.Open(); } SqlCommand cmd; string sq1; sq1 = "CREATE TABLE [B]"+TextBox1.Text+"[/B](myId INTEGER CONSTRAINT PKeyMyId PRIMARY KEY," +"myName CHAR(50), myAddress CHAR(255), myBalance FLOAT)"; cmd = new SqlCommand(sq1, cn); try { cmd.ExecuteNonQuery(); MessageBox.Show("Table Created"); } catch (SqlException sqlexception) … | |
i am making a hairstyle and makeup software in vb and i need to upload the picture which will be edited, to put a hairstyle and makeup on. ive no idea how i can do it.. it is a virtual makeover software and i need to produce the before and … | |
I'm running a structural analysis program in VS2010 which iterates through a loop up to 4000 times. The program keeps breaking on me around the 960th loop and gives the following error Unhandled exception at 0x0040cd1d in Structural Analysis Program.exe: 0xC000005: Access violation writing location 0x00000000. The error seems to … | |
I have created 3 files: SmsInbox, SmsGetData and SmsMsg. I don't know if I set this up right. I want Phonenumber, message and time to be stored in the Jlist and when I double click it It will print out the phonenumber, message and time. How do I print it … | |
I have a site the generated a row of data from MySQL db. The parent element DIV is called "enclosure". This shows up as hidden when page loads. I have a link "show/hide" that I'm using to show the data when click using jQuery. My problem: Since all the rows … | |
Hi all, I need to translate my xml data to a new XML file wuth XSLT. I thought I had it, but I only got first row. Need help to write the XSLT. I have XML data exported from access: (using XSLT - to get my file) - <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" … | |
this is my problem my jsp page is [code]<%@ page import="java.sql.*"%> <%@ page import="java.util.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:truth","sa",""); Statement st=con.createStatement(); String cate=request.getParameter("T3"); String user=request.getParameter("user"); String pass=request.getParameter("passwd"); String reenter=request.getParameter("rpasswd"); String mail=request.getParameter("mail"); String credit=request.getParameter("credit"); String address=request.getParameter("add"); String city=request.getParameter("city"); String state=request.getParameter("state"); String country=request.getParameter("country"); String mobile=request.getParameter("mobile"); out.println(user+pass+mail+mobile+address+city+state+country); st.executeUpdate("insert into usertable values('"+user+"','"+pass+"','"+mail+"','"+mobile+"','"+address+"','"+city+"','"+state+"','"+country+"')"); response.sendRedirect("Index.jsp"); %>[/code] this … | |
I have made a header file with a templated dynamic array class that I wish to convert into secure code. The problem is that since all of the code relies on the Template I cannot put it into a static library. Any ideas how I could still make the source … | |
Need help converting from hex to binary any help is very appreciated!! [CODE]#include <string> #include <iostream> class Hex { private: //constructor std::string hexNumber; int decNumber; public: Hex(std::string hNum): hexNumber(hNum) {} Hex(int dNum): decNumber(dNum) {} ~Hex(); int toInt(); std::string toBin(); std::string toHex(); }; [/CODE] it keeps saying i need to put … | |
Hello Friends, I have an issue after upgrading my firefox to version 4. This issue was there in IE8 but worked nicely in firefox3 Here is my issue: I have a page with three forms and each form posts using "htmlentities($_SERVER['PHP_SELF'])" action that is to the same page. Based on … | |
You probably hear this 1000's of times but I am getting this error. All I am trying to do is pass yardage to the topRow class but it turns to 0 by the time it gets there. Any ideas? [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; … | |
![]() | [CODE]<script language = "javascript"> var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP"); } function getData(dataSource, divID) { if(XMLHttpRequestObject) { var obj = document.getElementById(divID); XMLHttpRequestObject.open("GET", dataSource); XMLHttpRequestObject.onreadystatechange = function() { if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { … ![]() |
Hello java programmers, I want to draw some squares on layers using Graphics2D, course. Here is my source code with problems: [CODE]import java.awt.*; import java.util.ArrayList; import java.util.List; import javax.swing.*; public class Draw extends JPanel { private static final long serialVersionUID = 1L; private List<Cube> cubes = new ArrayList<Cube>(); public static … | |
I'm trying to write some code that will write certain variables to a text file and create a simple record system. So when a button is clicked the variables are calculated and written to a text file. How can I set it up so that when the button is clicked … | |
I keep getting the following error whenever I try to run this query on my "spot" table: [CODE]#1054 - Unknown column 'a.Longitude' in 'field list'[/CODE] The weird thing is though that the column DOES in fact exist, is spelled the same way, and has thousands of rows of data. Even … | |
![]() | Hi folks , i am working on hastable nowdays and looking ways to optimize my code . Please comment on my below observations and let me know if you have any suggestions. I have an existing implementation of chained hash table (A), which uses singly link list for chaining. typedef … |
Do any of you (reading this) know of a good learning resource for implementing a neural network, instead of papers describing the theory? Or perhaps someone can explain how one can apply the information on perceptrons given [URL="http://www.cprogramming.com/tutorial/AI/perceptron.html"]here.[/URL] | |
Hi....now I need some helps..because I totally no idea to do that.. Now, I need to read and count the frequency for each items Eg, set of data in text file 1 2 1 3 1 4 [COLOR="red"]2 3[/COLOR] 3 4 Now, i wan to read each item and count … | |
is there any way to find browser location based on city ,state or country....to switch home page accordingly | |
[CODE]#include <iostream> using namespace std; int main() { double firstNo;// first number is stored here double secondNo; double result;//variable for result when first and second number are operated upon char operation;// place to store the user's inputed operation // asks the user to choose the first number cout<< "Enter in … | |
I have a form form1 and there is a search button for searching the doctor when i click search button then a new form opens i.e. form2 and in form2 there is a data grid view control and i want when i select any doctor and click on apply button … | |
Hi, I am updating a Web Service server from JBoss 4.2.2 to JBoss 5.1, however when I began to use JBoss 5.1 I've got an error saying that one of my properties files could not be loaded. I have put this file in the following path: C:\Servers\jboss-5.1.0.GA\server\default\conf And I am … | |
Hello all, I am very new to JQuery and thought I'd go about teaching myself. I took three different codes I found online and combined them for my site. I used: accordion menu ([url]http://www.i-marco.nl/weblog/jquery-accordion-3/[/url]) a sliding menu and coda-slider2.0 ([url]http://www.ndoherty.biz/demos/coda-slider/2.0/#1[/url]) The combined menu works great for my main navigation but … | |
hi, i wants to take the items from a listbox and then store to a dictionary list like this: Dictionary<string, double> sortList3 = new Dictionary<string, double>(); In the dictionary, the key is string and value is double. The listbox content is as below: {1 2} 4 {1 4} 6 {1 … | |
Hello peeps, I want to test out this program but i am having problems! each time i run it - it goes " java.lang.NoSuchMethodError: main Exception in thread "main" " I know why i am having this error - coz i am missing my "public static void ....." But the … | |
hello , I am writing a validation code in which i have validate two feilds and check if the feild username and email already exist in the database. please help | |
Hi, I've looked around and cannot find an answer to this. I want every email that comes in to a certain email address to get stripped of everything but the subject and email address and get stored into a MySQL database. First, is this possible? If so, how? If someone … | |
I'm looking for the best way to make a method available to a sub class (not talking inheritance, polymorphism at all, just standalone classes!) without handing down a million pointers to each sub class. [code] Class A; // contains many instances of other classes. Class Z; // one of those … | |
When [B][I]floating point division[/I][/B] operator is [I]overloaded[/I], it [U]remains nothing[/U] ; :idea:So what is the [COLOR="Green"]role and importance[/COLOR] of [U][B][I]floating point remainder operator[/I][/B][/U],:icon_rolleyes: how it [COLOR="Red"]differentiate[/COLOR] from [B]integer remainder operator[/B] ? | |
1.<?php 2.$con = mysql_connect("localhost","root","")or die (mysql_error()); 3.mysql_select_db("registration", $con); 4.function protect($value){ 5.$value=mysql_real_escape_string($value); 6.$value=stripslashes($value); 7.$value=strip_tags($value); 8.} 9.if(isset($_POST['upload']) && $_FILES['file']['size'] >0) 10.{ 11.$fileName = $_FILES['file']['name']; 12.$tmpName = $_FILES['file']['tmp_name']; 13.$fileSize = $_FILES['file']['size']; 14.$fileType = $_FILES['file']['type']; 15.$fp = fopen($tmpName, 'r'); 16.$content = fread($fp, filesize($tmpName)); 17.$content = addslashes($content); 18.fclose($fp); 19.if(!get_magic_quotes_gpc()) 20.{ 21. $fileName = addslashes($fileName); 22.} … | |
[CODE]from Tkinter import * master = Tk() def ChangeOpt1(): Options.option_clear() Options.option_add("Apple","Orange","Melon") Options.update() def ChangeOpt2(): Options.option_clear() Options.option_add("Milk","Water","Juice") Options.update() Option1=Checkbutton(text="OPTION1",indicatoron=0,command=ChangeOpt1) Option1.pack() Option2=Checkbutton(text="OPTION2",indicatoron=0,command=ChangeOpt2) Option2.pack() variable = StringVar(master) variable.set("You have to check an option") Options= OptionMenu(master, variable, "You have to check an option") Options.pack() mainloop()[/CODE] I want to do that when I clicked Option1, … | |
Hello, I'm working on a simple winsock2 messaging program with a client and a server. The server, which uses the same code as the client, save for some preprocessor directives, compiles fine, but the client throws up 3 unresovled external symbol errors: Error 1 error LNK2019: unresolved external symbol "public: … | |
Hi I was wondering if someone could help me. I have a dropdown list which is populated from MySQL. The dropdown data is classed as sections. When a user selects a section from the dropdown a form on the same page is populate with the section name and they are … | |
Hi guys, I have two questions, I wonder if they are possible to implement. 1. [ICODE]<form action="nextform.php" method="POST">[/ICODE] Is it possible to hide nextform.php from other users as I don't want anyone seeing where the data is being POSTed. Or similar solution. 2. Is it possible to hide javascript files … | |
I create website on asp.net, is name ExpenseReport First, I create 'DBConnect' class in App_Code by using namespace ExpenseReport [CODE]using System; using System.Data; using System.Configuration; using System.Collections; using System.Data.SqlClient; namespace ExpenseReport { public partial class DBConnect { private SqlConnection objConn; private SqlCommand objCmd; private SqlTransaction Trans; private String strConnString; private … | |
Hi All, I don't know if I'm asking it right. I have a jsp for monthly report that calling java class and passing date parameter (year and month) into that java class. The java class has a statement that call procedure in database. It's so time consuming to show the … | |
Hi there, I am a Delphi guy and I am a bit new to C++. I have this annoying error when I try to compile and I have no idea how to solve this: [B]error: request for member ‘GetVector’ in ‘gff’, which is of non-class type ‘TGff_File*’[/B] on line #20 … | |
I would like to be able to take data from a MySQL DB and place it in various div elements. I would like to do this after the page has been rendered. I know I could do this using JavaScript with innerHTML, but do not know what function to use … | |
hi frens I am trying to pass array in $_SESSION from the abc.php to generatepdf.php. the pdf is not getting generated after i wrote this part of code. this is in generatepdf.php [CODE] foreach($_SESSION['refcode'] as $temp) { $refcode[]=$temp; } foreach($_SESSION['description'] as $temp) { $description[]=$temp; } foreach($_SESSION['unit'] as $temp) { $unit[]=$temp; … | |
Not sure if this is the right forum for SQL statement problems. I've searched all over but don't know how to output formatted SQL queries. Like Selecting the first letter of the first name and then last name with proper spacing. | |
Hi DW, I'm extremely new to DaniWeb. I have been coding in C++ for about one month. I'm thinking about coding in Python too. But, I'd like to ask some newbie question's about it first. [B]I'd like to know what it's used for.[/B] [I]I think it's mostly used for web … | |
I can't seem to plot this function with the given information. I'm not sure that my function is correct. T = Tmean + (Tpeak - Tmean)cos(w(t - tpeak)) Tmean is the mean temp. over a year Tpeak is the highest daily mean temp. tpeak is the day that the peak … |
The End.