Page 30 of 42 FirstFirst ... 20282930313240 ... LastLast
Results 581 to 600 of 831

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Workaround Stategies for iOS8 respringing using GroovyAPI+

  1. #581
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    King and I and the other that have been helping you ARE the 'fathers' of WW2. LOL!!.. There's nothing more we can do with WW to make it print the updatetimestring for you or the sunrise times. The problem is with weather.com. WW2 only takes the data it receives from weather.com and places what it finds in the widgetweather.xml.

  2. The Following User Says Thank You to NewD For This Useful Post:

    King_O_Hill (2015-04-09)

  3. #582
    Quote Originally Posted by shigo11 View Post
    Hi again , sorry to disappear ...the fact that the Arc SB widget was FINALLY working !! was such "a prize" for me I had to investigate and do I did edit my weather.xml with the update tine string while springing in and out of WW2 ....sounds too much ?!? Well ...I got to notice that my sunrisetine and my sunsettime in the xml are also missing , and of course , are missing from the Arc window on the SB , if I add them , the widget is finally changing the walls according to the day & night ( I got stuck with 'beautiful sunshine at 3:10 am !!) ....which got me to think - what else is f**king missing from my weather xml - just because I live a little off centre ....of the world !!

    Maybe I can approach some of the basic fathers of the WW2 widget - maybe then can help ?

    NewD - I'm going to add the code you were talking about and let you know -

    Thanks To All of you who are trying to help us ( 3 in the world )


    Sent from my iPhone using Tapatalk
    It would take a bit of code editing, but there are javascripts that determine sunrise/sunset and/or moonnrise/moonset from your GPS position (latitude & longitude) and the current time and date. So you would not have to rely on missing values in the xml file.
    I am still trying to figure out why there is a updatetimestring and the only reason I could come up is to show how long ago the last update was, well, that is something I easily could live without. LOL
    Last edited by rasputin007; 2015-04-09 at 06:04 PM.
    Nothing is impossible only miracles take a bit longer!

  4. #583
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Default Workaround Stategies for iOS8 respringing using GroovyAPI+
    Quote Originally Posted by rasputin007 View Post
    It would take a bit of code editing, but there are javascripts that determine sunrise/sunset and/or moonnrise/moonset from your GPS position (latitude & longitude) and the current time and date. So you would not have to rely on missing values in the xml file.
    I am still trying to figure out why there is a updatetimestring and the only reason I could come up is to show how long ago the last update was, well, that is something I easily could live without. LOL
    That is only one of its uses, Ras. The other is more central to how WW-based widgets (like UniAW) work. Within WW we have the ability to set a time interval at which WW will grab new data from the weather.framework and write it to the XML. When that time interval is achieved in WW itself it sends a new request to weather.framework to update. And records the update "real time" in the "updatetimestring" in the XML. This then informs our widgets when to update the the cached arrays with all of the new weather data saved in the XML. The updateWeather function is set to auto refresh every 20 seconds in our widgets. But new data is only refreshed in the arrays when the code detects that new data has been written in the xml file. That "math calculation" is accomplished with the obj.updatetimestring. No widgets would work without that calculation.

  5. The Following User Says Thank You to NewD For This Useful Post:

    rasputin007 (2015-04-09)

  6. #584
    Thanks for the explanation.
    So, to summarise it, if you don't have a updatetimestring in the xml file you are buggered!
    Nothing is impossible only miracles take a bit longer!

  7. #585
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by rasputin007 View Post
    Thanks for the explanation.
    So, to summarise it, if you don't have a updatetimestring in the xml file you are buggered!
    Exactly.. or as we say in American English.. "You're screwed!"..

  8. #586
    Or maybe

    What would you be if you were attached to another object by an inclined plane, wrapped helically around an axis?

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  9. #587
    Theme Creator Pibe77's Avatar
    Join Date
    Nov 2014
    Location
    Marano di Napoli, Italy
    Posts
    1,410
    Thanks
    4,854
    Thanked 3,572 Times in 984 Posts

    Hallo and sorry for Off Topic, I would ask you because i know you are using Insomnia tweak too:

    ...then...since i installed Insomnia i found a strange file in .../Mobile/ Documents called Mraid.js
    do you know what it is and if it is safe?

    Thanks in advance


    Inviato dal mio iPhone utilizzando Tapatalk

  10. #588
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Pibe77 View Post
    Hallo and sorry for Off Topic, I would ask you because i know you are using Insomnia tweak too:

    ...then...since i installed Insomnia i found a strange file in .../Mobile/ Documents called Mraid.js
    do you know what it is and if it is safe?

    Thanks in advance
    I don't have that file in var/mobile/Documents on my phone, Pibe.

  11. The Following User Says Thank You to NewD For This Useful Post:

    Pibe77 (2015-04-10)

  12. #589
    Theme Creator Pibe77's Avatar
    Join Date
    Nov 2014
    Location
    Marano di Napoli, Italy
    Posts
    1,410
    Thanks
    4,854
    Thanked 3,572 Times in 984 Posts

    Quote Originally Posted by NewD View Post
    I don't have that file in var/mobile/Documents on my phone, Pibe.
    lol, i set Insomnia to Off and delete that file, than...as soon as i set Insomnia to On that file reappears

    Thank you very much for quick replay
    maybe i wait if sameone has the same...
    thanks


    Inviato dal mio iPhone utilizzando Tapatalk

  13. #590
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Pibe77 View Post
    lol, i set Insomnia to Off and delete that file, than...as soon as i set Insomnia to On that file reappears

    Thank you very much for quick replay
    maybe i wait if sameone has the same...
    thanks
    I'm using the Pro version, Pibe.. Maybe that's the difference. The free version maybe puts a demo file in Documents. Though it's strange that it would be a .js file..

  14. The Following User Says Thank You to NewD For This Useful Post:

    Pibe77 (2015-04-10)

  15. #591
    Theme Creator Pibe77's Avatar
    Join Date
    Nov 2014
    Location
    Marano di Napoli, Italy
    Posts
    1,410
    Thanks
    4,854
    Thanked 3,572 Times in 984 Posts

    Quote Originally Posted by NewD View Post
    I'm using the Pro version, Pibe.. Maybe that's the difference. The free version maybe puts a demo file in Documents. Though it's strange that it would be a .js file..
    I think you are right! I'm using the free version, it has Ads..

    However, as you've already said it is very strange get a js file

    This is the first part of Mraid.js file ... is a very long file

    Code:
    /**
    * Millennial Media JS Library (MM.js)
    * Copyright 2010-2013, Millennial Media
    *
    * Version: 1.4
    * Built on Mon Jun 24 2013 14:08:11 GMT-0700 (PDT).
    */
    
    // Generated by CoffeeScript 1.6.2
    var MMAppStore, MMBanner, MMBrand, MMBridgeObject, MMCachedVideo, MMCalendar, MMCommand, MMDevice, MMFileManager, MMInlineVideo, MMInterstitial, MMJS, MMJSUtils, MMListenerManager, MMMedia, MMMicrophone, MMNotification, MMPassbook, MMPasteboard, MMSDKInterface, MMSocial, MMSpeechkit, MRAID, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
      __hasProp = {}.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
    
    String.prototype.trim = function() {
      return this.replace(RegExp("^\\s+|\\s+$", "g"), "");
    };
    
    String.prototype.titleCase = function() {
      return this.replace(RegExp("\\w\\S*", "g"), function(str) {
        return str.charAt(0).toUpperCase().concat(str.substr(1).toLowerCase());
      });
    };
    
    if (typeof MMJS === typeof void 0) {
      MMJSUtils = (function() {
        function MMJSUtils() {}
    
        MMJSUtils.ios_version = null;
    
        MMJSUtils.platform = null;
    
        MMJSUtils.sdk_version = null;
    
        MMJSUtils.params = null;
    
        MMJSUtils.isBridgeEnabled = function() {
          if (MMDevice.readyState !== "unknown") {
            return true;
          }
          return false;
        };
    
        MMJSUtils.isPre46 = function(a) {
          if (this.isBridgeEnabled() === true) {
            return false;
          }
          if (a == null) {
            return true;
          }
          return this.underVersion(a, "4.6.0");
        };
    
        MMJSUtils.underVersion = function(versionString, minVersion) {
          var i, res, result, v1, v2;
    
          if (versionString == null) {
            return false;
          }
          v1 = versionString.split(".");
          v2 = minVersion.split(".");
          i = 0;
          result = 0;
          while (i < Math.min(v1.length, v2.length)) {
            res = v1[i] - v2[i];
            if (res !== 0) {
              result = res;
              break;
            }
    ....to continue too

    Thanks anyway, i will try the Pro Version...


    Inviato dal mio iPhone utilizzando Tapatalk

  16. #592
    Hi again - just a short update - I used iCleanPro marking all substrates in Cydia and then took them all off (except the ones you've asked me not to) , I rebooted and went in to check the xml file - it was updated by the WW widget (according to the last time on iFile) but the relevant field - updatetimestring - is Empty!
    I can come to the conclusion that the xml is missing the relevant data ( and some more data fields) and it come like that from the weather.com site - I have no conflicting other tweak

    I'm at the point I added to the main.js the relevant code changes regarding the - updatetimestring - were I update the time itself 2 times a day - and I added also the sunset & sunrise time (to same main.js) which they don't change as so often (as one might assume) - bottom line - Arc SB is working (about 90%) and looking great

    Maybe it's not a big fish ....but at list it's my first fish

    Thank you all


    Sent from my iPhone using Tapatalk

  17. The Following User Says Thank You to shigo11 For This Useful Post:

    King_O_Hill (2015-04-11)

  18. #593
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by shigo11 View Post
    Hi again - just a short update - I used iCleanPro marking all substrates in Cydia and then took them all off (except the ones you've asked me not to) , I rebooted and went in to check the xml file - it was updated by the WW widget (according to the last time on iFile) but the relevant field - updatetimestring - is Empty!
    I can come to the conclusion that the xml is missing the relevant data ( and some more data fields) and it come like that from the weather.com site - I have no conflicting other tweak

    I'm at the point I added to the main.js the relevant code changes regarding the - updatetimestring - were I update the time itself 2 times a day - and I added also the sunset & sunrise time (to same main.js) which they don't change as so often (as one might assume) - bottom line - Arc SB is working (about 90%) and looking great

    Maybe it's not a big fish ....but at list it's my first fish

    Thank you all


    Sent from my iPhone using Tapatalk
    Glad you could get the Arc SB working. At least we know the trouble. As I said in the my first response to you - we've only seen this issue a few times in all the time WW has been out. And it has to do with certain places around the world where the updatetimestring is not calculated because the feed doesn't provide Sunrise and Sunset times for that area. Very frustrating for the few of you it affects. Good luck!

  19. #594
    Quote Originally Posted by rasputin007 View Post
    It would take a bit of code editing, but there are javascripts that determine sunrise/sunset and/or moonnrise/moonset from your GPS position (latitude & longitude) and the current time and date. So you would not have to rely on missing values in the xml file.
    I am still trying to figure out why there is a updatetimestring and the only reason I could come up is to show how long ago the last update was, well, that is something I easily could live without. LOL
    Rad, just out of curiosity ( and spare time) can you point out relevant java scripts or other tweaks that makes this calculation according to the GPS (lat & long) , maybe I could use that code and reedit again the main.js to calculate the missing data?
    NewD- if I understood you correctly the field -updatetimestring - is missing because the sunrise & sunset times are missing from the original feed? And hence, no calculation is being done to determine the updatetimestring ?


    Sent from my iPhone using Tapatalk

  20. #595
    Quote Originally Posted by King_O_Hill View Post
    Or maybe

    What would you be if you were attached to another object by an inclined plane, wrapped helically around an axis?
    FUBAR'd?

  21. #596
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by shigo11 View Post
    NewD- if I understood you correctly the field -updatetimestring - is missing because the sunrise & sunset times are missing from the original feed? And hence, no calculation is being done to determine the updatetimestring ?
    Yes. I believe that is the 'dependent' order of things. An updatetimestring may not be able to be determined without sunrise and sunset times. If I recall the updatetimestring is a 'calculated field' from within WW2.. and that the sunrise/sunset times are what are missing from weather.com's feed in these certain global areas. But I'd need to verify that with the developer to be sure.. Let me do some more checking..
    Last edited by NewD; 2015-04-10 at 06:11 PM.

  22. #597
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Okay.. Shigo -- still haven't confirmed whether or not it's updatetimestring that gets calculated first or second.. But I have a 'workaround' for your updatetimestring.. that I think should work reliably.. Back in the main.js of your widget replace this:

    Code:
    obj.updatetimestring = $(data).find('updatetimestring').text();
    ..with this:
    Code:
    //obj.updatetimestring = $(data).find('updatetimestring').text();
    
    var now = new Date();
    var strDateTime = [[now.getFullYear(), AddZero(now.getDate()), AddZero(now.getMonth() + 1)].join("-"), [AddZero(now.getHours()), AddZero(now.getMinutes()), AddZero(now.getSeconds())].join(":"), now.getHours() >= 12 ? "PM" : "AM"].join(" ");
    obj.updatetimestring = strDateTime;
    
    function AddZero(num) {
        return (num >= 0 && num < 10) ? "0" + num : num + "";
    }
    .. don't change anything else..

    That should allow the widget to work and update automatically - I think.. Run it for a while and see if it's updating through the day.

  23. #598
    Quote Originally Posted by NewD View Post
    Okay.. Shigo -- still haven't confirmed whether or not it's updatetimestring that gets calculated first or second.. But I have a 'workaround' for your updatetimestring.. that I think should work reliably.. Back in the main.js of your widget replace this:

    Code:
    obj.updatetimestring = $(data).find('updatetimestring').text();
    ..with this:
    Code:
    //obj.updatetimestring = $(data).find('updatetimestring').text();
    
    var now = new Date();
    var strDateTime = [[now.getFullYear(), AddZero(now.getDate()), AddZero(now.getMonth() + 1)].join("-"), [AddZero(now.getHours()), AddZero(now.getMinutes()), AddZero(now.getSeconds())].join(":"), now.getHours() >= 12 ? "PM" : "AM"].join(" ");
    obj.updatetimestring = strDateTime;
    
    function AddZero(num) {
        return (num >= 0 && num < 10) ? "0" + num : num + "";
    }
    .. don't change anything else..

    That should allow the widget to work and update automatically - I think.. Run it for a while and see if it's updating through the day.
    Ok I added the code saved and respring - widget doesn't work (as it was until the new code changes )
    ...I have the feeling it's maybe that the string that we are building is missing something in compare to the TRUE updatetimestring - "2015-04-10 11:56:00 AM". ....maybe it's " " ( blank spaces ) - What Do U think ?


    Sent from my iPhone using Tapatalk

  24. #599
    Quote Originally Posted by shigo11 View Post
    Rad, just out of curiosity ( and spare time) can you point out relevant java scripts or other tweaks that makes this calculation according to the GPS (lat & long) , maybe I could use that code and reedit again the main.js to calculate the missing data?
    NewD- if I understood you correctly the field -updatetimestring - is missing because the sunrise & sunset times are missing from the original feed? And hence, no calculation is being done to determine the updatetimestring ?


    Sent from my iPhone using Tapatalk
    Here is a "cleaned up" version i use in MYO5.
    Code:
    var latitude; //latitude is the latitude you can get from widgetweather.xml
    var longitude; //longitude is the longitude you can get from widgetweather.xml
    var lat1;
    var lat2;
    var lat3;
    var long1;
    var long2;
    var long3;
    var textLat;
    var textLong;
    					
    				
    				if (latitude < 0) {
    					 textLat = Math.round(latitude*100)/100 + "\u00B0" + "S";
    					 lat3=textLat.split('\u00B0')[0];
    					 lat1=Math.abs(lat3);
    					 lat2=textLat.split('\u00B0')[1];
    					}
    					 else if (latitude > 0){
    						textLat = Math.round(latitude*100)/100 + "\u00B0" + "N";
    						lat1=textLat.split('\u00B0')[0];
    						lat2=textLat.split('\u00B0')[1];
    					 }
    					 else {
    						textLat = Math.round(latitude*100)/100 + "\u00B0";
    					 }
    					 
    					 if (longitude < 0) {
    						textLong = Math.round(longitude*100)/100 + "\u00B0" + "W";
    						long3=textLong.split('\u00B0')[0];
    						long1=Math.abs(long3);
    						long2=textLong.split('\u00B0')[1];
    					}
    					else if (longitude > 0) {
    						textLong = Math.round(longitude*100)/100 + "\u00B0" + "E";
    						long1=textLong.split('\u00B0')[0];
    						long2=textLong.split('\u00B0')[1];
    					}
    					else {
    						textLong = Math.round(longitude*100)/100 + "\u00B0";
    					 }
    												
    					sunriseSunset(long1, long2, lat1, lat2, 0) 			// hour adjustment 0 if wintertime, 1 if summertime
    				
    
    function sunriseSunset(longitude, ew, latitude, ns, localoffset)
    {
              var d = new Date();
              var dyear = d.getUTCFullYear();
              var dmonth = d.getUTCMonth() + 1;
              var dday = d.getUTCDate();
              var zenith = 90.83;
              var lnghour;
              var n1, n2, n3, n, t1, t2, m1, m2, l1, l2, ra1, ra2, lquadrant1, lquadrant2, raquadrant1, raquadrant2;
              var sindec1, sindec2, cosdec1, cosdec2, cosh1, cosh2, h1, h2, T1, T2, UT1, UT2, localT1, localT2;
              var output = " ", output1 = " ", output2 = " ";
    
              // Set coords as negative if West or South.
              if(ew == 'w' || ew == 'W'){longitude *= -1;}
              if(ns == 's' || ns == 'S'){latitude *= -1;}
              
              lnghour = longitude / 15.0;
    
              // Calculate the day of the year.
              n1 = Math.floor(275 * dmonth / 9);
              n2 = Math.floor((dmonth + 9) / 12);
              n3 = (1 + Math.floor((dyear - 4 * Math.floor(dyear / 4) + 2) / 3));
              n = n1 - (n2 * n3) + dday - 30;
              // Get sunrise and sunset times.
              t1 = n + ((6 - lnghour) / 24);
              t2 = n + ((18 - lnghour) / 24);
              // Sun's mean anomaly.
              m1 = (0.9856 * t1) - 3.289;
              m2 = (0.9856 * t2) - 3.289;
              // Sun's true longitude.
              l1 = m1 + (1.916 * Math.sin((Math.PI/180)*m1)) + (0.020 * Math.sin((Math.PI/180)*2 * m1)) + 282.634;
              if(l1 < 0){l1 += 360;}
              if(l1 > 360){l1 -= 360;}
              l2 = m2 + (1.916 * Math.sin((Math.PI/180)*m2)) + (0.020 * Math.sin(2 * (Math.PI/180)*m2)) + 282.634;
              if(l2 < 0){l2 += 360;}
              if(l2 > 360){l2 -= 360;}
              // Sun's right ascension.
              ra1 = (180/Math.PI)*Math.atan(0.91764 * Math.tan((Math.PI/180)*l1));
              if(ra1 < 0){ra1 += 360;}
              if(ra1 > 360){ra1 -= 360;}
              ra2 = (180/Math.PI)*Math.atan(0.91764 * Math.tan((Math.PI/180)*l2));
              if(ra2 < 0){ra2 += 360;}
              if(ra2 > 360){ra2 -= 360;}
              // Sun's quadrant.
              lquadrant1  = (Math.floor(l1/90)) * 90;
              raquadrant1 = (Math.floor(ra1/90)) * 90;
              ra1 = ra1 + (lquadrant1 - raquadrant1);
              lquadrant2  = (Math.floor(l2/90)) * 90;
              raquadrant2 = (Math.floor(ra2/90)) * 90;
              ra2 = ra2 + (lquadrant2 - raquadrant2);
              // Convert right ascension into hours.
              ra1 = ra1 / 15.0;
              ra2 = ra2 / 15.0;
              // Get sun's declination.
              sindec1 = 0.39782 * Math.sin((Math.PI/180)*l1);
              sindec2 = 0.39782 * Math.sin((Math.PI/180)*l2);
              cosdec1 = Math.cos(Math.asin(sindec1));
              cosdec2 = Math.cos(Math.asin(sindec2));
              // Sun's local hour angle.
              cosh1 = (Math.cos((Math.PI/180)*zenith) - (sindec1 * Math.sin((Math.PI/180)*latitude))) / (cosdec1 * Math.cos((Math.PI/180)*latitude));
              cosh2 = (Math.cos((Math.PI/180)*zenith) - (sindec2 * Math.sin((Math.PI/180)*latitude))) / (cosdec2 * Math.cos((Math.PI/180)*latitude));
              if(cosh1 > 1){output1 = "No sunrise.";}
              if(cosh2 < -1){output2 = "No sunset.";}
              // Get hour.
              h1 = 360 - (180/Math.PI)*Math.acos(cosh1);
              h2 = (180/Math.PI)*Math.acos(cosh2);
              h1 = h1 / 15;
              h2 = h2 / 15;
              // Local mean time for rise and set.
              T1 = h1 + ra1 - (0.06571 * t1) - 6.622;
              T2 = h2 + ra2 - (0.06571 * t2) - 6.622;
              // Adjust back to UTC.
              UT1 = T1 - lnghour;
              if(UT1 < 0){UT1 += 24;}
              if(UT1 > 24){UT1 -= 24;}
              UT2 = T2 - lnghour;
              if(UT2 < 0){UT2 += 24;}
              if(UT2 > 24){UT2 -= 24;}
              // Convert UTC value to local based on longitude and latitude.
              localT1 = UT1 + localoffset;
              localT1 = (localT1 > 24) ? localT1-24:localT1;
              localT1 = (localT1 < 0) ? localT1+24:localT1;
              localT2 = UT2 + localoffset;
              localT2 = (localT2 > 24) ? localT2-24:localT2;
              localT2 = (localT2 < 0) ? localT2+24:localT2;
              // Output sunrise and sunset times as a string.
              if(output1 != " "){localT1 = output1;}
              if(output2 != " "){localT2 = output2;}
    		  // Correct underflow/overflow and convert to 12 hour - am/pm format
              var localT1Hour = Math.floor(localT1);
              var localT1Minute = Math.floor((localT1 - localT1Hour)*60);
              localT1Minute = (localT1Minute < 10) ? "0" + localT1Minute: localT1Minute;
              localT1MinutePM = (localT1Hour < 12) ? localT1Minute + " AM":localT1Minute + " PM";
              localT1HourPM = (localT1Hour > 12) ? localT1Hour - 12: localT1Hour;
              var localT2Hour = Math.floor(localT2);
              var localT2Minute = Math.floor((localT2 - localT2Hour)*60);
              localT2Minute = (localT2Minute < 10) ? "0" + localT2Minute: localT2Minute;
              localT2MinutePM = (localT2Hour < 12) ? localT2Minute + " AM":localT2Minute + " PM";
              localT2HourPM = (localT2Hour > 12) ? localT2Hour - 12: localT2Hour;
    		  
    }
    DO NOT COPY & PASTE THIS CODE!
    It is useless.
    The typed in code is correct, but the displayed code is rubbish, not my fault, blame the MMi forum software for messing up code in code tags.
    Last edited by rasputin007; 2015-05-17 at 11:41 AM.
    Nothing is impossible only miracles take a bit longer!

  25. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    NewD (2015-05-16), Wildfowler (2015-05-17)

  26. #600
    Quote Originally Posted by shigo11 View Post
    Ok I added the code saved and respring - widget doesn't work (as it was until the new code changes )
    ...I have the feeling it's maybe that the string that we are building is missing something in compare to the TRUE updatetimestring - "2015-04-10 11:56:00 AM". ....maybe it's " " ( blank spaces ) - What Do U think ?


    Sent from my iPhone using Tapatalk
    Yes, it would need to be formatted exactly the way WW.xml formats it.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

Page 30 of 42 FirstFirst ... 20282930313240 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •