484,484,484

Discussion in 'Picture Gallery' started by clayj, Jul 7, 2005.

  1. clayj macrumors 604

    clayj

    Joined:
    Jan 14, 2005
    Location:
    visiting from downstream
    #1
    Just happened to be looking at the Apple web site when this number came around, and my luck was good enough for me to capture this... no Photoshopping at all, I promise you (except to crop the image).
     

    Attached Files:

  2. besler3035 macrumors 6502

    Joined:
    Oct 29, 2004
    Location:
    Grand Rapids, MI
    #2
    The font for the numbers 484,484,484 looks thicker than on Apple's website. Something tells me that you're not being too honest here...
     
  3. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #3
    Umm... I imagine whatever font that displays there is going to depend on what fonts ClayJ has installed on his system. If he has the font, then he can use it to photoshop the image, so why would he use a different font? Basically, we're just going to have to take ClayJ's word for it, unless someone can give more convincing evidence that it was photoshopped.

    edit: I should add that if I were going to photoshop this, I would just use whatever the first three digits were in the original screenshot. No need to mess with fonts whatsoever -- just a quick copy and paste.
     
  4. shadowmoses macrumors 68000

    shadowmoses

    Joined:
    Mar 6, 2005
    #4
    Thats pretty cool....Send it to Apple and see if they give you a prize :D
     
  5. emw macrumors G4

    emw

    Joined:
    Aug 2, 2004
    #5
    What's more amazing is the rate - about 15-20 per second. Don't know if it's people trying to win, or if that's just the normal rate of purchase.
     
  6. clayj thread starter macrumors 604

    clayj

    Joined:
    Jan 14, 2005
    Location:
    visiting from downstream
    #6
    It's gotta be the normal rate of purchase, because we're obviously not near 500M yet, and the 100K prize intervals are still pretty spread out. I don't buy bits, but in the grand tradition of Charlie Bucket, I will try to buy the 500Mth song.

    And to those who doubt my veracity regarding the non-altered state of my picture, I have just one thing to say to you:

    PHBPFFPPTBHT!
     
  7. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #7
    Someone (presumably with more coding expertise than me) said that it's not connected to a database, just a simple counter. I wonder if they "recalibrate" from time to time to match actual sales. Though 15-20 per second doesn't strike me as altogether unreasonable. You have to count pretty fast to get to 500 million.
     

    Attached Files:

  8. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #8
    I would think it is pretty illogical to connect it to the database since the number of people who visit their main page is pretty huge, and the polling probably will kill the connection pool. Most likely the programmers did a quick rate count and then hard code it to the site.
     
  9. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #9
    Nice catch.. I really wonder how accurate that ticker is..
     
  10. mac 2005 macrumors 6502a

    mac 2005

    Joined:
    Apr 1, 2005
    Location:
    Chicago
    #10
    Wow! Here's what I saw

    Unretouched...
     

    Attached Files:

  11. tobefirst macrumors 68040

    tobefirst

    Joined:
    Jan 24, 2005
    Location:
    St. Louis, MO
    #11
    So THAT's how you spell that! :) I'd always wondered.

    Nice catch, Clayj!

    If someone is willing to photoshop this, they've got way too much time on their hands...speaking of which, why were you screen capturing Apple's site in the first place? (; Just kidding....
     
  12. clayj thread starter macrumors 604

    clayj

    Joined:
    Jan 14, 2005
    Location:
    visiting from downstream
    #12
    I went to the page and saw that the ticker was at something like 484,483,900 or so, and being the pattern recognition filter that I am, I decided to try to capture it right at 484,484,484. Luckily my timing was good and I caught the right thing... if I'd caught 484,484,485, you would not have seen a post from me. :)
     
  13. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #13
    This could be a new game! Try to take a screenshot as the counter passes a multiple of 1,000, 10,000, or higher. I've missed three times so far, but it's better than I did at that throw-the-paper-in-the-wastebasket game. :)
     
  14. cwedl macrumors 65816

    cwedl

    Joined:
    Jun 5, 2003
    #14

    Nor very at all, I refreshed the itunes website and the number went back, and then I refreshed again and it went forward but not as much as it did the first time.
     
  15. Don't panic macrumors 603

    Don't panic

    Joined:
    Jan 30, 2004
    Location:
    having a drink at Milliways
    #15
    on my computer the ticker is blank.
    am i missing something?
     
  16. ham_man macrumors 68020

    ham_man

    Joined:
    Jan 21, 2005
    #16
    PHP:
        <td>
                <
    div id="counterbillboard">
                    <
    div id="counter">
                        <
    h2 id="countdown"></h2>
                    </
    div>
                    <
    form id="form-thismustbehere"><div><input id="thismustbehere"> <!-- dunstanthis HAS to be here or the countdown flickers in FF --></div></form>
                    <
    a href="/itunes/500million/" class="blocklink"><img src="http://images.apple.com/home/2005/images/promoitmscounttrans20050705.gif" width="334" height="120" border="0" alt="iTunes Music Store 500 Million Song Countdown. Download songs. Win Prizes."></a>
                </
    div>
            </
    td>
    That is the HTML code on Apple's site for the counter, if it matters to anybody.

    Oh, and cool catch there Clayj. Must have been pretty lucky, cause the ticker goes FAST...
     
  17. tech4all macrumors 68040

    tech4all

    Joined:
    Jun 13, 2004
    Location:
    NorCal
    #17
    Does this ticker actually go up as music is bought from the iTMS? Or does it just go up on it's own?
     
  18. emw macrumors G4

    emw

    Joined:
    Aug 2, 2004
    #18
    Took me three tries... Just what I needed, another time-waster.
     

    Attached Files:

  19. michaelrjohnson macrumors 68020

    Joined:
    Aug 9, 2000
    Location:
    54140
    #19
    I really wanted to play Doctor Q's new game... but my office's myriad of filters block anything from the iTunes domain. Including the simple JS that is the counter.

    See? :(
     

    Attached Files:

  20. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #20
    Hmmm. I wonder if blank is a multiple of 1000?
     
  21. wdlove macrumors P6

    wdlove

    Joined:
    Oct 20, 2002
    #21
    I have great confidence in your abilities Doctor Q. ;) Will look forward to your first entry. :D
     
  22. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #22
    I was waiting for the palindromic 484,848,484 capture to show up but I guess I'm SOL...
     
  23. SpaceMagic macrumors 68000

    SpaceMagic

    Joined:
    Oct 26, 2003
    Location:
    Cardiff, Wales
    #23
    I found it's connected to an XML feed, presumably from the database.

    Apple Home page... view source.. you get:

    Code:
    <script src="http://wdirect.apple.com/home/counter500million.js" type="text/javascript" language="javascript"></script>

    follow that link.. and you get:

    Code:
    function addEventToObject(obj, evt, func) {
    	var oldhandler = obj[evt];
    	obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();};
    }
    
    function intComma(num) {
        var T = "", S = String(num), L = S.length - 1, C, j, P = S.indexOf(".") - 1;
        if (P < 0) {P = L;}
        for (j = 0; j <= L; j++) {
            T += (C = S.charAt(j));
            if ((j < P) && ((P - j) % 3 == 0) && (C != "-")) {T += ",";}
        }
        return T;
    }
    
    function ajaxRequest(url,func) {
        if (window.XMLHttpRequest) {
            var req = new XMLHttpRequest();
            if (func) {req.onreadystatechange = function() {func(req);}}
            req.open("GET", url, true);
            if (browser.isSafari) {req.setRequestHeader('If-Modified-Since','Wed, 15 Nov 1995 00:00:00 GMT');}
            req.send(null);
        } else if (window.ActiveXObject) {
            isIE = true;
    		try {var req = new ActiveXObject("Msxml2.XMLHTTP");}
    		catch(e) {req = new ActiveXObject("Microsoft.XMLHTTP");}
            if (req) {
                if (func) {req.onreadystatechange = function() {func(req);}}
                req.open("GET", url, true);
                req.send();
            }
        }
    }
    
    //initialize vars
    var c, ci, initDate, curDate, curDateElapsed, curCountElapsed, preDate, dateDiff, timeoutID;
    var initCount = curCount = preCount = addCount = tempCount = countDiff = rate = 0;
    var XMLHttpRequests = 0; // DEBUG
    var update = 5 //in mins
    var incr = 100 //in msecs
    var refresh = 60000 //in msecs, should be 1 min (60000 ms)
    var safariBugFixCounter = null;
    var countTimer = null; //dunstan
    
    function initializeProcessReqChange(req)
    	{
    	if (req.readyState == 4) 
    		{
    		if (req.status == 200)
    			{
    			setCounters(req);
    			if (XMLHttpRequests < 1 || !countTimer) runCountdown(); //dunstan
    			XMLHttpRequests+=1;/*DEBUG*/
    			} 
    		else
    			{
    			//alert("There was a problem retrieving the XML data:\n" + req.statusText); //dunstan
    			clearTimeout(countTimer); //dunstan
    			countTimer = null; //dunstan
    			}
    		}
    	document.body.style.cursor = 'default';
    	return true;
    	}
    
    function setCounters(req) {	
    	preCount = parseInt(req.responseXML.getElementsByTagName('count')[1].childNodes[0].nodeValue);
    	//if new values
    	if (preCount == initCount || initCount == 0) {
    		initCount = parseInt(req.responseXML.getElementsByTagName('count')[0].childNodes[0].nodeValue);
    		initDate = new Date(req.responseXML.getElementsByTagName('count')[0].getAttribute('timestamp'));
    		preDate = new Date(req.responseXML.getElementsByTagName('count')[1].getAttribute('timestamp'));
    		//calculate difference in values
    		countDiff = initCount-preCount;
    		//calculate difference in time of values
    		dateDiff = parseInt(initDate.valueOf()-preDate.valueOf());
    		//calculate rate of increase ((songs downloaded in previous time)/time)*incr
    		rate = countDiff/dateDiff;
    		rate = rate*0.8; //dunstan adjusting the rate down to 80% as per dan's instructions
    		//calculate number of songs to add each loop
    		//calculate current time
    		curDate = new Date();
    		//calculate time since last update
    		curDateElapsed = curDate.valueOf() - initDate.valueOf();
    		//calculate projected number of songs since last update
    		curCountElapsed = curDateElapsed*rate;
    		//add projected number of songs to most recent value
    		curCount = initCount+curCountElapsed;
    	}
    }
    
    function runCountdown() {
    		//increase value of counter at constant increment
    		//calculate number of songs to increase per increment
    		//multiply rate by increment
    		addCount = rate*incr;
    		//add this number to counter
    		curCount += addCount;
    		//update document content
    		//set counter to predicted count
    		c.innerHTML = (curCount<500000000) ? intComma(Math.floor(curCount)) : "500,000,000+";
    		if (ci) {ci.innerHTML = (curCount<500000000) ? intComma(Math.floor(curCount)) : "500,000,000+";}
    		
    		
    		
    		document.getElementById('thismustbehere').value = curCount;
    		
    		
    		
    		countTimer = setTimeout(runCountdown, incr); //dunstan
    }
    
    function doCountdown() {	
    		//get most recent values from xml and process
    		ajaxRequest('http://www.apple.com/itunes/external_counter.xml',initializeProcessReqChange);
    		//on one minute loop
    		var refreshTimer = setTimeout(doCountdown,refresh);
    }
    //on page load 
    function initCountdown() {
    	//create reference to counter object
    	c = document.getElementById('countdown');
    	ci = (document.getElementById('countdown2')) ? document.getElementById('countdown2') : null;
    	//do countdown
    	if ((browser.isIE == true) && (browser.isMac == true)) {
    		var counterDiv = (document.getElementById('counter')) ? document.getElementById('counter') : null;
    		//Put any chunk of HTML in here you wish to be displayed for IE Mac
    		var ieMacContent = '<a href="/itunes/500million/"><img src="http://images.apple.com/home/2005/images/itmscounteriemac20050705.gif"></a>';
    		counterDiv.innerHTML = ieMacContent;
    	} else {
    		doCountdown();
    	}
    }
    addEventToObject(window,'onload',initCountdown);
    

    Look in THAT code and you find:

    Code:
    function doCountdown() {	
    		//get most recent values from xml and process
    		ajaxRequest('http://www.apple.com/itunes/external_counter.xml',initializeProcessReqChange);
    Follow this .xml and you get:

    Well.. look...
    http://www.apple.com/itunes/external_counter.xml
     
  24. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #24
    I win! I win! And I have Photoshop to thank!

    (Perhaps I should have waited until the counter actually got to 485,000,000 before posting this.)
     

    Attached Files:

  25. michaelrjohnson macrumors 68020

    Joined:
    Aug 9, 2000
    Location:
    54140
    #25
    I'm not sure you're allowed to win at your own game, are you Dr. Q? :D
     

Share This Page