97 Topics

Member Avatar for
Member Avatar for xiangzhuang

Hey guys I keep getting the "no return statement error in two places, I have commented them for you [CODE] /** * A WordsCompare object stores Strings. It is used to determine if the first word * should be placed before or after the second word in the dictionary */ …

Member Avatar for JamesCherrill
0
289
Member Avatar for nick100555

I have the following CashRegister class where i must implement 3 methods: -getSalesTotal total up sales for the day -getSalesCount total number of sales for the day - rest a reset method that returns all instance variables to 0 Here is my code any help on mistakes i may have …

Member Avatar for Syrne
0
329
Member Avatar for roottybrian

I'm trying to write an SQL (MySQL) Statement here using an if statement but all am getting are countless errors. I've narrowed down to simple instructions but still no breakthrough. [CODE]DELIMITER // CREATE TRIGGER confirmation_triggers AFTER INSERT ON `old_deliquencies` FOR EACH ROW IF new.status='True' THEN INSERT INTO `notifications` VALUES(NULL, new.loan_id, …

Member Avatar for rch1231
0
135
Member Avatar for kmbl84

Hi, The whole idea of this program is allow teachers to input marks results for 6 students. Once all marks have been entered, It must to display the marks and grade for each student. For some reason it can't display the grade properly. It just display "Fail" on each mark. …

Member Avatar for kmbl84
0
125
Member Avatar for Pwnerz0r

I am trying to create my login system but I have got a problem with reconizing the value from a file. getline(fstream) recognizes it and puts it in a char(reg_confirm), but I can't set a different function for a different value. it should go like this: if (value == "0") …

Member Avatar for Eagletalon
0
175
Member Avatar for mkalinic

Hello all, I am having some trouble with my tic-tac-toe game. My main problem is that I do not know how to properly make it so that when i click a button on the form acting as spots for the x's and o's the proper letter will come up and …

Member Avatar for Reverend Jim
0
450
Member Avatar for meyumi_lelouch

I am trying to make a program that will list all the National Heroes of our Country. We used the switch statement. [CODE]#include "stdafx.h" #include "iostream" #include "stdio.h" #include "conio.h" using namespace std; int main() { int choice,desc; char repeat; cout<<"\t\t\t\tPhilippine National Heroes\n\n"; cout<<"[1]Dr.Jose Rizal\n"; cout<<"[2]Andres Bonifacio\n"; cout<<"[3]General Gregorio Del …

Member Avatar for Anuradha Mandal
0
834
Member Avatar for mingis

Hi there, I am a complete newbie to JSP so apologies if this is a blindingly obvious question - I have researched on Google, but can't get this working. I have a simple switch statement as below: [CODE] <% for (int a=0; a<10; a++) { if ( null != countryID[a] …

Member Avatar for masijade
0
133
Member Avatar for klenne

Hi, I'm trying to check the login. The values of id and pw are send from a textbox and the values of userid and password are from a mysql database. I try to compare them and if they are equal i want to return true and else return false. But …

Member Avatar for klenne
0
268
Member Avatar for Toikkala

Hi! On school we got exercise to calculate how much the length of substance grow when we know original length and temperature change. So,the case goes that i have value temperature coefficient of different substances and i have to multiply them. I'd like to it without doing several condition statements. …

Member Avatar for woooee
0
241
Member Avatar for Joeflims

Hey everybody. I was reading some code on the website and I saw this: [CODE]with open(FILE) as number_file: lucky_numbers = [set(line.strip().split('-')) for line in number_file] [/CODE] What does "with ... as ..." mean? What is it used for? How is it used?

Member Avatar for Joeflims
0
134
Member Avatar for alex1050

I need help understanding the for statements. This segment of code repeats itself as so 1 22 333 4444 However, i need understanding in how it repeats itself. Thanks [CODE]#include <stdio.h> int main () { int i,j; for(i=1;i<5;i++) { for(j=1;j<=i;j++) printf("%d",i); printf("\n"); } }[/CODE]

Member Avatar for tomato.pgn
0
75
Member Avatar for d_panayotov

Hi, I tried searching but I don't know how exactly to describe my question in 2-3 words so I didn't find anything. Is it possible to do something like this?Just to get the idea... I know it doesn't work: [CODE]switch(c){ case '1':{ (...) ; break;} case '2':{ (...) ; break;} …

Member Avatar for L7Sqr
0
127
Member Avatar for Khoanyneosr

[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <vector> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); int game(string sofar, const string THE_WORD, int MAX_WRONG, int wrong, string used); // Types and Arrays string choice; string inst; const int MAX_WRONG …

Member Avatar for Khoanyneosr
0
275
Member Avatar for BioJavaPhobic

Hello, I'm a biologist trying to do some bioinformatics, so new to Java and new to this forum. I've searched all over the forum for previous threads on this topic, but can't find an answer that has helped me. Apologies if I've missed something already posted that may help solve …

Member Avatar for BioJavaPhobic
0
289
Member Avatar for hmushtaq

Hi, I'm currently a student given the task of programming a RPN calculator using C. The following code is some test code that I made to solve the issue described in the thread title. It calls a custom getline() function(while loop) which is also shown and then should take in …

Member Avatar for hmushtaq
0
160
Member Avatar for TheOnlyNemesis

Hey, i am struggling with this program, i have tried everything i can think of but it still says missing return statement on public String processInput(String theInput){ [CODE]package clientserverassignment; import java.net.*; import java.io.*; public class Protocol1 { private static final int WAITING = 0; private static final int SENTTOS = …

Member Avatar for jon.kiparsky
0
210
Member Avatar for Mayank23
Member Avatar for Progr4mmer

im trying to make so one if has two outcomes ex: if(prime % chk == 0) prime++ (and) chk++; i want to know how to put (and) into code so it does both if prime % chk == 0 this is what i have for my prime finder [CODE]class Number …

Member Avatar for Akill10
0
138
Member Avatar for iWarrior

I'm having some problems with the UPDATE statement in VB.NET. Not the UPDATE statement directly, but when it comes to incrementing a field's value by 1. Below is the code that I'm using for writing to the database, as well as the two UPDATE SQL statements that I've tried. Any …

Member Avatar for GeekByChoiCe
0
231
Member Avatar for vishalkhialani

Hi, Below is a working code. [CODE] 1. if($('input[name="test"]').is(":checked")) 2. { 3. // my other code 4. } [/CODE] I want to remove "test" and put a variable there instead I tried this way but it does not seem to work. I am not sure where I am going wrong. …

Member Avatar for hielo
0
91
Member Avatar for vikas.kethineed

I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() …

Member Avatar for kramerd
0
225
Member Avatar for sirlink99

The [COLOR="Red"]red[/COLOR] is where the problem is: Thanks for the help. [code] // The "ChoseYourStory" class. import java.awt.*; import hsa.Console; public class ChoseYourStory { static Console c; // The output console public static void main (String[] args) { c = new Console (); int move; String start = ("yes"); int …

Member Avatar for JamesCherrill
0
142
Member Avatar for Gribouillis

The with statement allows all sorts of syntactic sugar in python. This snippet defines two contexts: [icode]inevitably[/icode] and [icode]preferably[/icode] which register a function call to be executed at the end of a block of statement. Although they are not very useful (the function call could be written directly at the …

1
539
Member Avatar for NH1

i get that error when i try and run through my code. Can any one please tell me what is wrong with my insert statement. It looks correct. [code=c] OleDbConnection connect = new OleDbConnection(); connect = new DBconnect().DbConn(""); string insertStatement = "INSERT INTO Restrict " + "([Company ID], [User Type], …

Member Avatar for NH1
0
191
Member Avatar for Chris.Leah

Hi guys, I am using Visual Studio 2008 and have connected a database correctly as I have done a login that works fine, although when I try to insert information submitted in the text boxes a different table, it doesn't enter after I end program to check it still has …

Member Avatar for maj3091
0
403
Member Avatar for webweb2

Hey guys, I am a CS major at Bradley University and school is about to start so just to brush up on my C++ syntax I decided to make a simple program that would be used to study. It is basically just a notecard program, where you enter the front …

Member Avatar for Fbody
0
94
Member Avatar for andy106

Hi How can I rewrite the following to get it to work: <?php if ($_product->getsub()) { echo '[COLOR="Red"]<a href="ref="http://test.com/-<?php echo $this->htmlEscape($_product->getData('key_code')); ?>.html">[/COLOR]<li style="width:120px; margin-left:auto; margin-right:auto; margin-top:20px;" class="nav-rsvp-package">subscribe</li> the problem is that i have [COLOR="Red"]<?php echo $this->htmlEscape($_product->getData('key_code')); ?>.html">[/COLOR] inside another [I]<?php[/I] snippet. I already tried: [CODE] <a href="ref="http://test.com/-<?php echo $this->htmlEscape($_product->getData('key_code')); ?>.html"> …

Member Avatar for andy106
0
223
Member Avatar for LloydFarrell

hi all, Im trying to add a "title" to a switch case statement below, but for some reason im unable to complete, what I thought was a simple task. Hope someone can help and explaine the reasons why cheers, Lloyd [code] switch($ad) { case "add1.gif"; header("Location: http://www.google.co.uk"); break; case "add2.gif"; …

Member Avatar for syamsasi
0
733
Member Avatar for NH1

Im having a little bit of trouble with an update statement. if any one could take a look at it and help me with what im doing wrong that would be great. [code=c] private void button6_Click(object sender, EventArgs e) // Button6 is OK { ///////If Null///// if ((textBox1.Text.Length == 0) …

Member Avatar for Geekitygeek
0
104

The End.