[Visual Basic] MathML to/from Plain Text Converter
Hi mọi người, tìm hiểu code trên codeproject.com thấy có bài hướng dẫn chuyển đổi dạng HTML
Chuyển đổi chuỗi mã hóa MathML thành/từ chuỗi văn bản thuần túy
Mã bao gồm hai lớp để phân tích chuỗi
MathML. Lớp đầu tiên, MathToString chuẩn bị chuỗi. Lớp thứ hai, ParseML, thực hiện phân tích. Tương tự, để lấy mã MathML từ văn bản, một lớp chuẩn bị và lớp kia thực hiện chuyển đổi.Giới thiệu
Có vẻ như có ít tài nguyên chuyển đổi mã MathML thành văn bản thuần túy. Một lý do chính đáng là không có sự đồng thuận về cách định dạng một số biểu thức toán học. Nhưng đối với nhiều biểu thức liên quan đến toán tử (+,-,/,*,^,=), đây là một trình chuyển đổi khả thi.Các lớp học đã tham gia
LớpMathToString chuẩn bị string mã MathML để class ParseMLcó thể thực hiện phân tích cú pháp chi tiết.
Sự chuẩn bị
Đầu tiên, các khoảng trắng được thay thế bằng các chuỗi rỗng và một số ký tự đặc biệt cũng được thay thế. Ngoài ra, một số thẻ không liên quan đến biểu thức toán học, như stylethẻ, sẽ bị xóa. Sau đó, mã sẽ chuyển từ<mfrac>...</mfrac>,<msup>...</msup>, <mrow>...</mrow>, <msqrt>...</msqrt> các thẻ bên trong nhất sang các thẻ bên ngoài nhất, được phân tích cú pháp và thay thế, bao quanh chúng giữa các ký tự đặc biệt để sau đó chúng có thể được phục hồi theo ParseML lớp.Sử dụng Mã
Để chuyển đổi, chỉ cần gọi phương thức chia sẻMathToString.convertToString():Dim converted as String = MathMLToString.convertToString(MathMLcodeToConvert)
Để chuyển đổi văn bản sang
MathML, hãy gọi convertStringToMathML().Nguyên tắc cơ bản
Phương pháp phân tích cú pháp là phân tích cú pháp đệ quy-giảm dần: Phân tích biểu thức bằng phương pháp giảm dần đệ quy.Phương pháp đánh giá Eyêu Tcầu bất kỳ phép cộng hoặc trừ nào, nhưng Ttrước tiên gọi Fbất kỳ phép nhân hoặc trừ nào, và Ftrước tiên gọi Pbất kỳ phép toán lũy thừa nào có thể. Pgọi trước để lấy mã thông báo tiếp theo. Nếu có (mã thông báo " ", v gọi đệ quy đến T.
E --> T {( "+" | "-" ) T}
T --> F {( "*" | "/" ) F}
F --> P ["^" F]
P --> v | "(" E ")" | "-" T
Phiên bản 1.0.3.0
Bây giờ, tệp zip demo có chứa tệp thiết lập.Các ứng dụng
JavaScript, .NET và Core đã được mã hóa lại, vì MathML là một ứng dụng của XML và để phản ánh các thẻ có thể được lồng nhau 'đệ quy', ý tôi là, một phần tử có thể xuất hiện bên trong chính nó hoặc bất kỳ cấp nào bên dưới các phần tử con của nó. Ví dụ:<mfrac>
<mrow>
<mi>-1</mi>
</mrow>
<mn>
<mn>3</mn>
</mn>
</mfrac>
Phiên bản 2.0.0.0 (2024-03-25)
Mã đã được viết lại, cải thiện và mở rộng. Ví dụ, hiện tại nó hỗ trợ bao gồm các phương trình trong ngôn ngữ LaTex như sau:\begin{array}{*{20}c} {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} &
{{\text{when}}} & {ax^2 + bx + c = 0} \\ \end{array}
Để thực hiện mục đích này, bằng cách đưa phương trình vào LaTex trong hộp văn bản
MathML và nhấp vào 'Chuyển đổi thành văn bản thuần túy', mã Latex sẽ được thay thế bằng bản dịch sang MathML và được chuyển đổi thành văn bản thuần túy.
Phiên bản 2.0.5.0 (2024-04-17)
Một số mẫu khác đã được thêm vào.Đã có sự sắp xếp để dấu ngoặc vuông và ngoặc nhọn được phản ánh trong quá trình chuyển đổi.
ConvertStringToMathML.EvaluateFromInnerToOuter() là một phương pháp mới và như tên gọi của nó, nó kiểm tra từ hầu hết các cặp ngoặc đơn và/hoặc ngoặc vuông bên trong đến hầu hết các cặp ngoặc vuông bên ngoài.
Phiên bản 2.0.5.9 (2024-05-01)
Đã thêm nhiều mẫu hơn.Một số lỗi đã được vá và một số cải tiến đã được triển khai. Ví dụ, hiện tại thẻ
<mlabeledtr>đã được tính đến.
Phiên bản 2.0.6.0 (17-05-2024)
Một số mẫu khác đã được thêm vào. Nhấn các phím chức năng F1, F2 và F12 tương ứng để chuyển đến số mẫu; chuyển đến mẫu tiếp theo; và quét các mẫu từ mẫu hiện tại (phím thoát 'Esc' sẽ hủy quét).Có các tính năng mới. Việc giữ nguyên dấu ngoặc đơn bằng cách sử dụng
⸨ ⸩ đã được bật, ngăn ứng dụng xóa chúng. Ví dụ, khi chuyển đổi văn bản "(3)" thành MathML dấu ngoặc đơn bị loại bỏ. Thay vào đó, văn bản "⸨3⸩ "được chuyển đổi thành MathMLsẽ giữ nguyên chúng.Bây giờ, với ↓ký tự (
ascii 25), sau và trước dấu ngoặc đơn, một MathML thuộc tính stretchy='false' đã đạt được. Vì vậy, văn bản ∫⸨5*x+2*sin⸨↓x↓⸩⸩dx khi được dịch sang MathML sẽ mở rộng dấu ngoặc đơn bên ngoài chứ không phải dấu ngoặc đơn bên trong xung quanh x.Ngoài ra, người dùng có thể lựa chọn giữa
MathJa'sphiên bản 2.7.2 và 3. Phiên bản 2 cũ hơn nhưng có ngắt dòng tài khoản, trong khi phiên bản 3 thì không.
Phiên bản 2.0.13.0 (2024-07-11)
- Bao gồm thêm một số ví dụ.- Một số bản sửa lỗi và cải tiến đã được thực hiện.
[JAVASCRIPT] Mã Nguồn Matrix Rain Chạy Trên Website
Hi mọi người, với bộ mã nguồn này thì mọi người không còn xa lạ gì nữa rồi, đây là một dạng mà lúc xưa mình đang tìm hiểu và học làm một "HACKER" hay tìm những dạng trang như này hoặc các trang deface khác trên Google để tìm hiểu và fâke bạn bè mình vừa HACK được trang website này. Nhưng thức tế là trang của mình. haha.
FULL CODE.
<!DOCTYPE html>
<html>
<head>
<title>Matrix Rain Javascript - Hung Pro VN</title>
</head>
<body>
<canvas id="canvas"></canvas>
<style type="text/css">
body{margin: 0; padding: 0; overflow: hidden;}
</style>
<script type="text/javascript">
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
canvas.height = window.innerHeight;
canvas.width = window.innerWidth;
canvas.height = 768;
canvas.width = 1366;
var texts = '0123456789'.split('');
var fontSize = 16;
var columns = canvas.width/fontSize;
var drops = [];
for(var x = 0; x < columns; x++){
drops[x] = 1;
}
function draw(){
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#0F0';
ctx.font = fontSize + 'px arial';
for(var i = 0; i < drops.length; i++){
var text = texts[Math.floor(Math.random()*texts.length)];
ctx.fillText(text, i*fontSize, drops[i]*fontSize);
if(drops[i]*fontSize > canvas.height || Math.random() > 0.95){
drops[i] = 0;
}
drops[i]++;
}
}
setInterval(draw, 33);
</script>
</body>
Qua đoạn code phía trên mọi người cùng nắm bắt được mình cần thay thế chỉnh sưa gì rồi chứ. Chúc mọi người thành công với bộ mã nguồn đơn giản này.
[BLOGGER] Theme Maintenance 2024
Hi mọi người, hôm qua ngồi viết bài chia sẽ về [CSHARP] How To Login Zalo With Api Version 4 và vào để lưu dữ liệu ở trang Mediafire.Com một trang lưu dữ liệu một thời nỗi đình nỗi đám của dân IT và Hacker những năm 2005,2006,2007...
Blogger và lúc đó mình tìm kiếm rất nhiều giao diện phù hợp với bản thân nhưng loay hoay mãi không thấy giao diện nào ưng ý nên mình đã tự học làm một giao diện đơn giản kiểu như blog đang bảo trì hay đang khắc phục lỗi sữ cố, như những website thời bấy giờ đang làm ra.Bên duối là hình ảnh demo của blog mình viết ra.
Với giao diện này thì hoàn toàn đơn giản, không phúc tạp gì và như mọi người cũng đã biết thì với giao diện blogger thì chỉ có HTML,CSS,JAVASCRIPT. Và không có thể thêm bộ code php vào giao diện mặc định của nó được nhé mọi người, và sau này không biết blogger nó có tùy biến gì không nhưng với những thứ hiện tại thì cũng đủ để những người không chuyên về website/blog như mình và những người khác tìm hiểu và áp dụng để tạo cho mình một giao diện tuyệt với, dù có giao diện đẹp nhưng cũng theo năng lực của bản thân là đi SEO cho web/blog của các bạn được hiện thị đứng top từ khóa của blog các bạn phát triển để có thự hạng rank và traffic ổn định trên GOOGLE
BÊN DƯỚI LÀ FULL GIAO DIỆN.
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<link href='https://www.blogger.com/static/v1/widgets/55013136-widget_css_bundle.css' rel='stylesheet' type='text/css'/>
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
<meta content='width=1100' name='viewport'/>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='blogger' name='generator'/>
<link href='https://hungcoderlink.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='https://hungcoderlink.blogspot.com/' rel='canonical'/>
<link rel="alternate" type="application/atom+xml" title="HUNG PRO VN - Atom" href="https://hungcoderlink.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="HUNG PRO VN - RSS" href="https://hungcoderlink.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="HUNG PRO VN - Atom" href="https://www.blogger.com/feeds/3652659979300949499/posts/default" />
<!--Can't find substitution for tag [blog.ieCssRetrofitLinks]-->
<meta content='https://hungcoderlink.blogspot.com/' property='og:url'/>
<meta content='Go Hùng Coder' property='og:title'/>
<meta content='' property='og:description'/>
<title>SOM Theme.Pro.VN</title>
<style id='page-skin-1' type='text/css'><!--
/*
@import url(http://fonts.googleapis.com/css?family=Raleway:200,300);
/* ============================================ Reset ============================================ */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, figure, footer, header,
hgroup, menu, nav, section, menu,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
article, aside, figure, footer, header,
hgroup, nav, section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del {
text-decoration: line-through;
}
abbr[title], dfn[title] {
border-bottom:1px dotted #000;
cursor:help;
}
/* tables still need cellspacing="0" in the markup */
table {
border-collapse:collapse;
border-spacing:0;
}
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #ccc;
margin:1em 0;
padding:0;
}
input, select {
vertical-align:middle;
}
/* ============================================ General Type styles ============================================ */
body {
width: 980px;
margin: 80px auto;
font-family: 'Raleway', sans-serif;
font-weight: 200;
text-align: center;
color: #909090;
}
p {
font-size: 25px;
margin-bottom: 20px;
line-height: 1.3;
}
p a {
color: #1abc9c;
border-bottom: 1px solid #1abc9c;
text-decoration: none;
font-style: normal;
-webkit-font-smoothing: antialiased;
font-size: 52px;
font-weight: 300;
}
#carousel{width:980px;height:125px;border-bottom:1px solid #ccc;position:relative;display:block;background:#9DE2D5;margin-bottom:8px}
#carousel h5{color:#555;margin:2px}
#carousel .container{position:absolute;left:24px;width:960px;height:125px;overflow:hidden}
#carousel .thumb{float:left;margin-right:5px;}
#carousel #previous_button{position:absolute;width:24px;height:125px;background:url("") center;z-index:100;cursor:pointer;}
#carousel #next_button{position:absolute;right:0;width:24px;height:125px;background:url("") center;z-index:100;cursor:pointer;}
#carousel #next_button:hover,#carousel .thumb:hover,#carousel #previous_button:hover{filter:alpha(opacity=70);opacity:.7}
#carousel ul{width:100000px;position:relative;margin-top:10px}
#carousel ul li{background:#ebebeb;display:inline;float:left;text-align:left;font:bold 11px Arial;border:0px solid #ccc;width:212px;height:90px;margin:0 2px 20px 6px;padding:6px}
#carousel ul li a.slider_title{color:#222;display:block;margin-top:0;padding-top:0}
#carousel ul li a.slider_title:hover{color:#1b5d97}
#carousel a img{display:block;background:#fff;margin-top:0}
.bomkhung{background:#f9f9f9;padding:10px 20px 10px;border:2px dashed #3598DB;text-align:center;margin-top:10px;}
--></style>
<meta name='google-adsense-platform-account' content='ca-host-pub-1556223355139109'/>
<meta name='google-adsense-platform-domain' content='blogspot.com'/>
</head>
<!-- chuyen huong link -->
<script type='text/javascript'>
//<![CDATA[
/* Redirector */
(function(b){window.top.location.href.includes("https://www.theme.pro.vn/")||b.filter(function(a){return!a.hasAttribute("imageanchor")&&!a.href.startsWith("https://www.theme.pro.vn/")&&5<a.href.length}).map(function(a){a.href="https://www.theme.pro.vn/chuyen-huong-link.html?hungprovn="+(a.href);a.rel="nofollow noopener";a.target="_blank"})})(Array.from(document.querySelectorAll(".post-body a")));
//]]></script>
<!-- end -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<!-- <script src='http://yourjavascript.com/265232511102/carousellite.js' type='text/javascript'/> -->
<script type='text/javascript'>
//<![CDATA[
imgr = new Array();
imgr[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbrFzg1yRBDU5vres72dFcwmrKKthrzzy7T56bZML1bEN13APWTpvxHoF_KKQmVjggNZSYcpK51YcSWiwGUrVoeSsd9SPdIez-6f-qBPEA5gyN8SNeVllyGdnNe7UTIL76NN3Nqmy55L8/s1600/no+image.jpg";
showRandomImg = true;
aBold = true;
summaryPost = 140;
summaryTitle = 25;
numposts1 = 20;
function removeHtmlTag(strx,chop){
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
s = s.join("");
s = s.substring(0,chop-1);
return s;
}
function showrecentposts(json) {
j = (showRandomImg) ? Math.floor((imgr.length+1)*Math.random()) : 0;
img = new Array();
document.write('<ul>');
for (var i = 0; i < numposts1; i++) {
var entry = json.feed.entry[i];
var posttitle = entry.title.$t;
var pcm;
var posturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
pcm = entry.link[k].title.split(" ")[0];
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;}
else
if ("summary" in entry) {
var postcontent = entry.summary.$t;}
else var postcontent = "";
postdate = entry.published.$t;
if(j>imgr.length-1) j=0;
img[i] = imgr[j];
s = postcontent ; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
//cmtext = (text != 'no') ? '<i><font color="'+acolor+'">('+pcm+' '+text+')</font></i>' : '';
var month = [1,2,3,4,5,6,7,8,9,10,11,12];
var month2 = ["January","February","March","April","May","June","July","August","September","October","November","December"];
var day = postdate.split("-")[2].substring(0,2);
var m = postdate.split("-")[1];
var y = postdate.split("-")[0];
for(var u2=0;u2<month.length;u2++){
if(parseInt(m)==month[u2]) {
m = month2[u2] ; break;
}
}
var daystr = day+ ' ' + m + ' ' + y ;
var trtd = '<li class="car"><div class="thumb"><a href="'+posturl+'"><img width="100" height="90" class="alignnone" src="'+img[i]+'"/></a></div><h5>'+daystr+'</h5><a class="slider_title" href="'+posturl+'">'+posttitle+'</a></li>';
document.write(trtd);
j++;
}
document.write('</ul>');
}
/* javascript load */
(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var div=$(this),ul=$("ul:first",div),tLi=$(".car",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v;}
var li=$(".car",ul),itemLength=li.size(),curr=o.start;div.css("visibility","visible");li.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({padding:"0",position:"relative","list-style-type":"none","z-index":"1"});div.css({overflow:"hidden","z-index":"2"});var liSize=o.vertical?height(li):width(li);var ulSize=liSize*itemLength;var divSize=liSize*v;li.css({width:li.width()});ul.css(sizeCss,ulSize+"px").css(animCss,-(curr*liSize));div.css(sizeCss,divSize+"px");if(o.btnPrev)
$(o.btnPrev).click(function(){return go(curr-o.scroll);});if(o.btnNext)
$(o.btnNext).click(function(){return go(curr+o.scroll);});if(o.btnGo)
$.each(o.btnGo,function(i,val){$(val).click(function(){return go(o.circular?o.visible+i:i);});});if(o.mouseWheel&&div.mousewheel)
div.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll);});if(o.auto)
setInterval(function(){go(curr+o.scroll);},o.auto+o.speed);function vis(){return li.slice(curr).slice(0,v);};function go(to){if(!running){if(o.beforeStart)
o.beforeStart.call(this,vis());if(o.circular){if(to<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*liSize)+"px");curr=to==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll;}else if(to>=itemLength-v+1){ul.css(animCss,-((v)*liSize)+"px");curr=to==itemLength-v+1?v+1:v+o.scroll;}else curr=to;}else{if(to<0||to>itemLength-v)return;else curr=to;}
running=true;ul.animate(animCss=="left"?{left:-(curr*liSize)}:{top:-(curr*liSize)},o.speed,o.easing,function(){if(o.afterEnd)
o.afterEnd.call(this,vis());running=false;});if(!o.circular){$(o.btnPrev+","+ o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled");}}
return false;};});};function css(el,prop){return parseInt($.css(el[0],prop))||0;};function width(el){return el[0].offsetWidth+ css(el,'marginLeft')+ css(el,'marginRight');};function height(el){return el[0].offsetHeight+ css(el,'marginTop')+ css(el,'marginBottom');};})(jQuery);
//]]>
</script>
<body>
<center><img src='https://csdl.hung.pro.vn/LOGO-HUNG-PRO-WEBP.png'/>
</center>
<p>We are sorry for this blog while we close, perhaps to the fore we don't use blog <b><span style='color:#ff0000'>HÙNG PRO VN</span></b> again and Changed into a new Blog, wait his coming :), we will announce them later in social media if we have issued our new blog with the theme or template that is super than ever. Thank you for your attention :)</p>
<p><a href='http://hung.pro.vn/'>HUNG.PRO.VN</a></p>
<div id='carousel'>
<div id='previous_button'></div>
<div class='container'>
<script>
document.write("<script src=\"https://www.hung.pro.vn/feeds/posts/default/?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts\"><\/script>");
</script>
<div class='clear'></div>
</div>
<div id='next_button'></div>
</div>
<script type='text/javascript'>
(function($) { $(document).ready(function(){
$("#carousel .container").jCarouselLite({
auto:4000,
scroll: 1,
speed: 800,
visible: 4,
start: 0,
circular: true,
btnPrev: "#previous_button",
btnNext: "#next_button"
});
})})(jQuery)
</script>
<script type='text/javascript'>
//<![CDATA[
function changetargetlink(x){
var a = document.getElementsByTagName('a');
var args = changetargetlink.arguments;
for(var i in a){
a[i].target = "_blank";
a[i].rel = "_blank";
for(var j=0;j<args.length;j++){
if(a[i].href.match(args[j])){
a[i].target = "";
a[i].rel = "";
}}}}
changetargetlink('http://baotri.theme.pro.vn/');
//]]>
</script>
<style type='text/css'>body, a, a:hover {cursor: url(https://blogger.googleusercontent.com/img/proxy/AVvXsEjljjfcLRV0GpgxfRaBzN3gOvQqxpo_j92LDKfhRZgydViDN-MEMa3lVneuLA5p4STmlNVRoynjHjX7m2BMMqhf5erzmVwaKQzkqNyJDYlJgIXMTg8MsOBsJeLuerZs4ga0isS8AEnUkMIAtZSBF4aXlA=s0-d), progress;}</style>
<div class='main no-items section' id='main'></div>
<!-- Don't Ctrl + U -->
<script type='text/javascript'>
//<![CDATA[
shortcut={all_shortcuts:{},add:function(a,b,c){var d={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(c)for(var e in d)"undefined"==typeof c[e]&&(c[e]=d[e]);else c=d;d=c.target,"string"==typeof c.target&&(d=document.getElementById(c.target)),a=a.toLowerCase(),e=function(d){d=d||window.event;if(c.disable_in_input){var e;d.target?e=d.target:d.srcElement&&(e=d.srcElement),3==e.nodeType&&(e=e.parentNode);if("INPUT"==e.tagName||"TEXTAREA"==e.tagName)return}d.keyCode?code=d.keyCode:d.which&&(code=d.which),e=String.fromCharCode(code).toLowerCase(),188==code&&(e=","),190==code&&(e=".");var f=a.split("+"),g=0,h={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},i={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},j=!1,l=!1,m=!1,n=!1,o=!1,p=!1,q=!1,r=!1;d.ctrlKey&&(n=!0),d.shiftKey&&(l=!0),d.altKey&&(p=!0),d.metaKey&&(r=!0);for(var s=0;k=f[s],s<f.length;s++)"ctrl"==k||"control"==k?(g++,m=!0):"shift"==k?(g++,j=!0):"alt"==k?(g++,o=!0):"meta"==k?(g++,q=!0):1<k.length?i[k]==code&&g++:c.keycode?c.keycode==code&&g++:e==k?g++:h[e]&&d.shiftKey&&(e=h[e],e==k&&g++);if(g==f.length&&n==m&&l==j&&p==o&&r==q&&(b(d),!c.propagate))return d.cancelBubble=!0,d.returnValue=!1,d.stopPropagation&&(d.stopPropagation(),d.preventDefault()),!1},this.all_shortcuts[a]={callback:e,target:d,event:c.type},d.addEventListener?d.addEventListener(c.type,e,!1):d.attachEvent?d.attachEvent("on"+c.type,e):d["on"+c.type]=e},remove:function(a){var a=a.toLowerCase(),b=this.all_shortcuts[a];delete this.all_shortcuts[a];if(b){var a=b.event,c=b.target,b=b.callback;c.detachEvent?c.detachEvent("on"+a,b):c.removeEventListener?c.removeEventListener(a,b,!1):c["on"+a]=!1}}},shortcut.add("Ctrl+U",function(){top.location.href="http://www.hung.pro.vn/p/privacy-policy.html"});
//]]>
</script>
<!-- /End Don't Ctrl + U -->
<!-- don't clip right -->
<style type='text/css'>
body{
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
</style>
<script type='text/javascript'>
//<![CDATA[
// JavaScript Document
var message="NoRightClicking"; function defeatIE() {if (document.all) {(message);return false;}} function defeatNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=defeatNS;} else{document.onmouseup=defeatNS;document.oncontextmenu=defeatIE;} document.oncontextmenu=new Function("return false")
//]]>
</script>
<!-- dont ctrl + U BomKhung.Info-->
<script type='text/javascript'>
//<![CDATA[
shortcut={all_shortcuts:{},add:function(a,b,c){var d={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(c)for(var e in d)"undefined"==typeof c[e]&&(c[e]=d[e]);else c=d;d=c.target,"string"==typeof c.target&&(d=document.getElementById(c.target)),a=a.toLowerCase(),e=function(d){d=d||window.event;if(c.disable_in_input){var e;d.target?e=d.target:d.srcElement&&(e=d.srcElement),3==e.nodeType&&(e=e.parentNode);if("INPUT"==e.tagName||"TEXTAREA"==e.tagName)return}d.keyCode?code=d.keyCode:d.which&&(code=d.which),e=String.fromCharCode(code).toLowerCase(),188==code&&(e=","),190==code&&(e=".");var f=a.split("+"),g=0,h={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},i={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},j=!1,l=!1,m=!1,n=!1,o=!1,p=!1,q=!1,r=!1;d.ctrlKey&&(n=!0),d.shiftKey&&(l=!0),d.altKey&&(p=!0),d.metaKey&&(r=!0);for(var s=0;k=f[s],s<f.length;s++)"ctrl"==k||"control"==k?(g++,m=!0):"shift"==k?(g++,j=!0):"alt"==k?(g++,o=!0):"meta"==k?(g++,q=!0):1<k.length?i[k]==code&&g++:c.keycode?c.keycode==code&&g++:e==k?g++:h[e]&&d.shiftKey&&(e=h[e],e==k&&g++);if(g==f.length&&n==m&&l==j&&p==o&&r==q&&(b(d),!c.propagate))return d.cancelBubble=!0,d.returnValue=!1,d.stopPropagation&&(d.stopPropagation(),d.preventDefault()),!1},this.all_shortcuts[a]={callback:e,target:d,event:c.type},d.addEventListener?d.addEventListener(c.type,e,!1):d.attachEvent?d.attachEvent("on"+c.type,e):d["on"+c.type]=e},remove:function(a){var a=a.toLowerCase(),b=this.all_shortcuts[a];delete this.all_shortcuts[a];if(b){var a=b.event,c=b.target,b=b.callback;c.detachEvent?c.detachEvent("on"+a,b):c.removeEventListener?c.removeEventListener(a,b,!1):c["on"+a]=!1}}},shortcut.add("Ctrl+U",function(){top.location.href="http://www.bomkhung.info/p/ban-quyen-bom-khung-blogger.html"}),shortcut.add("F12",function(){top.location.href="http://www.bomkhung.info/p/ban-quyen-bom-khung-blogger.html"}),shortcut.add("Ctrl+Shift+I",function(){top.location.href="http://www.bomkhung.info/p/ban-quyen-bom-khung-blogger.html"}),shortcut.add("Ctrl+S",function(){top.location.href="http://www.bomkhung.info/p/ban-quyen-bom-khung-blogger.html"}),shortcut.add("Ctrl+Shift+C",function(){top.location.href="http://www.bomkhung.info/p/ban-quyen-bom-khung-blogger.html"}); //]]> </script>
<!-- end -->
<iframe allowfullscreen='true' frameborder='0' height='1' scrolling='no' src='https://mp3.zing.vn/embed/song/ZW8WA7WB?start=true' width='1'></iframe>
</body>
</html>
Mọi người lưu ý khi áp dụng mẫu giao diện này thì nhớ thay đổi địa chỉ link "
https://www.hung.pro.vn/feeds/posts/default/?max-results=" trong theme lại để hiển thị bài viết mà các bạn muốn hiển thị trong giao diện nhé. Xem xét nếu thấy hợp lý thì áp dụng cho web/blog của bản thân nhé.Cảm ơn mọi người đã quan tâm.
[BLOGGER] Chèn Quảng Cáo Trượt Dọc 2 Bên Blogger
Hi mọi người, sau một hồi đăng ký quảng cáo GOOGLE ADSENSE nhưng chưa thành công, nhưng mình vẫn đặt quảng cáo lên blog để tạo điểm nhấn để được GOOGLE chấp nhận, sau một hồi chỉnh sữa giao diện và mình đã thêm quảng cáo trượt dọc 2 bên để tạo nét cho blog. (blog mình thì đơn giản nhưng được cái là tộc độ tải trang khá ổn)
<style>
#hungprovn-left {bottom: 24px;left: 10px;position: fixed;}
#hungprovn_right {bottom: 24px;right: 10px;position: fixed;}
@media(max-width: 1024px) {.hungprovn-ads-all {display: none!important}}
</style>
<div class='hungprovn-ads-all'>
<div id='hungprovn-left'>
<!-- Chèn quảng cáo vào đây -->
</div>
<div id='hungprovn_right'>
<!-- Chèn quảng cáo vào đây -->
</div>
</div>
Demo ở trang blog này, mọi người có thể kiêm tra và xem xét nhé.
[CSS] Web Design – CSS Reset And Normalize.css
Sự không đồng nhất trong việc hiển thị HTML của các trình duyệt thường được giải quyết bằng cách sử dụng CSS Reset hay Normalize.css. Nếu chưa quen thuộc với các khái niệm này, bài viết sau sẽ cho bạn một cái nhìn tổng quan cũng như áp dụng chúng.
Giới thiệu
Bản chất của CSS Reset là ghi đè lên các thiết lập hiển thị các thẻ HTML mặc định của trình duyệt. CSS Reset sẽ đưa các thiết lập hiển thị về ‘zero’ của các thẻ HTML. Điều này giúp tạo một điểm khởi đầu giống nhau cho việc hiển thị giao diện trang web trên các trình duyệt. Tất nhiên, điều này cũng đòi hỏi bạn phải dành thời gian xây dựng lại giao diện cho các thẻ HTML nếu bạn muốn người dùng xem được trang web một cách dễ dàng.Một trong những phiên bản reset CSS cơ bản nhất là sử dụng selector ‘*’ (universal selector) để áp dụng style cho tất cả thẻ HTML. Phiên bản này chỉ bao gồm một dòng css đơn giản có chức năng xóa margin và padding của tất cả các thẻ HTML:
* { margin: 0; padding: 0; }
Tuy nhiên phương pháp này không có hiệu suất tốt và không đáp ứng đầy đủ các trường hợp. Vì vậy, một số phiên bản CSS Reset được nghiên cứu và sử dụng khá phổ biến hiện nay như YUI Reset, Eric Meyer’s Reset, HTML5 Doctor CSS Reset.
Bạn có thể xem thống kê về phiên bản CSS Reset được sử dụng tại
http://www.cssreset.com/Tạo CSS Reset
Bạn có thể tự tạo cho mình một CSS Reset riêng dựa trên kinh nghiệm hoặc tham khảo các phiên bản đang phổ biến. Bởi vì CSS Reset hoạt động ở tầng thấp, nên việc đảm bảo chất lượng và hiệu quả cần được chú ý.- Chỉ reset các style cần thiết, vì vậy không nên dùng selector ‘*’ mặc dù nó có thể giúp css trở nên ngắn gọn hơn nhiều.
- Giữ cho code ngắn gọn, rõ ràng, tránh dư thừa các kí tự, khoảng trắng hay các định nghĩa class không cần thiết.
- CSS Reset phải được nạp trước các tập tin css khác.
margin: 0; padding: 0; border: 0 font-style: normal; font-weight: normal; font-size: 100%; text-align: left; color: #000; text-decoration: none; line-height: 1.4em; …
Các phiên bản CSS Reset phổ biến
Phiên bản đầu tiên của CSS Reset được Yahoo đưa ra năm 2006 với tên gọi: YUI Reset. YUI Reset sẽ chọn lọc và reset những thuộc tính cần thiết một cách hợp lý cho từng thẻ.YUI Reset được chia thành hai phiên bản Global (thông thường) và Contextual.
- Global: áp dụng reset cho cả trang.
- Contextual: chỉ reset các thẻ con của thẻ chứa class “
yui3-cssreset”. - Hiện tại, bạn có thể phiên bản css code mới nhất YUI 3 Reset tại:
http://yui.yahooapis.com/3.11.0/build/cssreset/cssreset.css.- Và trang hướng dẫn:
http://yuilibrary.com/yui/docs/cssreset/- Eric Meyer’s Reset: một phiên bản được cải tiến từ YUI 2 Reset bởi Eric Meyer:
http://meyerweb.com/eric/tools/css/reset/. - HTML5 Doctor CSS Reset: dựa trên Eric Meyer’s Reset, phiên bản này hỗ trợ thêm các thẻ mới có trong HTML5:
http://html5doctor.com/html-5-reset-stylesheet/
Normalize.css
Normalize.css có thể được liệt kê vào danh sách các CSS Reset do cách áp dụng của chúng giống nhau. Nhưng thay vì ‘xóa hoàn toàn’ định dạng của các thẻ HTML, Normalize.css chỉ xóa bỏ sự khác biệt về style giữa các trình duyệt. Như vậy, các style mặc định của mỗi thẻ HTML sẽ được giữ lại và bạn không phải định nghĩa lại hết các thuộc tính cho chúng.So với CSS Reset, Normalize.css có các ưu điểm:
- Giữ lại các style mặc định có ích.
- Sửa các lỗi chung của các trình duyệt.
- Không làm rối mắt khi bạn dùng công cụ debug.
- Có tính module.
- Tài liệu hướng dẫn đầy đủ.
Chọn lựa phiên bản CSS Reset
Việc chọn lựa bản CSS Reset (bao gồm cả Normalize.css) thường dựa theo từng loại dự án mà bạn làm. Nhiều người chọn việc tạo một CSS Reset riêng dựa trên các bản có sẵn. Một số lại thấy thoải mái với việc không sử dụng CSS Reset và chấp nhận sự khác biệt không đáng kể giữa các trình duyệt.Đây là vài hướng dẫn lựa chọn CSS Reset mà bạn có thể xem đầy đủ tại: Which CSS Reset Should I Use?
– Nếu bạn làm việc với HTML5, dùng HTML5 Doctor Reset CSS.
– Nếu bạn làm một trang cơ bản và test, hoặc một trang không dùng HTML5 thì dùng Eric Meyer’s Reset CSS.
– Nếu bạn cần một CSS Reset hoạt động như một framework, có các style được tạo sẵn sau khi reset thì dùng Tripoli CSS Reset hay Vanilla CSS Un-Reset.
– Nếu bạn cần một CSS Framework đầy đủ chức năng, hãy tìm hiểu và sử dụng YUI 3 CSS Libary.
– Nói chung là bạn không nên dùng Universal Selector ‘*’ CSS Reset.
[DEVEXPRESS] How to using HTML and CSS code viewer
Xin chào các bạn, bài viết hôm nay mình tiếp tục chia sẻ các bạn cách sử dụng HTMLCodeViewer và CSSCodeViewer trên Devexpress Winform. [DEVEXPRESS] Hướng dẫn sử dụng HTML and CSS Code Viewer trên Winform Hai control này trên Devexpress mặc định không có hiển thị ở thanh ToolBox của Visual Studio.
Nên các bạn cần viết một vào dòng code để hiện thị nó lên và gắn vào Panel control. Giao diện demo ứng dụng:
Các bạn có thể xem video hướng dẫn từng bước thực hiện:
Source code C#:
using DevExpress.XtraEditors.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HTMLCSSCodeEditor
{
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var htmlCodeEditor = new HtmlCodeViewer();
htmlCodeEditor.ReadOnly = false;
htmlCodeEditor.Dock = DockStyle.Fill;
htmlCodeEditor.AllowCodeFolding = DevExpress.Utils.DefaultBoolean.True;
htmlCodeEditor.ShowIndentGuides = DevExpress.Utils.DefaultBoolean.True;
htmlCodeEditor.ShowLineNumbers = DevExpress.Utils.DefaultBoolean.True;
htmlCodeEditor.ScrollBars = ScrollBars.Both;
// add control to panel
panelHTMLEditor.Controls.Add(htmlCodeEditor);
var cssCodeEditor = new CssCodeViewer();
cssCodeEditor.ReadOnly = false;
cssCodeEditor.Dock = DockStyle.Fill;
cssCodeEditor.AllowCodeFolding = DevExpress.Utils.DefaultBoolean.True;
cssCodeEditor.ShowIndentGuides = DevExpress.Utils.DefaultBoolean.True;
cssCodeEditor.ShowLineNumbers = DevExpress.Utils.DefaultBoolean.True;
cssCodeEditor.ScrollBars = ScrollBars.Both;
// press Ctrol + Alt + . => multi select in visual studio
// add control to panel
panelCSSEditor.Controls.Add(cssCodeEditor);
}
}
}
Chúc mọi người thành công với thủ thuật trên.

![[Visual Basic] MathML to/from Plain Text Converter [Visual Basic] MathML to/from Plain Text Converter](https://cdn.hung.pro.vn/img/b/R29vZ2xl/AVvXsEjqcJauF0rGNns2qPjSNPX8JIbpiklMaPsH5xPAqiTXzwfsp2nCjNXHuZAJYskodKPI1g1SVdHGPcQIVp1wJYeFjiC2Pb__0NFPGXtLTMI0c8sxjZr0NRHnz8Abk3uZKQ1cZJUOb6sRfOUhk7MzhGS1WPIKZtMYyoLqvcalVsEgDviHI61bgCiocZ6gOP8/s16000/MathML_ToFrom_String.png)




![[BLOGGER] Quảng Cáo Trượt Dọc 2 Bên [BLOGGER] Quảng Cáo Trượt Dọc 2 Bên](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFly_HvCplSn1W8qoyUk0NupKMt3hZwR5ujRxhJVotm1lBt-3gfVmj55pdzYMyNeuGphcYGQY2bmtFt4uFfyN6A6DHFvc2znz3lSocc6dtss361ty4qLaFiicsCkIpj6YqUOTyEzaBNbY7Qz2zw7Hb6XNBXmT0lDCmdP175q_UNtcKIW0VkdJEe5FmW7s/s16000-rw/chen_quang_cao_truot_doc_2_ben_blogspot.png)
![[BLOGGER] Quảng Cáo Trượt Dọc 2 Bên [BLOGGER] Quảng Cáo Trượt Dọc 2 Bên](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp6XCmOl2ibxG_EIkhCYDw9Uy0BWs32WQscyfyyLJgRa4tAMPCiL0J5TMrzVIn8t5zkHgJHIv4Vt8bWmRi1vJ4lMlfRi5RFSeXyax5AkpDdnWUCv2YlFT5UftmNEyX6cxSCsw5aSQcttmndS9CBXBsMwfhgmkDJ8Q-12zjGEpEqK2x4o1YMuFKOZb7fYQ/s16000-rw/demo_giao_dien_quang_cao_truot_doc_2_ben.png)


