199,114 Archived Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 { … | |
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 … | |
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); /** … | |
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 … | |
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]; … | |
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... | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 { … | |
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 … | |
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 | |
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; } /* … | |
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 … | |
[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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … ![]() | |
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 ![]() | |
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 … | |
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 … | |
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" … | |
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 … | |
I am having problems with my turbo c. its showing me that it cannot find out the include<stdio.h> file from the system. | |
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 | |
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 … | |
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. | |
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 … |
The End.