132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for calvintmoss

So I am trying to convert some C into mips and I am running into a problem. So here is the C and the mips. My question is a few things, 1, all the times I have done a comparasin, > < == in the past there has been an …

Software Development assembly
Member Avatar for deceptikon
0
3K
Member Avatar for pauldespre

Hello, I have this functions: main(), menu1(),menu2() and so on. Main function takes an input and call one of the menu() functions so ... menu1(),menu2() functions needs to be defined before the main() function. The problem appears when i want to call the main() function inside one of the menu() …

Software Development python
Member Avatar for TrustyTony
0
147
Member Avatar for hwoarang69

so i have two class. 1 = Main.java - 2 = Player.java AND my folder tree -src -images player_walk_right.gif -Main.java -Player.java Player.java public class Player { Image player_image = getImage(getDocumentBase(),"player_walk_right.gif"); /*** constructor Method ***/ public Player() { //empty constructor } public Player(int ix, int iy) { x = ix; y …

Software Development image java
Member Avatar for JamesCherrill
0
224
Member Avatar for La:)

I am trying to write a program to generate hailstone sequences for different starting values of n and have achieved this. Now however, I am trying to find the average length of the sequences and what the longest and shortest sequences are in the range(5,1000)and am not sure how to …

Software Development python
Member Avatar for abc0502
0
1K
Member Avatar for vegaseat

[B]Intro[/B] C is using structures to group data, mostly data that belongs together. Here we have some data that a campaign manager might keep for the volunteers. First we take a look at the C code: [code=c]#include <stdio.h> struct person { char *name; char *sex; char *slogan; }; int main(void) …

Software Development data-structure python
Member Avatar for georgooty
0
767
Member Avatar for daino

I'm trying to build libpng which has worked up to a point. I'm using Windows XP, and have a MingW compiler. I also have MSYS installed and am using it to configure libpng. The issue I'm having is that libpng can't find zlib. I've tried every variation under the sun …

Software Development c++
Member Avatar for daino
0
1K
Member Avatar for pratik65

i wanted to know the code for putting values from comboxes into Datagridview but i tried but im getting coversion exception.. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=grade;Integrated Security=True;Pooling=False") Dim cmd As SqlCommand If ComboClass.SelectedItem <> "" Or …

Software Development open-source vb.net
Member Avatar for artemix22
0
276
Member Avatar for zygimantelis

I creating a test program for TKinter, and getting some errors :( from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Entry(frame, text="Hello", command=self.say_hi) self.hi_there.pack(side=LEFT) username = StringVar() name = Entry(frame, textvariable=username) name.pack(side=LEFT) print name.get() def say_hi(self): …

Software Development python tkinter
Member Avatar for Schol-R-LEA
0
1K
Member Avatar for anisha.silva

Hi i have a method as below public void sendDataToCleint(ref UpdateClient uc,ref QueryClient qc,ref FailClient fc) { uc.setValue(false); qc.setValue(false); fc.setValue(false); while (_data.Count != 0) { string a = dataOUT(); string[] split = a.Split(new Char[] { ' ' }); if (split[1] == "NEW") { uc.setValue(true); qc.setValue(false); fc.setValue(false); uc.getData(a); // how do …

Software Development data-structure queue
Member Avatar for Momerath
0
136
Member Avatar for omarelbeik

for the program im writing this is what i have to do: i have to write a C program that maintains a table of productID and price in a .txt file. The following menu shows the functionality of the program: 1. Display all products 2. Search product by ID 3. …

Software Development c file-system
Member Avatar for Adak
0
318
Member Avatar for Carpetfizz

Hello, My friend and I were done with our work in math class, and threw together this little text-based rpg in like ten minutes. Anyway, we're having a small issue, everytime I press the "2" for "Fight!" the loop regenerates the random values and we mysteriously gain health that was …

Software Development c++
Member Avatar for Carpetfizz
0
230
Member Avatar for pattilupwned

Hello, I am writing a program that reads in data from a text file and puts it into a linked list. Certain variables are read in only if the "officeHeld" number is a particular number, otherwise the variable is set to 0. When I run this through Visual Studio, I …

Software Development c++ linked-list unix visual-studio
Member Avatar for dx9_programmer
0
365
Member Avatar for scott88cooper

#include <iostream> #include <iomanip> #include <string> using namespace std; void getInput (double& currentPrice, double& prevYrPrice, double& twoYrAgoPrice); void calculateInflation (double currentPrice, double prevYrPrice, double twoYrAgoPrice, double & currentInflation,double & preInflation); void printOutput (double currentInflation, double prevInflation); int maine () void getInput (double& currentPrice, double& prevYrPrice, double& twoYrAgoPrice); { cout << …

Software Development c++
Member Avatar for Ancient Dragon
0
179
Member Avatar for amendonca

Define a function drawRectangle with the following prototype: void drawRectangle(int width, int height, int offest); The function will print a rectangle made out of height rows with '@' character repeated width times on each row. The first @ on each row will be preceded by offset spaces. That means the …

Software Development c c# c++
Member Avatar for Ancient Dragon
0
163
Member Avatar for Some Dude

Alright, so I need some more help. This time, the problem is not inherently in the code (Though I've had trouble with that thus far too). I am currently playing around with open and close file dialogs trying to get what seems to be an out-dated "GetOpenFileName()" function to work. …

Software Development api c++
Member Avatar for Some Dude
0
645
Member Avatar for Monster99d

I have Visual Studio 2012 Ultimate. I tried creating a Win32 Program and there are no debugging errors. However, when I debug it, the window I am creating should be shown on screen, but there is no window. All I see is my code. Why would this happen? #include <Windows.h> …

Software Development c++ visual-studio
Member Avatar for nullptr
0
107
Member Avatar for BlinkOnly

I wrote a program to simulate a simple page flip animation in opengl and now i'm trying to replicate it with two images using texture mapping so that the second image appears on the "back" of the first image during the drag of the lower left corner of the page. …

Software Development c++ opengl
0
162
Member Avatar for kusel1030

For a program i'm writing I need to read a .txt file into a 2-d array. The txt file contains spaces that need to also be read into the array, so I was told I need to use getline, but after searching google and this site i'm not sure exactly …

Software Development c++
Member Avatar for omarelbeik
0
252
Member Avatar for Elixir42

Hi I am setting the sampler states initially then setting them on the fly with keypresses that I know runs but I dont see anything changing. Am I missing something. Can I just call SetSamplerState(...) anytime or do I need to call something after? static bool bToggleH = false; static …

Software Development c++
Member Avatar for Elixir42
0
230
Member Avatar for poloblue

Good Morning, I just want to know how to implement a body initilization in a class. Below is the class information. class A { private: const int size; //a const data member char *cat; public: A(); //default constructor A(const int n); //constrcutor with parameter void print(); //print A ~A(){delete[] cat;}; …

Software Development c++
Member Avatar for Stagnant
0
139
Member Avatar for sk8ergirl

I'm working in my java worksheet what I have to to is to first create 3 class in java I create the first and second , but I don't understand how to create the third one I don't know if I should post the code of the first and second …

Software Development java
Member Avatar for stultuske
0
373
Member Avatar for Chinmaya Dash

How can I convert a .class file of java to .exe file

Software Development java
Member Avatar for stultuske
0
389
Member Avatar for hwoarang69

i getting error on getdocumentbas(). is there a easy way to display image on screen??? public class Player { private Image mario; public Image getPlayerImage() { return mario.getImage(); } public void init() { mario = new Image(getDocumentBas(),"Image/player_walk_right.GIF"); } public void paint(Graphics g) { g.drawImage(mario,x,y,this); } }

Software Development image java
Member Avatar for hwoarang69
0
189
Member Avatar for Kamina00

Hi I was just looking up the difference between cin.get() and cin.getline(). It seems they can both function the same way except cin.get() keeps the delimiter in the buffer while cin.getline() throws it out. My question is with this code: char name[200]; char name1[200]; char name2[200]; string hi; cin >> …

Software Development c++
Member Avatar for Kamina00
0
1K
Member Avatar for daino

What language are CMAKE Makefile (CmakeLists) written in? As for other Makefiles are they written in the same language. For example a Makefile.gcc to be compiled using a MingW compiler?

Software Development shell-scripting
Member Avatar for L7Sqr
0
92
Member Avatar for barrelr0ll

Hey there, so I recently joined an online course, and the first mini-project is to create rock, paper, scissors, lizard, spock. upon testing my program it seems I've got an error in my code and I can't for the life of me figure it out, I was hoping you guys …

Software Development python
Member Avatar for barrelr0ll
0
95
Member Avatar for doobz

Hi, I'm in an intro to Computer Programming class, and we need to make a program that rolls 5 die, and tells you if you have any combinations (pair, 3 of a kind, 4 of a kind, 5 of a kind, and Pair+3 of a kind) My program rolls perfectly, …

Software Development python tkinter
Member Avatar for woooee
0
763
Member Avatar for bprosic

Hi, I have datetimepicker and next to datetimepicker is textbox. When I choose date from datetimepicker, selected date goes into textbox. Works fine. -- txt1.Text = Format(DateTimePicker1.Value, "dd.MM.yyyy") Problem is, when selected date from datetimepicker is shown in txt1, that date doesnt want to be saved into database. Database is …

Software Development vb.net
Member Avatar for bprosic
0
2K
Member Avatar for shanna62

Hi, In the program below, in the cout statement I want to understand what the code in the (ptr –arr) is doing. I understand ptr is the result of the find algorithm but I don’t know what the –arr does. If you can explain that to me I would appreciate …

Software Development algorithm c++
Member Avatar for shanna62
0
327
Member Avatar for kieranrea

**I've been over this code several times but still cannont figure out why after the first time, it always prints "Add in sale? Y/N:" twice. Any ideas?** void PrintHeader(); int TotalSales(); float OverallProfit(float totalvalue, float drinkcost, int runningcost); float CalculateCosts();//Not used yet int IncentiveCheck(); //Not used yet #include <stdio.h> #include …

Software Development c
Member Avatar for somjit{}
0
159
Member Avatar for mike12255

I am playing around manipulating strings and currently I want to take a full name typed in by a user eg. "Mike W. Heintzman" and then take three letters input by the user, eg. M I E and then I want it to find all of those instances in the …

Software Development c++
Member Avatar for mike12255
0
120
Member Avatar for Ankit.duke

Do any one have idea of implementing the moore machine by c Programming implementation??

Software Development c
Member Avatar for Despairy
0
82
Member Avatar for romiaujla

This is a part of the question of my assignment and i am facing problems on how to access the array in a function. Write a function that finds the 2nd minimum value among the given data items of float type, and returns the 2nd minimum. You should use pointer …

Software Development c
Member Avatar for romiaujla
0
216
Member Avatar for luixoja

Hi! Im very new in c programming and i have a lot of problems with this easy exercise. I have a struct for a matrix typedef struct { int dim; float **m; } t_matriu; I have a function to create a matrix and to generate random numbers to fill it. …

Software Development c
Member Avatar for deceptikon
0
131
Member Avatar for Sasquadge

What I'm trying to so is have calc grab the add, mult, sub, div from the fraction.cpp and do that one thing I curious and can't figure out it the how to do the formula in the function and return the value to add the fractions. Can anyone give me …

Software Development c++
Member Avatar for Despairy
0
235
Member Avatar for FreddyGIraheta

Alright you guys im new to c++ and programming and i have this homework assignment that is incomplete at the moment and i dont know where i messed up. /*Write a program to compute income tax as follows: First, display the following menu and ask the user to select his …

Software Development c++
Member Avatar for Despairy
0
222
Member Avatar for sarafuddin

Can I get the question's solution? Define a structure called Toy with the following members: . Name of Toy . Price of Toy . Made in (the place where the toy is made) . Manufactured date (define as a structure with date, month, year) Using the structure defined above, write …

Software Development c++
Member Avatar for Despairy
0
178
Member Avatar for System Networks

I am sick of putting resources and coding them all the time and I don't want to always repeat them. I'm using slick2d in java. It is a game library. I cannot find and game engine tutorials either. How do I create a game engine?

Software Development java
Member Avatar for System Networks
0
279
Member Avatar for hwoarang69

note i am working on eclipse, java, xml and anroid. i have a activity_right_sub_menu.xml file <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/I_ABOUT" android:title="About Us" android:numericShortcut="1" android:alphabticShortcut="a" android:orderInCategory="100" android:showAsAction="never"/> <item android:id="@+id/I_PREFERENCE" android:title="Preferences" android:numericShortcut="2" android:alphabticShortcut="b" android:orderInCategory="100" android:showAsAction="never" /> </menu> than i have a Menu.java file public class Menu extends ListActivity { …

Software Development android android-development java listview
Member Avatar for jalpesh_007
0
3K
Member Avatar for FUTURECompEng

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that …

Software Development java linked-list programming-construct
Member Avatar for jalpesh_007
0
307
Member Avatar for daino

I'm trying to install podofo (pdf library) for use with MingW in Windows XP. It requires zlib. I'm using CMAKE to generate the makefile. For some reason, CMAKE, no matter how many times i redirect the ZLIB_LIBRARY to the zlib directory an error in CMAKE occurs telling me that it …

Software Development c++ pdf
Member Avatar for BobS0327
0
1K
Member Avatar for nyfan68

I was wondering if anyone could give me some help on this homework assignment. I have done all the tasks asks of me, but when I try to run the program to test it out, my IDE says the thread exits with a code 0 (whatever that means). I am …

Software Development c++ ide
Member Avatar for Ancient Dragon
0
194
Member Avatar for FreddyGIraheta

How do i input an if else statement inside an already existing if else statement?

Software Development c++
Member Avatar for MandrewP
0
110
Member Avatar for rayden150

I am practicing my C++ programming just making an Health Care related program, I cant seem to access my data that is stored on a .txt file, All I get is that f is not declared in this scope Heres the code: [CODE] #include <iostream> #include <stdlib.h> #include "structr.h" using …

Software Development c++
Member Avatar for anilnepal1111
0
1K
Member Avatar for tboctavan

I have NO idea why C# is so difficult for me when C++ is a breeze. I want to preface this post with this: Yes, this is for a class still. But I'm only coming to people more knowledgable than I because... I just don't get it. I've read my …

Software Development
Member Avatar for nmaillet
0
238
Member Avatar for jnewman3

I'm applying the peterson solution for protecting memory of the critcal section. Each child process should contain a local variable that keeps track of the number of times it interrupts the other child while it is in its critical section. The process should display this value before terminating. I'm having …

Software Development c multithreading
Member Avatar for Ancient Dragon
0
2K
Member Avatar for yalda.zand.35

Hi can someone help me with this question please? 1. In "setup" Create an array of 1000 random integers between 0 and 100. Also, in "setup" declare an array of bins or counters to find out how many integers fall into one of the 10 "bins" 0-9, 10-19, 20 -29, …

Software Development java
Member Avatar for Taywin
0
157
Member Avatar for Stuugie

Hi all, I'm about to get a little long winded here and I'm sorry for that but I have a couple of issues that I need guidance with. I have assembled a procedure that basically performs a bunch of web browser clicks to query Statistics Canada (SC). The query itself …

Software Development java javascript vb.net
Member Avatar for Stuugie
0
533
Member Avatar for Stuugie

Hi all, I have the following procedure that connects to my database. Sub getDateModified() Dim fileCreatedDate As DateTime = File.GetCreationTime(strFilePath + "\CPI1.csv") Dim stmt As String SQLConn.ConnectionString = ConnString SQLConn.Open() stmt = "select Table_Numbers From tblRelease_Dates Where (Release_Date Between '" + fileCreatedDate + "' And GETDATE())" SQLCmd.Connection = SQLConn SQLCmd.CommandText …

Software Development vb.net
Member Avatar for Reverend Jim
0
166
Member Avatar for amadkhalil

hye... guys i m new one in C++ and i have a matrix of size 96x48 (which is a non square matrix) i want to take inverse of this matrix .... please guide me ...thanks

Software Development c++
Member Avatar for mike_2000_17
0
1K

The End.