199,114 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 …

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() …

Member Avatar for TrustyTony
0
147
Member Avatar for <M/>

I have a csv file and I am not sure how to set dates on it... For example, if somebody submits a form and its information shows up in the csv but has a date that shows when it was submitted... Can someone help me with this?

Member Avatar for diafol
0
194
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 …

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 …

Member Avatar for abc0502
0
1K
Member Avatar for johndohmen1963

Who can help me with the following i have 5 or more rows in a table the last column is called rank one row is called points. I want automatic insert the rank like when a person has 123 points is rank 1 the second person with 120 point rank …

Member Avatar for johndohmen1963
0
144
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) …

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 …

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 …

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): …

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 …

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. …

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 …

Member Avatar for Carpetfizz
0
230
Member Avatar for grantcharov

Okay, I am a total newbie stuck with the following task. I have one table, that looks like this: | id | name | rating | date | ------------------------------ What I am trying to do is gettin an output showing which 'name' has the best 'rating' based on months, showing …

Member Avatar for grantcharov
0
229
Member Avatar for asif49

Consider you have a website visited by millions of people. 50 people or so fill in a registeration form and both press submit at exactly the same moment. Can SQL deal with all these requests at the same time, is there any chance it will accidentally generate the same primary …

Member Avatar for LastMitch
0
104
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 …

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 << …

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 …

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. …

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> …

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. …

0
162
Member Avatar for honorhim

Hi, could anyone help resolve this error message for the code below? Thanks so much. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/web/admin/index.php on line 69 <script language=php> session_start(); session_register("myauth"); include ("../connection.php"); $user_id=$username; $pass=$pws; $checkadmin = 0; $la_checkadmin = 0; if ($user_id!="" OR $pass!="") { $query …

Member Avatar for Zagga
0
775
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 …

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 …

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;}; …

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 …

Member Avatar for stultuske
0
373
Member Avatar for Chinmaya Dash
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); } }

Member Avatar for hwoarang69
0
189
Member Avatar for freakvista

So i was wondering if it is possible to make something <a class='photo' href=<?PHP 'lala.php?blu=$q&subf=$subf&img=$imagenr' ?> target='_blank'> <span><img src=<?PHP'{$handle}/{$file}'?> /></span></a> lala.php is already made with all needed, but when i'm trying to make something with this code it doesnt show up the photo. I named class photo so i can …

Member Avatar for freakvista
0
176
Member Avatar for JokerAce89

Im currently a student having degree in Computer Science. I had learn Java, C language, SQL, asp.net, javascript and html. In my course structure, I had learn AI, algorithm analysis, database system, object-oriented programming practices and etc. Im interest in forensic things and I want my final year project is …

Member Avatar for kathirvelan
0
634
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 >> …

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?

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 …

Member Avatar for barrelr0ll
0
95
Member Avatar for ziggydog

Hi everybody I am populating an array of structures with info for a product enquiry. <!--- ADD PRODUCT TO CART ARRAY ROUTINE---> <cfif IsDefined("btn_add")> <a href="%5C"> <cfset temp = arrayAppend(session.enquirycontents, structNew())> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].ID = #form.ID#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].product = #productdetail.product#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].prodnum = #productdetail.prodnum#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].quantity = #form.Quantity#> <cfset session.enquirycontents[arrayLen(session.enquirycontents)].dimensions = …

Member Avatar for ziggydog
0
177
Member Avatar for furlanut

I need one result from 3 tables. The JOIN query fields of the first table repeat throughout the 3 tables. Is the JOIN query set out incorrectly or do I have to re-define the $row index in some way to avoid repetition of the fields. I have been using 3 …

Member Avatar for furlanut
0
181
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, …

Member Avatar for woooee
0
763
Member Avatar for LastMitch

Hi I having issue trying to add `2` months from the `date()` function? Here is my code: <?php // current date $todayDate = date("Y-m-d"); echo "Today: ".$todayDate."<br>"; // Two months from now is Christmas! echo "strtotime($todayDate) . "+2 month")"; echo "Today is Christmas: strtotime('l dS \o\f F Y', $todayDate)"; ?> …

Member Avatar for LastMitch
0
164
Member Avatar for mmcdonald

Whats the best way to collect all the users where `server_id = X` Table: id server_id user 1 2761 adam 2 2567 tom 3 2761 luke 4 2761 mike 5 2346 lucy So what should I do to echo all users where `server_id = 2761`? What output should look like... …

Member Avatar for diafol
0
147
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 …

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 …

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 …

Member Avatar for somjit{}
0
159
Member Avatar for rotten69

I'm using jQuery for mobile and making the app show users a dailog box to let them enter their credentials when they want to log into the app. Ok. it redirects them to the home page but the url stays as mysite.com/login.php rather than mysite.com/index.php This removes the menu bar …

Member Avatar for rotten69
0
168
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 …

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??

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 …

Member Avatar for romiaujla
0
216
Member Avatar for showman13

OK, this may sound like an odd request, but hopefully someone can help. I have always developed scripts behind webpages that were 800 wide so they would fit on basically any display. The one I'm working on now I have designed for 1200 wide because I just needed more space. …

Member Avatar for showman13
0
92
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. …

Member Avatar for deceptikon
0
131
Member Avatar for HunainHafeez

during signup by applicant he/she must fill her educational details , total 5 educational levels, 1.ssc 2.hssc 3. BS 4. MS 5. Phd now lets say that an applicant has only BS passed then it mean that he/she would not have fill 4 and 5 option, now i want that …

Member Avatar for HunainHafeez
0
342
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 …

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 …

Member Avatar for Despairy
0
222

The End.