Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
digit
- Page 1
My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Mr.M
… it means to bring 8,there's always that first
digit
which confuses everything. Another problem is that the register can…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Dani
I am confused when you say the HTML time picker input box can be set to 20:00 for time in and 5:00 for time out, because `<input type="time" ...>` only allows the end-user to specify a time, not a time and date combination. Should it always be assumed that if the time out is earlier than the time in, that it is the next day? …
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Mr.M
Thanks, to clarify what I meant regarding the dates is that I have a date input that shows a calendar when a user click on it to choose the date for which the register is being marked for. Then I also have 2 time inputs one is for timein and the other is for timeout. Let me try your code and see if it does solve the problem I've been having.…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Mr.M
I'm getting an error saying the `date_create` class can not be found
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Dani
Oh goodness, I’m sorry! I made a typo. Remove the new keyword. I’ve edited my post above.
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Mr.M
Thank you, you saved me, I've been trying for weeks now. It works now perfectly with your code.
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Dani
> Also just one more question regarding your code, I will have to minus 1 hour from the total hour difference, do I have to use the %h - 1? Just in case you haven't figured this out yet, the answer is no :) In my code above, see where I am showing you what $diff looks like on line 15? You should be able to do something like this: $…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Dani
In other words, if you just need days or hours you can do something like `$diff->d` or `$diff->h` (All properties available [here](https://www.php.net/manual/en/class.dateinterval.php), but if you want to calculate a runner's start time and end time and then do something like "You ran the race in 08:33:56!" then you could use the `…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Erussuhsh
Hi I'm new to android app development can you teach me how to make a app
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Week Ago
by Dani
I don’t personally know Android development or mobile development at all. However, others here might. Please start a new question [by clicking here](https://www.daniweb.com/community/contribute/181).
Digit Display
Programming
Software Development
15 Years Ago
by ejiroy
…class DigitsDisplay { public static void main(String[] args) { int
digit
; Scanner input = new Scanner (System.in); System.out.print(&…quot;Enter a positive integer: ");
digit
= input.nextInt(); count = 0; while (
digit
!= 0) { count + = 1;
digit
% 10; System.out.println…
Re: Digit Display
Programming
Software Development
15 Years Ago
by BestJewSinceJC
The last part is definitely wrong.
digit
% 10, if
digit
= 245, will be 5. But
digit
never gets modified there, so your program will run forever. What you should be doing is using a combination of % and / .
Re: Digit length with leading zero?
Programming
Software Development
15 Years Ago
by Adak
… account for leading zeroes. How do I validate a nine
digit
number, using only math and no functions, with possible leading… the char array from right to left, and multiply each
digit
with it's column, according to the base 10 numbering… won't know if a 0 might have a leading
digit
further to the left of it, and thus be a…
Digit length with leading zero?
Programming
Software Development
15 Years Ago
by idlackage
The number I'm looking for is valid when it's positive, and nine digits. I used ( (value >= 100000000) && (value <= 999999999) ) first, which worked okay, but did not account for leading zeroes. How do I validate a nine
digit
number, using only math and no functions, with possible leading zeroes?
Re: Digit length with leading zero?
Programming
Software Development
15 Years Ago
by jephthah
… account for leading zeroes. How do I validate a nine
digit
number, using only math and no functions, with possible leading…
Digit Or Currency to Word (Text) conversion
Programming
Software Development
14 Years Ago
by ashishkumar008
Hello, i want to know how to convert
digit
or currency in words. like- when i enter in textbox […
Re: Digit Summation
Programming
Software Development
14 Years Ago
by daviddoria
I would use std::stringstream to put the int into a stirng. Then the logic is much more straight forward to get each
digit
of the string. You can again use stringstream to get each one back to an int before adding them. iamthewee's option also works, but it could be more confusing to read in my opinion. Dave
Re: Digit Summation
Programming
Software Development
14 Years Ago
by Ryan61343
whatabout to keep doing it till you reach one
digit
A function that takes a 4 digit integer and adds 1 to each digit in scheme
Programming
Computer Science
8 Years Ago
by Roger_2
… 481.6 % 10 = 1 (does not equal 0, increment next
digit
) 3rd
digit
481.6 / 10 = 48.16 48.16 % 10 = 8… (does not equal 0, increment next
digit
) 4th
digit
48.16 / 10 = 4.816 4.816 % 10 = 4…10)) (define (di4 n) (+ n 1) ; increment 1st
digit
(cond ;check if 1st
digit
became 0 if so skip and increment 100…
Re: A function that takes a 4 digit integer and adds 1 to each digit in scheme
Programming
Computer Science
8 Years Ago
by David W
… strings ... and then to code a function to increment each '
digit
' in this string as proscribed ... with a carry term to… the 'next left'
digit
for the case of the incremented '
digit
value' becoming 10. I could show you…
Re: A function that takes a 4 digit integer and adds 1 to each digit in scheme
Programming
Computer Science
8 Years Ago
by David W
…(): while True: try: i = int(input( "Enter a 4
digit
int between 1000 and 9999: " )) if 1000 <= i…
Re: A function that takes a 4 digit integer and adds 1 to each digit in scheme
Programming
Computer Science
8 Years Ago
by David W
… takeInValid4Dig() { while( true ) { string iStr = takeInLine( "Enter a 4
digit
int between 1000 and 9999: " ); if( isValidPosInt(iStr) ) { int…
Re: A function that takes a 4 digit integer and adds 1 to each digit in scheme
Programming
Computer Science
8 Years Ago
by Taywin
…, you will need to call another function which take one
digit
which is taken off from the input number, increase it…
Re: function to return a zero as the most significant digit
Programming
Software Development
15 Years Ago
by tquiva
…quot;%d", &integer) != EOF) { /* Call function to print
digit
*/ put_result(integer); /* Print a blank line */ printf("\n"…(); while (IS_DIGIT(ch)) { /* repeat as long as ch is a
digit
*/ n = n * 10 + dig_to_int(ch); /* accumulate value in n */…
Warning: pack() [function.pack]: Type H: illegal hex digit s in
Programming
Web Development
9 Years Ago
by abhi10kumar
…: Warning: pack() [function.pack]: Type H: illegal hex
digit
s in D:\xampp\htdocs\project\includes\encryption.php on…Warning: pack() [function.pack]: Type H: illegal hex
digit
s in D:\xampp\htdocs\project\includes\encryption.php on…: pack() [function.pack]: Type H: illegal hex
digit
s in D:\xampp\htdocs\project\includes\encryption.php on…
function to return a zero as the most significant digit
Programming
Software Development
15 Years Ago
by tquiva
…integer) != EOF) { /* Call function to print
digit
*/ put_result(integer); /* Print a blank line */ …. It returns an integer with the most significant
digit
removed. */ { return n % wt; }…weight (a power of 10) of the most significant
digit
. */ { int wt = 1; while((n/wt…
5 digit palindrome program
Programming
Software Development
16 Years Ago
by SQ89
… int digit1; // first
digit
int digit2; // second
digit
int digit4; // fourth
digit
int digit5; // fifth
digit
int digits; // number…b, c; System.out.println("Enter a five
digit
number"); // prompt number = input.nextInt(); int…
Hong Kong Identity Card Check Digit
Programming
Software Development
11 Years Ago
by Jumper_1
…/smartcard_front.jpg) Below are the steps for generating the check
digit
. 1. The first letter of the card number is converted… dividing this sum by 11 is computed. 4. The check
digit
is computed by subtracting the remainder from 11. If the… by 11 – 2 = 9. Hence, the card number (with check
digit
) C668668(E) in the sample HKID card is invalid! The…
8 digit or 9 digit
Programming
Software Development
14 Years Ago
by swathys
…a text box to accept 9 or 10
digit
(after check
digit
)and then show the 2nd text box …help me.... [COLOR="red"]code with Check
digit
[/COLOR] [CODE] countvar = 0 If Not FocusedTB Is….PrepareNextButton()[/CODE] [COLOR="red"]code without Check
digit
[/COLOR] [CODE] countvar = 0 If Not FocusedTB Is…
3 digit integer to printable 3 digit string?
Programming
Software Development
10 Years Ago
by Roger_2
…algorithm to accomodate for up to three
digit
integers as the score will need … .bss userScore: resd 4 pcScore: resb 4 number: resd 4
digit
: resd 4 count: resd 4 . . . . . . . . . .… again jne write_number loop2: pop dword[
digit
] ;pop the
digit
from the stack and call write_digit ;…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC