Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Rounding Values?

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Rounding Values?

Post by William Grimsley »

saratogaWX wrote:I can understand the perception that it appears we're being overly sensitive and harsh with Williams questions. We are not attempting to 'bully' William at all .. he has a long history on this (and on a forum to which he is now banned) of doing postings which are mainly due to self-inflicted coding errors and failing to respond meaningfully to advice/guidance given. By his own admission, he does have Aspberger syndrome which (according to Wikipedia)
Asperger syndrome (AS), also known as Asperger's syndrome or Asperger disorder, is an autism spectrum disorder (ASD) that is characterized by significant difficulties in social interaction, alongside restricted and repetitive patterns of behavior and interests. It differs from other autism spectrum disorders by its relative preservation of linguistic and cognitive development.
All of which is evidenced by his interactions on the forums.

It's just that many of us (me included) have ceased having patience dealing with the repetitive behavior after more than a year of the same kind of interactions. It was strongly hoped that William would benefit and learn from the interactions and better cope with his environment and better understand the social cues offered, but sadly, little such improvement has been seen and he continues to post questions about trivial coding errors he creates or offers advice where his subject knowledge is fundamentally flawed (though the latter has substantially mitigated in recent history). So.. I have stopped responding to his self-inflicted coding questions and/or trivial stylistic questions. I will respond to errata in the template support scripts (if they are unmodified from the distributed versions).
Hi Ken,

Thanks, for pointing out, that I have Aspergers Syndrome! I hope people aren't so horrible to me, in the future.
I will respond to errata in the template support scripts (if they are unmodified from the distributed versions).
Ah! Well, I do have some errata problems on my site.

Somehow, this came up, after doing some what I thought was 'valid' coding! http://validator.w3.org/check?uri=http% ... 3#line-790
User avatar
saratogaWX
Posts: 1185
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Rounding Values?

Post by saratogaWX »

I do not feel that people are responding 'horrible' to you. They are responding the way they are because you have evidenced little improvement in your interactions on the forum (persistence in pursuit of the trivial, lack of incorporation of advice given in either new interactions or applying coding skills gained from prior interactions where learning should have been done).

To your validation question, the code area you cited is something you have added to the ajax-dashboard.php (not in the original distribution), but for a last time, I'll give you the pointer on where to fix your self-inflicted coding issue.

The first error starts at

Code: Select all

 <tr>
<td class="data1">Dawn:</td>
<td style="text-align: right;" class="data1">
05:54 </td>
</tr>
<tr>
<td class="data1">Dusk:</td>
<td style="text-align: right;" class="data1">
18:51 </td>
</tr>
and all subsequent errors appear to be the result of failing to close the prior row (with a </tr>) before beginning that code.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Rounding Values?

Post by beteljuice »

Advice being ignored? No way! I'm taking everything on board! If I thought that I was going to ignore everyone, I wouldn't be typing this post!
This is advice:
From the php rounding example page you link to:
Quote:
Example #1 round() examples
<?php
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
echo round(5.045, 2); // 5.05
echo round(5.055, 2); // 5.06
?>
Nowhere in your code did you say how many decimal places you wanted - so defaults to 0.
.... but, that is purely working with the number, to display eg. 2.0 you need to use another function on the rounded figure you just produced. (Which is also mentioned on the example page you quoted).
This is ignorance and throwing a strop:
I'm not wanting to display 2.0C! I'm wanting to display the 'actual' wind chill. Anyway, I've posted my query on http://www.phphelp.com because you guys, won't help me!
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Rounding Values?

Post by William Grimsley »

saratogaWX wrote:I do not feel that people are responding 'horrible' to you. They are responding the way they are because you have evidenced little improvement in your interactions on the forum (persistence in pursuit of the trivial, lack of incorporation of advice given in either new interactions or applying coding skills gained from prior interactions where learning should have been done).

To your validation question, the code area you cited is something you have added to the ajax-dashboard.php (not in the original distribution), but for a last time, I'll give you the pointer on where to fix your self-inflicted coding issue.

The first error starts at

Code: Select all

 <tr>
<td class="data1">Dawn:</td>
<td style="text-align: right;" class="data1">
05:54 </td>
</tr>
<tr>
<td class="data1">Dusk:</td>
<td style="text-align: right;" class="data1">
18:51 </td>
</tr>
and all subsequent errors appear to be the result of failing to close the prior row (with a </tr>) before beginning that code.
Hi Ken,

Ok, I understand that people aren't being 'horrible' to me. I'm just saying that Aspergers Syndrome, is very benefitial but at times like in those situations, can be very awkward.

Thanks! That worked! I should of found that in the first place, but without knowing what I'd done and having not looked properly at the validation page, I just went straight for help! :lol:

I would really like to say, thanks so much for your help and patience towards me, over the past months!

Thanks so much,

William
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Rounding Values?

Post by William Grimsley »

beteljuice wrote:
Advice being ignored? No way! I'm taking everything on board! If I thought that I was going to ignore everyone, I wouldn't be typing this post!
This is advice:
From the php rounding example page you link to:
Quote:
Example #1 round() examples
<?php
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
echo round(5.045, 2); // 5.05
echo round(5.055, 2); // 5.06
?>
Nowhere in your code did you say how many decimal places you wanted - so defaults to 0.
.... but, that is purely working with the number, to display eg. 2.0 you need to use another function on the rounded figure you just produced. (Which is also mentioned on the example page you quoted).
This is ignorance and throwing a strop:
I'm not wanting to display 2.0C! I'm wanting to display the 'actual' wind chill. Anyway, I've posted my query on http://www.phphelp.com because you guys, won't help me!
Ah, oops. Ok, I get it now. :oops:
Post Reply