64,152 Solved Topics
Remove Filter ![]() | |
HI I am working on a project to animate user-defined algos. I am still at the very beginning but I am practicing code in swing and here is an Array class that the user can use in his user defined algo: [CODE] import java.awt.*; import javax.swing.*; public class Array1 extends … | |
hello all i hv a jsp code in which there is a link to another file successLogs.jsp as follows <td align=center><a href="successLogs.jsp?strHour=<%=strDate+strHour%>&strcli=<%=strcli%>"><u><%=totSuccCount%></u></td> in successLogs.jsp there is call to a linux script which is fetching a file from the logs. The problem is that when i click on the link in … | |
Hi I'm asked to write two functions to find the factorial one using recursion and the other using loops. the range of numbers which if have to output their factorials is 1 to 500(N) after some time the computer won't be able to find the factorial .I have to output … | |
i have a problem here. [CODE][/CODE] #include<stdio.h> int main (){ int counter; int x; int y; int product; counter=1; x=1; y=1; product=1; while (counter<=5){ printf("%d>%d\n",x,y); x=x+1; y=y+2; counter=counter+1; product=product*y; } printf("Product>%d",product); return 0; } well,the product should be 945.but what have printf out is 10395?what is the provlem inside the … | |
here is the things so far i got. [CODE][/CODE] #include <stdio.h> int CF(int C); int FC(int F); int main(){ printf("Fahrenheit equivalents of Celsius temperature\n"); printf("Celsius \t Fahrenheit \n"); for (x=0;x<=100;x++); printf("Celsius equivalents of Fahrenheit temperature\n"); printf("Fahrenheit \t Celsius \n"); for (x=32;x<=212;x++); Pls,somebody help me.T.T | |
first we read something from the text files ( INT type only ), then i want read till "\n" stop and inceasement a value, examples, [CODE] int Attendance[10][10]; ExistingFile = fopen("Attendance.txt", "w"); if(!ExistingFile) { printf("\t\t This File Cannot Be Open Successfully!!\n"); printf("\t\t Please Check It!!\n"); exit(-1); } else { fprintf(ExistingFile, … | |
I am developing a application using VB 6.0. My requirement is if the user log off the application using File->Exit the below action should perform Action1 : The login status should get updated with 0 in the back end table called "Create_Login" so that next time if the user login … | |
I wanted to know the applications of linked lists in real-world applications. Are there any alternatives to Linked lists ? Thanks so much ^_^ | |
I'm just trying to make a cash till and something is wrong because when i try to execute it it just freezes. I think something is wrong with my loop, also i don't know how to refresh my sale total when i click clear order. It clears it but when … | |
Hi, I have am interesting problem that I cannot think of a solution for. I have an VB.NET application. This Application is permanently resident in memory and minimized to the tray area because we use it very often. The problem comes in when we VPN into a client's site. These … | |
Hi, Im doing a project in my class where i have to make code. i have to make a spread sheet that will control the sales that are taking place. The cash till has to add up the total cost of the items being bought, take in the input of … | |
Hello, I am working on a combo box, Visual Basic 6.5 on Microsoft Word 2003. When I put in the text for the combo box, it loads fine. I save, close the document. When I re-open the file, everything in the drop box is gone. What am I doing wrong? | |
This is my first post and I am just starting with arrays, but I am still stuck on how this function is suppose to work. I had to make two void functions and two-value returning functions. Main should call the getTestScores and get three test scores, then it should call … | |
Simply im in the middle of creating a search engine to that will pick out data from a certain table depending on what dropdown menu has been choosen! Ive got the search engine and display page working, but am trying to create an individual page for the results which i … | |
I'm creating my second application. I'm not very good at coding. If i make dump mistake please bare with me. I can't get this Progress bar to work, I tried few steps. I'm writing this application to copying the Host file to a folder in desktop for troubleshooting purpose at … | |
I have the following three tables: ClassHeader ClassID Major TeacherClasses TeacherID ClassID StudentClasses TeacherID Major I want to select all TeacherClasses where the a given Major = ClassHeader.Major | |
Hello, I'm new here, so please be gentle. I have posted my code at the following page: [url]http://www.bpaste.net/show/11397/[/url] In short, I need to read in my file, block by block, but have the re.finditer regular expression report the offsets relative to the beginning of the overall file, rather than relative … | |
![]() | Basically I've looked everywhere for help with this problem and been unable to find any so i thought i'd ask here. I have a text file full of numbers which i wish to manipulate. the actual text file has about 200 rows and 10 columns, but in this example i'll … |
Hi everyone, I'm Dee I'm new here so please excuse me if I'm asking this in the wrong forum. I must also admit that I also know very little about .NET / PHP and techie stuff :confused: so I'm after some help and guidance if possible. I'm getting an enormous … | |
Hi every one, please could you help me in my project!! I'm trying to design a words game that's give you the first two letters from the word and you insert the rest to make a word (for now I'm just using "co" as example and I have just one … | |
Hi again everyone. I am trying to change around this program I wrote to meet some new requirements, but getting stuck on how to do it. *Write a program that reads a file consisting of students' test scores in the range of 0-200. The students scores should be stored into … | |
Ive made this quick program to strip the "youtube - " prefix off my mp3 collection, so i started modifying a script i had made before to replace file names with a <filename><incrementing number> type name. It has gone well so far, with the only problem being it will strip … | |
Hey; I'm practicing with template classes. When I declare a user-typed destructor for this template class, the program freezes and needs to be closed explicitly. Obviously, in the destructor, I am trying to release the memory allocated to hold the coordinates[3] array. What is the problem with declaring a user-typed … | |
[CODE] #include <iostream> using namespace std; class vector1 { float vector[]; int y; public : vector1(int x) { y=x; cout<<"enter the elements of the array"; for(int i=0; i<=y; i++) { cin>>vector[y]; } cout<<"elements of vectors are"; cout<<"{"; for(int i=0; i<y; i++) { cout<<"\n"<<vector[i]; } cout<<"}"; } void modify(int z) { … | |
FileInputStream inherits from InputStream which has a mark() method which does nothing. FileInputStream itself doesn't define any mark() method. Even then, if I wrap a FileInputStream object inside a BufferedInputStream object and call markSupported() on it, it returns true. In the docs, it says that the mark() method of any … | |
Hi! Is it possible to pass objects like you do in JavaScript in PHP: [CODE] function example($args){ ... } example({foo: 'bar', lorem: 'ipsum'}); [/CODE] Or something similar to this? So that you both get an "infinite" number of arguments and a chosen name for the variable ($args['foo']). I know you … | |
So in my database "project" i have tables [B]courses[/B],[B]courses2[/B],[B]courses[/B] and [B]participants[/B],[B]participants2[/B],[B]participants3[/B] and [B]company[/B]. On page company.php i have a print link where he send me on a page named print.php ,where i can see the participants. Now on print.php i can see only participants from courses and participants ,i want … | |
I'm trying to create a random float generator. The float must be 2 decimal places and between the values 0.50 and 999.99. I tried casting rand() to a float below, which didn't work. I'd still like to know the reason this didn't work. [CODE] saleAmount = ((float)rand() % 99950.00 + … | |
Hello, I have made a web application program that takes one string and outputs it through an array into three seperate textboxes using comma seperated values. This works fine - BUT I want data 0 to only allow entry of strings (it's a name), data 2 to only allow entry … | |
Hi, I need two functions one that checks if the inputed number is a prime number and second one that splits the given number in to prafactors. I have the first function done but the second one is a bit annoying. The function has to take the given number and … | |
Here's my problem. I need to add only the first and last elements of each row, and display them separately. Ex. Row 0=11 Row 1=11 Row 2=8 [CODE]int arr[][]={{5,9,6},{3,2,8},{7,0,1}}; int sum=0; for(int row=0;row<arr.length;row++){ for(int col=0;col<arr[row].length;col++) sum=arr[row][col]+ arr[row][col]; System.out.println(sum+" ");[/CODE] this is my code, and i think i just need some … | |
How could I empty my JTable (AbstractTableModel)? If I run [ICODE]tableModel.deleteData();[/ICODE], then the message "0 >= 0" appears. Thanks! [CODE]class QueryTableModel extends AbstractTableModel { Vector cache; // will hold String[] objects int colCount; String[] headers; String url; String databasename; String login; String pass; Connection db; static Statement statement; public QueryTableModel(String … | |
Hi guys! I can not understand - what is wrong with this simple line - [CODE]create table SUBJECT ( SUBJ_ID NUMERUC not null, SUBJ_NAME VARCHAR(100));[/CODE] error message -[QUOTE]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to … | |
Hi! How could I open a file saved on FTP Server? I'm using org.apache.commons.net.ftp.FTPClient to save/delete files. There are only 5 types of files: doc, docx, xls, xlsx, pdf. If I select a pdf file, then it must be opened in Adobe Acrobat, etc. So, what is the best approach … | |
How do I allow the display to show numbers with the commas, but then when it does the calculations, have the commas go away for the math since obviously java can't read commas in calculations? example [CODE] DecimalFormat df0 = new DecimalFormat("###,###.00"); JFormattedTextField loanText = new JFormattedTextField(df0);[/CODE] the user puts … | |
Hello! I’ve got three tables that I want to link together. When I try to upload images and text throught a form, the web browser show this error message: [QUOTE]Error, query failed 1452-Cannot add or update a child row: a foreign key constraint fails (`mn000532_almacen`.`images`, CONSTRAINT `images_ibfk_1` FOREIGN KEY (`itemID`) … | |
[CODE]<?php include("includes/connection.php");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php echo $sql= "SELECT * FROM forms WHERE today >= CURDATE() - INTERVAL 30 DAY"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) {echo $City= $row['City']; echo $Name=$$row['Name'];} ?> </body> </html> [/CODE] i just … | |
I know this is probably overly simple but I am terrible with math. This is a section from a game I'm attempting with PyGame. Instead of using pixels for coordinates I have my own render function that uses blocks(actually just cnverts block value to pixels), which are 32x32 pixels, so … | |
Well, I've been Googling for at least 30 minutes, and looking through past posts about this, but just can't seem to find an answer that works. Basically, I've got a component class that has a single method I'm trying to test out. The entity class has a private array of … | |
Hi, ^^ I'll be competing for a java programming contest next week and one of the instructions is to "Receive input from the console window (of JCreator)." Thus, programs shouldn't involve any GUI. I've found this very useful tool called Scanner in the java.util package. My self-training was going smoothly … | |
Hi.. I want to use the pear package.Pear is already on my xampp package.On the file php.ini the pear is included(I didn't change the file php.ini..there is a line like include_path = ".;c\xampp\php\PEAR").I used the following code to retrieve the results from database..But it is not working .. [CODE]<?php // … | |
Hi to all . I write the JS code : [CODE]<?xml version = "1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>TemperaturE</title> <script type = "text/javascript"> function temperature() { var temperatureValue = myForm.TemperatureField.value; if ( temperatureValue < 20) {document.body.style.backgroundColor = "Blue";} if (temperatureValue <40) {document.body.style.backgroundColor … | |
I have the following query [CODE]SELECT * from PHOTOS WHERE Subject = '$Subject' AND Location = '$Location' ORDER BY Number[/CODE] It results in the following output 1, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9 How does PHP/MySql think 10 is lower than 2?? … | |
Hey Guys i was wondering if i could get a bit of help I'm creating a program that contains a number of different sorting methods (insertion, quick, merge) that sort an array of bikes. [CODE] Bike[] bikes = new Bike[13]; bikes[0] = new Bike("Mountain", 160, "Diamond", 6, 18, "Standard", "Hardtail", … | |
Hello. I going to write fames.xml with my app. I need to know the best way to handle adding a block of XML but not at the end because I need to have the root element at the end. Any ideas. 1.never end it but when I use it add … | |
I have a database with a listing of events. I do not want to include events that have already happened, so I want to query the db for events from the current date going forward. I have tried a number of things but it is not working. Here is what … | |
Hi! I saw a post on this site that exhibited the same exact problem that I have for a homework assignment and while it was solved, my issue with the homework assignment is different. The C++ program that I wrote asked the user to input information but once you enter … | |
Hi, i have made a form in which people fill out their details and its gets saved in database with [CODE] $today = date("F j, Y");[/CODE] now i want to make a search for that forms with date , like Search with in last 3 days or Last 6 months. … | |
Hello everyone, I've used this website many times to help myself based off of others' questions, but now I have a problem of my own that I can not solve. I was assigned the task of creating a stack program in C++ using a linked list. Seems simple enough, but … | |
Hi There, I have found a very usefull and lightweight code that is made by the famous Tim Van Damme, a Dutch compatriot. Here is the code, i will explain my question beneath. The js that works in combination with the js libary. [CODE]<script language="javascript" type="text/javascript"> jQuery(document).ready(function($) { $('.tabs').each(function () … |
The End.