轻松上手 ECharts,让你的数据可视化更简单!
最编程
2024-02-14 18:29:27
...
/g,"
"); noteContent = noteContent.replace(//g,""); // 系列化表单数据 var comment_parent = 0; var is_user_logged_in = $("#is_user_logged_in").val(); var comment_post_ID = 22031; var _wp_unfiltered_html_comment = $("#_wp_unfiltered_html_comment").val(); var comment = noteContent; var author = $("#author").val(); var url = $("#url").val(); var email = $("#email").val(); if(isBlank(author) && is_user_logged_in==0) { statusdiv.html('
请输入昵称!
').show(); } else if(isBlank(email) && is_user_logged_in==0) { statusdiv.html('请输入邮箱!
').show(); } else { // var formdata=commentform.serialize() + "&comment=" + noteContent ; // 添加状态信息 statusdiv.html('Processing...
').show(); // 获取表单提交地址 var formurl=commentform.attr('action'); // 异步提交 $.ajax({ type: 'post', url: formurl, dataType:'json', data: {"comment_parent":comment_parent,"comment_post_ID":comment_post_ID, "_wp_unfiltered_html_comment":_wp_unfiltered_html_comment,"comment":comment,"url":url, "email":email,"author":author}, error: function(XMLHttpRequest, textStatus, errorThrown){ statusdiv.html('数据不完整或表单提交太快了!
').show(); }, success: function(data, textStatus){ if(data.errorno=="0") { $("#submit").prop('disabled', true); statusdiv.html('笔记已提交审核,感谢分享笔记!
').show(); alert('笔记已提交审核,感谢分享笔记!'); }else{ statusdiv.html(''+data.msg+'
').show(); } commentform.find('textarea[name=comment]').val(''); } }); setTimeout(function(){ $("#submit").prop('disabled', false); }, 10*1000); } return false; }); $(".comt-author").click(function() { href = $(this).children("a").attr("href"); if(href.indexOf("/note/")!=-1) { var win = window.open(href, '_blank'); win.focus(); } }); $(".comt-meta span").hover(function(){ $(this).children(".tooltip").css({ "opacity": 1, "pointer-events": "auto"}); },function(){ $(this).children(".tooltip").removeAttr("style"); }); /* $(".wrapper i").hover(function(){ $(this).siblings(".tooltip").css({ "opacity": 1, "pointer-events": "auto"}); },function(){ $(this).siblings(".tooltip").css({ "opacity": 0, "pointer-events": "auto"}); }); */ //Upvote.create('runoobvote-id', {callback: vote_callback}); var ajaxurl = 'https://www.runoob.com/wp-admin/admin-ajax.php'; var callback = function(data) { //console.log($('#runoobvote-id').upvote('upvoted')); //console.log($('#runoobvote-id').upvote('downvoted')); //console.log(data); _vote_action = data.action; id_arr = data.id.split('-'); um_id= id_arr[2]; //console.log(um_id); var re = /^[1-9]+/; if (re.test(um_id)) { var ajax_data = { _vote_action: _vote_action, action: "pinglun_zan", um_id: um_id, um_action: "ding" }; //console.log(ajax_data); $.post(ajaxurl,ajax_data,function(status){ //if(status.vote_num>999) { // _voteHtml = ''+kFormatter(status.vote_num) +''; // $("#runoobvote-id-" + um_id + " .count").hide().after(_voteHtml); //} }); } }; if($('#comments').length && $('.upvotejs').length){ $('.upvotejs').upvote({id: 22031, callback: callback}); $.post(ajaxurl,{"action":"pinglun_zan","postid":22031},function(data){ $(data).each(function(key,value) { $("#runoobvote-id-" + value.commid + " .upvote").addClass(value.upvotejs_class); $("#runoobvote-id-" + value.commid + " .downvote").addClass(value.downvote_class); $("#runoobvote-id-" + value.commid + " .count").text(value.upvote_count); }) },'json'); } }); function isBlank(str) { return (!str || /^\s*$/.test(str)); } function kFormatter(num) { // return num; return Math.abs(num) > 999 ? Math.sign(num)*((Math.abs(num)/1000).toFixed(1)) + 'k' : Math.sign(num)*Math.abs(num) }推荐阅读
-
刘韧工作手册(2023年版)-17 共同学习,共同进步,搭建共识。一起工作的基础,是对彼此能力的认可,继续一起工作的基础,是能力的共同提高。共同进步的基础,就是共同学习,共同学习的基础,是看过同样的书。 年轻时,男女谈恋爱,双方世界观趋同,差距不大。后来,世界观逐渐拉大,对话成了鸡同鸭讲,我讲,你听不懂。你讲,我不感兴趣,甚至闹离婚,双方自然而然走不下去了。工作也一样,同事间如果差距越来越大,最终,无法一起工作。 我为了和别人搭建共识,会处心积虑向其推荐读书。听什么歌,观什么电影,看什么书,能在一定程度了解一个人。 有人说,金庸的书是文学。我说,那是娱乐。文学是“真、善、美”,首先是要“真”,就是情感真实。而在金庸的小说里,类似“九阴真经”、“葵花宝典”的秘籍是假的,小说里的人物寻得秘籍,一夜之间就能武功猛增……这样的情节,在现实中可能吗?生活中,漂亮的富家女黄蓉会爱上傻小子郭靖吗?金庸看多了,人会追求走捷径,工作生活“走捷径”会害死自己。 18 礼物,是人际交往中的情感润滑剂。互相送礼物,增进感情。不知道买什么,就买吃的。 英国人做客,会送主人红酒、鲜花和小卡片,回家后,会写感谢信。在新加坡,朋友们来家,常带些做好的熟食,大家一起吃。 2000年,我听说谷歌在办公室给员工备吃的。当时不太理解,后来才知道,“在一起吃”这个行为,有助于消除紧张和敌意,人更容易感到温暖和轻松,更愿意敞开心扉,是社交中增进感情的好方式之一。脸书新加坡总部,午餐,公司会请高级厨师做六种风格的菜,每一道菜都做的极好,甚至比五星级酒店的饭菜都好吃。他们的员工告诉我,根本不想回家,就想在公司吃饭。 19 坦诚,不装懂,打破沙锅问到底。想当然半天,不如简单试一下。要学会积攒各种低成本测试方法,并勤快地去试。超大额跨国汇款,先汇1元,测试路径是否畅通。没有招,没有策略库,一筹莫展。 有句古话,叫“以其昏昏,使人昭昭”。很多人对“学而优则仕”这句话的理解,是典型的“以其昏昏,使人昭昭”。这句话常被人解释为“学习好了就去当官”,若照此解释,下一句“仕而优则学”只能解释为“当官当好了就去学习”!这显然说不通。这里的“优”,不是“优秀”,而是“空闲”的意思。很多人不清楚,却到处教人解释这句话。 《水浒传》是中国版的黑帮小说,讲的是厚黑学,没有道德底线。梁山人为了拉扈三娘入伙,杀光了她全家,把原本是千金小姐,花容月貌的扈三娘指婚丑陋的王英。直到今天,《水浒传》常被解释为“侠义”。 在群里,遇到信口雌黄国学的人,我会问他们,论语中,第一句话“学而时习之不亦说乎”中的“习”是什么意思?很多人解释为“复习”。其实,繁体字中,“习”的写法是“習”,下面一个“白”,上面一个“羽”,指的是“雏鸟学飞”。意思是,雏鸟利用老鸟教的技巧,终于飞起来了。因此,“习”的本意是指老师手把手把心得教给你,让你学会了,有了收获和进步,绝不是指反复“复习”和“练习”的意思。 维特根斯坦说:“凡是可说的就要说清楚,凡是不可说的就该保持沉默。”别不懂装懂。 20 善待帮助你的人。一个人能否成功,要看有没有人愿意帮你。有多大成功,要看有多少人愿意帮你。 别人发现你出错了,提醒你,这些都是你所能得到的“举手之劳”的帮助,你知道了,能改掉,你容易成长。 如何做一个有很多人愿意帮你的人呢? 首先,滴水之恩,当涌泉相报。每次收到礼物,我一定会表示感谢。 其次,得到帮助,一定要反馈。很多帮助不一定非得要你用物质来交换,可能仅仅是你要领情。我会记录所有受到的帮助,并广而告之。我写书时,会把帮助我的人都列举出来,这样做成本不高,但被提到的人会感动。 你们可以回忆一下,有多少人帮过你?如果脱口说出的人数越多,说明你离成功越近。要是发现世界上,愿意帮你的人只有父母,那就要反思了。(完) 刘韧商业写作通识
-
轻松上手 ECharts,让你的数据可视化更简单!
-
简单易上手!让你轻松掌握Spring Boot的yaml和properties配置文件
-
简单易用,让你轻松传输iOS数据的工具——SyncBird
-
超简单!让你轻松上手的中望CAD 2022安装指南
-
简单易学!让你轻松掌握Pandas数据排序的多种方式
-
如何在吉利车上安装第三方应用?简单步骤让你轻松上手!包括缤瑞、缤越、博越、博瑞GE和星越等车型。别忘了,还可以通过笔记本电脑的移动热点来使用哦!🎉