132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for arithehun

I have joined our local high school's FIRST robotics club, but their programmer graduated last year, so who got selected? The wimpy freshman: me! I am an intermediate programmer (PLEASE don't look at my previous posts, I now know two languages, and am better). So I downloaded an instruction booklet. …

Software Development c++ objective-c robotics
Member Avatar for arithehun
0
1K
Member Avatar for Bladtman242

This is probably really more of a math problem. I hope I want have to go into too much (for you, boring) detail about the code, as the problem resides in this loops. Please let me know if I provided too little detail :) Now for the problem: I would …

Software Development java
Member Avatar for Bladtman242
0
269
Member Avatar for Asset

def getAverage(numList): total = 0 for i in range(0, len(numList)): total = float(numList[i]) total = total + numList[i] average = total/len(numList) return average Hi, I'm really, really new to python, I'm having error on this function and I can't solve it yet, so can someone help? Thank-you :)

Software Development python
Member Avatar for Asset
0
713
Member Avatar for Teiji

Hi, I was checking out the unittest module and try out the sample code. I save the code below in a file call "testrandom.py" and run it using IDLE (Python's default IDE), but I get the following in red. Obviously, the tests run fine as indicated by OK, but why …

Software Development ide python
Member Avatar for TrustyTony
0
366
Member Avatar for micahgeorge

How can I set the time to 00:00:00, now i set it to DateTime startTine=DateTime.Now but i want to show the time as 0 everytime and run the calculation from that(0)starting time........

Software Development
Member Avatar for Momerath
0
8K
Member Avatar for gizmo7008

For my class, I am creating a rock paper scissors game. My code is not all the way done, but I am stuck on a certain part of the process. For some reason, I am getting errors on the "==" in: [CODE] while (true) { human = humanChoice(); computer = …

Software Development c++
Member Avatar for gizmo7008
0
213
Member Avatar for Nassarofficial

The first one is: A program that searches within a file and by user input for a word, and counts how many of this word in the file, and if its in the file or not. Thats what i reached so far: sword, line= 0, 0 filename= raw_input("please input file …

Software Development python
Member Avatar for griswolf
0
96
Member Avatar for hurkagurk

Thank you very much for reading this. I've been programming for 15 years (VB, a lot of PHP, etc), but I've never considered myself a 'real' programmer. Mainly I'll build things that I need that are too specialized to be made by anyone else - simple programs and scripts to …

Software Development machine-learning
Member Avatar for Kimpl
0
201
Member Avatar for somon

Hi, Please can anybody help me a little bit with my assignment , The thing is that I was kinda ill , so i missed many important lessons, but now teacher told that i need to do assignment, Can anybody help me with beggining , * we use Xcode. 1. …

Software Development c++ ide
Member Avatar for m.e.nergiz
0
121
Member Avatar for ZIPB

Can anyone tell how to call a class function from a switch statement example [code] number number::operator+(number) { inputs } [/code] [code]switch (option) { case 1: number number::operator+(number); break; [/code] IS THAT THE CORRECT WAY TO CALL THE ABOVE FUNCTION?

Software Development c++
Member Avatar for VernonDozier
0
146
Member Avatar for hannlim

Any people can help to do this? * ** *** **** Urgent~

Software Development c++
Member Avatar for Sohelp
0
64
Member Avatar for lynneh3979

I am new to this. I am trying to write code to update every other element in an array. Here is all I have.... can't find anything to show me how to do this. [CODE]#include<iostream> using std::cout; using std::endl; int palpha = 0; int main() { char* alphabet[] ={ "A", …

Software Development c++
Member Avatar for VernonDozier
0
145
Member Avatar for Seagull One

I've been working hard all day to get this to work. I'm playing around with the math module in python. I eventually want the following code to help me control the speed of a servo motor. The idea is to get the servo speed to accelerate and then decelerate as …

Software Development algorithm mathematics python
Member Avatar for woooee
0
194
Member Avatar for TrustyTony

I write usually many versions of the functions, sometimes writing functions from scratch again. Sometimes the parameters change from version to version, sometimes they are refering to library of functions that also has multiple versions. Has somebody advice on how to manage best this kind of situation? Should I define …

Software Development python
0
135
Member Avatar for karthikdebbadi

Hi all, I am very much new to any forum or discussion.I am working on C++ on ubuntu. My problem is I have to transfer a file from my domain to a remote server which maintains these files using sftp which is provided by my linuc machine. I am not …

Software Development c++ ubuntu
Member Avatar for karthikdebbadi
0
269
Member Avatar for miha2

Hello guys, I know it's been asked a lot about it here, but that's what I should do (though I'm not quite sure what the teacher wants, is n should be 100, 1000 and further, or use prime numbers. The "first draft" is due this Sunday, the "final draft" is …

Software Development c++ mathematics
Member Avatar for miha2
0
2K
Member Avatar for Shawneal

I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowchart and don't have a clue. I need help with the following: flowchart, pseudo-code, Input and Output variables, and also an Program Desk Check …

Software Development c++
Member Avatar for aasadi
0
261
Member Avatar for Micko

Hello, I'm playing with win API functions readFile and WriteFile. Is it possible to open file using CreateFile in binary mode just like using fopen standard C function. I tried with function WriteFile to write string to a file but it seems that file is opened in textual mode. What …

Software Development api c windows-api
Member Avatar for progneer.soft
0
8K
Member Avatar for Hey11

hello , i want a formula for calculating the median of an even array

Software Development c++
Member Avatar for SasseMan
0
99
Member Avatar for j855

I have a question. I have a list of numbers like: Bobby 9 9 8 4 8 5 6 7 3 8 6 5 5 7 6 9 6 4 6 4 3 4 7 6 6 I have already written a code to take the numbers in range (1,15) …

Software Development python
Member Avatar for TrustyTony
0
113
Member Avatar for phfilly

Hi. I would like help on undoing and redoing using the memento design pattern. I want to save a state that a board is in. Like a chessboard. If the user uses the undo option a previous board should be loaded and all of the states that the pieces was …

Software Development c++
Member Avatar for phfilly
0
597
Member Avatar for fantasma

Greetings from Portugal I've been stuck for some hours now, since I can't get my n00b code to work as I want. Could someone give me a hint of what to do or what am I doing wrong? I have a file that writes something like this: 1001,Loja1,10 1002,Loja2,20 And …

Software Development c++
Member Avatar for fantasma
0
155
Member Avatar for mushahidh

hi evereyone, i have some problem related to graphics in c++ that is when i include graphics.h in my program and use graphic command like draw line etc..then suddenly windows has been closed and messages appears that "NTVDM CPU HAS ENCOUNTERED AN ILLEGAL INSTRUCTION", and some error code and two …

Software Development c++ windows-vista
Member Avatar for Taywin
0
154
Member Avatar for Chalandria

Need help please. This program is supposed to be a do while loop and convert fahrenheit to celcius and vise versa using user defined methods but as of right now it just doesn't work. I need to make a do while loop in main method too, but was just trying …

Software Development java
Member Avatar for Taywin
0
137
Member Avatar for babbu

Hi All, I am using visual studio 2005 and Access 2007. I want to update a table in access 2007 using C#.net. I have written the following code but it doesn't seem to work and neither does it throw any error. [CODE] OleDbCommand updateTransactionCost = new OleDbCommand(); updateTransactionCost.Connection = Module1.oledbcon; …

Software Development visual-studio
Member Avatar for babbu
0
89
Member Avatar for powerson65

Hi i have a program with a JFrame and it has two jpanels on it, one containing the buttons needed and the other which is going to be used for plotting graphs, but when i try to plot an x, y graph on the plotting jpanel it does not show …

Software Development java
Member Avatar for powerson65
0
109
Member Avatar for eladreznik

i am trying to create a nextrow button to work with a bound datagridview the problems i have: 1. the row moves down, but the first row is the one who has the focus (the little black triangle is staying to it's left. 2. i am trying to set a …

Software Development vb.net
Member Avatar for eladreznik
0
95
Member Avatar for ybsolar

I want to create a double pointer and make it point to an double dimension array, then output the content of the array through the pointer. However Gcc warn me that "assignment from incompatible pointer type". Just like this: [CODE]#include <stdio.h> #include <stdlib.h> int main() { int i,j; int **p; …

Software Development c
Member Avatar for gerard4143
0
135
Member Avatar for lais90

I wish to change the color of my printf statement. I use following code: [code]#include <stdio.h> #include <stdlib.h> void main() { system("color e"); printf("An enemy appears\n"); system("color c"); printf("This is an apple.\n"); }[/code] I wish to print the statement which is "An enemy appears" in yellow color and "This is …

Software Development apple c
Member Avatar for mitrmkar
0
714
Member Avatar for xikkub

I'm writing an application to patch assembler instructions according to memory addresses. I have been using C/stdio for FILE operations (fopen, fseek, fprintf), but I would like to have a C++/fstream implementation as well (.open, .seekp, .put). I've had no problems patching file memory with stdio, but fstream/ofstream methods corrupt …

Software Development c++ ios
Member Avatar for xikkub
0
234
Member Avatar for myk45

Hello, i have 2 small doubts regarding pointers. 1)im trying to defererence 4 bytes as shown, and im initializiing each byte using a char pointer. But im getting runtime errors. Code [CODE] char a = 65; char *ptr = (char *)malloc(4); int *ptr1; ptr = &a; ptr1 = &a; *ptr …

Software Development c
Member Avatar for myk45
0
265
Member Avatar for bkafroboy69

can anyone help me look over my code? The Course class A Course object should store the department, course number, and course title. It should have linked lists of prerequisites and "subsequents" (the courses for which this course is a prerequisite). The constructor should construct a course given a department, …

Software Development java linked-list
Member Avatar for bkafroboy69
0
119
Member Avatar for creeps

This one is pretty strange (or at least I can't figure out what triggers it). I have the piece of code below, but there seems to be a bug with the second call of [icode]scanf[/icode]. It simply gets skipped. So the input should be something like [code] 10 3 fbfbfbfbfb …

Software Development c
Member Avatar for creeps
0
104
Member Avatar for Naveen

hi can any1 send me the source code to the bellman-ford and djikstra routing algos please? regards, naveen.

Software Development c
Member Avatar for byomakesh mahap
0
138
Member Avatar for getack

We have this massive project due tomorrow - a chess game that enables two or more players to play against each other. We have a board class, that contains a 2D array of Piece object pointers representing the lay area of the board. In the board constructor, the Piece array …

Software Development c++
Member Avatar for getack
0
259
Member Avatar for richies

public class Test { public static void main(String[] args) { int max = 0; max(1, 2, max); System.out.println(max); } public ststic void max( int value1, int value2, int max) { if (value1 > value2) max = value1; else max = value2; } }

Software Development java
Member Avatar for stultuske
0
120
Member Avatar for ceyesuma

Hello I am trying to get to a Component On a JInternalFrame. I have a reference to the frame on the frame there is a panel. on the panel there is a JTabbedPane. to add a tab to the JTabbedPane I need to reference the Pane. Is there a way …

Software Development java java-swing
Member Avatar for ceyesuma
0
169
Member Avatar for Robban

Hi, I have a javaproblem that I just can't solve. "Write a [B]recursive[/B] method who returns the largest value in an array with the signature: [CODE]public int max(int[] v)[/CODE] (Hint: If you need to, use a private help-method) It would be easy if it was allowed to change the signature …

Software Development java
Member Avatar for JamesCherrill
0
190
Member Avatar for moufoo

Hello, It's been a few months since I haven't been able to launch Codeblock's debugger, when I launch the debugger I always get this (example): [B]Adding source dir: C:\Users\Me\Desktop\L2\SDD\TP2\ Adding file: bin\Debug\TP2.exe Starting debugger: failed[/B] I have tried: [LIST] [*]Reinstalling [*]Reinstalling (uninstall done using Revo Uninstaller) [*]Installing latest version of …

Software Development c operating-system
Member Avatar for Ancient Dragon
0
737
Member Avatar for shelexelex

hi everyone. my name is chris..i am new to javw pogramming i just have the feelings that i can get what i hv been looking for here.. i startd reading java sometimes ago and i got chocked whn i got to evnt handling... i relly wantto be a java pogrammer..i …

Software Development java
Member Avatar for shelexelex
0
104
Member Avatar for jdiddy

hi, i am creating a small program for an assignment to store and retrieve information from a database. I have created arraylists to add and retrieve the data. just wondering if i am going about it the right way. One of the problems is that when the information is displayed …

Software Development java xml
Member Avatar for jdiddy
0
88
Member Avatar for saraswathy6

Hi, I need to call a public static method that returns in xslt. I'm using jstl to do the transformation and hence using the jaxp parser which would use XSLTC or Xalan internally. The way I have the namespacee declaration for my xslt is <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:autn="http://schemas.autonomy.com/aci/" xmlns:myUtil="http://xml.apache.org/xalan/java/com.csa.porter.scat.CategoryUtils" xmlns:java="http://xml.apache.org/xalan/java" …

Software Development apache xml
Member Avatar for saraswathy6
0
617
Member Avatar for jmcorpse

I just need a little advice. This code I have written works well. The only problem I am having is that the output is not lining up and I don't know what to do. If everything was entered line by line I could get it to line up. Since it …

Software Development c++
Member Avatar for Ancient Dragon
0
73
Member Avatar for KrazyKitsune

I'm working on a self-project called 'Project Calculus' (Not that you care about the name). It's a huge calculator that works cross-platform and only uses 'already implemented' modules (So no SymPy, no NumPy, no SciPy, et cetera.) in it. I need help (If you even bother to cooperate with a …

Software Development python
Member Avatar for KrazyKitsune
0
126
Member Avatar for rothn

When my code (below) is executed, a error message is triggered which says "The operation completed successfully." To give this some context, hFileMap is valid; I have checked this with my debugger, and other operations can easily be performed correctly on this handle that yield correct results. The only weird …

Software Development c++ motherboards-cpu-ram
Member Avatar for vijayan121
0
1K
Member Avatar for Hey11

hello , i want to ask is there any function that gets the mode of an array without using pointers ???plz tell me if there is

Software Development c++
Member Avatar for vijayan121
0
82
Member Avatar for Masas

So I got this assignment to combine two arrays without using strcat(). The two arrays must be passed to function as parameters. The arrays need to be merged into one array in the function with dynamic memory allocation and then the new string needs to be returned back to main. …

Software Development c
Member Avatar for savdapu krishna
0
288
Member Avatar for masumar

Hi, How do I sum all occurrences of a number in a file? I have a file with a bunch of numbers, each on it's own line: 5 3 11 3 7 3 5 5 11 7 7 ... How do i sum them up so that the output will …

Software Development python
Member Avatar for TrustyTony
0
429
Member Avatar for arya6000

Hello I created the following project to show you guys how I plan to do things. But my main project will be bigger and will have multiple classes. I'm just trying to get this to work properly so I know I'm using good practice when coding. ok, lets begin :), …

Software Development c c# c++ multithreading
Member Avatar for Momerath
0
133
Member Avatar for novice20

Why am I not able to edit my unix file though i have the permissions -rwxrwxrwx? :(

Software Development shell-scripting unix
Member Avatar for vaibhav1983
0
72

The End.