199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for George_91

I've to make several experiments of some algorithms. I want to send those results to a .txt file [CODE] //.... for (count= 1; count<= 20; count++){ //.... std::cout<<exp<<"Time: "<<duration << " seconds" <<'\n'; ofstream f2; f2.open("results.txt", ofstream::out); for(int i=0; i<=20; i++){ f2<<duration<<endl; } f2.close(); } [/CODE] With this code, I …

Member Avatar for MachDelta
0
184
Member Avatar for seanbl1

Hi there, I am currently studying Java just over six weeks and am a novice. I have been give a question to do, the question is... Theatre Ticketing System Write a program that reads ticket details from the user and outputs those details in the form of a Theatre ticket …

Member Avatar for JeffGrigg
0
107
Member Avatar for slidepuppy1

I want to return the value of i, but I don't know how. My code is: [CODE]public int indexOfFile(String filename) { int value=0; for(int i=0; i<DRIVE_SIZE; i++) { if(drive[i]!=null && drive[i].getName().equals(filename)) { value= i; }else{ value= -1; } } return value; }[/CODE] so I want the value of i, but …

Member Avatar for stultuske
0
168
Member Avatar for Brokenpwn

I recently started reading Beginning DirectX 10 Game Programming written by Wendy Jones, and I'm about 60 pages in on the chapter about sprites, and I feel like I haven't learned anything, half the code they throw at me I can hardly decipher, and even if I do that, how …

Member Avatar for Serapth
0
210
Member Avatar for just_starting

[CODE]def main(): distance, fuel = 0.0, 0.0 inStr = input ("Enter gallons and miles (with a space between):") while inStr != "": gallons,miles = inStr.split() gallons = eval(gallons) miles = eval(miles) print("MPG for this leg: {0:0.1f}".format(miles/gallons)) distance = distance + miles fuel = fuel + gallons inStr = input("Enter gallons …

Member Avatar for just_starting
0
167
Member Avatar for vishwanath.m

hey guys, i have a problem with this question.. Given n and m, calculate 1^1 + 2^2 + 3^3 + ... + n^n modulo m. here i cant use power function directly as it only works for very very small inputs. Test your code on anything larger and you will …

Member Avatar for StuXYZ
0
205
Member Avatar for triumphost

I have an iFrame that is 1024px X 700px. I removed the scrollbars using Scrolling="No" because the scrollbars don't look very pleasing to my eyes. I use javascript to scroll the iFrame but for the life of me, I cannot figure out how to detect if I'm already at the …

Member Avatar for triumphost
0
883
Member Avatar for Juicyjuice

[CODE]import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.PostMethod; public class sslRequest { public void run(){ String url = "https://pipeline.sbcc.edu/cp/home/login"; try { HttpClient client = new HttpClient(); //client.getParams().setParameter("http.protocol.single-cookie-header", true); // client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY); PostMethod method = new PostMethod( url ); // Configure the form parameters method.addParameter("user", "username" ); method.addParameter("pass", "password123" ); method.addParameter("uuid", "********-f08d-4d64-aeef-************"); // Execute the POST …

0
161
Member Avatar for arson09

I'm really confused at the moment. I'm not looking for anyone to give me the answers, but if you could at least give hints on what i need to do in each method, i'll be happy!! FYI, one of the main things that's confusing me is that i'm not allowed …

Member Avatar for arson09
0
225
Member Avatar for graphicsgrl

I am new to python(version 3.2.11) and having some problems with this code...Please Help!! Here is the program I am supposed to write: Write a program which computes the fuel efficiency of a multi-leg journey. The program will prompt the user for the starting odometer reading and then for information …

Member Avatar for graphicsgrl
0
954
Member Avatar for haoth

Hi, I am having a bit of trouble finding a way to check a string for the highest and lowest number. Example: I would have a: [CODE]String example = "1 3 5 9 4 3";[/CODE] And now I would have to check which is the lowest number and the highest …

Member Avatar for haoth
0
371
Member Avatar for ao_py

I have written a program that simulates volleyball using rally scoring. In rally scoring, the team that wins the rally wins the point, regardless of which team is serving (for this reason my program ignores the issue of who’s serving). Games are played to a score of 30 and must …

Member Avatar for Gribouillis
0
2K
Member Avatar for lxXTaCoXxl

I have a string array that I'm storing complete strings into. The array size is 1,000 so that I have plently of space to work with. Storing the strings into the array is working just fine. The part I need help with is removing specific indexes from the array. I …

Member Avatar for lxXTaCoXxl
0
161
Member Avatar for atticusr5

Hello all, I am messing around with the jPaginate files, essentially a pagination script using jQuery. I have the mark up working, but I am just messing around (not a real expert in JavaScript) and I have a simple question. When the user clicks on the next page icon, the …

Member Avatar for atticusr5
0
153
Member Avatar for pavangajula2007

I am btech cse student final year. I have more eager to develop the projcet on java platform but I dont know how to initiate and what books I have to read. Please suggest me some tools and advices for developing the project in java

Member Avatar for stultuske
0
108
Member Avatar for red_ferrari007

PROGRAM GETS COMPILED...BUT GIVES ERROR ARRAY OUT OF BOUNDS...PLEASE HELP AS SOON AS POSSIBLE !!! import java.io.*; class Evaluate { char postfix[]; int stack[]; int i,a,b,c,top,n; BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); Evaluate() throws IOException { System.out.println("ENTER ARRAY SIZE"); n=Integer.parseInt(input.readLine()); postfix=new char[n]; stack=new int[n]; top=-1; i=-1; } void readpostfix() throws IOException { …

Member Avatar for NormR1
0
331
Member Avatar for furlanut

I have a simple form which echoes data from db. when name typed. It works fine when name is typed and submit pressed. But I see that even when no name is selected or, when existing results on screen, pressing submit brings up ALL names from table not just row …

Member Avatar for furlanut
0
124
Member Avatar for jacksantho

Hi, I was trying to import the excel values in mysql DB. While trying, am facing this error. Please help me out: [CODE]Fatal error: Call to undefined function mysql_real_espace_string() in E:\xampp\htdocs\read.php on line 49[/CODE] CODING: [CODE]<?php ini_set('memory_limit', '16M'); set_time_limit(0); require_once("E:/xampp/htdocs/phpexcel/Classes/PHPExcel.php"); $inputFileName='./xls/test_data.xls'; /** Identify the type of $inputFileName **/ $inputFileType=PHPExcel_IOFactory::identify($inputFileName); /** …

Member Avatar for jacksantho
0
1K
Member Avatar for WaltP

Using onMouseOver in a link - I am able to display a file's contents in a frame. - I can display an image file in an IMG tag But I can't figure out how to combine the two. What I want to do is onMouseOver display the contents of a …

Member Avatar for WaltP
0
177
Member Avatar for George_91

I've a vector of size 'n', I need to do random couples with the n numbers (integers) and make a swap between them. Any ideas how? I had this idea [CODE] int low = 0; int temp; for (int high = n-1; i= low; high-- ) { temp = v[high]; …

Member Avatar for George_91
0
191
Member Avatar for nerkla

Hi, My combobox is filled with file names (without extension) of all the .txt files in folder "[I]c:/files[/I]". When I select one file name from that combobox, how can I show that files full path in textbox or label? Sorry for my bad english...

Member Avatar for nerkla
0
146
Member Avatar for triumphost

[IMG]http://i.imgur.com/DGegu.png[/IMG] I have that page above.. But the thing is the entire website was made using an iFrame that loads another page.. Each page has one of those at the bottom. Thing is when the main page loads the second page, there are duplicates of those at the bottom. I …

Member Avatar for Amr87
0
228
Member Avatar for mccarthy.den

hello everyone. couple of days back i started learning C (with the help of internet) i have do while loop which i can't get to work as long as i know, when i press 'y' it should again ask temperature. but it is not doing that. i am using Turbo …

Member Avatar for WaltP
0
135
Member Avatar for learner guy

hi can anyone help me in making this code work ..i will be very grateful to him/her [CODE]#include <iostream> #include <stdio.h> #include <conio.h> #include <windows.h> using namespace std; #define BLACK 0 #define BLUE 1 #define GREEN 2 #define CYAN 3 #define RED 4 #define MAGENTA 5 #define BROWN 6 #define …

Member Avatar for WaltP
0
392
Member Avatar for cdea06

Ok this is driving me absolutely crary! I'm trying to add a static method Account consolidate(Account acct1, Account acct2) to my Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should be …

Member Avatar for JamesCherrill
0
244
Member Avatar for nestkojex

Hello guys, i created a form and i want to form to serve a dual purpose of sending data to my database contacts and and another database for newsletter. so the task is as follow: one form serving two databases at one click on submit. i need your help. thank …

Member Avatar for diafol
0
99
Member Avatar for selma_ter

Hello! I create a class which extends Thread. I can start the thread with run() method but the new thread does not runs parallel on my main application. I try the start() method which runs perfect and parallel to my to my main application. -Here i could not understand what …

Member Avatar for JamesCherrill
0
196
Member Avatar for zack_falcon

My professor has instructed me to make a simple project that requires the use of a database server on one computer, so that another can connect to it. If my program makes a change in the database, the other program is updated automatically. As in, it is updated as soon …

Member Avatar for zack_falcon
0
145
Member Avatar for Resentful

I know this may be the wrong section, but I couldn't decide which was best. I understand VB.Net quite well, but Actionscript throws me off most of the time. I am needing a bit of Actionscript converted in VB.Net. [CODE]package com.adobe.crypto { import flash.utils.*; public class HMAC extends Object { …

Member Avatar for Reverend Jim
0
168
Member Avatar for loupgarou

Hey everyone, I have a quick question about some Java code. I need to write a method that fills an array, with a few conditions. The method I'm writing is called readArray. There are [U]two[/U] arrays, one called "states" and the other "capitals". I have to fill both these String …

Member Avatar for JamesCherrill
0
204
Member Avatar for dennysimon

hello all i just learn java syntax to extrac jar file we command : jar xf jar-file but there no information where the extracted files will be located and what is the sign if the command successfull or not any info ? thank denny

Member Avatar for rajesh.ingole
0
85
Member Avatar for Vasthor

the program behaviour is different with code that have similar function this [CODE] #include <iostream> #include <string> int main() { int a = 1; while (a < 11) { int b = a++; int c = a * b; std::cout << c << std::endl; ++a; } return 0; } /* …

Member Avatar for Vasthor
0
151
Member Avatar for Amr87

Hello Everyone, I`m Using this code to pass javascript associative array to php using jquery ajax [CODE]function install (loc) { var mydata = []; //lightbox(); switch(loc){ case "step1": { mydata['step'] = '1'; mydata['SiteName'] = $("#siteName").val(); mydata['SiteDesc'] = $("#siteDesc").val(); mydata['AdminEmail'] = $("#adminEmail").val(); mydata['username'] = $("#username").val(); mydata['password'] = $("#password").val(); } break; case …

0
94
Member Avatar for marco1497

[B]Why are programming languages dissimilar even if they go after the similar compilation procedure?[/B] [I]>>>elaborate on the compiler design part NOT on the Structure/Concept of Programming language side<<<[/I]

Member Avatar for JeffGrigg
0
257
Member Avatar for hemant_rajput

Hi, I need wrote a script which can go to particular site and download all the wallpaper or images available there. Can any one suggest me how to start with that. I never wrote python prog before but i know python. If anyone cn give me the direction it will …

Member Avatar for hemant_rajput
0
209
Member Avatar for shujat132

Hello Dear Brothers and sisters How are you................? I'm Student of bscs in 6th semester i write three programs but all of these are giving errors and i'm not able to findout probelm. but i thing problem is some where with CONTAINER please check all these Thanks [COLOR="Red"]First One[/COLOR] [CODE]import …

Member Avatar for NormR1
0
1K
Member Avatar for Jade4127

Hello - I am a student who bis mid-semester in an OOP course, with zero programming experience. I am trying to understand the concepts but this stuff is tough....I have an increased level of respect for all of the developers out there! Here is my question..in the code i am …

Member Avatar for Jade4127
0
496
Member Avatar for Violet_82

Hi there, I am having some problem understanding an event in jquery. Given the following example [url]http://api.jquery.com/event.pageY/[/url], I don't quite understand what 'e' is and what it does. The rest of the code is kinda clear, it basically gets the coordinates but I don't understand what is the function of …

Member Avatar for Violet_82
0
236
Member Avatar for logicmonster

I am trying to create an array of a custom object and I think the error I'm running into is that the objects within the array are not initialized prior to use (its a run time error, so i'm not entirely sure). The part that doesn't make sense is, if …

Member Avatar for JamesCherrill
0
778
Member Avatar for bouhbob

Hi there, I've made this page in html: [url]http://www.greenbeanbaby.com/retailers.php[/url] with drop-down menus that work. But when I try to make it dynamic for my client to update it, I'm stuck! The drop downs don't work. Here is the code I'm using: [CODE]$r=mysql_query("SELECT * FROM retailer"); $varloop=1; echo "<div id='wrap'>"; while(list($idr, …

Member Avatar for diafol
0
174
Member Avatar for Nahiyan

Hello, I want to fetch data from a MySQL database's table and order the selected data by date. Which data format is ordered most precisely by MySQL? I also want the date format to be unique. Please express the format just like PHP's one, example: h:i:s. Thanks, Nahiyan

Member Avatar for diafol
0
122
Member Avatar for DeathEater

hey guys. i need advice and guidance for a new project i want to start. imagine a company with some subsections that each one has a program and a separate database on sql server 2008 express. what i want to do is unit these apps so that all of them …

Member Avatar for Ketsuekiame
0
224
Member Avatar for ooops.789

I am trying to generate a random number, but it should not be a particular number. So i am passing the number which should not be the random number and the range in which it has to be generated to the function, and i am reinvoking the function if the …

Member Avatar for cluekiller
0
230
Member Avatar for Joey_Brown

Hello. What is the best way [an a correct one] to check a value, lets say I need a user input in a certain range. Could I place this check inside a setter method? My setter would than be a boolean return type instead of void? Are there some "laws" …

Member Avatar for Joey_Brown
0
3K
Member Avatar for Panathinaikos22

C is a medium level language ? i guess c++ also that's why C/C++ are faster than others, but i dont think VB/C# example are to slow like some says. That i hear exactly is: (" a ATM Software can't be in High level language VB/C#/Java because are to slow …

Member Avatar for timetraveller92
0
159
Member Avatar for stream4559

I am having problems with my turbo c. its showing me that it cannot find out the include<stdio.h> file from the system.

Member Avatar for timetraveller92
0
210
Member Avatar for s_h_a_m

hello im new in programming and i need help in printing this kind of output [CODE] * * * * * * * * * *[/CODE] the number of iterations depends on users input please help me

Member Avatar for timetraveller92
0
95
Member Avatar for Liuhh00

hey guys lol to be honest...i just got this based off of luck x.x idk how but i can't keep doing this with the rest of my programs lol this is a program for an asterick pattern any way i can improve it just by using for loops?please im open …

Member Avatar for timetraveller92
0
359
Member Avatar for Sokh

Hi everyone,Can you please help me? I want a C# code for taking time and date from a site and import this time in my program,can you pls help me.

Member Avatar for Sokh
0
274
Member Avatar for hericles

Hi, I'm trying to debug an android app on a fairly crap tablet I have (WonderMedia WM8650) but I can't get my linux machine to recognise the device.From what I've read its a matter of including the USB vendor ID into the 51-android.rules file but I can't find out the …

0
101

The End.