bootstrap table 列拖动变宽

需要导入
在这里插入图片描述
colResizable-1.6.min.js

/**_ _____           _          _     _      | |  __ \         (_)        | |   | |     ___ ___ | | |__) |___  ___ _ ______ _| |__ | | ___ / __/ _ \| |  _  // _ \/ __| |_  / _` | '_ \| |/ _ \| (_| (_) | | | \ \  __/\__ \ |/ / (_| | |_) | |  __/\___\___/|_|_|  \_\___||___/_/___\__,_|_.__/|_|\___|v1.6 - jQuery plugin created by Alvaro Prieto LaurobaLicences: MIT & GPLFeel free to use or modify this plugin as far as my full name is kept	If you are going to use this plug-in in production environments it is strongly recommended to use its minified version: colResizable.min.js*/(function($){ 	var d = $(document); 		//window objectvar h = $("head");			//head objectvar drag = null;			//reference to the current grip that is being draggedvar tables = {};			//object of the already processed tables (table.id as key)var	count = 0;				//internal count to create unique IDs when needed.	//common strings for packingvar ID = "id";	var PX = "px";var SIGNATURE ="JColResizer";var FLEX = "JCLRFlex";//short-cutsvar I = parseInt;var M = Math;var ie = navigator.userAgent.indexOf('Trident/4.0')>0;var S;try{S = sessionStorage;}catch(e){}	//Firefox crashes when executed as local file system//append required CSS rules  h.append("<style type='text/css'>  .JColResizer{table-layout:fixed;} .JColResizer > tbody > tr > td, .JColResizer > tbody > tr > th{overflow:hidden;padding-left:0!important; padding-right:0!important;}  .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;cursor: e-resize;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;	} .JCLRFlex{width:auto!important;} .JCLRgrip.JCLRdisabledGrip .JColResizer{cursor:default; display:none;}</style>");/*** Function to allow column resizing for table objects. It is the starting point to apply the plugin.* @param {DOM node} tb - reference to the DOM table object to be enhanced* @param {Object} options	- some customization values*/var init = function( tb, options){	var t = $(tb);				    //the table object is wrappedt.opt = options;                //each table has its own options available at anytimet.mode = options.resizeMode;    //shortcutst.dc = t.opt.disabledColumns;if(t.opt.disable) return destroy(t);				//the user is asking to destroy a previously colResized tablevar	id = t.id = t.attr(ID) || SIGNATURE+count++;	//its id is obtained, if null new one is generated		t.p = t.opt.postbackSafe; 							//short-cut to detect postback safe 		if(!t.is("table") || tables[id] && !t.opt.partialRefresh) return; 		//if the object is not a table or if it was already processed then it is ignored.if (t.opt.hoverCursor !== 'e-resize') h.append("<style type='text/css'>.JCLRgrip .JColResizer:hover{cursor:"+ t.opt.hoverCursor +"!important}</style>");  //if hoverCursor has been set, append the stylet.addClass(SIGNATURE).attr(ID, id).before('<div class="JCLRgrips"/>');	//the grips container object is added. Signature class forces table rendering in fixed-layout mode to prevent column's min-widtht.g = []; t.c = []; t.w = t.width(); t.gc = t.prev(); t.f=t.opt.fixed;	//t.c and t.g are arrays of columns and grips respectively				if(options.marginLeft) t.gc.css("marginLeft", options.marginLeft);  	//if the table contains margins, it must be specifiedif(options.marginRight) t.gc.css("marginRight", options.marginRight);  	//since there is no (direct) way to obtain margin values in its original units (%, em, ...)t.cs = I(ie? tb.cellSpacing || tb.currentStyle.borderSpacing :t.css('border-spacing'))||2;	//table cellspacing (not even jQuery is fully cross-browser)t.b  = I(ie? tb.border || tb.currentStyle.borderLeftWidth :t.css('border-left-width'))||1;	//outer border width (again cross-browser issues)// if(!(tb.style.width || tb.width)) t.width(t.width()); //I am not an IE fan at all, but it is a pity that only IE has the currentStyle attribute working as expected. For this reason I can not check easily if the table has an explicit width or if it is rendered as "auto"tables[id] = t; 	//the table object is stored using its id as key	createGrips(t);		//grips are created };/*** This function allows to remove any enhancements performed by this plugin on a previously processed table.* @param {jQuery ref} t - table object*/var destroy = function(t){var id=t.attr(ID), t=tables[id];		//its table object is foundif(!t||!t.is("table")) return;			//if none, then it wasn't processed	 t.removeClass(SIGNATURE+" "+FLEX).gc.remove();	//class and grips are removeddelete tables[id];						//clean up data};/*** Function to create all the grips associated with the table given by parameters * @param {jQuery ref} t - table object*/var createGrips = function(t){	var th = t.find(">thead>tr:first>th,>thead>tr:first>td"); //table headers are obtainedif(!th.length) th = t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td");	 //but headers can also be included in different waysth = th.filter(":visible");					//filter invisible columnst.cg = t.find("col"); 						//a table can also contain a colgroup with col elements		t.ln = th.length;							//table length is stored	if(t.p && S && S[t.id])memento(t,th);		//if 'postbackSafe' is enabled and there is data for the current table, its coloumn layout is restoredth.each(function(i){						//iterate through the table column headers			var c = $(this); 						//jquery wrap for the current column		var dc = t.dc.indexOf(i)!=-1;           //is this a disabled column?var g = $(t.gc.append('<div class="JCLRgrip"></div>')[0].lastChild); //add the visual node to be used as gripg.append(dc ? "": t.opt.gripInnerHtml).append('<div class="'+SIGNATURE+'"></div>');if(i == t.ln-1){                        //if the current grip is the las one g.addClass("JCLRLastGrip");         //add a different css class to stlye it in a different way if neededif(t.f) g.html("");                 //if the table resizing mode is set to fixed, the last grip is removed since table with can not change}g.bind('touchstart mousedown', onGripMouseDown); //bind the mousedown event to start dragging if (!dc){ //if normal column bind the mousedown event to start dragging, if disabled then apply its css classg.removeClass('JCLRdisabledGrip').bind('touchstart mousedown', onGripMouseDown);      }else{g.addClass('JCLRdisabledGrip'); }g.t = t; g.i = i; g.c = c;	c.w =c.width();		//some values are stored in the grip's node data as shortcutt.g.push(g); t.c.push(c);						//the current grip and column are added to its table objectc.width(c.w).removeAttr("width");				//the width of the column is converted into pixel-based measurementsg.data(SIGNATURE, {i:i, t:t.attr(ID), last: i == t.ln-1});	 //grip index and its table name are stored in the HTML 												}); 	t.cg.removeAttr("width");	//remove the width attribute from elements in the colgroup t.find('td, th').not(th).not('table th, table td').each(function(){  $(this).removeAttr('width');	//the width attribute is removed from all table cells which are not nested in other tables and dont belong to the header});		if(!t.f){t.removeAttr('width').addClass(FLEX); //if not fixed, let the table grow as needed}syncGrips(t); 				//the grips are positioned according to the current table layout			//there is a small problem, some cells in the table could contain dimension values interfering with the //width value set by this plugin. Those values are removed};/*** Function to allow the persistence of columns dimensions after a browser postback. It is based in* the HTML5 sessionStorage object, which can be emulated for older browsers using sessionstorage.js* @param {jQuery ref} t - table object* @param {jQuery ref} th - reference to the first row elements (only set in deserialization)*/var memento = function(t, th){ var w,m=0,i=0,aux =[],tw;if(th){										//in deserialization mode (after a postback)t.cg.removeAttr("width");if(t.opt.flush){ S[t.id] =""; return;} 	//if flush is activated, stored data is removedw = S[t.id].split(";");					//column widths is obtainedtw = w[t.ln+1];if(!t.f && tw){							//if not fixed and table width data available its size is restoredt.width(tw*=1);if(t.opt.overflow) {				//if overfolw flag is set, restore table width also as table min-widtht.css('min-width', tw + PX);t.w = tw;}}for(;i<t.ln;i++){						//for each columnaux.push(100*w[i]/w[t.ln]+"%"); 	//width is stored in an array since it will be required again a couple of lines aheadth.eq(i).css("width", aux[i] ); 	//each column width in % is restored}			for(i=0;i<t.ln;i++)t.cg.eq(i).css("width", aux[i]);	//this code is required in order to create an inline CSS rule with higher precedence than an existing CSS class in the "col" elements}else{							//in serialization mode (after resizing a column)S[t.id] ="";				//clean up previous datafor(;i < t.c.length; i++){	//iterate through columnsw = t.c[i].width();		//width is obtainedS[t.id] += w+";";		//width is appended to the sessionStorage object using ID as keym+=w;					//carriage is updated to obtain the full size used by columns}S[t.id]+=m;							//the last item of the serialized string is the table's active area (width), //to be able to obtain % width value of each columns while deserializingif(!t.f) S[t.id] += ";"+t.width(); 	//if not fixed, table width is stored}	};/*** Function that places each grip in the correct position according to the current table layout	 * @param {jQuery ref} t - table object*/var syncGrips = function (t){	t.gc.width(t.w);			//the grip's container width is updated				for(var i=0; i<t.ln; i++){	//for each columnvar c = t.c[i]; 			t.g[i].css({			//height and position of the grip is updated according to the table layoutleft: c.offset().left - t.offset().left + c.outerWidth(false) + t.cs / 2 + PX,height: t.opt.headerOnly? t.c[0].outerHeight(false) : t.outerHeight(false)				});			} 	};/*** This function updates column's width according to the horizontal position increment of the grip being* dragged. The function can be called while dragging if liveDragging is enabled and also from the onGripDragOver* event handler to synchronize grip's position with their related columns.* @param {jQuery ref} t - table object* @param {number} i - index of the grip being dragged* @param {bool} isOver - to identify when the function is being called from the onGripDragOver event	*/var syncCols = function(t,i,isOver){var inc = drag.x-drag.l, c = t.c[i], c2 = t.c[i+1]; 			var w = c.w + inc;	var w2= c2.w- inc;	//their new width is obtained					c.width( w + PX);			t.cg.eq(i).width( w + PX); if(t.f){ //if fixed modec2.width(w2 + PX);t.cg.eq(i+1).width( w2 + PX);}else if(t.opt.overflow) {				//if overflow is set, incriment min-width to force overflowt.css('min-width', t.w + inc);}if(isOver){c.w=w; c2.w= t.f ? w2 : c2.w;}};/*** This function updates all columns width according to its real width. It must be taken into account that the * sum of all columns can exceed the table width in some cases (if fixed is set to false and table has some kind * of max-width).* @param {jQuery ref} t - table object	*/var applyBounds = function(t){var w = $.map(t.c, function(c){			//obtain real widthsreturn c.width();});t.width(t.w = t.width()).removeClass(FLEX);	//prevent table width changes$.each(t.c, function(i,c){c.width(w[i]).w = w[i];				//set column widths applying bounds (table's max-width)});t.addClass(FLEX);						//allow table width changes};/*** Event handler used while dragging a grip. It checks if the next grip's position is valid and updates it. * @param {event} e - mousemove event binded to the window object*/var onGripDrag = function(e){	if(!drag) return; var t = drag.t;		//table object reference var oe = e.originalEvent.touches;var ox = oe ? oe[0].pageX : e.pageX;    //original position (touch or mouse)var x =  ox - drag.ox + drag.l;	        //next position according to horizontal mouse position incrementvar mw = t.opt.minWidth, i = drag.i ;	//cell's min widthvar l = t.cs*1.5 + mw + t.b;var last = i == t.ln-1;                 			//check if it is the last column's grip (usually hidden)var min = i? t.g[i-1].position().left+t.cs+mw: l;	//min position according to the contiguous cellsvar max = t.f ? 	//fixed mode?i == t.ln-1? t.w-l: t.g[i+1].position().left-t.cs-mw:Infinity; 								//max position according to the contiguous cells x = M.max(min, M.min(max, x));				//apply bounding		drag.x = x;	 drag.css("left",  x + PX); 	//apply position increment	if(last){									//if it is the last gripvar c = t.c[drag.i];					//width of the last column is obtaineddrag.w = c.w + x- drag.l;         }              if(t.opt.liveDrag){ 			//if liveDrag is enabledif(last){c.width(drag.w);if(!t.f && t.opt.overflow){			//if overflow is set, incriment min-width to force overflowt.css('min-width', t.w + x - drag.l);}else {t.w = t.width();}}else{syncCols(t,i); 			//columns are synchronized}syncGrips(t);var cb = t.opt.onDrag;							//check if there is an onDrag callbackif (cb) { e.currentTarget = t[0]; cb(e); }		//if any, it is fired			}return false; 	//prevent text selection while dragging				};/*** Event handler fired when the dragging is over, updating table layout* @param {event} e - grip's drag over event*/var onGripDragOver = function(e){	d.unbind('touchend.'+SIGNATURE+' mouseup.'+SIGNATURE).unbind('touchmove.'+SIGNATURE+' mousemove.'+SIGNATURE);$("head :last-child").remove(); 				//remove the dragging cursor style	if(!drag) return;drag.removeClass(drag.t.opt.draggingClass);		//remove the grip's dragging css-classif (!(drag.x - drag.l == 0)) {var t = drag.t;var cb = t.opt.onResize; 	    //get some values	var i = drag.i;                 //column indexvar last = i == t.ln-1;         //check if it is the last column's grip (usually hidden)var c = t.g[i].c;               //the column being draggedif(last){c.width(drag.w);c.w = drag.w;}else{syncCols(t, i, true);	//the columns are updated}if(!t.f) applyBounds(t);	//if not fixed mode, then apply bounds to obtain real width valuessyncGrips(t);				//the grips are updatedif (cb) { e.currentTarget = t[0]; cb(e); }	//if there is a callback function, it is firedif(t.p && S) memento(t); 	//if postbackSafe is enabled and there is sessionStorage support, the new layout is serialized and stored}drag = null;   //since the grip's dragging is over									};	/*** Event handler fired when the grip's dragging is about to start. Its main goal is to set up events * and store some values used while dragging.* @param {event} e - grip's mousedown event*/var onGripMouseDown = function(e){var o = $(this).data(SIGNATURE);			//retrieve grip's datavar t = tables[o.t],  g = t.g[o.i];			//shortcuts for the table and grip objectsvar oe = e.originalEvent.touches;           //touch or mouse event?g.ox = oe? oe[0].pageX: e.pageX;            //the initial position is keptg.l = g.position().left;g.x = g.l;d.bind('touchmove.'+SIGNATURE+' mousemove.'+SIGNATURE, onGripDrag ).bind('touchend.'+SIGNATURE+' mouseup.'+SIGNATURE, onGripDragOver);	//mousemove and mouseup events are boundh.append("<style type='text/css'>*{cursor:"+ t.opt.dragCursor +"!important}</style>"); 	//change the mouse cursorg.addClass(t.opt.draggingClass); 	//add the dragging class (to allow some visual feedback)				drag = g;							//the current grip is stored as the current dragging objectif(t.c[o.i].l) for(var i=0,c; i<t.ln; i++){ c=t.c[i]; c.l = false; c.w= c.width(); } 	//if the colum is locked (after browser resize), then c.w must be updated		return false; 	//prevent text selection};/*** Event handler fired when the browser is resized. The main purpose of this function is to update* table layout according to the browser's size synchronizing related grips */var onResize = function(){for(var t in tables){if( tables.hasOwnProperty( t ) ) {t = tables[t];var i, mw=0;t.removeClass(SIGNATURE);   //firefox doesn't like layout-fixed in some casesif (t.f) {                  //in fixed modet.w = t.width();        //its new width is keptfor(i=0; i<t.ln; i++) mw+= t.c[i].w;		//cell rendering is not as trivial as it might seem, and it is slightly different for//each browser. In the beginning i had a big switch for each browser, but since the code//was extremely ugly now I use a different approach with several re-flows. This works //pretty well but it's a bit slower. For now, lets keep things simple...   for(i=0; i<t.ln; i++) t.c[i].css("width", M.round(1000*t.c[i].w/mw)/10 + "%").l=true; //c.l locks the column, telling us that its c.w is outdated									}else{     //in non fixed-sized tablesapplyBounds(t);         //apply the new bounds if(t.mode == 'flex' && t.p && S){   //if postbackSafe is enabled and there is sessionStorage support,memento(t);                     //the new layout is serialized and stored for 'flex' tables}}syncGrips(t.addClass(SIGNATURE));}} };		//bind resize event, to update grips position $(window).bind('resize.'+SIGNATURE, onResize); /*** The plugin is added to the jQuery library* @param {Object} options -  an object that holds some basic customization values */$.fn.extend({  colResizable: function(options) {           var defaults = {//attributes:resizeMode: 'fit',                    //mode can be 'fit', 'flex' or 'overflow'draggingClass: 'JCLRgripDrag',	//css-class used when a grip is being dragged (for visual feedback purposes)gripInnerHtml: '',				//if it is required to use a custom grip it can be done using some custom HTML				liveDrag: false,				//enables table-layout updating while dragging	minWidth: 15, 					//minimum width value in pixels allowed for a column headerOnly: false,				//specifies that the size of the the column resizing anchors will be bounded to the size of the first row hoverCursor: "e-resize",  		//cursor to be used on grip hoverdragCursor: "e-resize",  		//cursor to be used while draggingpostbackSafe: false, 			//when it is enabled, table layout can persist after postback or page refresh. It requires browsers with sessionStorage support (it can be emulated with sessionStorage.js). flush: false, 					//when postbakSafe is enabled, and it is required to prevent layout restoration after postback, 'flush' will remove its associated layout data marginLeft: null,				//in case the table contains any margins, colResizable needs to know the values used, e.g. "10%", "15em", "5px" ...marginRight: null, 				//in case the table contains any margins, colResizable needs to know the values used, e.g. "10%", "15em", "5px" ...disable: false,					//disables all the enhancements performed in a previously colResized table	partialRefresh: false,			//can be used in combination with postbackSafe when the table is inside of an updatePanel,disabledColumns: [],            //column indexes to be excluded//events:onDrag: null, 					//callback function to be fired during the column resizing process if liveDrag is enabledonResize: null					//callback function fired when the dragging process is over}			var options =  $.extend(defaults, options);		//since now there are 3 different ways of resizing columns, I changed the external interface to make it clear//calling it 'resizeMode' but also to remove the "fixed" attribute which was confusing for many peopleoptions.fixed = true;options.overflow = false;switch(options.resizeMode){case 'flex': options.fixed = false; break;case 'overflow': options.fixed = false; options.overflow = true; break;}return this.each(function() {				init( this, options);             });}});
})(jQuery);

bootstrap-table-resizable.js

/*** @author: Dennis Hernández* @webSite: http://djhvscf.github.io/Blog* @version: v1.0.0*/(function ($) {'use strict';var initResizable = function (that) {//Deletes the plugin to re-create itthat.$el.colResizable({disable: true});//Creates the pluginthat.$el.colResizable({liveDrag: that.options.liveDrag,fixed: that.options.fixed,headerOnly: that.options.headerOnly,minWidth: that.options.minWidth,hoverCursor: that.options.hoverCursor,dragCursor: that.options.dragCursor,onResize: that.onResize,onDrag: that.options.onResizableDrag,resizeMode: that.options.resizeMode});};$.extend($.fn.bootstrapTable.defaults, {resizable: true,liveDrag: false,fixed: true,headerOnly: false,minWidth: 15,hoverCursor: 'e-resize',dragCursor: 'e-resize',onResizableResize: function (e) {return false;},onResizableDrag: function (e) {return false;}});var BootstrapTable = $.fn.bootstrapTable.Constructor,_toggleView = BootstrapTable.prototype.toggleView,_resetView = BootstrapTable.prototype.resetView;BootstrapTable.prototype.toggleView = function () {_toggleView.apply(this, Array.prototype.slice.apply(arguments));if (this.options.resizable && this.options.cardView) {//Deletes the plugin$(this.$el).colResizable({disable: true});}};BootstrapTable.prototype.resetView = function () {var that = this;_resetView.apply(this, Array.prototype.slice.apply(arguments));if (this.options.resizable) {// because in fitHeader function, we use setTimeout(func, 100);setTimeout(function () {initResizable(that);}, 100);}};BootstrapTable.prototype.onResize = function (e) {var that = $(e.currentTarget);that.bootstrapTable('resetView');that.data('bootstrap.table').options.onResizableResize.apply(e);}
})(jQuery);

直接引入后便可以实现拖拽列变宽

原文出处https://www.cnblogs.com/legend-123/p/9478799.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/517006.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

阿里产品专家:高情商的技术人,如何做沟通?

不愿沟通是固执&#xff0c;不会沟通是傻瓜&#xff0c;不敢沟通是奴隶。 ——德拉蒙德 工作中&#xff0c;你是否经常看到别人在会上谈笑风生、纵横捭阖&#xff0c;但自己却唯唯诺诺&#xff0c;不敢表达观点&#xff1f;即便鼓起勇气发言却不被重视&#xff0c;经常被人打断…

“刚毕业1年,做Python能挣多少?”网友:吹的不多..

01现状揭秘&#xff1a;Python的火持续燃烧程序员&#xff1a;心态崩了&#xff01;2020年转眼已经大半&#xff0c;在近几个月的榜单中&#xff0c;Python已经连续走上卫冕的道路&#xff0c;并且与Java的差距拉得更远了一些。以往与Java常呈现你追我赶之势&#xff0c;而这一…

阿里云正式推出内容平台“云栖号”:全面助力企业和个人上云决策

1月7日&#xff0c;阿里云官网正式推出“云栖号”&#xff08;https://yqh.aliyun.com/ &#xff09;&#xff0c;旨在为大家提供第一手的上云资讯&#xff0c;云产品快速入门&#xff0c;来自不同行业精选的企业上云案例&#xff0c;基于众多成功案例萃取而成的最佳实践&#…

bootstrap table 搜索列formatter之后,单字节搜索异常

bootstrap table 搜索列formatter之后&#xff0c;单字节搜索异常 最近发现搜索这边出现这个问题&#xff0c;这样搜索没有效果 后面发现是因为搜索列formatter之后就会出现这个问题&#xff0c;那么我们就多生成一列不使用formatter并隐藏这列 <!DOCTYPE html> <h…

完了!TCP出了大事!

来源 | 编程技术宇宙责编 | 晋兆雨封图 | CSDN 下载自视觉中国不速之客夜黑风高&#xff0c;乌云蔽月。两位不速之客&#xff0c;身着黑衣&#xff0c;一高一矮&#xff0c;潜入Linux帝国。这一潜就是一个多月&#xff0c;直到他们收到了一条消息高个&#xff1a;“上峰终于给我…

基于Flutter+FaaS的业务框架思考与实践

闲鱼将使用Flutter和FaaS来建设未来的技术开发体系&#xff0c;这是一项长期的规划&#xff0c;新的技术在现在看来犹如雾里看花&#xff0c;需要我们不断的思考&#xff0c;探索&#xff0c;实践才能渐渐描绘出它的轮廓。本文对此提供一种思考角度&#xff0c;对未来基于FaaSF…

机器学习在高德用户反馈信息处理中的实践

1.背景 作为国内领先的出行大数据公司&#xff0c;高德地图拥有众多的用户和合作厂商&#xff0c;这为高德带来了海量的出行数据&#xff0c;同时通过各个渠道&#xff0c;这些用户也在主动地为我们提供大量的反馈信息&#xff0c;这些信息是需要我们深入挖掘并作用于产品的&a…

div中同时存在文本和数字超过两行出省略号

div中同时存在文本和数字超过两行出省略号 设置文本超过两行出省略号出现下面问题&#xff0c;未到指定宽度就换行 width: 255px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;word-wrap: break-word…

前端框架/工具汇总

文章目录一、数据框架1. vue2. react二、UI框架2.1. element2.2. element-plus2.3. Ant Design Vue2.4. Ant Design of React2.5. Bootstrap三、工具3.1. Fast Mock3.2. Easy Mock3.3. Mock语法/案例一、数据框架 1. vue https://cn.vuejs.org/ 2. react https://react.do…

没错!现在搞 Python 越来越难了!!

今天&#xff0c;想跟大家聊聊 Python 能力的提升。结合我最近这些年的Python学习、开发经验&#xff0c;发现 90% 的人在学Python时都会遇到下面这些问题&#xff1a;1.想学Python&#xff0c;但应用方向太多了&#xff0c;没编程经验根本不知道该怎么学...2.基础入门看似简单…

端计算Walle:2235亿次运算,为了无法计算的端智能价值

本文知识点提炼&#xff1a; 1、端计算在移动设备上的应用探索 2、技术方案与核心模块设计 3、总结与展望 背景 传统的云计算&#xff0c;使用的是端侧采集数据&#xff0c;云端处理消费&#xff0c;再反馈给端侧的模式。而伴随着数字化转型的浪潮、万物互联时代的到来&…

Serverless 解惑——函数计算如何访问 MySQL 数据库

函数计算&#xff08;Function Compute&#xff09;&#xff1a;函数计算 是事件驱动的全托管计算服务。使用函数计算&#xff0c;您无需采购与管理服务器等基础设施&#xff0c;只需编写并上传代码。函数计算为您准备好计算资源&#xff0c;弹性地可靠地运行任务&#xff0c;并…

ant-design-vue 环境搭建及入门

1.首先需搭建vue环境 2.安装环境&#xff08;根据官网&#xff09; npm install -g vue/cli &#xff08;建议国内不使用npm安装&#xff0c;使用cnpm这样会快点&#xff09;cnpm install -g vue/cli 3.新建一个项目 切换到需要创建项目文件夹下&#xff0c;运行创建项目命令…

小程序 json 解析

它传来的值是这样的 {"resultcode":"200","reason":"SUCCESSED!","result":[{"1":{"variety":"Au100g","latestpri":"268.50","openpri":"269.02"…

摊牌了:我就靠这几点,搞定了算法面试官

很多时候&#xff0c;你即使提前复习了这些最常见的面试算法题&#xff0c;你依旧无法通过算法面试&#xff01;为什么&#xff1f;1. 你在提前准备复习的时候&#xff0c;在网上找了半天相应题目的分析文章&#xff0c;但你看了就是不懂。2. 你在面试的时候&#xff0c;卡壳了…

从零开始入门 K8s | 调度器的调度流程和算法介绍

导读&#xff1a;Kubernetes 作为当下最流行的容器自动化运维平台&#xff0c;以声明式实现了灵活的容器编排&#xff0c;本文以 v1.16 版本为基础详细介绍了 K8s 的基本调度框架、流程&#xff0c;以及主要的过滤器、Score 算法实现等&#xff0c;并介绍了两种方式用于实现自定…

vue-resource安装

进入项目cd到项目所在目录 运行命令 我们一般用第二种方式运行 1&#xff09;.npm install vue-resource 2&#xff09;.这种方式会将数据写入package.json这样将项目发送给其他用户时项目会有问题 cnpm install vue-resource --save 3.main.js导入vue-resource

2019年全球最受欢迎数据库新鲜出炉,你猜中了吗?

全球知名的数据库流行度排行榜网站DB-Engines 宣布&#xff0c;在过去的一年里&#xff0c;MySQL在 DB-Engines排名中比其他350个受监测数据库管理系统的任何一个更受欢迎。 因此&#xff0c;MySQL为2019年的年度DBMS。 DB-Engines 2019&#xff1a; MySQL 获得“年度数据库”称…

IT 实力较量:决战超级数据中心之巅

作者 | 马超责编 | 伍杏玲出品 | CSDN&#xff08;ID:CSDNnews&#xff09;今年的新冠疫情让不少人认识到云计算的战略意义&#xff1a;今年5月&#xff0c;IBM 新 CEO 克里希纳在上任伊始就表示&#xff0c;IBM将专注于AI和混合云&#xff0c;将它们视为未来的关键技术。谷歌云…

自建Hive数据仓库跨版本迁移到阿里云E-MapReduce

最佳实践概述 应用场景 客户在IDC或者公有云环境自建Hadoop集群&#xff0c;数据集中保存在HDFS文件系统&#xff0c;同时借助Hive进行常见的ETL任务。客户在决策上云之后&#xff0c;会将自建Hadoop集群的数据迁移到阿里云自建Hadoop或者EMR。 技术架构 本实践方案基于如下…