Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
diff
- Page 1
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Dani
…difference represented as a PHP object $
diff
= date_diff($start, $end); // $
diff
is now a PHP object of how…hours, seconds // See for ourselves what $
diff
looks like var_dump($
diff
); // Specify a string that says how to… echo 'The time difference is: ' . $
diff
->format($format); You can build the string …
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Dani
…above, see where I am showing you what $
diff
looks like on line 15? You should be able… to do something like this: $hours = $
diff
->h; $total_hours = $
diff
->h - 1; echo "Total hours: …"; Alternatively, this should also work: $total_hours = $
diff
->format('%h') - 1; This is all untested code. :)
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Dani
… need days or hours you can do something like `$
diff
->d` or `$
diff
->h` (All properties available [here](https://www…
My php is showing wrong results of time difference
Programming
Web Development
1 Month Ago
by Mr.M
… out. Now I've been trying to use even time
diff
to get time difference between the two times provided but…
Re: My php is showing wrong results of time difference
Programming
Web Development
1 Month 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 Month 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 Month 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 Month 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 Month 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 Month 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).
diff in arrays
Programming
Web Development
10 Years Ago
by Priti_P
… [year_of_passing] => 1995 ) ) In above case I have , I have
diff
between [2]nd array as well as new array is… was thinking of one solution: make only one array of
diff
. But, in case difference between values , I want to update…
Re: diff in arrays
Programming
Web Development
10 Years Ago
by cereal
…); } $first = array_map('generate_digest', $a); $second = array_map('generate_digest', $b); $
diff
= my_diff($first, $second); print_r($
diff
); It's not a strong solution because is…
diff files script
Programming
Software Development
16 Years Ago
by axn
…extension of the files echo ${line} ${line} | sed 's/\(.*\)..../\1/'
diff
${line} ${line} | sed 's/\(.*\)..../\1/' # this doesnt seem … working file1 = ${line} file2 = ${line} | sed 's/\(.*\)..../\1/'
diff
${file1} ${file2} [B]collabrpt_cslbos.new collabrpt_cslbos diffusql[7]: file1: not…
Re: diff files script
Programming
Software Development
16 Years Ago
by JeoSaurus
Looks like you need to enclose your $line|sed in both cases! Try this: [code] for line in $(ls *.new); do file1="${line}" file2="$(echo ${line} | sed 's/\(.*\)..../\1/')"
diff
${file1} ${file2} done [/code] Hope it helps! -G
Diff B/w String Class and Stringbuilder Class
Programming
Software Development
17 Years Ago
by sonia sardana
I know just the one
diff
. [B][COLOR="Red"]1)[/COLOR][/B] String Class … created everytime a string is updated. [B]Is the above
diff
. rite or wrong???? ny More DIfferences????????/[/B]
regarding diff command in shell script
Hardware and Software
Linux and Unix
12 Years Ago
by sudipta.mml
diff
doesn't give same output format as input. How do I get that? For example file1 contains 1 2 3 4 5 file 2 contains 4 5
diff
file1 file2>file3 and file3 contains <1 <2 <3 The output is right but I don't want the symbol <. Please help me out in this regard.
Re: Diff B/w String Class and Stringbuilder Class
Programming
Software Development
17 Years Ago
by sonia sardana
Ya U r right Frnd StringBuilder is faster than String Class. Any more
diff
. If u know plz frd it???
Diff between Identifier and keyword
Programming
Software Development
18 Years Ago
by himanjim
Can anybody tell me the
diff
between keywords and identifiers? Cin and cout in C++ are keywords or identifiers?
Diff b/w php and cakePHP
Programming
Web Development
18 Years Ago
by mithesh
Hi can anybody help me wth whats the
diff
b/w php and a cake PHP ? Plsssssssssssss
diff command (unix command) implementation in c++
Programming
Software Development
16 Years Ago
by sirihoney
I really wonder whether the
diff
command can be implemented in c++.. But i need the code for tht..anyone please help... Sirisha.
Re: diff command (unix command) implementation in c++
Programming
Software Development
16 Years Ago
by Salem
If clicking a link is too much, the
diff
code is just way beyond you ;)
diff c++ and java..?
Programming
Software Development
16 Years Ago
by lyardson
the exact
diff
between c++ and java technically........need to submit a assignment
Re: diff c++ and java..?
Programming
Software Development
16 Years Ago
by Nick Evan
[QUOTE=lyardson;878812]the exact
diff
between c++ and java technically[/QUOTE] Technically 'Java' has one more character then 'C++' :icon_wink:
Re: diff c++ and java..?
Programming
Software Development
16 Years Ago
by kvprajapati
[QUOTE=lyardson;878812]the exact
diff
between c++ and java technically........need to submit a assignment[/QUOTE] Read this link [URL="http://disordered.org/Java-QA.html"]http://disordered.org/Java-QA.html[/URL]
Diff b/w Controls
Programming
Web Development
15 Years Ago
by ritu verma
hey frnds tell me dat wat the
diff
b/w two controls.They are different controls or same. Plz explain me.
Diff HTML generator
Programming
Software Development
15 Years Ago
by scru
… even code snippets that can generate HTML code from a
diff
or comparison of the contents of two files? I know…
Diff b/w C & C++
Programming
Software Development
14 Years Ago
by nbaztec
… Languages. Our lecturer gave us an assignment to lay out
diff
. b/w C & C++, which started with a rather…
Diff in two types of Code printing same thing?
Programming
Software Development
14 Years Ago
by gudads
#include <stdio.h> void main() { printf("hi"); } ..................... #include <stdio.h> int main ( void) { printf("hi"); return 0; } .............. q1: What is the
diff
in two codes? q2: I am habitual of using code type 1 ( the first code), is it ok to follow that way?
Re: Can I apply a diff to an already altered file?
Hardware and Software
Linux and Unix
11 Years Ago
by Ancient Dragon
diff
is used to find the differences between two files. So you will need a copy of the file before the changes were made and a copy of the file after the changes were made.
Re: regarding diff command in shell script
Hardware and Software
Linux and Unix
12 Years Ago
by cereal
You can output for RCS (Revision Control System) and `ed scripts` by using `-n` or `-e`:
diff
-n file1 file2 > file3
diff
-e file1 file2 > file3 Check `man
diff
` for more information. Or you can use the `awk` command:
diff
file1 file2 | awk '/>/ || /</ { print $2 }' > file3
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
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC