97 Topics
|
|
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 */ … |
|
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 … |
|
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, … |
|
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. … |
|
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") … |
|
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 … |
|
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 … |
|
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] … |
|
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 … |
|
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. … |
|
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? |
|
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] |
|
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;} … |
|
[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 … |
|
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 … |
|
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 … |
|
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 = … |
|
how can i use a string in a switch statement? |
|
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 … |
|
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 … |
|
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. … |
|
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() … |
|
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 … |
|
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 … |
|
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], … |
|
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 … |
|
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 … |
|
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"> … |
|
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"; … |
|
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) … |
The End.