SlideShare a Scribd company logo
<style type="text/css">
.top-commentators {
margin: 3px 0;
border-bottom: 1px dotted #ccc;
}
.avatar-top-commentators {
vertical-align:middle;
border-radius: 30px;
}
.top-commentators .commenter-link-name {
padding-left:0;
}
</style>
<script type="text/javascript">
var maxTopCommenters = 8;
var minComments = 1;
var numDays = 0;
var excludeMe = true;
var excludeUsers = ["Anonymous", "someotherusertoexclude"];
var maxUserNameLength = 42;
//
var txtTopLine = '<b>[#].</b> [image] [user] ([count])';
var txtNoTopCommenters = 'No top commentators at this time.';
var txtAnonymous = '';
//
var sizeAvatar = 33;
var cropAvatar = true;
//
var urlNoAvatar = "http://2.bp.blogspot.com/-pWdg8wLsedo/UmVWQxLdwrI/AAAAAAAAEVk/-
z7YgKykkuU/s1600/avatar_blue_m_96.png" + sizeAvatar;
var urlAnoAvatar = 'http://1.bp.blogspot.com/-6B6DXCp8dek/UmVPm7D2mOI/AAAAAAAAEVU/Xz-3z2nRpUk/s1600/avatar1.png' +
sizeAvatar;
var urlMyProfile = '';
var urlMyAvatar = '';
if(!Array.indexOf) {
Array.prototype.indexOf=function(obj) {
for(var i=0;i<this.length;i++) if(this[i]==obj) return i;
return -1;
}}
function replaceTopCmtVars(text, item, position)
{
if(!item || !item.author) return text;
var author = item.author;
var authorUri = "";
if(author.uri && author.uri.$t != "")
authorUri = author.uri.$t;
var avaimg = urlAnoAvatar;
var bloggerprofile = "http://www.blogger.com/profile/";
if(author.gd$image && author.gd$image.src && authorUri.substr(0,bloggerprofile.length) == bloggerprofile)
avaimg = author.gd$image.src;
else {
var parseurl = document.createElement('a');
if(authorUri != "") {
parseurl.href = authorUri;
avaimg = 'http://www.google.com/s2/favicons?domain=' + parseurl.hostname;
}
}
if(urlMyProfile != "" && authorUri == urlMyProfile && urlMyAvatar != "")
avaimg = urlMyAvatar;
if(avaimg == "http://img2.blogblog.com/img/b16-rounded.gif" && urlNoAvatar != "")
avaimg = urlNoAvatar;
var newsize="s"+sizeAvatar;
avaimg = avaimg.replace(//sdd+-c//, "/"+newsize+"-c/");
if(cropAvatar) newsize+="-c";
avaimg = avaimg.replace(//sdd+(-c){0,1}//, "/"+newsize+"/");
var authorName = author.name.$t;
if(authorName == 'Anonymous' && txtAnonymous != '' && avaimg == urlAnoAvatar)
authorName = txtAnonymous;
var imgcode = '<img class="avatar-top-commentators" height="'+sizeAvatar+'" width="'+sizeAvatar+'" title="'+authorName+'"
src="'+avaimg+'" />';
if(authorUri!="") imgcode = '<a href="'+authorUri+'">'+imgcode+'</a>';
if(maxUserNameLength > 3 && authorName.length > maxUserNameLength)
authorName = authorName.substr(0, maxUserNameLength-3) + "...";
var authorcode = authorName;
if(authorUri!="") authorcode = '<a class="commenter-link-name" href="'+authorUri+'">'+authorcode+'</a>';
text = text.replace('[user]', authorcode);
text = text.replace('[image]', imgcode);
text = text.replace('[#]', position);
text = text.replace('[count]', item.count);
return text;
}
var topcommenters = {};
var ndxbase = 1;
function showTopCommenters(json) {
var one_day=1000*60*60*24;
var today = new Date();
if(urlMyProfile == "") {
var elements = document.getElementsByTagName("*");
var expr = /(^| )profile-link( |$)/;
for(var i=0 ; i<elements.length ; i++)
if(expr.test(elements[i].className)) {
urlMyProfile = elements[i].href;
break;
}
}
if(json && json.feed && json.feed.entry && json.feed.entry.length) for(var i = 0 ; i < json.feed.entry.length ; i++ ) {
var entry = json.feed.entry[i];
if(numDays > 0) {
var datePart = entry.published.$t.match(/d+/g);
var cmtDate = new Date(datePart[0],datePart[1]-1,datePart[2],datePart[3],datePart[4],datePart[5]);
var days = Math.ceil((today.getTime()-cmtDate.getTime())/(one_day));
if(days > numDays) break;
}
var authorUri = "";
if(entry.author[0].uri && entry.author[0].uri.$t != "")
authorUri = entry.author[0].uri.$t;
if(excludeMe && authorUri != "" && authorUri == urlMyProfile)
continue;
var authorName = entry.author[0].name.$t;
if(excludeUsers.indexOf(authorName) != -1)
continue;
var hash=entry.author[0].name.$t + "-" + authorUri;
if(topcommenters[hash])
topcommenters[hash].count++;
else {
var commenter = new Object();
commenter.author = entry.author[0];
commenter.count = 1;
topcommenters[hash] = commenter;
}
}
if(json && json.feed && json.feed.entry && json.feed.entry.length && json.feed.entry.length == 200) {
ndxbase += 200;
document.write('<script type="text/javascript"
src="http://'+window.location.hostname+'/feeds/comments/default?redirect=false&max-results=200&start-
index='+ndxbase+'&alt=json-in-script&callback=showTopCommenters"></'+'script>');
return;
}
// convert object to array of tuples
var tuplear = [];
for(var key in topcommenters) tuplear.push([key, topcommenters[key]]);
tuplear.sort(function(a, b) {
if(b[1].count-a[1].count)
return b[1].count-a[1].count;
return (a[1].author.name.$t.toLowerCase() < b[1].author.name.$t.toLowerCase()) ? -1 : 1;
});
var realcount = 0;
for(var i = 0; i < maxTopCommenters && i < tuplear.length ; i++) {
var item = tuplear[i][1];
if(item.count < minComments)
break;
document.write('<di'+'v class="top-commentators">');
document.write(replaceTopCmtVars(txtTopLine, item, realcount+1));
document.write('</d'+'iv>');
realcount++;
}
if(!realcount)
document.write(txtNoTopCommenters);
}
document.write('<script type="text/javascript"
src="http://'+window.location.hostname+'/feeds/comments/default?redirect=false&max-results=200&alt=json-in-
script&callback=showTopCommenters"></'+'script>');
</script>

More Related Content

What's hot

MongoDB - Introduction
MongoDB - IntroductionMongoDB - Introduction
MongoDB - Introduction
Vagmi Mudumbai
 
Upload text JAVA SCRIPT
Upload text JAVA SCRIPTUpload text JAVA SCRIPT
Upload text JAVA SCRIPT
Amrit Preetam Sahu
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
20121023 mongodb schema-design
20121023 mongodb schema-design20121023 mongodb schema-design
20121023 mongodb schema-design
MongoDB
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
apostlion
 
Expressを使ってみた
Expressを使ってみたExpressを使ってみた
Expressを使ってみた
Atsuhiro Takiguchi
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
Robert Nyman
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
francescapasha
 
Esperwhispering
EsperwhisperingEsperwhispering
Esperwhispering
Theo Schlossnagle
 
MongoDB
MongoDBMongoDB
MongoDB
Steve Klabnik
 
えっ、なにそれこわい
えっ、なにそれこわいえっ、なにそれこわい
えっ、なにそれこわい
Kei Shiratsuchi
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
Luiz Messias
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
Sena Cedagro
 
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
Future Processing
 
CGI.pm - 3ло?!
CGI.pm - 3ло?!CGI.pm - 3ло?!
CGI.pm - 3ло?!
Anatoly Sharifulin
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
Bastian Feder
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
Darren Mothersele
 
Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013
Sébastien Deleuze
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
Sayanee Basu
 
Schema design
Schema designSchema design
Schema design
christkv
 

What's hot (20)

MongoDB - Introduction
MongoDB - IntroductionMongoDB - Introduction
MongoDB - Introduction
 
Upload text JAVA SCRIPT
Upload text JAVA SCRIPTUpload text JAVA SCRIPT
Upload text JAVA SCRIPT
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
20121023 mongodb schema-design
20121023 mongodb schema-design20121023 mongodb schema-design
20121023 mongodb schema-design
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
 
Expressを使ってみた
Expressを使ってみたExpressを使ってみた
Expressを使ってみた
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
 
Esperwhispering
EsperwhisperingEsperwhispering
Esperwhispering
 
MongoDB
MongoDBMongoDB
MongoDB
 
えっ、なにそれこわい
えっ、なにそれこわいえっ、なにそれこわい
えっ、なにそれこわい
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
 
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
[Quality Meetup] M. Górski, M. Boś - Testy UI w Espresso z farmą w tle
 
CGI.pm - 3ло?!
CGI.pm - 3ло?!CGI.pm - 3ло?!
CGI.pm - 3ло?!
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 JavascriptjQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
 
Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
 
Schema design
Schema designSchema design
Schema design
 

Viewers also liked

At89s51
At89s51At89s51
At89s51
Tarun Sharma
 
At 89s51
At 89s51At 89s51
At 89s51
Mr Giap
 
Ne 555
Ne 555Ne 555
Ne 555
Mr Giap
 
LED Vu-Metter LM3915 and LM386
LED Vu-Metter LM3915 and LM386LED Vu-Metter LM3915 and LM386
LED Vu-Metter LM3915 and LM386
Mr Giap
 
Viết Ngôn Ngữ Lập Trình 8051 PIC AVR
Viết Ngôn Ngữ Lập Trình 8051 PIC AVRViết Ngôn Ngữ Lập Trình 8051 PIC AVR
Viết Ngôn Ngữ Lập Trình 8051 PIC AVR
Mr Giap
 
Vi Điều Khiển Ứng Dụng AT89s52
Vi Điều Khiển Ứng Dụng AT89s52Vi Điều Khiển Ứng Dụng AT89s52
Vi Điều Khiển Ứng Dụng AT89s52
Mr Giap
 
Tài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
Tài Liệu Điều Khiển Từ Xa Bằng Hồng NgoạiTài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
Tài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
Mr Giap
 

Viewers also liked (7)

At89s51
At89s51At89s51
At89s51
 
At 89s51
At 89s51At 89s51
At 89s51
 
Ne 555
Ne 555Ne 555
Ne 555
 
LED Vu-Metter LM3915 and LM386
LED Vu-Metter LM3915 and LM386LED Vu-Metter LM3915 and LM386
LED Vu-Metter LM3915 and LM386
 
Viết Ngôn Ngữ Lập Trình 8051 PIC AVR
Viết Ngôn Ngữ Lập Trình 8051 PIC AVRViết Ngôn Ngữ Lập Trình 8051 PIC AVR
Viết Ngôn Ngữ Lập Trình 8051 PIC AVR
 
Vi Điều Khiển Ứng Dụng AT89s52
Vi Điều Khiển Ứng Dụng AT89s52Vi Điều Khiển Ứng Dụng AT89s52
Vi Điều Khiển Ứng Dụng AT89s52
 
Tài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
Tài Liệu Điều Khiển Từ Xa Bằng Hồng NgoạiTài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
Tài Liệu Điều Khiển Từ Xa Bằng Hồng Ngoại
 

Similar to Code Tops Comments

前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
Юрий Буянов «Squeryl — ORM с человеческим лицом»
Юрий Буянов «Squeryl — ORM с человеческим лицом»Юрий Буянов «Squeryl — ORM с человеческим лицом»
Юрий Буянов «Squeryl — ORM с человеческим лицом»
e-Legion
 
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-118CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
sivakumarmcs
 
course js day 3
course js day 3course js day 3
course js day 3
Georgyi Grigoryev
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
Jonathan Snook
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
psstoev
 
jQuery for Sharepoint Dev
jQuery for Sharepoint DevjQuery for Sharepoint Dev
jQuery for Sharepoint Dev
Zeddy Iskandar
 
Custom UI Components at Android Only 2011
Custom UI Components at Android Only 2011Custom UI Components at Android Only 2011
Custom UI Components at Android Only 2011
Johan Nilsson
 
Doctype htm1
Doctype htm1Doctype htm1
Doctype htm1
Eddy_TKJ
 
greenDAO
greenDAOgreenDAO
greenDAO
Mu Chun Wang
 
16-DOMTree.pptx
16-DOMTree.pptx16-DOMTree.pptx
16-DOMTree.pptx
KhushiSingla10
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
sblackman
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
WebFrameworks
 
React.js or why DOM finally makes sense
React.js or why DOM finally makes senseReact.js or why DOM finally makes sense
React.js or why DOM finally makes sense
Eldar Djafarov
 
Computer Programming -II (Lec. 10).pptx
Computer Programming -II (Lec. 10).pptxComputer Programming -II (Lec. 10).pptx
Computer Programming -II (Lec. 10).pptx
SaurabhSharma783949
 
Codigo123
Codigo123Codigo123
Codigo123
ALFA7
 
Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)
Yuki Shimada
 
shoubox script
shoubox scriptshoubox script
shoubox script
Alif Mahardika
 
Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!
Jhonny Batista
 

Similar to Code Tops Comments (20)

前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
Юрий Буянов «Squeryl — ORM с человеческим лицом»
Юрий Буянов «Squeryl — ORM с человеческим лицом»Юрий Буянов «Squeryl — ORM с человеческим лицом»
Юрий Буянов «Squeryl — ORM с человеческим лицом»
 
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-118CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
18CSC311J WEB DESIGN AND DEVELPMENT UNIT-1
 
course js day 3
course js day 3course js day 3
course js day 3
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
 
jQuery for Sharepoint Dev
jQuery for Sharepoint DevjQuery for Sharepoint Dev
jQuery for Sharepoint Dev
 
Custom UI Components at Android Only 2011
Custom UI Components at Android Only 2011Custom UI Components at Android Only 2011
Custom UI Components at Android Only 2011
 
Doctype htm1
Doctype htm1Doctype htm1
Doctype htm1
 
greenDAO
greenDAOgreenDAO
greenDAO
 
16-DOMTree.pptx
16-DOMTree.pptx16-DOMTree.pptx
16-DOMTree.pptx
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
React.js or why DOM finally makes sense
React.js or why DOM finally makes senseReact.js or why DOM finally makes sense
React.js or why DOM finally makes sense
 
Computer Programming -II (Lec. 10).pptx
Computer Programming -II (Lec. 10).pptxComputer Programming -II (Lec. 10).pptx
Computer Programming -II (Lec. 10).pptx
 
Codigo123
Codigo123Codigo123
Codigo123
 
Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)
 
shoubox script
shoubox scriptshoubox script
shoubox script
 
Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!
 

More from Mr Giap

1500 Câu Hỏi Về Điện
1500 Câu Hỏi Về Điện1500 Câu Hỏi Về Điện
1500 Câu Hỏi Về Điện
Mr Giap
 
Đồ Án Đo Điện Áp Hiển Thị Trên LCD
Đồ Án Đo Điện Áp Hiển Thị Trên LCDĐồ Án Đo Điện Áp Hiển Thị Trên LCD
Đồ Án Đo Điện Áp Hiển Thị Trên LCD
Mr Giap
 
15 Ghép nối 8255
15 Ghép nối 825515 Ghép nối 8255
15 Ghép nối 8255
Mr Giap
 
13 DC Bước - Bàn phím DAC
13 DC Bước - Bàn phím DAC13 DC Bước - Bàn phím DAC
13 DC Bước - Bàn phím DAC
Mr Giap
 
12 LCD ADC - Cảm biến
12 LCD ADC - Cảm biến12 LCD ADC - Cảm biến
12 LCD ADC - Cảm biến
Mr Giap
 
11 Lập trình ngắt
11 Lập trình ngắt11 Lập trình ngắt
11 Lập trình ngắt
Mr Giap
 
10 Truyền thông nối tiếp
10 Truyền thông nối tiếp10 Truyền thông nối tiếp
10 Truyền thông nối tiếp
Mr Giap
 
09 Bộ đếm và định thời
09 Bộ đếm và định thời09 Bộ đếm và định thời
09 Bộ đếm và định thời
Mr Giap
 
08 Lệnh một Bit
08 Lệnh một Bit08 Lệnh một Bit
08 Lệnh một Bit
Mr Giap
 
07 Lệnh Logic
07 Lệnh Logic07 Lệnh Logic
07 Lệnh Logic
Mr Giap
 
05 Chế độ danh địa chỉ
05 Chế độ danh địa chỉ05 Chế độ danh địa chỉ
05 Chế độ danh địa chỉ
Mr Giap
 
04 Lập trình cổng vào ra
04 Lập trình cổng vào ra04 Lập trình cổng vào ra
04 Lập trình cổng vào ra
Mr Giap
 
03 Các lệnh nháy
03 Các lệnh nháy03 Các lệnh nháy
03 Các lệnh nháy
Mr Giap
 
02 Lập trình hợp ngữ 8051
02 Lập trình hợp ngữ 805102 Lập trình hợp ngữ 8051
02 Lập trình hợp ngữ 8051
Mr Giap
 
01 Các bộ Vi Điều Khiển 8051
01 Các bộ Vi Điều Khiển 805101 Các bộ Vi Điều Khiển 8051
01 Các bộ Vi Điều Khiển 8051
Mr Giap
 
14 Ghép nối bộ nhớ ngoài
14 Ghép nối bộ nhớ ngoài14 Ghép nối bộ nhớ ngoài
14 Ghép nối bộ nhớ ngoài
Mr Giap
 
Lập trình C cho VĐK 8051
Lập trình C cho VĐK 8051Lập trình C cho VĐK 8051
Lập trình C cho VĐK 8051
Mr Giap
 
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tử
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tửBảng tra cứu các phần tử bán dẫn và linh kiện điện tử
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tử
Mr Giap
 
Mạch Phát PT2248
Mạch Phát PT2248Mạch Phát PT2248
Mạch Phát PT2248
Mr Giap
 
Mạch Thu PT2249
Mạch Thu PT2249Mạch Thu PT2249
Mạch Thu PT2249
Mr Giap
 

More from Mr Giap (20)

1500 Câu Hỏi Về Điện
1500 Câu Hỏi Về Điện1500 Câu Hỏi Về Điện
1500 Câu Hỏi Về Điện
 
Đồ Án Đo Điện Áp Hiển Thị Trên LCD
Đồ Án Đo Điện Áp Hiển Thị Trên LCDĐồ Án Đo Điện Áp Hiển Thị Trên LCD
Đồ Án Đo Điện Áp Hiển Thị Trên LCD
 
15 Ghép nối 8255
15 Ghép nối 825515 Ghép nối 8255
15 Ghép nối 8255
 
13 DC Bước - Bàn phím DAC
13 DC Bước - Bàn phím DAC13 DC Bước - Bàn phím DAC
13 DC Bước - Bàn phím DAC
 
12 LCD ADC - Cảm biến
12 LCD ADC - Cảm biến12 LCD ADC - Cảm biến
12 LCD ADC - Cảm biến
 
11 Lập trình ngắt
11 Lập trình ngắt11 Lập trình ngắt
11 Lập trình ngắt
 
10 Truyền thông nối tiếp
10 Truyền thông nối tiếp10 Truyền thông nối tiếp
10 Truyền thông nối tiếp
 
09 Bộ đếm và định thời
09 Bộ đếm và định thời09 Bộ đếm và định thời
09 Bộ đếm và định thời
 
08 Lệnh một Bit
08 Lệnh một Bit08 Lệnh một Bit
08 Lệnh một Bit
 
07 Lệnh Logic
07 Lệnh Logic07 Lệnh Logic
07 Lệnh Logic
 
05 Chế độ danh địa chỉ
05 Chế độ danh địa chỉ05 Chế độ danh địa chỉ
05 Chế độ danh địa chỉ
 
04 Lập trình cổng vào ra
04 Lập trình cổng vào ra04 Lập trình cổng vào ra
04 Lập trình cổng vào ra
 
03 Các lệnh nháy
03 Các lệnh nháy03 Các lệnh nháy
03 Các lệnh nháy
 
02 Lập trình hợp ngữ 8051
02 Lập trình hợp ngữ 805102 Lập trình hợp ngữ 8051
02 Lập trình hợp ngữ 8051
 
01 Các bộ Vi Điều Khiển 8051
01 Các bộ Vi Điều Khiển 805101 Các bộ Vi Điều Khiển 8051
01 Các bộ Vi Điều Khiển 8051
 
14 Ghép nối bộ nhớ ngoài
14 Ghép nối bộ nhớ ngoài14 Ghép nối bộ nhớ ngoài
14 Ghép nối bộ nhớ ngoài
 
Lập trình C cho VĐK 8051
Lập trình C cho VĐK 8051Lập trình C cho VĐK 8051
Lập trình C cho VĐK 8051
 
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tử
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tửBảng tra cứu các phần tử bán dẫn và linh kiện điện tử
Bảng tra cứu các phần tử bán dẫn và linh kiện điện tử
 
Mạch Phát PT2248
Mạch Phát PT2248Mạch Phát PT2248
Mạch Phát PT2248
 
Mạch Thu PT2249
Mạch Thu PT2249Mạch Thu PT2249
Mạch Thu PT2249
 

Recently uploaded

一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
Infosec train
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
dtagbe
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
GNAMBIKARAO
 

Recently uploaded (11)

一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
 

Code Tops Comments

  • 1. <style type="text/css"> .top-commentators { margin: 3px 0; border-bottom: 1px dotted #ccc; } .avatar-top-commentators { vertical-align:middle; border-radius: 30px; } .top-commentators .commenter-link-name { padding-left:0; } </style> <script type="text/javascript"> var maxTopCommenters = 8; var minComments = 1; var numDays = 0; var excludeMe = true; var excludeUsers = ["Anonymous", "someotherusertoexclude"]; var maxUserNameLength = 42; // var txtTopLine = '<b>[#].</b> [image] [user] ([count])'; var txtNoTopCommenters = 'No top commentators at this time.'; var txtAnonymous = ''; // var sizeAvatar = 33; var cropAvatar = true; // var urlNoAvatar = "http://2.bp.blogspot.com/-pWdg8wLsedo/UmVWQxLdwrI/AAAAAAAAEVk/- z7YgKykkuU/s1600/avatar_blue_m_96.png" + sizeAvatar; var urlAnoAvatar = 'http://1.bp.blogspot.com/-6B6DXCp8dek/UmVPm7D2mOI/AAAAAAAAEVU/Xz-3z2nRpUk/s1600/avatar1.png' + sizeAvatar; var urlMyProfile = ''; var urlMyAvatar = ''; if(!Array.indexOf) { Array.prototype.indexOf=function(obj) { for(var i=0;i<this.length;i++) if(this[i]==obj) return i; return -1; }} function replaceTopCmtVars(text, item, position) { if(!item || !item.author) return text; var author = item.author; var authorUri = ""; if(author.uri && author.uri.$t != "") authorUri = author.uri.$t; var avaimg = urlAnoAvatar; var bloggerprofile = "http://www.blogger.com/profile/"; if(author.gd$image && author.gd$image.src && authorUri.substr(0,bloggerprofile.length) == bloggerprofile) avaimg = author.gd$image.src; else { var parseurl = document.createElement('a'); if(authorUri != "") { parseurl.href = authorUri; avaimg = 'http://www.google.com/s2/favicons?domain=' + parseurl.hostname; } } if(urlMyProfile != "" && authorUri == urlMyProfile && urlMyAvatar != "") avaimg = urlMyAvatar; if(avaimg == "http://img2.blogblog.com/img/b16-rounded.gif" && urlNoAvatar != "") avaimg = urlNoAvatar; var newsize="s"+sizeAvatar; avaimg = avaimg.replace(//sdd+-c//, "/"+newsize+"-c/"); if(cropAvatar) newsize+="-c"; avaimg = avaimg.replace(//sdd+(-c){0,1}//, "/"+newsize+"/"); var authorName = author.name.$t; if(authorName == 'Anonymous' && txtAnonymous != '' && avaimg == urlAnoAvatar) authorName = txtAnonymous; var imgcode = '<img class="avatar-top-commentators" height="'+sizeAvatar+'" width="'+sizeAvatar+'" title="'+authorName+'"
  • 2. src="'+avaimg+'" />'; if(authorUri!="") imgcode = '<a href="'+authorUri+'">'+imgcode+'</a>'; if(maxUserNameLength > 3 && authorName.length > maxUserNameLength) authorName = authorName.substr(0, maxUserNameLength-3) + "..."; var authorcode = authorName; if(authorUri!="") authorcode = '<a class="commenter-link-name" href="'+authorUri+'">'+authorcode+'</a>'; text = text.replace('[user]', authorcode); text = text.replace('[image]', imgcode); text = text.replace('[#]', position); text = text.replace('[count]', item.count); return text; } var topcommenters = {}; var ndxbase = 1; function showTopCommenters(json) { var one_day=1000*60*60*24; var today = new Date(); if(urlMyProfile == "") { var elements = document.getElementsByTagName("*"); var expr = /(^| )profile-link( |$)/; for(var i=0 ; i<elements.length ; i++) if(expr.test(elements[i].className)) { urlMyProfile = elements[i].href; break; } } if(json && json.feed && json.feed.entry && json.feed.entry.length) for(var i = 0 ; i < json.feed.entry.length ; i++ ) { var entry = json.feed.entry[i]; if(numDays > 0) { var datePart = entry.published.$t.match(/d+/g); var cmtDate = new Date(datePart[0],datePart[1]-1,datePart[2],datePart[3],datePart[4],datePart[5]); var days = Math.ceil((today.getTime()-cmtDate.getTime())/(one_day)); if(days > numDays) break; } var authorUri = ""; if(entry.author[0].uri && entry.author[0].uri.$t != "") authorUri = entry.author[0].uri.$t; if(excludeMe && authorUri != "" && authorUri == urlMyProfile) continue; var authorName = entry.author[0].name.$t; if(excludeUsers.indexOf(authorName) != -1) continue; var hash=entry.author[0].name.$t + "-" + authorUri; if(topcommenters[hash]) topcommenters[hash].count++; else { var commenter = new Object(); commenter.author = entry.author[0]; commenter.count = 1; topcommenters[hash] = commenter; } } if(json && json.feed && json.feed.entry && json.feed.entry.length && json.feed.entry.length == 200) { ndxbase += 200; document.write('<script type="text/javascript" src="http://'+window.location.hostname+'/feeds/comments/default?redirect=false&max-results=200&start- index='+ndxbase+'&alt=json-in-script&callback=showTopCommenters"></'+'script>'); return; } // convert object to array of tuples var tuplear = []; for(var key in topcommenters) tuplear.push([key, topcommenters[key]]); tuplear.sort(function(a, b) { if(b[1].count-a[1].count) return b[1].count-a[1].count; return (a[1].author.name.$t.toLowerCase() < b[1].author.name.$t.toLowerCase()) ? -1 : 1; }); var realcount = 0;
  • 3. for(var i = 0; i < maxTopCommenters && i < tuplear.length ; i++) { var item = tuplear[i][1]; if(item.count < minComments) break; document.write('<di'+'v class="top-commentators">'); document.write(replaceTopCmtVars(txtTopLine, item, realcount+1)); document.write('</d'+'iv>'); realcount++; } if(!realcount) document.write(txtNoTopCommenters); } document.write('<script type="text/javascript" src="http://'+window.location.hostname+'/feeds/comments/default?redirect=false&max-results=200&alt=json-in- script&callback=showTopCommenters"></'+'script>'); </script>