Kendo UI 使用札记

2024-03-06 20:50
文章标签 使用 ui kendo 札记

本文主要是介绍Kendo UI 使用札记,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

http://www.cnblogs.com/juhualang/p/3760992.html

前言:本文章只会写 Kendo UI 组件的基础调用方法

AutoComplete

复制代码
    // html<input class="chooseCountry" type="text"/>// js $(document).ready(function () {var data = ["中国","中国台湾","中国断臂山","日本","台湾"];//create AutoComplete UI component$(".chooseCountry").kendoAutoComplete({dataSource: data,filter: "startswith",placeholder: "选择你的国家,蠢货!",separator: ", "});});
复制代码

Button

复制代码
    // html  <p class="button-primary">primary Button</p><p class="button-passed">disabled Button</p>  // js$(".button-primary").kendoButton({enable : true,icon : "wolf" // create span inner obj, and span.class = kin-icon, k-i-"this.value";
        });$(".button-passed").kendoButton({enable : false,spriteCssClass : "k-icon k-i-refresh" // create span inner obj, and span.class = this.value;});
复制代码

Calendar

复制代码
// html
<div class="calendar"><!-- kendo will create calendar elements here -->
</div>// js
$(".calendar").kendoCalendar();
复制代码

ColorPicker

 

复制代码
    // HTML<!-- color picker --><div class="color_picker_wrap" style="width:400px;"><div class="color_view" style="height:60px; padding: 10px; background: #000"><h3 style="color: #fff;">COLOR VIEW</h3></div><div class="color_choose"></div><br/><input class="color_customer_choose"/></div>// JSfunction preview(e) {$(".color_view").css("background-color", e.value);}$(".color_choose").kendoColorPalette({columns: 4,tileSize: {width: 35,height: 19},palette: ["#e1dca5", "#d0c974", "#a29a36", "#514d1b","#c6d9f0", "#8db3e2", "#548dd4", "#17365d","#e1dca5", "#d0c974", "#a29a36", "#514d1b","#c6d9f0", "#8db3e2", "#548dd4", "#17365d"],change: preview});$(".color_customer_choose").kendoColorPicker({value: "#fff",buttons: false,select: preview
     });
复制代码

ComboBox

复制代码
     // html<!-- combobox --><div class="combobox-wrap" style="background:#ddd; padding: 10px;"><h3>choose drink</h3><input id="choose_drink" type="text" placeholder="Select drink..."/><h3>size</h3><!-- kendo will create elements replace select, select will hide --><select id="size" name="" placeholder="Select size..."><option value="">迷你杯</option><option value="">小杯</option><option value="">中杯</option><option value="">大杯</option><option value="">特大杯</option></select><button id="order-submit">submit order</button></div>//   JS//   create ComboBox from input HTML element;
       // ★create ComboBox by this way... this combox haven not method "value()";
$("#choose_drink").kendoComboBox({dataTextField : "text",dataValueField : "value",dataSource : [{ text: "coffee", value : "1"},{ text: "banana juice", value : "2"},{ text: "apple juice", value : "3"},{ text: "ice juice", value : "4"}],filter : "contains",suggest : true,index : 3});// create ComboBox from select HTML element$("#size").kendoComboBox();var fabric = $("#choose_drink").data("kendoComboBox");var select = $("#size").data("kendoComboBox");$("#order-submit").click(function() {alert('Thank you! Your Choice is:\n\nDrink ID: ' + fabric.value() + ' and Size: ' + select.value());});
复制代码

 

DatePicker

复制代码
<div class="date_picker_wrap"><input id="datePicker" type="text"/>
</div>// JS
// create DateTimePicker from input HTML element
$("#dateTimePicker").kendoDatePicker();
复制代码

 

DateTimePicker

复制代码
<div class="date_time_picker_wrap"><input id="dateTimePicker" type="text"/>
</div>// JS
// create DateTimePicker from input HTML element
$("#dateTimePicker").kendoDateTimePicker();
复制代码

DropDownList

drop down List's mark must use id to create list unit, else it cant use $("#listObj").val()  Or$("#listObj").data("kendoDropDownList").value() to get current selected value data;

 

复制代码
<select name="" id="demo1"><option value="选项11">选项1</option><option value="选项22">选项2</option><option value="选项33">选项3</option><option value="选项44">选项4</option>
</select><div id="demo2"></div><div id="demo3"></div><script type="text/javascript">$("#demo1").kendoDropDownList();$("#demo2").kendoDropDownList({dataTextField: "text",dataValueField: "bishi", // #demo2.val() default return bishi(customer property);
        dataSource : [{text: "狼哥哥1", bishi: "狼哥哥1"},{text: "狼哥哥2", bishi: "狼哥哥2"},{text: "狼哥哥3", bishi: "狼哥哥3"},{text: "狼哥哥4", bishi: "狼哥哥4"}]});// following are customer drop down list;var demo2Datas =  [{text: "项目1", value: "项目11"},{text: "项目2", value: "项目22"},{text: "项目3", value: "项目33"},{text: "项目4", value: "项目44"}];$("#demo3").kendoDropDownList({dataTextField: "text",dataValueField: "value", // #demo2.val() default return value;
        dataSource : demo2Datas // remote dataArray;
    });
</script>
复制代码

 

 

 

Editor

    // HTML<div class="editor" style="height:300px;"></div>// JS$(".editor").kendoEditor();

Grid

可编辑的 Grid 在 editing.html里,并且我写了参数注释

复制代码
    // HTML<div class="grid_basic"></div>// JS$(".grid_basic").kendoGrid({dataSource: {type: "odata",transport: {// loading XML field;read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Products"},pageSize: 20},height: 550,groupable: true, // enable item drop to group;sortable: true,  // wtf is it?pageable: {refresh: true,  // create refresh buttonpageSizes: true,buttonCount: 5},columns: [{field: "ProductID", // XML Mark;title: "ID",width: 60  // default width is response;
            }, {field: "ProductName",title: "名字" // default title with field;
            }, {field: "UnitPrice",title: "单件价格"}, {field: "QuantityPerUnit"}]});
复制代码

 ListView: binding remote data

复制代码
    // HTML<!-- ListView: binding remote data --><script src="content/shared/js/products.js"></script><div class="demo-section"><div id="listView"></div><div id="pager_listview" class="k-pager-wrap"></div></div><script type="text/x-kendo-template" id="template_listview"><div class="product_listview"><img src="content/web/foods/#= ProductID #.jpg" alt="#: ProductName # image"/><h3>#:ProductName#</h3><p>#:kendo.toString(UnitPrice, "c")#</p></div></script>// JS$(function (){var dataSource = new kendo.data.DataSource({data: products, // receive a object arr;  --> content/shared/js/products.jspageSize: 21});$("#pager_listview").kendoPager({dataSource: dataSource});$("#listView").kendoListView({dataSource: dataSource,template: kendo.template($("#template_listview").html()) // set HTML template; --> script type="text/x-kendo-template"
            });});// CSS<style scoped>.demo-section {width: 860px;margin: 20px auto;border: 0;background: none;}#listView {padding: 10px 5px;margin-bottom: -1px;min-height: 510px;}.product_listview {float: left;position: relative;width: 111px;height: 170px;margin: 0 5px;padding: 0;}.product_listview img {width: 110px;height: 110px;}.product_listview h3 {margin: 0;padding: 3px 5px 0 0;max-width: 96px;overflow: hidden;line-height: 1.1em;font-size: .9em;font-weight: normal;text-transform: uppercase;color: #999;}.product_listview p {visibility: hidden;}.product_listview:hover p {visibility: visible;position: absolute;width: 110px;height: 110px;top: 0;margin: 0;padding: 0;line-height: 110px;vertical-align: middle;text-align: center;color: #fff;background-color: rgba(0,0,0,0.75);transition: background .2s linear, color .2s linear;-moz-transition: background .2s linear, color .2s linear;-webkit-transition: background .2s linear, color .2s linear;-o-transition: background .2s linear, color .2s linear;}.k-listview:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
复制代码

 Masked Text Box

复制代码
//HTML<div class="maskedtextbox_wrap"><h1>Masked text Box</h1><h3>choose Kind of Currencies</h3><br/><p><input class="initial_price" value="9,999.66"/></p><br/><h3>input </h3><input class="maskedtextbox_choose" value="en-US"/><br/><br/><p><label for="">电话号码</label><input class="phone_number" value="+ 86 18516108504"/></p></div>// JS$(".phone_number").kendoMaskedTextBox({mask: "+ 00 18500000000"});
复制代码

 Menu:大姨妈您杀了我吧,看了kendo自动生成的menu结构..我再也不想用它了!

复制代码
    //HTML<!-- Menu --><div style="height:200px;"><ul class="menu" style="width:200px;"><li>您大爷<ul style="display: none"><li>一号大爷<ul><li>大爷是基佬</li><li>大爷是人妖</li><li>大爷是人妖,所以不能叫基佬</li></ul></li><li>二号大爷</li><li>三号大爷</li></ul></li></ul></div>// JS  <script type="text/javascript">$(".menu").kendoMenu();</script>
复制代码

MultiSelect

复制代码
    // HTML<!-- MultiSelect --><div class="multiSelect" style="width:400px; font-family: 'microsoft Yahei';"><h1 style="color: pink">你丫的突然打鸡血想组织一个活动,所以:</h1><h3>选择朋友</h3><input class="chooseFriend"/><h3>选择活动</h3><!-- ★ multi select must set select.property.multiple = multiple --><select class="chooseEvent" multiple="multiple"/><option>玩小鸭</option><option>玩菊花</option><option>玩泥巴</option><option>玩水</option></select></div>// JS$(".chooseFriend").kendoMultiSelect({dataTextField: "text",dataValueField: "value",dataSource: [{ text: "豆芽菜", value: "1"},{ text: "鸡鸡猫", value: "2"},{ text: "夜影", value: "3"},{ text: "凹凸曼", value: "4"}]});$(".chooseEvent").kendoMultiSelect().data("kendoMultiSelect");
复制代码

 Notification

复制代码
     // HTML    <!-- Notification --><div class="notification_wrap"><!-- creat pupup html --><span id="popupNotification"></span><span id="staticNotification"></span><button class="static_notification k-button">static notification</button><button class="bottom_right_notification k-button">as a pupup at bottom-right</button></div>// JSvar popupNotification = $("#popupNotification").kendoNotification().data("kendoNotification");var staticNotification = $("#staticNotification").kendoNotification({appendTo: "body"  // static popup want to stay's wrap}).data("kendoNotification");$(".static_notification").click(function(){var d = new Date();popupNotification.show(kendo.toString(d, 'HH:MM:ss.') + kendo.toString(d.getMilliseconds(), "000"), "error");});$(".bottom_right_notification").click(function(){var d = new Date();staticNotification.show(kendo.toString(d, 'HH:MM:ss.') + kendo.toString(d.getMilliseconds(), "000"), "info");var container = $(staticNotification.options.appendTo);container.scrollTop(container[0].scrollHeight);});
复制代码

 

Numeric Text Box

复制代码
    <!-- Numeric Text Box --><div class="numericTextBox"><div><input class="currency" type="number" value="30" min="0" max="100"/></div><div style="margin-top: 7px;"><input class="percentage" value="0.05"/></div><div style="margin-top: 7px;"><input class="custom" value="2.00"/></div><div style="margin-top: 7px;"><!-- 此格式等同于在接下来的JS代码中的组件调用中设置参数 --><input class="numeric" type="number" value="17" min="0" max="100" step="1"/></div></div><!-- JS --><script type="text/javascript">$(".currency").kendoNumericTextBox({format: "c",decimals: 2 //小数数位
        });$(".percentage").kendoNumericTextBox({format: "p0",min: 0,max: 0.4,step: 0.01});// custom numeric text box;
        $(".custom").kendoNumericTextBox({format: "0.00 克拉",min: 0,max: 12,step: 0.01});$(".numeric").kendoNumericTextBox();</script>
复制代码

PanelBar 竖式手风琴菜单

复制代码
<!-- panelBar --><div class="panelBar_wrap"><ul class="panelBar"><li><h2>这是标题</h2><div><p>这全是内容</p><p>这全是内容</p><p>这全是内容</p></div></li><li><h2>这是标题</h2><div><p>这全是内容</p><p>这全是内容</p><p>这全是内容</p></div></li><li><h2>这是标题</h2><div><p>这全是内容</p><p>这全是内容</p><p>这全是内容</p></div></li></ul></div><!-- JS --><script type="text/javascript">$(".panelBar").kendoPanelBar({expandMode: "single"});</script>
复制代码

 Progress Bar

     <!-- progress Bar -->

复制代码
    <div class="progressBarWrap"><h2>who are u favorite one</h2><ul><li><label for="">你第一喜欢的人</label><select id="prBar1" name=""><option value="dad" selected="selected">爸爸</option><option value="mom">妈妈</option><option value="hao">豪仔鸡</option></select></li></ul><ul><li><label for="">你第二喜欢的人</label><select id="prBar2" name="" ><option value="dad">爸爸</option><option value="mom" selected="selected">妈妈</option><option value="hao">豪仔鸡</option></select></li></ul><ul><li><label for="">你第三喜欢的人</label><select id="prBar3" ><option value="dad">爸爸</option><option value="mom">妈妈</option><option value="hao" selected="selected">豪仔鸡</option></select></li></ul><ul class="progressResults"><li><h4>"爸爸"</h4><div class="dad"></div></li><li><h4>"妈妈"</h4><div class="mom"></div></li><li><h4>"豪仔鸡"</h4><div class="hao"></div></li><li><h4>其他人</h4><div class="another"></div></li></ul><button class="progressBtn">vote submit</button></div>


<!-- JS -->
<script type="text/javascript">function progressDemo(){var progressbars = [];$(".progressResults div").each(function () {var pb = $(this).kendoProgressBar({min: 0,max: 100,type: "percent",animation: {duration: 600}}).data("kendoProgressBar");progressbars.push(pb);});$(".progressBarWrap select").kendoDropDownList();$(".progressBtn").click(function () {var first = $("#prBar1").val();var second = $("#prBar2").val();var third = $("#prBar3").val();$.each(progressbars, function (i, pb) {pb.value(0); // setting progress bar default progressing; });if (first !== "" && first !== second && second !== "" &&second !== third && first !== third) {$("." + first).data("kendoProgressBar").value(100);$("." + second).data("kendoProgressBar").value(70);$("." + third).data("kendoProgressBar").value(40);$.each(progressbars, function (i, pb) {// setting not be voting's progressbar's progressing;if (pb.value() == 0){pb.value(5);}});} else {alert("please select different people to vote it");}});}progressDemo();</script>
复制代码

scheduler //我的亲姨妈啊,您是不知道这个插件有多复杂- -;

slider 

复制代码
  <!-- slider --><div class="sliderWrap"><input class="sliderVertical" value="500"/><div style="height: 40px;"></div><input class="sliderHorizontal"/></div>

<script type="text/javascript">$(".sliderVertical").kendoSlider({min: 0,max: 1000,smallStep: 100, // 每次点击按钮的 step largeStep: 200 // 刻度 }).data("kendoSlider");$(".sliderHorizontal").kendoSlider({orientation: "vertical",min: -20,max: 20,value: 10, // default point, u can also setting input.value; smallStep: 1,largeStep: 10,showButtons: false});</script>
复制代码

sortable

复制代码
    <!-- sortable --><div class="sortableWrap" style="margin-left: 400px;"><ul class="sortable-basic"><li class="sortable">狼哥哥<span>handsome</span></li><li class="sortable">豆芽菜<span>dude</span></li><li class="sortable">鸡鸡猫<span>dude</span></li><li class="sortable">凹凸曼<span>idiot</span></li><li class="sortable disabled">船长<span>disabled item</span></li><li class="sortable disabled">船长老婆大人<span>disabled item</span></li><li class="not-sortable">猪头<span>not sortable item</span></li></ul></div><style type="text/css">.sortable-basic li{ height:40px; line-height: 40px; background: lightcyan; margin-bottom: 5px;}.sortable-basic .disabled{ background: pink;}.sortable-basic .not-sortable{ background: grey;}li.hint{display: block; width: 200px;}li.hint {position: relative;display: block;width: 200px;height:40px;background-color: #52aef7;color: #fff;}li.hint:after {content: "";display: block;width: 0;height: 0;border-top: 6px solid transparent;border-bottom: 6px solid transparent;border-left: 6px solid #52aef7;position: absolute;right: -6px;top: 8px;}li.hint:last-child {border-radius: 4px;}li.hint span {color: #fff;}</style><script type="text/javascript">$(".sortable-basic").kendoSortable({hint:function(element) {return element.clone().addClass("hint");    // when draging, auto create draging element: "<li></li>"  and this statement is setting the mark's CSS;
            },placeholder:function(element) {return element.clone().addClass("placeholder").text("drop here");   // when draging, auto create placeHolder element: "<li></li>"  and this statement is setting the mark's CSS && text;
            },filter: ".sortable", // only abled filter's selector to sortable;
            disabled: ".disabled", // cant drop self;cursor: "url('content/web/sortable/grabbing.cur'), default",// coursor image;
            cursorOffset: { // basic from cursor;
                top: -10,left: -230}});</script>
复制代码

TimePicker

basic using

    <!-- time Picker --><input id="timePicker" type=""/><script type="text/javascript">$("#timePicker").kendoTimePicker();</script>

range time picker

复制代码
<!-- time Picker --><input id="timePicker_start" type="" value="8:00 AM"/><input id="timePicker_end" type="" value="8:30 AM"/><script type="text/javascript">function timePickerDemo(){
       /** 这段 start.onchange时执行的函数,狼哥哥还看不懂- - */
function startChange() {var startTime = start.value();if (startTime) {startTime = new Date(startTime);end.max(startTime);startTime.setMinutes(startTime.getMinutes() + this.options.interval);end.min(startTime);end.value(startTime);}}// init star timepicker;var start = $("#timePicker_start").kendoTimePicker({change: startChange}).data("kendoTimePicker");// init end timepickervar end = $("#timePicker_end").kendoTimePicker().data("kendoTimePicker");// define min/max range; start.min("8:00 AM");start.max("10:00 PM");// define min/max range; end.min("8:00 AM");end.max("11:30 PM");}timePickerDemo();</script>
复制代码

ToolTip

basic demo

复制代码
    <div class="tooltipWrap"><h2>ToolTip</h2><ul id="tooltip"><li title="当然是剁椒鱼头啦!">湖南的美食 - 鼠标移上来</li><li title="回锅肉!必须是它!">四川的美食 - 鼠标移上来</li><li title="上海菜很难吃!甜甜的..">上海的美食 - 鼠标移上来</li></ul></div><style type="text/css">.tooltipWrap{position: relative; width:500px;}.tooltipWrap li{position: relative; line-height: 40px; margin-bottom: 5px; background: pink;}.tooltipWrap .k-animation-container{left: 0;}</style><script type="text/javascript">$(document).ready(function() {var tooltip = $("#tooltip").kendoTooltip({filter: "li",width: 120,position: "bottom" // value: top right bottom left;
         // content: this.title; default using thisElement's property( title );
}).data("kendoTooltip");$("#tooltip").find("li").click(false);});</script>
复制代码

Tree View

basic demo

复制代码
    <!-- tree view --><div class="treeViewWrap"><div><ul id="treeview"><li data-expanded="true"><span class="k-sprite folder"></span>images<ul><li><span class="k-sprite image"></span>狼哥哥.png</li><li><span class="k-sprite image"></span>豪仔鸡.jpg</li></ul></li><li data-expanded="true"><span class="k-sprite folder"></span>resource<ul><li><span class="k-sprite folder"></span>html<ul><li><span class="k-sprite image"></span>index.html</li><li><span class="k-sprite image"></span>category.html</li></ul></li><li><span class="k-sprite folder"></span>PDF<ul><li><span class="k-sprite pdf"></span>Javascript高级程序设计.pdf</li><li><span class="k-sprite pdf"></span>前端精粹.pdf</li></ul></li></ul></li></ul></div></div><style scoped>.treeViewWrap {width: 400px;}.k-sprite {margin-right: 5px;/* icon sprite */background-image: url("content/web/treeview/coloricons-sprite.png");}.rootfolder { background-position: 0 0; }.folder { background-position: 0 -16px; }.pdf { background-position: 0 -32px; }.html { background-position: 0 -48px; }.image { background-position: 0 -64px; }</style><script type="text/javascript">// ID must setting on "UL" element;
        $("#treeview").kendoTreeView();</script>
复制代码

window

复制代码
    <!-- window --><div class="windowWrap"><div id="window">这是个窗口</div></div><script type="text/javascript">function windowDemo(){var onClose = function () {alert("我要关闭了");}$(".windowWrap").kendoWindow({width: "600px",title: "狼哥哥的故事",actions: ["Pin","Minimize","maximize","Close"],close: onClose})}windowDemo();</script>
复制代码

data Source

复制代码
    <!--  data source --><div class="dataSource"><table class="peoples"><thead><tr><th>Rank</th><th>Name</th><th>Age</th></tr></thead><tbody><tr><td colspan="4"></td></tr></tbody></table></div>

  <!-- data create template --><script id="templateDataSource" type="text/x-kendo-template"><tr><td>#= rank #</td><td>#= name #</td><td>#= age #</td></tr></script>

<script type="text/javascript">function dataSourceDemo() {var template = kendo.template($("#templateDataSource").html());var peoples = [{ "rank": 1, "name": "狼哥哥", age: "18"},{ "rank": 2, "name": "豆芽菜", age: "21"},{ "rank": 3, "name": "王晓花", age: "23"},{ "rank": 4, "name": "夜影", age: "25"},{ "rank": 5, "name": "鸡鸡猫", age: "19"}];var dataSource = new kendo.data.DataSource({data: peoples,change: function () { // subscribe to the CHANGE event of the data source; $(".peoples tbody").html(kendo.render(template, this.view())); // populate the table; console.log(this.view());}});// read data from "peoples" array dataSource.read();}dataSourceDemo();</script>
复制代码

template    custom template to show data;

复制代码
<!-- template --><div class="templateWrap" style="height: 300px;"><input id="product_dropDown" type=""/><div id="product-preview"></div></div><script id="product_templateDemo" type="text/x-kendo-template"><h4>ProductName: #: ProductName #</h4><img src="content/web/foods/#= ProductID #.jpg" alt=""/></script><script>function templateDemo() {var template = kendo.template($("#product_templateDemo").html());function preview() {var dropdown = $("#product_dropDown").data("kendoDropDownList");var product = dropdown.dataSource.get(dropdown.value()); // get current dropDown's Element.dataSource [return Object]// dropdown.value() == current dropDown Element's ID;  -->  dataValueField: "ProductID";var productPreviewHtml = template(product);$("#product-preview").html(productPreviewHtml);  // populate the view box;
            }$("#product_dropDown").kendoDropDownList({dataTextField: "ProductName",dataValueField: "ProductID",dataSource: {transport: {read: {url: "http://demos.telerik.com/kendo-ui/service/products",dataType: "jsonp"}},schema: {model: {id: "ProductID"}}},dataBound: preview,change: preview});}templateDemo();</script>
复制代码

MVVM

Effect

placeholder!!!!!!!!!!


这篇关于Kendo UI 使用札记的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/781310

相关文章

使用DeepSeek API 结合VSCode提升开发效率

《使用DeepSeekAPI结合VSCode提升开发效率》:本文主要介绍DeepSeekAPI与VisualStudioCode(VSCode)结合使用,以提升软件开发效率,具有一定的参考价值... 目录引言准备工作安装必要的 VSCode 扩展配置 DeepSeek API1. 创建 API 请求文件2.

使用TomCat,service输出台出现乱码的解决

《使用TomCat,service输出台出现乱码的解决》本文介绍了解决Tomcat服务输出台中文乱码问题的两种方法,第一种方法是修改`logging.properties`文件中的`prefix`和`... 目录使用TomCat,service输出台出现乱码问题1解决方案问题2解决方案总结使用TomCat,

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

Java中使用Java Mail实现邮件服务功能示例

《Java中使用JavaMail实现邮件服务功能示例》:本文主要介绍Java中使用JavaMail实现邮件服务功能的相关资料,文章还提供了一个发送邮件的示例代码,包括创建参数类、邮件类和执行结... 目录前言一、历史背景二编程、pom依赖三、API说明(一)Session (会话)(二)Message编程客

C++中使用vector存储并遍历数据的基本步骤

《C++中使用vector存储并遍历数据的基本步骤》C++标准模板库(STL)提供了多种容器类型,包括顺序容器、关联容器、无序关联容器和容器适配器,每种容器都有其特定的用途和特性,:本文主要介绍C... 目录(1)容器及简要描述‌php顺序容器‌‌关联容器‌‌无序关联容器‌(基于哈希表):‌容器适配器‌:(

使用Python实现高效的端口扫描器

《使用Python实现高效的端口扫描器》在网络安全领域,端口扫描是一项基本而重要的技能,通过端口扫描,可以发现目标主机上开放的服务和端口,这对于安全评估、渗透测试等有着不可忽视的作用,本文将介绍如何使... 目录1. 端口扫描的基本原理2. 使用python实现端口扫描2.1 安装必要的库2.2 编写端口扫

使用Python实现操作mongodb详解

《使用Python实现操作mongodb详解》这篇文章主要为大家详细介绍了使用Python实现操作mongodb的相关知识,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录一、示例二、常用指令三、遇到的问题一、示例from pymongo import MongoClientf

SQL Server使用SELECT INTO实现表备份的代码示例

《SQLServer使用SELECTINTO实现表备份的代码示例》在数据库管理过程中,有时我们需要对表进行备份,以防数据丢失或修改错误,在SQLServer中,可以使用SELECTINT... 在数据库管理过程中,有时我们需要对表进行备份,以防数据丢失或修改错误。在 SQL Server 中,可以使用 SE

使用Python合并 Excel单元格指定行列或单元格范围

《使用Python合并Excel单元格指定行列或单元格范围》合并Excel单元格是Excel数据处理和表格设计中的一项常用操作,本文将介绍如何通过Python合并Excel中的指定行列或单... 目录python Excel库安装Python合并Excel 中的指定行Python合并Excel 中的指定列P

浅析Rust多线程中如何安全的使用变量

《浅析Rust多线程中如何安全的使用变量》这篇文章主要为大家详细介绍了Rust如何在线程的闭包中安全的使用变量,包括共享变量和修改变量,文中的示例代码讲解详细,有需要的小伙伴可以参考下... 目录1. 向线程传递变量2. 多线程共享变量引用3. 多线程中修改变量4. 总结在Rust语言中,一个既引人入胜又可