109 Topics

Member Avatar for
Member Avatar for nigelhow

Okay i have 2 variable named bid price and offer price . I need to fill in the values into the variables through cases. For each row of data ,i want to retrieve the rates for the currency pairs (eg. eur/usd,audusd) . I have 2 values for each currency for …

Member Avatar for broj1
0
236
Member Avatar for iBackpace

Hello, help me please. I have a db sample ( http://i.imgur.com/JRZ2ojP.png ) I have 1 combobox and 1 textbox If the combobox select "Notebook" then on the textbox it must be display the corresponding itemStock (3) Please :( By the this my simple code for my combobox Try Query = …

Member Avatar for Begginnerdev
0
644
Member Avatar for Judgment

I'm trying to create a game of Go Fish in Python. But I've stumbled onto a little problem that I can't seem to figure out how to deal with. There is a human player (player 0) and three computer players (from 1-3). The human player goes first and chooses a …

Member Avatar for james.lu.75491856
0
680
Member Avatar for jshlmnc

I am having trouble getting started with my program. I have writen the array but I am having trouble starting the if statemnent to fill the seats in the program. If they press 1 it needs to fill seats 1 through 5 if they press 2 it needs to fill …

Member Avatar for JamesCherrill
0
308
Member Avatar for wastedkill

So here is what I want. if (tracks, the db) (user_id, the row) for '".$_SESSION['user']['id']."' = equal (tracks, row) in (users, the db) for '".$_SESSION['user']['id']."' exit else update (users, the db) (tracks, the row) to match. This isn't the script as I don't know where to start but I am …

Member Avatar for diafol
0
164
Member Avatar for Tony.Z

My code only outputs 0.00 when 'y' is entered. Clearly, I'm a beginner. #include <iostream> #include <iomanip> #include <string> const double ADULTFEE = 18.00, CHILDFEE = 7.50, TRAINFEE = 6.00, BIRDFEE = 5.00; using namespace std; int main () { char reply = ' '; double adultNum = 0, childNum …

Member Avatar for RonalBertogi
0
407
Member Avatar for Dani

What's the difference and which are you supposed to use? I typically stick to `else if` unless I am using short tags. Is this correct??

Member Avatar for EvolutionFallen
0
270
Member Avatar for bfitzgerald

Hi Guys I'm using a form which sends data to a php file so that ti can be sent to a database. However some of the data passed are dates for the start, end of teh event and when sign ups expire. I want to stop the from data been …

Member Avatar for bfitzgerald
0
193
Member Avatar for Faith.Moraa

Hello Team, I've been having a wierd problem with 2 of my scripts and I now know the problem was in my if statements. code=sys.argv[1] phone=sys.argv[2] message=sys.argv[3] if code == 949: servId='62000001760' elif code == 947: servId='62000001840' else: servId='90928' print servId I run this script as: sudo python printserv.py 949 …

Member Avatar for Schol-R-LEA
0
139
Member Avatar for yap.junjie.7

Help me look at the codes below. It has T_IF error and T_WHILE error. The errors are on line 7 and line 18. I hope anyone can teach me to repair it and the code function is still same. <?php require_once("db.php"); session_start() if (!isset($_SESSION['cart'])) { <---T_IF error $_SESSION['cart'] = array(); …

Member Avatar for TonyG_cyprus
0
392
Member Avatar for deadsolo

Hi everyone! I am having troubles making the second IF statment execute in my code: Pattern dl_noise_rates_p = Pattern.compile("\\d+\\s(.+)\\s(.+)\\s(.+)\\s(.+)"); Matcher dl_noise_rates_m = dl_noise_rates_p.matcher(lineString2); if(dl_noise_rates_m.find()){ String s_dl_nr1 = (dl_noise_rates_m.group(1)); //checking for non numbers pulled in the regex if(s_dl_nr1 == "NaN"){ //| s_dl_nr1 == "NaN" | s_dl_nr1 == " NaN" System.out.println ("OMGOMGOMGOMGOMGOMGOMGOMGOMG …

Member Avatar for bguild
0
182
Member Avatar for Vijaysurya

hai everybody, i need help in multiple true if condition IF (condition 1 is true) { $('.cCal').css('border-color','red'); return false; } and (condition 2 is true) { $('.cCal2').css('border-color','red'); return false; } (condition 3 is true) { $('.cCal3').css('border-color','red'); return false; } this syntax working only one condition is true. more than one …

Member Avatar for Troy III
-1
154
Member Avatar for Dum_Bass

I am trying to create a simple scoring function using sprite collision. I have my sprite ids defined under a seperate header and my class is in order. LEFT_SCORE is animated using a sprite sheet (obviously). int Ball::leftGoal( ) { int leftScore = 1; if (dbSpriteCollision (BALL, 12)) {++leftScore;} dbSetSpriteFrame …

Member Avatar for Dum_Bass
0
163
Member Avatar for masterfact18

!! i was trying to create a simple grading system but my project doesnt work it always shows the last if statement and ignore the other statement...please help here's my code...can someone please tell me what's wrong coz i dont know how to use if/elseif/else statement... newbie here...please help Private …

Member Avatar for tinstaafl
0
285
Member Avatar for l.worboyz

basically i am working on a project for uni, which is to create a form of an abacus model. - peg_array[] stores the number of counters/beads present in each of the pegs(lines) of the abacus. i am trying to use 2 boolean methods: "boolean removeCounter(int thisPeg)" "boolean removeCounter(int thisPeg)" thisPeg …

Member Avatar for valdez25
0
304
Member Avatar for minimee120

Hello all, I'm fairly new to using PHP, and for my assignment I've coded it all but I'm trying to go the extra step, and code something that if the item amount = 0 it doesn't print it out on the order form The items are $LAPTOP $MONITOR $KEYBOARD $PRINTER …

Member Avatar for diafol
0
200
Member Avatar for clubberlangMayo

hi everybody, im doing a project in vb 2010 its a simple "guess the number between 1 and 30" i have it all finished working properly , my only remaining issue is, if i enter a character or letter into the combobox, it crashes the system. i got a piece …

Member Avatar for clubberlangMayo
0
271
Member Avatar for boiishuvo

This code works fine but it would be too long if the score is 50 or over. Is there any way to make it shorter and quicker? I tried to use for loop statement but it didn't work well. background(backgroundChange); if (score >= 5 && score < 10) backgroundChange-=0.8; else …

Member Avatar for JamesCherrill
0
187
Member Avatar for kedxu

**Does the code** int value = 5; if(value==5) System.out.println("value is 5"); if(value==6) System.out.println("value is 6"); **actually compute faster than** int value = 5; if(value==5) System.out.println("value is 5"); else if(value==6) System.out.println("value is 6"); **?** I would assume that it *is* faster, based on its name and all, but is that actually …

Member Avatar for deceptikon
0
199
Member Avatar for Prysm[VA]

So in my classes I've taken I was told by the teacher "case statements and if-else statements are the same things essentionally" so why learn both? and so I was not taught about cases. Besides the fact I should learn it anyway incase I need it for someone elses code, …

Member Avatar for mike_2000_17
0
323
Member Avatar for timwhelan

I am trying to turn off a block in drupal using existing code. <?php $node = node_load(arg(1)); $type = $node->type; if(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } else { return in_array($type,array('3_column_interior_page', '3_column_faculty_bio_page')); } ?> I wanted to add a page that will not show the block... <?php $node …

Member Avatar for timwhelan
0
198
Member Avatar for ziyaddinsadigov

I want to check if value is already exists in database with php. But this value can be as for example "John" or "JOHN" or "JOhn" or ... e.t.c how to check for all conditions?

Member Avatar for Atli
0
16K
Member Avatar for Prysm[VA]

Alright guys, I've been looking at this on google and I can't seem to find an answer. Any help is definitely appreciated! Here is the code, then I will explain my problem. void printMenu() { cout<<"||============================||"<<endl; cout<<"||=========Main Menu==========||"<<endl; cout<<"||===1.Begin DNA Creation"; cout<<"||===2.Load the Files"; if(!dna1[].strand1){ cout<<"<0>";} else{ cout<<"<"<<sizeof(dna1.strand1)<<">";} cout<<endl; cout<<"=========||"<<endl; …

Member Avatar for Prysm[VA]
0
407
Member Avatar for while(!success)

Hi guys, I'm still new to .NET and your answers to my questions have been so helpful. I have another question yet again, however. This time my question has to do with sql server and handling it with code behind. I am creating a stored procedure which is supposed to …

Member Avatar for while(!success)
0
2K
Member Avatar for codesforcoffee

I think this simple example might ask the question a lot more clearly. I have an input file with multiple products. There are different types of product (2 types with 2 product IDs is fine enough for this example), but the input will have many more. I only want to …

Member Avatar for codesforcoffee
0
2K
Member Avatar for germainelol1

I am creating a method to multiply 2 polynomial expressions together such that: `3x^5 * 2x^3 = 6x^8` -> Where the coefficients are multiplied and the exponents are added together. My test case for this would look something like the following @Test public void times01() throws TError { assertEquals(Term.Zero, Term.Zero.times(Term.Zero)); …

Member Avatar for NormR1
0
331
Member Avatar for Tsaou

Hi, recently i started taking lessons on c programming and my first assignment was to make programm which would name all the perfect multiperfect or superperfect numbers within a set (whose limits will be given as #define constants) and their percentage. Anyway apart from any logic errors (which i would …

Member Avatar for Gonbe
0
302
Member Avatar for Jenniferting

Hi guys, so im required to write a programme that will make a table, along with the values and all and im also required to mark "X" at the minimum value of total time A+B (exactly beside the minimum value in the table). I tried using if statement but it …

Member Avatar for Jenniferting
0
227
Member Avatar for s123456

assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter 7/3/12 code displays todays date....displays "payday" entered......adds 7 days to "payday" to show NEXT payday. void Date::addDays(int month, int day, int year) { _day = …

Member Avatar for MandrewP
0
146
Member Avatar for lulu79

Hi, I want to get last working day data from database(SQL database). For example, if today is Tuesday, I want to get Monday data. I can get the data directly using strtTime = Date.Now.AddDays(-1).ToString("yyyy/MM/dd") & " " & "06:15:00" But the problem is if today day is Monday. Since the …

Member Avatar for lulu79
0
205

The End.