I can't understand!
This link has been bookmarked by 64 people . It was first bookmarked on 05 Aug 2007, by Benedikt Hanswille.
-
13 Jan 09
-
09 Jan 09
-
06 Jan 09
-
20 Nov 08
-
randomizing
-
@TD:
Why not? Just edit the code a little bit.
Generate m random integer values between 1 and data.items.length, place them in an array a[].
for (var i=0; i < m; i++) {
var item = data.items[a[i]];
...........................
} -
Add Sticky NoteThat was just a small replacement you needed to make in the original code.
Generate the code and replace:
for (var i=0; i < data.items.length; i++) {
var item = data.items[i];
with
var len = data.items.length;
var m = Math.min(10, len);
var a = new Array(len);
for (var i=0; i < len; i++)
a[i]=i;
for (i=0; i < m; i++) {
var ran = Math.floor(Math.random() * (len-i))+i;
var temp=a[i];
a[i]=a[ran];
a[ran]=temp;
var item = data.items[a[i]];
Note: 10 is the number of items that are displayed, but you can change the value. -
-
-
03 Nov 08
-
15 Oct 08
-
06 Oct 08
-
14 Aug 08
-
05 Jun 08
-
12 Apr 08
-
09 Apr 08
-
26 Mar 08
-
25 Mar 08
-
02 Mar 08
-
07 Feb 08
amanda etchescan do this natively in GR now, but this output is prettier.
-
24 Nov 07
-
07 Nov 07
-
20 Oct 07
-
04 Oct 07
-
24 Sep 07
-
18 Sep 07
-
15 Sep 07
-
10 Sep 07
-
04 Sep 07
oahnveGoogle Operating System tipsar om hur du kan göra en av dina mappar i Google Reader till en blogroll.
-
03 Sep 07
-
28 Aug 07
Tillmann AllmerWie man aus Feeds im Google Reader eine Blogroll baut.
-
15 Aug 07
-
14 Aug 07
-
12 Aug 07
jolausGoogle Reader-eko estekak erabiliz blogroll bat sortu eta partekatzeko bidea
-
09 Aug 07
-
08 Aug 07
-
06 Aug 07
-
05 Aug 07
-
Tama LeaverHow to create a blogroll of the blogs you're subscribed to in Google Reader. Not exactly a one-click solution, but a very useful function I used to wish for!
-
04 Aug 07
-
Karoly Czifrajavascript widget: create/share a blogroll from the feeds you've subscribed to
create share javascript widgets blogroll opml tools for blog
Public Stiky Notes
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.