132,726 Archived Topics
Remove Filter ![]() | |
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 | |
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 | |
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 … | |
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 ![]() | |
[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 | |
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++ | |
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 | |
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): … | |
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 | |
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 | |
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++ | |
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 | |
#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++ | |
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 … | |
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. … | |
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 | |
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. … | |
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++ | |
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++ | |
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++ | |
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 | |
How can I convert a .class file of java to .exe file Software Development java | |
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); } } | |
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++ | |
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 | |
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 | |
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, … | |
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 | |
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 … | |
**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 | |
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++ | |
Do any one have idea of implementing the moore machine by c Programming implementation?? Software Development c | |
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 | |
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 | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 … | |
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 … | |
How do i input an if else statement inside an already existing if else statement? Software Development c++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ |
The End.