Author Topic: [CLOSED] Alternative Dashboard Version 6.81 Released!  (Read 60224 times)

0 Members and 1 Guest are viewing this topic.

Offline Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #300 on: October 08, 2013, 02:15:48 PM »
thats not the way it had come across in this sentence
Quote
after over a year trying to figure out an easy way to handle all the many date formats data comes in from WD
Brian
info@weather-display.com
http://www.weather-display.com

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #301 on: October 08, 2013, 10:41:59 PM »
Quote
andle all the many date formats data comes in from WD
?

are you able to expand on that statement?
exmples>
samples?

(as there should only be 2 date formats)

Here are a few examples from Testtags.php:

$easterdate =  '31 March 2013';   // Next easter date  <--- Month is spelled out totall with day first
$easterdate =  '31 maart 2013';   // Next easter date  <--- Month is in users home Language
$fullmoondate =  ' 18 October 2013';   // Date of the next/last full moon (date only)   <--- note extra space at start
$mooneclipse =  '07:47 UTC 15 April 2014 Eclipse Total';   // Next moon eclipse date
$vpstormrainstart = '0/0/0';  //Davis VP Storm rain start date  <--- Special format date
$dateoflastrainalways = '10/6/2013';   <--- Day not padded with leading zero
$moonrisedate =  '10/09/13';   // moon rise date   <---  Day is padded with leading zero
$mcoldestdayonrecord = '48.3F  on: Oct 06 2013';  <--- Month is spelled out with 3 characters and Month is First
$firstsnowseasonav = '03 of December';  <--- Month is spelled out totally, day is zero padded and added word
Plus those dates that are stored in three separate variables for month, day and year

Some dates are space separated, some with slashes.
Some with the month spelled out in full, some with it just 3 characters
Some months and days are padded with a leading 0, others are not.
Some contain temperatures, times, or other non-date information.

Not saying there is anything wrong with anything, just saying that there are multiple ways a date is formatted in WD and multiple ways people want it to look when displayed.  You have to be able to weed out the date from all the possible formats, then put them back together in the order people want to see them.  

All I said was, I finally got a routine built that seems to handle all the ways and is easy for the user to select how they want it to look on their display, plus had the added benefit of making the code shorter. Sorry if I stepped on toes by trying to make it easier to display.

Scott
« Last Edit: October 09, 2013, 07:12:27 PM by BurnsvilleWeather »
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #302 on: October 08, 2013, 11:10:32 PM »
thats not the way it had come across in this sentence
Quote
after over a year trying to figure out an easy way to handle all the many date formats data comes in from WD

Why is this immediately taken as bad?  This is why I left the other forum, every time I asked a question or stated a view on something it was either ignored, poo-poo'd or blown up on like this.  Brian, if you recall, it was you that told me to write a routine to handle the dates.  If you are upset with me for writing something to display all the dates in a specific format, I will be happy to remove the code and people can display them in the formats you have set forth.  Please advise, I will not release the code until you approve.

Scott
« Last Edit: October 08, 2013, 11:13:01 PM by BurnsvilleWeather »
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #303 on: October 09, 2013, 02:33:32 AM »
thanks for pointing out the particular problems with specific date formats
I had not seen this problem mentioned before (or at least dont recall)
Quote
or blown up on like this

well, you were the one who has made what seems like a out of the blue blanket statement here on this forum for an issue that I was not currently aware of

if it had been that I was made aware of this a year ago but then  never reminded again on the WD forum because you choose not to post on that forum then not sure what to say other than

there are alot of posts from alot of people and I am only one person doing the best I can

people need to politly remind me of an issue if it has been forgotten about or buried

its not that people are being ignored on purpose like you are stating here on this forum

Brian
info@weather-display.com
http://www.weather-display.com

Offline Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #304 on: October 09, 2013, 03:17:57 AM »
I have fixed a couple of problems with the next .zip update of WD
note that vpstorm rain one...if no rain ..then no date/time, hence zeros

also some of the dates/times come from a component, where I do not have much control over
(e.g like for easter etc)

also as I noted above some of the dates are derived from a routine that uses the users windows regional settings (ie some people will have set to show full word or not) (e.g firstsnowseasonav) compared to the abreviated month word WD uses (users can change that windows regional setting)
(this is because of the way that particular date is calculated from the data in the logfiles)
Brian
info@weather-display.com
http://www.weather-display.com

Offline bucks County Weather

  • Senior Member
  • **
  • Posts: 74
    • http://www.backyardweather.org
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #305 on: October 09, 2013, 07:27:21 AM »
Good job Scott.  That's why many jumped that ship.
Chris

Offline Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #306 on: October 09, 2013, 02:00:13 PM »
I can only do my best
with a young family to run around after
meeting for PTA to attend, BOT meetings, other local meetings

I am not going to please everyone all the time

I try to help people out as much as I can

I cant really see the point in running to this forum though where I have to try and provide support on a 2nd forum

Brian
info@weather-display.com
http://www.weather-display.com

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #307 on: October 09, 2013, 07:01:27 PM »
I have fixed a couple of problems with the next .zip update of WD
note that vpstorm rain one...if no rain ..then no date/time, hence zeros

also some of the dates/times come from a component, where I do not have much control over
(e.g like for easter etc)

also as I noted above some of the dates are derived from a routine that uses the users windows regional settings (ie some people will have set to show full word or not) (e.g firstsnowseasonav) compared to the abreviated month word WD uses (users can change that windows regional setting)
(this is because of the way that particular date is calculated from the data in the logfiles)


And that was all I was saying.  I've also just found out that some of the takes are translated to other languages in the testtags.php, further making it more difficult.

Scott
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #308 on: October 09, 2013, 07:08:38 PM »
Quote
or blown up on like this

well, you were the one who has made what seems like a out of the blue blanket statement here on this forum for an issue that I was not currently aware of

It was never intended to be made an issue at all.  I asked some questions about the date formats in the WD fourm; some at the time had dashes in them, some slashes, etc.  I didn't get any answers, but you did remove the dashes in the one date later,  so I went to work trying to fix it myself in the code I write, not a big deal.  I made a comment a year or so ago that I was having trouble getting the date to format correctly because of the different ways it was stored.  You told me to write a routine to display it, it only came in a couple formats.  So I did.  I simply said I was happy I got something to work right for me on the date issue. 
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline BurnsvilleWeather

  • Burnsville, MN USA
  • Forecaster
  • *****
  • Posts: 863
  • Retired from Weather!
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #309 on: October 09, 2013, 07:10:59 PM »
Just as an update, the 6.90 code will remain unreleased for now, my beta testers have found that some tags are language translated to their language in testtags.php therefore I will need to figure out how to handle month names in different languages too.  Sorry.

Scott
www.BurnsvilleWeatherLIVE.com (Formally Webster Weather LIVE)
Home of the Alternative Dashboard and Mobile Dashboard Scripts. Weather Display Scripts and Graphics


Davis VP2 with, UV, Solar, Leaf, Web Cam.

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #310 on: October 09, 2013, 08:21:12 PM »
Good things come to those that wait....

Thanks for all you do.

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline RickNY

  • Contributor
  • ***
  • Posts: 116
    • College Hills Weather - Farmingville, NY
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #311 on: October 13, 2013, 11:41:24 AM »
Is there an error in the included ajaxWDwx3.js on Lines 1662 and 1665?  I thought char was a reserved word in Java, and by extension, cant be used as a variable name in JS?  At any rate, trying to pack the JS throws errors on those two lines..

Code: [Select]
// Padding: left and right .. similar to "str_pad" function in php
String.prototype.str_pad = function ( cnt, chr, typ ) {
var sPad = "";
var char = (typeof chr == 'undefined')? "0" : chr;
var type = (typeof typ == 'undefined')? "R" : typ;
var iPad = cnt - Math.floor(this).toString().length;
   for (var i=0;i<iPad;i++) sPad+=char;
   return ((type=="R")? (sPad+this) : (this+sPad));
};


Thanks,
Rick

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #312 on: October 13, 2013, 12:10:33 PM »
I can only do my best
with a young family to run around after
meeting for PTA to attend, BOT meetings, other local meetings

I am not going to please everyone all the time

I try to help people out as much as I can

I cant really see the point in running to this forum though where I have to try and provide support on a 2nd forum


 

Thank you for all your work you do on Weather Display and help with it.

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #313 on: October 13, 2013, 01:00:46 PM »
Is there an error in the included ajaxWDwx3.js on Lines 1662 and 1665?  I thought char was a reserved word in Java, and by extension, cant be used as a variable name in JS?  At any rate, trying to pack the JS throws errors on those two lines..

Code: [Select]
// Padding: left and right .. similar to "str_pad" function in php
String.prototype.str_pad = function ( cnt, chr, typ ) {
var sPad = "";
var char = (typeof chr == 'undefined')? "0" : chr;
var type = (typeof typ == 'undefined')? "R" : typ;
var iPad = cnt - Math.floor(this).toString().length;
   for (var i=0;i<iPad;i++) sPad+=char;
   return ((type=="R")? (sPad+this) : (this+sPad));
};


Thanks,
Rick

While this function isn't a part of the Saratoga-Wx ajaxWDwx.js, it has been present in the AltDashboard's ajaxWDwx.js since at least version 6.70, which is far back as I cared to check.  If this function were problematic it should have shown up by now.

That said, I'm not sure this violates the reserved-word status of 'char'.  Those with greater JavaScript knowledge than I possess need to clarify what's going on with that function, whether it works as intended or not, and if it needs to be modified.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ericfynne

  • Contributor
  • ***
  • Posts: 139
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #314 on: October 13, 2013, 01:23:31 PM »
I thought char was a reserved word in Java, and by extension, cant be used as a variable name in JS?
Yes, char is a reserved word in Java, but not in JavaScript. Java is only related to JavaScript in the same way that Ham is related to Hamster.

Eric

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #315 on: October 13, 2013, 01:34:07 PM »
I thought char was a reserved word in Java, and by extension, cant be used as a variable name in JS?
Yes, char is a reserved word in Java, but not in JavaScript. Java is only related to JavaScript in the same way that Ham is related to Hamster.

Eric
You're right, Eric.  Here's the full story.  My search turned up an apparently obsolete list and I didn't check further. :oops:
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline RickNY

  • Contributor
  • ***
  • Posts: 116
    • College Hills Weather - Farmingville, NY
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #316 on: October 14, 2013, 09:03:02 AM »
Java is only related to JavaScript in the same way that Ham is related to Hamster.

Eric

Eric,

Fully aware that the two are unrelated, having programmed in Java for several years.. However, if you run the js file through a Java based packer such as YUI Compressor, it throws two errors on those lines.. The first being that there was no variable name after 'char'.  The 2nd error being related to the 'spad+=char'. 

Not saying you CANT do it while strictly dealing with JavaScript -- just saying that its probably not the best practice - especially if you plan on exposing the file to another language that considers it a reserved word (and char is reserved in quite a few).

At any rate, I modified the char to chra, (these were the only two places in the file where the word appeared) and was then able to pack the file.

Thanks,
Rick

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #317 on: October 14, 2013, 09:22:05 AM »
I've been compressing my copy of ajaxWDwx3.js here using the Microsoft Ajax Minifier option since long before it was version 3, and no errors due to the 'char' variable have ever been encountered.  The YUI minifier might be a different story, but obviously standards compliance means different things to the authors of these algorithms.  I agree that the use of a variable 'char' isn't best practice, but this function wasn't written by Scott or myself.

It would be easy to rename the variable 'char' as you have done but this will be Scott's call.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline RickNY

  • Contributor
  • ***
  • Posts: 116
    • College Hills Weather - Farmingville, NY
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #318 on: October 14, 2013, 09:37:01 AM »
I've been compressing my copy of ajaxWDwx3.js here using the Microsoft Ajax Minifier option since long before it was version 3

Hi Jerry.. Likewise, I can run the JS code through Dean Edwards Packer (URL specified in the JS file) - and it compresses fine (although Dreamweaver takes his version and complains of syntax errors in the compressed version, while YUI compressor produces output that Dreamweaver is happy with.

I think the problem with YUI is simply because it is a Java tool, packaged as a jar file - and sees the char and expects a variable name after it.  Granted this is not going to affect a good portion of the users utilizing Scott's dash.

There is another interesting behavior of the dash when viewing it under Safari on iOS 7.0.2.   I dont have any iOS devices running versions earlier than that - so I cant verify if its limited to iOS 7.. But anyone else out there that is running 6.81 of the dash -- try viewing your site for a few automatic AJAX refreshes and see if you start seeing wildly out of range numbers appear and disappear (I can see it happen with iOS 7.0.2 on my iPhone 5 with my own site as well as with Scott's).. Happens a lot in the daily precipitation and dew point fields.  I've been talking to Scott about this via email, but was wondering if anyone was out there still running iOS 6 that can see if the problem happens there.  Chrome for iOS does not display the issue, leading me to believe there is a bug in Apple's Nitro JavaScript engine, since Chrome is forced to use the older, slower UIWebView engine.



(Screengrab from Scott's site on iPhone 5, iOS 7.0.2)

Rick

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #319 on: October 14, 2013, 09:44:27 AM »
I've been compressing my copy of ajaxWDwx3.js here using the Microsoft Ajax Minifier option since long before it was version 3

Hi Jerry.. Likewise, I can run the JS code through Dean Edwards Packer (URL specified in the JS file) - and it compresses fine (although Dreamweaver takes his version and complains of syntax errors in the compressed version, while YUI compressor produces output that Dreamweaver is happy with.

I think the problem with YUI is simply because it is a Java tool, packaged as a jar file - and sees the char and expects a variable name after it.  Granted this is not going to affect a good portion of the users utilizing Scott's dash.

There is another interesting behavior of the dash when viewing it under Safari on iOS 7.0.2.   I dont have any iOS devices running versions earlier than that - so I cant verify if its limited to iOS 7.. But anyone else out there that is running 6.81 of the dash -- try viewing your site for a few automatic AJAX refreshes and see if you start seeing wildly out of range numbers appear and disappear (I can see it happen with iOS 7.0.2 on my iPhone 5 with my own site as well as with Scott's).. Happens a lot in the daily precipitation and dew point fields.  I've been talking to Scott about this via email, but was wondering if anyone was out there still running iOS 6 that can see if the problem happens there.  Chrome for iOS does not display the issue, leading me to believe there is a bug in Apple's Nitro JavaScript engine, since Chrome is forced to use the older, slower UIWebView engine.



(Screengrab from Scott's site on iPhone 5, iOS 7.0.2)

Rick


I have the same issue and did not know where to post it. You can see it here:

http://www.wxforum.net/index.php?topic=20422.0

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline RickNY

  • Contributor
  • ***
  • Posts: 116
    • College Hills Weather - Farmingville, NY
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #320 on: October 14, 2013, 09:53:57 AM »
Managed to find an iPhone 5 at work still running iOS 6.  Problem does not appear to happen there, so it appears to be an iOS7 bug.. I'll submit a bug report to Apple for whatever its worth.

Rick

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #321 on: October 14, 2013, 10:43:29 AM »
Rick,  please let us know what they say, if anything. They told me it was not their problem.

Thanks,
Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 210
    • Sherman Ct. Weather
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #322 on: October 14, 2013, 03:20:13 PM »
I would say its Apples problem.  Only happens with Safari and only with IOS 7.  I use Chrome with my iphone and ipad and it works fine.

Offline ericfynne

  • Contributor
  • ***
  • Posts: 139
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #323 on: October 14, 2013, 04:10:12 PM »
I think the problem with YUI is simply because it is a Java tool, packaged as a jar file - and sees the char and expects a variable name after it.
The fact that YUI is written in Java is irrelevant. YUI treats char as a reserved word because YUI was written to treat char as a reserved word, not because it was written in Java. If it had been written in Lisp, in which char is not a reserved word, the programmer would have (presumably) still chosen to treat char as a reserved word.

HTH

Eric

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Alternative Dashboard Version 6.81 Released! (Minor ver 6.83 available too)
« Reply #324 on: October 14, 2013, 04:58:52 PM »
There is another interesting behavior of the dash when viewing it under Safari on iOS 7.0.2.

FWIW, I'm not seeing the problems you guys are showing when looking at my site under Safari/iOS 7.0.2/iPhone 5s. Also, I am not seeing the problem on Scott's site. Everything is as it should be.

Note I am running the same 6.90 beta that Scott has posted.
John
W7JKG

 

anything