Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 334898 Details for
Bug 451032
Example files for Emacs test plans
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Example file for app-emacs/javascript
bottles-1079.js (text/plain), 1.74 KB, created by
Ulrich Müller
on 2013-01-09 12:03:42 UTC
(
hide
)
Description:
Example file for app-emacs/javascript
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2013-01-09 12:03:42 UTC
Size:
1.74 KB
patch
obsolete
>function song() { > bottlesOfBeer = function(i) { return i+' bottles of beer'; } > bottlesOfBeerOnTheWall = function(i) { return this.bottlesOfBeer(i)+' on the wall'; } > takeOneDown = function() { return 'Take one down and pass it around, '; } > > createVerse= function(first,second) { > var rval = document.createElement('p'); > rval.appendChild(document.createTextNode(first)); > rval.appendChild(document.createElement('br')); > rval.appendChild(document.createTextNode(second)); > return rval; > } > getNormalVerseFunction = function(i) { > return function() { > return createVerse( > bottlesOfBeerOnTheWall(i)+', '+bottlesOfBeer(i), > takeOneDown()+bottlesOfBeerOnTheWall(i-1)+'.' > ); > } > } > > verse = new Array(); > > for( var i = 3; i < 100; i++ ) > verse[i] = getNormalVerseFunction(i); > verse[2] = function() { > return createVerse( > bottlesOfBeerOnTheWall(2)+', '+bottlesOfBeer(2), > takeOneDown()+'1 bottle of beer.' > ); > } > verse[1] = function() { > return createVerse( > '1 bottle of beer on the wall, 1 bottle of beer.', > takeOneDown()+bottlesOfBeerOnTheWall('no more')+'.' > ); > } > verse[0] = function() { > return createVerse( > bottlesOfBeerOnTheWall('No more')+', '+bottlesOfBeer('no more'), > 'Go to the store and buy some more, '+bottlesOfBeerOnTheWall(99)+'.' > ); > } > > this.getDom = function() { > var rval = document.createElement('div'); > for( var i = 99; i >= 0 ; i-- ) > rval.appendChild(verse[i]()); > return rval; > } >} > >document.getElementsByTagName('body')[0].appendChild(new song().getDom());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 451032
:
334872
|
334874
|
334876
|
334878
|
334880
|
334882
|
334884
|
334886
|
334888
|
334890
|
334892
|
334894
|
334896
|
334898
|
334900
|
334902
|
334904
|
334906
|
334908
|
334910
|
334912
|
334914
|
334916
|
334918
|
334920
|
334922
|
334924
|
334926
|
334928
|
334930
|
334932
|
334934
|
334936
|
334938
|
353472
|
353474
|
353476
|
360484
|
370044