43,549 Solved Topics
Remove Filter ![]() | |
Hey All I'm trying to write a simple write .csv file function that can take multiple arrays of objects and write to a specified file. I understand that I can use params to pass an unspecified number of variables, but is it possible to use it to pass an unspecified … Software Development | |
hello, i am a little confused with something. im reading values from a text file which only contains 1's and 0's. here is the code. [CODE] char y; ifstream inFile2; inFile2.open("c:\\binary.txt"); ofstream fileout2; while (inFile2 >> y) { //cout<<y<<" "; this would print either a 1 or 0 // based … Software Development c++ file-system | |
Hi friends, I've recently changed to ubuntu 9.04.. I've not had any problem with the installation of pyqt as it is available from the ubuntu repositories with umpteen number of packages.. Thanks to ubuntu for making my job easier.. Anyhow i've to download tarball file for python 3.1 and installed … | |
I need help... I have a datagrid that show an online status. the Status column have 2 status, OnLine n OffLine. I want to make any record that Status = Online into bold style. is that possible ?? all I know is to make all datagrid into bold.. please help. Software Development vb.net | |
The function has to show the population for year 1, 2 and so on until the population reaches 1 million. The population increases by 8% every year? [code] def population(): current=input("please enter the current population of the city: ") increase=current/100*8+current year 1=increase while increase>1000000? [/code] Software Development python ![]() | |
While learning Python I've come across this several times, but I've never been able to get it to work, so I always work around it. No more I say! I'm using 3.1, so I'm assuming that string.split doesn't work in 3.0 and later. Say I want to split [I]"Why does … Software Development python | |
In the following program, at what point does my program call the _str__ method/constructor? I don't see it specifically being called at any point. I know it happens with this line print [CODE]"Printing crit1:" print crit1[/CODE] but I still don't see how or when this happens. Thanks for any and … Software Development python | |
What is the command for starting files? Something like this im guessing [CODE] start.file(C:\test.txt)[/CODE] Software Development python | |
Ok...i know a little bit of C++ (basics, like cout, cin, a little bit of classes ect) and realized something after watching a video from Chris Pirrilo... I dived into C++ without researching other languages first. My question to you is...should i stay w/ C++ or switch to C#? Can … | |
All I need is a frame, and a panel. On the panel I have to display 3 pictures 1 at a time, separated by a pause of custom length. I need the panel to be 773x632 pixels for my png image. What I need is the function for displaying an … | |
write a program which will print power of 2 use loop 2 ^ 0 1 2 ^ 1 2 2 ^ 2 3 2 ^ 3 4 Software Development visual-basic | |
Please, is there anyway to make the forms in vb6 transparent? I need urgent assistance. Thanks. Software Development visual-basic | |
Hi, My program takes any polynomial and calculates the first and second derivatives and evaluates them at a given x. The coefficients of the polynomial are stored in a vector A. I now want to do something else to this polynomial, however my calculations for the derivatives mean that the … Software Development c++ | |
I have an arbitrary number of files whose names I will know and I want to open them for reading. The important point is that I do not want to open them sequentially using a single file pointer. I need to have them all open at the same time. This … Software Development c | |
Hi everyone, I am new to java and I wrote a program that does the following (using Scanner): Name: Last Name: Age: (More? Y/N): When the user presses Y, he/she can add more information. Then in the end, I want to print something like: The participants are: Soni Smith (30), … Software Development java | |
I have to split a line that has been stored in a String[], and then place the parts in an ArrayList. Currently I am doing the following: (vehicles is the origional String[], details is the String, detail_split is the ArrayList) [CODE]for (int y = 0; y < vehicles.size(); y++) { … Software Development java | |
hey ill get straight to the point i need to create a python script to read each record from a .txt file and output each record in the same format to the cmd line, 4 lines including (name,address,ph no and email) 3 records. it needs to utilize the basic logical … Software Development python | |
New guy here and I'm stuck on this code I cant get to work right. I want to input any amount of numbers and I want the output to be the largest number along with how many times the largest number was input. I'm just off a bit but I … Software Development c++ | |
Hello I'm begining to learn Java and I'm trying to convert from a While loop into a for loop. Sadly I'm just not quite grasping it... I understand the loop is here [CODE]while (n * n > Math.pow(2,i)) { i++; } [/CODE] but it's not quite as simple as changing … Software Development java java-swing | |
Hey guys, So I am trying to make a program that will prompt the user to enter 3 integers (int1, int2, int3), then sort the integers into ascending order. I have the program reading the integers, but I can't get it to sort. I know I can use the sort … Software Development c++ | |
For my project, i have to be able to monitor the keyboard for input. Rather than having the user type in 'r' then hitting enter for an action, how would i have the user type 'r' and then have the action perform, skipping the process of hitting enter. Thanks Software Development c++ | |
hi all , I'm stucked with this bug or my error. I don't say that I find a bug on the visual studio compiler, what I need is to make this fix and continue my project. please give me a idea how to start after this kind of bug ? … Software Development c++ visual-studio | |
Hey, I was wondering if someone could help to figure out , how to add a value to a key that already exists in the dictionary. where the values of each key are lists. so for example: theIndex = {124:["b","s"], 356:["dg", "n"]} and i want to add the value "m" … Software Development python | |
How do we get combo box's selected value in asp.net as we use to do in classic asp?? | |
Hi! I was wondering if someone could help with writing the code for the following function. I am having trouble with dictionaries and would greatly appreciate some hints! thanks! Write a function build_car_maker, which consumes a car registry dictionary, and produces a car maker dictionary, leaving the original dictionary unchanged. … Software Development python | |
An interesting question came across my mind: If it is possible to convert a percentage to a Grade(A,B,C,D, or an F). Firstly, there is an easy method to convert a percentage to a Grade; by using an If and Else loop. However, are there also other methods with which this … Software Development java | |
Hi! I'm new to C++, been through the basics, and now I'm attempting to make a small console rpg-game where I want my stats (level, xp and such) to be saved in a file. I've successfully saved them into a txt-file, but how do I open it? I don't need … Software Development c++ | |
Hello daniweb peeps, been learning c++ from a beginners book for the past week or two but have got myself a bit confused, follows is the code that compiles but isn't doing what i want it to (Im hoping the fault is obvious!) [code] #include <iostream> using namespace std; int … Software Development c++ | |
I am creating a File and at the same time writing 3 lines to this file and then closing the file. What I wonder is if the fileSystemWatcher has any event that detects when I have done exactly this operation and closed the file. I want the filesystemwatcher to react … Software Development c++ | |
ok so i am having problems with my program. its a client program talking to the server program. i have both programs working fine but i do not know how to get the conversation to display on the server side of the conversation. here are the codes and makefile [code=c] … Software Development c client-server | |
I need the function to display a square of numbers. This is the actual function. [code] def draw(n): for i in range(n+1): print i*(n) [/code] but if i call the function [code] def drawBlock(3): [/code] then the output should be 333 222 111 but i cant understand how to get … Software Development python | |
![]() | hi everyone, I am trying to design an assembler program with Python using Tkinter and so far it is going pretty good. I just have one question: Is there anyway to change the text color of just a selected text using a text area? What I mean is, you know … ![]() |
Everything below works the first time through, and the validation of the user's choice to proceed or not works, as does his choice to quit; but when it gets to cin.getline it just blows right through it without waiting for input. As my parents used to say, Where have I … Software Development c++ | |
I want to write a program to conduct a binary search and return all the occurrences of a number to the user. I succeeded in coming up with a binary search method but I don't know how to make return all the occurrences of the number. Here is my code … Software Development java | |
Hi Guys, I am new to java and I need some help:) First of all: I admit, I did not write this, I re-wrote a bit of it for my needs, and therefore may not be able to fully understand parts of it. The thing is, the script accepts only … Software Development java | |
Hello folks. I have done a good amount of research and I'm still unable to determine how I can perform real emulation of a joystick. What I found on the web was using the mouse movements to simulate a joystick that moves an imaginary little ball. No, what I wish … Software Development c# | |
Hello, I have some app like this: Form1 (Parent) -> open in load event a Form2 (child) which have a button that open a 3rd one child form (then close Form2). My question is how I can access a control property (like labeltext (in statusbar) in Form1)? Form1 Parent [CODE] … Software Development | |
[CODE]Private Sub Command1_Click() Dim i As Integer, j As Integer For i = 1 To 10000 For j = 1 To 10000 Print "SDFGH========="; j Next j Next i End Sub[/CODE] when i click on command1, i want to view the enitre execution of loop,i.e, from [CODE=text] SDGGH=============1 SDFGH=============2 . … Software Development visual-basic | |
I'm trying to print horizontally not having any luck. I need to print I#x where x one through the length of a list i.e.-I#1 I#2 I#3 I#4 etc. This is what I have which is syntactically wrong: [CODE]for x in range(1, len(depend)): print "%05s" ('I#'+str(x))[/CODE] Could someone please point me … Software Development python | |
[CODE=C++]polynomial polynomial :: derivative(void) { polynomial outpoly; outpoly._coef = new double [_degree]; outpoly._degree = (_degree-1); for(int i=0; i<(_degree); i++) { outpoly._coef[i]=(i+1)*_coef[i+1]; } return outpoly; } //header: #pragma once #include <complex> #include <iostream> #include <string> #include <sstream> using namespace std; class polynomial { private: double * _coef; int _degree; public: // … | |
I want to make a dynamic array. but when I view the array, I think there's something wrong with the index part. Please help. Thanks! here's my code: [CODE] #include<stdio.h> main(){ int* a; int number; int choice; int index = 0; int head; while(choice!=4){ printf("\tMENU\t\n"); printf("[1] add number to array\n"); … Software Development c | |
Dear forum members, I'm working on an accounting software, which I was planing to do using C#. Now that I see there is WPF that I can use instead of WinForms, I would like to ask you a couple of questions. [LIST=1] [*]For an account software, which I would like … Software Development asp.net c# iphone web-browser web-design | |
byte range is 0x00 to 0xFF haw to write to text file like this byte 0x00 = byte 0x01 = byte 0x02 = ...... all to byte 0xFF Thanks. Software Development pascal | |
Hai May be too simple but I was not able to locate info on this.. My main form will have a button, when I click on it another form should appear. I can do it. I need the parent form there( no .hide) but it should not be 'click-able'. It … Software Development | |
I got it when trying to initialize my array of sprites (( the only one trowing me null is the sprite2D[] AllianceCharacters declaration: [CODE]sprite2D[] AllianceCharacters; static string Cardspath = Directory.GetCurrentDirectory() + "\\Content\\Cards"; string[] ActionBar = Directory.GetFiles(Cardspath + "\\ActionBar\\"); string[] Equips = Directory.GetFiles(Cardspath + "\\ActionBar\\Equips"); string[] CharactersAlliance = Directory.GetFiles(Cardspath + "\\Characters\\Alliance\\"); … | |
Hi, I've got a bit of a problem with an application I am writing at the moment. I know it has to be something small which I'm missing, but I can't figure out what it is. Basically, I have a Query (or Stored Procedure if you prefer) in an Access2000 … Software Development microsoft-access open-source visual-basic | |
Suppose in my one particular piece of code, I am avoiding loops. ie instead of providing 'for' loop to do the task , I am copying and pasting a part three or four times to make it simple (?)to code. In this case what are the consequences of my action? … Software Development | |
Hi guys, so I have this project where the requirements are as follows. Create a class called Car, which serves to represent a particular vehicle at a car dealership. Consider that each car has the following properties, entered by the user (all value ranges should be error checked): Sticker price … Software Development java java-swing | |
how could i square the result of function?.. so when i call the functioon [code] def sum(first, last): for i in range(first, last+1): print i return i**2 [/code] it gives the answer as 50, as it should square 3,4 and 5=50 Software Development python ![]() |
The End.