Hello, everybody. I was wondering if anybody could help me with something. I don't know if I'm taking things too fast but, I was wondering if somebody could help with this program I am making. I'm currently writing a "fake" bank script. Basically you start with a set amount of money, and you can deposit it, withdraw it, and check your balance. However, when I make the deposit and then check my balance, I shows up as the balance being 0, instead of what I had deposited... Could somebody help me out?? Here's the code: Bank.pyw: [CODE]#THIS PART IS NOT …

Member Avatar
Member Avatar
-1 forum 13

This problem is to print a square using a number that the user enters, which would be in the center. If the user entered a 5, then the program should output this: 111111111 122222221 123333321 123444321 123454321 123444321 123333321 122222221 111111111 If you're wondering, this was not a homework assignment. It was on a quiz, and I did not know how to do it. So if someone could give me at the very least some guidance on how to solve this problem, then that'd be nice. I know that I need to use for loops, but I'm not quite sure …

Member Avatar
Member Avatar
+0 forum 17

I am trying out a function from a book for the first time. I could use some help. It goes: [CODE] function sanitizeString($var) { $var = stripslashes($var); $var = htmlentities($var); $var = strip_tags($var)' return $var; } [/CODE] I have two simple forms. One that asks for an email address and another that does fahrenheit-celsius conversions (interesting stuff, I know). I have been testing this sanitizeString function out and it doesn't seem to do anything. Any HTML, or slashes or anything I put in text fields are not stripped of any of the harmful stuff. The code in its entirety is: …

Member Avatar
Member Avatar
+0 forum 5

Sir I have these codes [PHP] <form name="form1" action="<?php $_PHP_SELF ?>" method="post" enctype="multipart/form-data"> <p<Photo</p> <p><input type="file" name="file" id="file" value="<?php echo $myphoto; ?>"></p> <p><input type="submit" value="photo" name="save"></p> </form>[/PHP] and these are codes for submit button [PHP]if(isset($_POST['save'])) { if(isset($_FILES["file"])){ $myphoto=$_FILES["file"]["name"]; echo $myphoto; }else{ echo 'Error'; } } [/PHP] When I press save button the it shows the selected name properly, But it immediately make file input blank like this ![Untitled.png](/attachments/small/4/be0f4a5158a6575f919ec4d15e6e93eb.png "align-left") Why php echo is not working in this line? [PHP] <p><input type="file" name="file" id="file" value="<?php echo $myphoto; ?>"></p>[/PHP] File name must remain appear after echo. Please help

Member Avatar
Member Avatar
+0 forum 2

Well if you were like me and Python is your first language. You are trying to learn programming and many people suggested that learn Python as a first language. You take their advice, your download Python and get all set up. Maybe you take a tutorial or two in order to learn some basic syntax... Now you are sitting in front of your computer and you are wondering what to do next. I suggest you start on some projects and get programming to learn more Python. I have created all the projects myself, and will include the source code in …

Member Avatar
Member Avatar
+2 forum 12

Hi, I am working on a blackjack game as a person learning swift. Due to my need to learn the basics of swift before jumping into learning how the view controllers and other mobile-app specific details work, I am making this game in a playground. I wrote a function that is intended to get a user's input from the console, but the function does not wait for the user to enter his input. Instead, it returns an empty string and lets the program go on without letting the user enter in the appropriate input. Here is my function (that gets …

Member Avatar
Member Avatar
+0 forum 1

Hello! I am looking for some assistance with adding code to my program for handling non numeric data/user input, specifically letters. The program is coded in java. import java.util.*; public class AnArray { public static void main (String [] args) { // creates an array of interegers between 0 and 50 int element[] = new int [51]; // scanner for input Scanner scan = new Scanner(System.in); int input; // do/while loop for inputs do { System.out.println("Enter a number between 0 and 50. Enter -1 to quit."); input = scan.nextInt(); // replace this line with new methodPhil sends if(input == -1) …

Member Avatar
Member Avatar
+0 forum 3

I'm creating a program that allows you to do a whole ton of stuff, basically just built to make my life a little easier on my pc. However, the idea I had was that I could have a form of 'settings bar' where I could edit the settings (duh) of my program. The only problem I've ran into is that whenever I try to run the program all the variables will reset to their original positions. Now I could go through the painful and laborious process of changing a variable every time I wanted to change my settings, but is …

Member Avatar
Member Avatar
+0 forum 1

Option explicit Dim WshShell Set WshShell = CreateObject("Wscript.Shell") WshShell.Run "Batch_operation.bat" wshshell.XXXX "y" wshshell.XXXX "{ENTER}" What should I put in the "XXXX" to make the program enter "Y" and then move down a line ("{ENTER}")

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I would like some help regarding saving or reading to or from a bin file. I've read several online tutorials about file input/output, however it doesn't given specific information when applying it to both an array of structures. My knowledge of pointers is weak, as I constantly need to look over examples to get an idea of whats going on. Heres my attempt: [CODE] #define PLANET_SIZE 10 /* Called from function */ save(planet_t writePlanet[], *totalSize); /* define as int* totalSize */ read(planet_t *writePlanet); typedef struct{ char name[20]; }planet_t; /* Save to file */ void save(planet_t writePlanet[], int totalSize){ …

Member Avatar
Member Avatar
+0 forum 7

I want to use Tkinter funtion to create a a temperature calculator. I have all the code for the calculator, however using Tkinter function i cant figure out how to get the variable input by the users. I am new to python and programming, just started programming less then a month, so please give detailed codes. Thank you. P.S. I'm using Python 3.2.2.

Member Avatar
Member Avatar
+0 forum 4

I want from program that it force the user to input valid value.When ever user enter caharcter in integer valriable it force the user to input the right value.But this does not work.If user input invalid value it start looping. #include <iostream> using namespace std; int main() { int x; re_enter_x: cout<<"Enter X"; cin>>x; if(cin.fail()) { cout<<"INvalid Input "; cin.clear(); cout<<x<<endl; goto re_enter_x; } else { cout<<"Valid Number "; } return 0; }

Member Avatar
Member Avatar
+0 forum 3

this is my code $line = trim(fgets(STDIN)); echo $line; what browser shows: Warning: fgets() expects parameter 1 to be resource, string given in /storage/emulated/0/coding/mobilephp

Member Avatar
Member Avatar
+0 forum 2

Hi Iam a student , nd i have a home work Can any one help me !! Plz Write an asm 8086 language program that take 2 strings as input and computes the string distance between the 2 ,,, the string distance between 2 string os the sum of the difference the ASCII codes of character located at the same position in both strings . As an example assume the first string to be encs432 and the second string to be encs533 Then the distance between 2 strings is computed as follows Abs("e"-"e") +abs("n"-"n") +("c"-"c")+ ("s"-"s")+("4"-"5) ............= 4

Member Avatar
+0 forum 0

A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation …

Member Avatar
Member Avatar
+0 forum 1

Can anyone tell me what is wrong with this? App crashes if user input is left blank. I was hoping it would display toast and wait for input. EditText userWireInput = (EditText) findViewById(R.id.WireSizeInputET); String userWireData = userWireInput.getText().toString(); double userWire = Double.parseDouble(userWireData); if (userWire == 0) { Toast.makeText(ISOM_Int_Results.this, "ENTER WIRE SIZE", Toast.LENGTH_LONG).show(); return; }

Member Avatar
Member Avatar
+0 forum 3

Sometimes you only want to enter numeric data in a textbox. You have two options here : Let a user type whatever he/she wants into a textbox, validate the input and show him or her an annoying message that he/she has done something wrong.:angry: Or: capture the key before input, check if it's "numeric" and allow only "numerics" to come through. That way, you know the input is correct and you can proceed.:) A decimal point should be correct input, but only once. The next snippet does this and is easily adapted to allow for sientific input(+,-,e,E)

Member Avatar
Member Avatar
+1 forum 11

Good Day Everyone please I am writing a Check In and Check Out program to display the date increase in day/month/year whenever I input a number. Eg. suppose I type 2days on the Check In Form I want the Check Out Form to display the days difference from the current date i.e if the current date is 03/02/2016 (dd/mm/yyyy), it should automatically increase and display 05/02/2016 and likewise if I add a bigger number like 31 it should also increase automatically and display 03/03/2016. Please I need help to go about it, can anyone please help me with the code …

Member Avatar
Member Avatar
+0 forum 7

how to comute the total value I input in textbox then after that I will going to add another value and the total of both sum will display in textbox for example num1 = Val(btn.Price) * num2 = Val(btn.Quantity) then total amount display the value of num1 is 60 then the num2 is 1 in the total amount it display 60 what if i add num1 is 150 then num2 is 2 in the total amount 300 how to sum this two

Member Avatar
Member Avatar
+0 forum 1

hey guys just wanna ask how to display an image or call the values of the table. but i will input the values to the server im using Xampp as my localhost. i have my admin page yet. but i just wanna know how. thank you. :)

Member Avatar
+0 forum 0

I have to create a program that accepts the number of tile as input from the keyboard, and returns the number of tiles to the main method. It has to accept the number of tiles and calculates the cost of each tiles. The method has to return the cost to the main method and prompt the user if he/she wants to purchase another item. I'm having trouble computing the subtotal, and how to keep a previous subtotal and add it to a new one they might be interested in... and further on down the line Here's my code: const int …

Member Avatar
Member Avatar
+0 forum 2

=client reads line from standard input (inFromUser stream) , sends to server via socket (outToServer stream) =server reads line from socket =server converts line to uppercase, sends back to client =client reads, prints modified line from socket (inFromServer stream) i just want to know how the code for server and client run on command prompt (cmd) of this above example.

Member Avatar
Member Avatar
+0 forum 2

Hello! What can be done with send input, native methods, DoKeyBoard? Please give me a full code of native method, dokeyboard,blockinput, sendinput. I want to know this because i want to send strings to other app from vb.net with keypress(suppose pressed key"a", and send an unicode char) and i have seen and app that sends unicode strings with keypress. Please help me. I am new in daniweb so if have did any mistake please dont post bad comments Thank you

Member Avatar
Member Avatar
+0 forum 1

Write a program that will print all highly prime numbers from the input interval <a,b>. Prime number is highly prime if deletion of every digit from right is a prime. Example: 239 is highly prime because 239,23,2 are primes. Could someone point out what are logic errors in the following program: #include <stdio.h> int isPrime(int n); int isHighlyPrime(int n); void printHighlyPrimeNumbers(int a,int b); // check if n is a prime int isPrime(int n) { int i=2; while(i < n) { if((n % i) == 0) return 0; i=2*i-1; } return 1; } // check if n is highly prime prime …

Member Avatar
Member Avatar
+0 forum 1

Hello to all! I want to make my netbeans project executable and portable. i write a program which connects to Ms access database and execute an Insert Query. My program is running successfully. Now I want to made executeable of this project and want to run this executable on another computer, How can I do this? As you know that my project contains a ms access file also, should i copy data base to other computer also? Please tell me full and proper way. And please also tell me to make a web application of java, executable and portable. just …

Member Avatar
Member Avatar
+0 forum 1

How can I get the values in the textbox using the primary key as an input? example I enter the Account no and the Name,address will be displayed in the textboxes

Member Avatar
Member Avatar
+0 forum 2

Enter a string: [I]house[/I] (a)esuoH (b)ESUOH (c)esuoh (d)EhuoS (Last and 2nd letter changed positions) - I'm done with (b) and (c), and I don't know how to execute the remaining 2. Any suggestions? Here's my code: [code=cplusplus] #include <iostream> #include <string> #include <locale> using namespace std; int main () { do { system("CLS"); string input; cout<<"Enter a string: "; cin>> input; string str (input); cout<<"\n\n"; locale loc; //for letter (b) string::reverse_iterator rit; for ( rit=str.rbegin() ; rit < str.rend(); rit++ ) cout << toupper(*rit,loc); cout<<"\n\n"; //for letter (c) for ( rit=str.rbegin() ; rit < str.rend(); rit++ ) cout << tolower(*rit,loc); …

Member Avatar
Member Avatar
+0 forum 5

Hi...Just received a refurbished HP Computer desktop and when I plugged in the monitor HP Pavilion F70 it flashes up on the screen video input ... Do I need to change the resolutions? if so, how ? and what is recommended? it is a 17 inch HP screen monitor. Thanks Karen

Member Avatar
Member Avatar
+0 forum 1

I need to enable a disabled text box through php.Please inform me about the errors in the following code: [CODE] <input type= "text" name ="ch1" disabled = "true" <? if ( $_GET["e"] == 3 ) echo "disabled = 'false' "; ?> /> [/CODE]

Member Avatar
Member Avatar
+0 forum 14

Hi everyone, I have registered a rotary encoder in /dev/input/event0 and i try to test it with evtest. This is the output of the test: Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0 Input device name: "rotary.4" Supported events: Event type 0 (EV_SYN) Event type 2 (EV_REL) Event code 0 (REL_X) Properties: Testing ... (interrupt to exit) Event: time 1167609644.822522, type 2 (EV_REL), code 0 (REL_X), value 1 Event: time 1167609644.822522, -------------- EV_SYN ------------ Event: time 1167609645.364383, type 2 (EV_REL), code 0 (REL_X), value 1 Event: time 1167609645.364383, -------------- EV_SYN ------------ Event: …

Member Avatar
+0 forum 0

The End.