64,152 Solved Topics
Remove Filter ![]() | |
What I am trying to do is make a program that reads a txt file and converts the number into a double array. import java.io.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class rocket { public static void main(String[] args) throws IOException, FileNotFoundException { System.out.println(readLines("/Users/Jeremy/Documents/workspace/altitude.txt")); } public static Double[] readLines(String … | |
OK, I'm lost... don't know if this is easy and I'm missing it, or it can't be done, but this is my favorite place to ask... I have a table data cell that I would like to have as the submit value (link) in a form in a php script. … | |
i have a sprite sheet(image) and i want to draw on screen. image = sprite sheet image x = player x postion y = player y postion width = player width height = player heigh public class main extends japplet { ... public void paint(Graphics g) { g.drawImage(image, x, y, … | |
Dear All, I'm developed an application that can read incoming messages. Upto now all its fine, Now my app crashing sometimes and return `NullPointerException`. Please find my error log below. java.lang.RuntimeException: Unable to start receiver me.radhakrishna.buddyreader.TextMessageReceiver: java.lang.NullPointerException at android.app.ActivityThread.handleReceiver(ActivityThread.java:2146) at android.app.ActivityThread.access$1500(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4441) at … | |
Hello, I have been making an employee timeclock and have run into a bump in the road. Here's what my setup is like when an employee (who is not an Admin) loggs on they get a simple screen telling them the current time current date and two button that allow … | |
Hi, So far in me slowly learning webdevelopement (mostly thanks to all of you guys) I've used php to query the mysql database to calculate mean/mode/range/median values and to create arrays to visualize with highgraph. Now I've come to a point where I really need if possible, to skip the … | |
This is for part of my homework in an Object Oriented Programming class. I debugged the top part to make it workable. I need help on how to delete a searched item and also think I am missing closing the database file at the end. The search function #2 is … | |
Tried following code to get timezone conversion and failed. public static String ConvertTmz(String timeFormat, String timeStr, String tmz){ String theTimeFormat="MM/dd/yyyy HH:mm:ss"; if (timeFormat!=null) theTimeFormat=timeFormat; SimpleDateFormat sdf = new SimpleDateFormat(theTimeFormat); sdf.setTimeZone(TimeZone.getTimeZone(tmz)); GetTimeStr(timeStr); GregorianCalendar time=new GregorianCalendar(yyyy, mm-1, dd, hh, mi, ss); return sdf.format(time.getTime()); } Please help. | |
Hi all I am trying to write a program to recognizing word or phrase is a palindrome or not. Please help me Regards Aura | |
Group, I've read through the tutorial regarding Listviews and SQL's (http://www.daniweb.com/software-development/vbnet/code/445801/avoiding-sql-injection-attacks). Thanks for the article. It was very imformative. So I thought I might try this with the project I'm doing. I really like how these listview look and what they can do. But I realize I need to know … | |
I have installed WAMP server and workbench when I am trying the *phpinfo();* I get: J��� 5.5.29�"���q:k->.kP�ÿ÷!�€����������2EDfW^UlCH~d�mysql_native_password�!��ÿ„#08S01Got packets out of order my php file is located in the www folder http://localhost:3307/php1.php the wamp server is online Can anyone tell me what am I doing wrong? thanks ![]() | |
menu driven program to perform the following stack operations using a linked list: push pop and display elements. #include<iostream.h>//header file i/o stream flow #include<conio.h> class Stack { int A[10]; int top; public: Stack() { top=-1; } void push(); void pop(); void show(); }; void Stack::push() { int x; cout<<"Enter the … | |
write a menu driven program to create a linked list, insert an item, delete an item, and display the list of items. the program should contain a class with the required data and functions. #include <conio.h> #include <stdio.h> #include <stdlib.h> //Structure containing a Data part & a //Link part to … | |
why this [code](http://ideone.com/hfYD8V) is giving me runtime error? | |
![]() | I have a problem with creating drag and drop in Swing. I have written class that represents the toolbar item here is the code shortened code for it: public class ToolbarItem extends javax.swing.JToggleButton implements IToolbarItem, Transferable, DragSourceListener, DragGestureListener { private ModelEquivalent _modelEquivalent; private DragSource _dragAndDropSource; private TransferHandler _itemTransferHandler; public ToolbarItem(ModelEquivalent … ![]() |
Who can help me with the following. I have an allertbox with text in it but i want different languages for the text in the allertbox $lang = array(); $lang['ALERTBOX_A'] = 'To do this, you must first be logged in.'; onClick="alert(' <?php $lang['ALERTBOX_A']; ?>')" In this case the language is … | |
declare two dynamic arrays of integers, input **size** needed for the arras, allocate **size** integers, initialize all elements to 0, prompt the user to input **size** elements in the first array, diplay the elements, copy the elements to the second array after deleting duplicate elements, and display the elements from … | |
write a binary search algorithm to look for the presence of a search key in a single dimensional array of 10 elements. prompt the user to input 10 elements and the search key. display meaningful messages after the search operation. #include<iostream.h> #include<conio.h> void main() { int p[10]; int search_key; cout<<"\n … | |
Following a tutorial, I built a small sample program that uses winsock. It compiles, but there are a few different places I'm not sure what's happening with the pointers. Full source is available [here](http://pastebin.com/NTdCWhWr) Line 25: `struct hostent *host;` As near as I can tell, this creates a pointer to … | |
how to store 2d array in arraylist? and how to print arraylist? import java.util.ArrayList; public class aaa { public static void main(String[]args) { ArrayList<Integer[][]> aa= new ArrayList(); ???????????? int bb[][] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }; for(int y = 0; y < bb.length; y++) //rows { for(int … | |
Hi all I am Using following Line Of <a href="HostInactivityTest.aspx?HostID={$iHost}&HostNames={$HostName}" Target="_blank" style="font-size:8pt;font-family:Verdana;color:orange;font-weight:bold,text-align:left;"> Problem with this code is it opens new window with IE that is fine for me but newly open window shows URl,MenuBar,BookMarkBar that i dont want show in that child window so Anyone hase idea about this Please … | |
I need help to fix this two errors in the code. Line: 29 The static method isSolvable() from the type LinearEquation should be accessed in a static way. Line: 39,40: The static method getX() from the type LinearEquation should be accessed in a static way. Thank you. // This is … | |
I bought a template online and i'm trying to develop a website and I'm stuck on the contact form. I can't seem to get it to submit. When I click submit it just remains static, but i'd like to get it to run the action- that is go to the … | |
I have to resurrect the article that I marked solved this am, 'cause it ain't! My code is: <?php if(isset($_POST['chest'])){ $pin=$_COOKIE['registered']; $game=$_POST['item']; foreach($game as $rep){ $link=sqlite_open('data/'.$pin.'.sqlite ',0666,$sqliteerror); sqlite_query($link,"INSERT INTO holding (item) VALUES('$rep')"); sqlite_query($link,"UPDATE players SET points = points+10"); header('location:entrance.php'); } } include('php/head.php'); ?> <div class="game"> <p><u>Chest</u></p> <p> The chest has … | |
<? if(isset($_POST[b1])) { $m= new myclass(); $x=$m -> validlogin($_POST[t1],$_POST[t2]) # if ($x== true) # { $_SESSION[username]=$_POST[t1]; ?> <? include ("menu.php");?> <script type="text/javascript"> window.location = "cpanel.php"; </script> <? } else { echo "invaild login"; } } ?> } } ?> ![]() | |
I wrote the following code: package com.chain; public interface Chain { void setNext(Chain chain); void process(int number); } package com.chain; public class ProcessNegative implements Chain{ private Chain chain; public void setNext(Chain chain){ this.chain = chain; } public void process(int number){ if(number < 0){ System.out.println("Negative"); }else{ chain.process(number); } } } package … | |
Basically I got 2 calendar scripts from the same source. I saw a custom script before that merged these two but Everything I tried failed. Please help. Here are the 2 scripts. Script 1: $('#date3').DatePicker({ flat: true, date: ['2008-07-28','2008-07-31'], current: '2008-07-31', calendars: 3, mode: 'range', starts: 1 }); Script 2: … | |
alright guys so am havign trouble finding a way to search for seats that are toghether, my pgram consists of a theater with 20 x 10 seats, i have created a seatSelection class and the theater file which has the main. Ok so heres a sample output of how it … | |
Hi all.. Please help me how to clear all textbox in form. It really hard to set each of it. Thank you Aura | |
Hello everyone.I am a programmer between beginner and intermediate.I have experience in c/c++. So,i wanted to jump into the game programming world.First,i wanted to develop games withour graphics to increase my game logic.The latest games i have made is guessing game.Would you guys suggest some easy gaes to write..say..card games.I … | |
Hi, I have been trying to solve a problem,i need to write code to an existing projectile class to calculate the maximum height reached by a projectile ,i have tried all possible solutions but seem stuck,here is the code below # Canonball in form of a class # projectile.py from … | |
i'm helping a friend and i'm almost done with the program what i can't figure out is i need to sort the number of votes from lowest to highest my database is just ms access and i'm trying to display the photos of the candidates who got the highest votes … | |
I was having a discussion with a co worker just now and we discussed the idea of a message box coming up as part of a search and displaying a JPG picture as part of the results. Is that even possible? If so then how difficult would it be to … | |
I've upploade my php codes under the address http://george.freeoda.com, my problem is the calc link located on the http://george.freeoda.com/calc.php, this php files processess successfully on my server locally, what might be the problem? my full php codes are: <?php $n1 = &$_POST['n1']; // textbo1 declaration $n2 = &$_POST['n2']; // textbo2 … | |
Hello Community, I need to shortern a really long string then when it's in my program the string will expand back to it's normal length ready to be used in the program. I don't care what kind of method i need to use. Please help... | |
Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.GiveFeedbackEventArgs'. This is an Error while loading a page . Page loading Contains functions for filling combobox and grid . I can't able to Traise where the error occurs.Please help | |
hi .. I use visual basic 6, I opened a new project, when I create a data report using Crystal Report 8.5 which already include the current Visual Basic will add a new report by way of Add -> Crystal report 8.5, the error message "Visual Basic has stopped working … | |
Hi , I am trying to get a photo type base to work and have got stuck , I have 3 files , 1- the html - that takes the input called door.html 2- the connect.php to open the base. 3- the php to insert insert.php. 1= <FORM method=post action=insert.php><P> … | |
#include<stdio.h> #include<conio.h> #include<dos.h> void main() { int minutes,seconds,timeremaining,input=1; char cAns,cAnswer; clrscr(); gotoxy(35,15); printf("Press S to start the game: "); cAns=getche(); if(cAns=='S'||cAns=='s') { clrscr(); printf("\nAre you a human? Y or N: "); scanf(" %c",&cAnswer); timeremaining=input; do { input=timeremaining; minutes=input/60; input=input-(minutes*60); seconds=input; gotoxy(1,1); printf("%02d:%02d",minutes,seconds); timeremaining++; delay(1000); }while(timeremaining<=90); if(timeremaining>=90) { clrscr(); gotoxy(33,12); printf("TIME'S … | |
Hi All, I have a problem with a treeview class in my windows form. Specifically I'm try to detect when a user has expanded or contracted a node verses if they have clicked/selected the actual node. When the user clicks on the node, I want to expand / contract the … | |
Hi Im working with a python Odd numbers and my question is?. > An integer can either be odd (like 1,3,5,7,. . . ) or even (2,4,6,8,. . . ). > > 1. Write a python code which takes as input two numbers and displays all odd numbers between them … | |
Hi All, I am uisng Mysql DB and i have a task for suggesting Categories based on User keyword input. I have written the query as below but i need to ignore white spaces while matching, how can we achieve it SELECT search.*, MATCH (name) AGAINST ('black' IN BOOLEAN MODE) … | |
Hello all! I am sorry to have to waste your time with such an easy problem but I am stuck with some coders block on this one. I know it is definitely an easy fix I just cannot seem to wrap my head around it at the moment... I do … | |
Assuming a simple class like below and the main like below, will the class variable be stack/heap allocated depending on how the class is instantiated? OR will the class variable be allocated depending on how it is implemented? class Foo { private: std::string Bar; public: Foo() : Bar(std::string()) {} }; … | |
Group, I'm trying to change the "sa" password to my SQL Server Database via the 2008 SQL Server Manager Express. I have followed every instruction dillegently and can't seem to "complete" the change. Each time when trying to login with the SQL Server Authentication, I get the error message that … | |
I am getting wrong output. My Code is following, in which I have to use function unsigned long powerof2(int n); #include <stdio.h> #include <stdlib.h> #include <math.h> //int powerof2(int n); unsigned long powerof2(int n); int main(void) { printf(" n 2^n\n"); printf("-- ---\n"); for (int n=0; n<65 ;n++) { //printf(" n 2^n\n"); … | |
Hi I am really not good with javascript but I have a script that retrieves a list of state names with this code: map.objectList = new AmCharts.ObjectList("listdiv"); Apparantly it is withouth any format retrieved in a UL LI format. I need to "catch" this list (I know it has 51 … | |
I am trying to print: 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 9 512 10 1024 11 2048 12 4096 13 8192 14 16384 15 32768 16 65536 17 131072 18 262144 19 524288 20 1048576 21 2097152 22 … | |
How to read a specific value from a text file and then save the value in another text file. Example: in data.txt file there is some values. Item Name : m-01 Item Brand : One Man Item size : XXL Item Price : 1000 Item vat : 15% these are … | |
I am trying to create a simple scoring function using sprite collision. I have my sprite ids defined under a seperate header and my class is in order. LEFT_SCORE is animated using a sprite sheet (obviously). int Ball::leftGoal( ) { int leftScore = 1; if (dbSpriteCollision (BALL, 12)) {++leftScore;} dbSetSpriteFrame … |
The End.