extJs项目实战

extjs是因为在公司用到一次,也是公司唯一一个extjs的项目,当时拿到这个需求的时候,我有点懵逼,这他妈的什么鬼,参加工作两年不到的纯小白,没办法,这是工作,必须要完成的.硬着头皮做吧,好在最后弄完了,整理一下文档,方便以后学习.

/***服务说明模板store*/Ext.define('ProductApp.goodsDescription', {// extend:'Ext.app.Application',extend : 'common.AppEx',name : 'goodsDescription',// 为应用程序起一个名字,相当于命名空间controllers : [// 声明所用到的控制层'GoodsDescriptionCtrl'],paths:{goodsReference:'product/app'},appFolder : 'product/app',// 加载对象类的跟路径
    launch : function() {// 开始var mainView = Ext.create('Ext.container.Container', {layout : 'fit',items : [{xtype : 'goodsDescriptionMainView'}]});this.addToContainer(mainView);}
});
/***服务说明模板store*/Ext.define('ProductApp.goodsDescription', {// extend:'Ext.app.Application',extend : 'common.AppEx',name : 'goodsDescription',// 为应用程序起一个名字,相当于命名空间controllers : [// 声明所用到的控制层'GoodsDescriptionCtrl'],paths:{goodsReference:'product/app'},appFolder : 'product/app',// 加载对象类的跟路径
    launch : function() {// 开始var mainView = Ext.create('Ext.container.Container', {layout : 'fit',items : [{xtype : 'goodsDescriptionMainView'}]});this.addToContainer(mainView);}
});
/***服务说明模板store*/Ext.define('ProductApp.goodsDescription', {// extend:'Ext.app.Application',extend : 'common.AppEx',name : 'goodsDescription',// 为应用程序起一个名字,相当于命名空间controllers : [// 声明所用到的控制层'GoodsDescriptionCtrl'],paths:{goodsReference:'product/app'},appFolder : 'product/app',// 加载对象类的跟路径
    launch : function() {// 开始var mainView = Ext.create('Ext.container.Container', {layout : 'fit',items : [{xtype : 'goodsDescriptionMainView'}]});this.addToContainer(mainView);}
});
Ext.define('goodsDescription.model.GoodsDescriptionModel', {extend: 'Ext.data.Model',fields: [//服务说明及描述的ModelClunm{name:'serviceDescriptionId',mapping:'serviceDescriptionId'},{name:'labelName',mapping:'labelName'},{name:'labelIcon',mapping:'labelIcon'},{name:'labelDescription',mapping:'labelDescription'},{name:'sortNum',mapping:'sortNum'},{name:'productId',mapping:'productId'},{name:'isDefault',mapping:'isDefault'},{name:'fileName',mapping:'fileName' }]
});

/**
* 服务说明属性页面总的页面
*/
Ext.define('goodsDescription.view.goodsdescription.GoodsDescriptionMainView',{
extend:'Ext.panel.Panel',
alias : 'widget.goodsDescriptionMainView',
// title : '代码维护列表',
layout: {
type:'vbox',
align:'stretch'
},
frame:false,
defaults: {
split: true
},

items:[
{
tbar : [
{
xtype : 'button',
text : '添加服务说明',
action : 'addColumns',
icon : 'resources/images/add.jpg'
},'-', {
xtype : 'button',
text : '批量删除',
action : 'deleteGoodsDescription',
icon : 'resources/images/delete.jpg'
},'-',{
xtype : 'button',
text : '保存',
action : 'saveGoodsDescription',
icon : 'resources/images/filesave.png'
}
],
xtype:'goodsDescriptionGrid',
flex:1
}
],


});

/*** 服务说明属性页面总的页面*/
Ext.define('goodsDescription.view.goodsdescription.GoodsDescriptionMainView',{extend:'Ext.panel.Panel',alias : 'widget.goodsDescriptionMainView',
//    title : '代码维护列表',
    layout: {type:'vbox',align:'stretch'},frame:false,defaults: {split: true},items:[{tbar : [{xtype : 'button',text : '添加服务说明',action : 'addColumns',icon : 'resources/images/add.jpg'},'-', {xtype : 'button',text : '批量删除',action : 'deleteGoodsDescription',icon : 'resources/images/delete.jpg'},'-',{xtype : 'button',text : '保存',action : 'saveGoodsDescription',icon : 'resources/images/filesave.png'}],xtype:'goodsDescriptionGrid',flex:1}],});
/*** 上传服务说明图片窗口*/
Ext.define('goodsDescription.view.goodsdescription.GoodsDescImgAddWin', {extend: 'Ext.window.Window',alias: 'widget.goodsDescImgAddWin',height: 150,width: 400,title: '上传图片',closeAction: 'hide',modal:true,layout: 'fit',initComponent: function() {Ext.apply(this, {buttons: [{text: '上传',action: 'preview'}, {text: '退出',scope: this,handler: this.close}],items: [{xtype:'form',itemId:'goodsDescImgForm',layout: {type: 'hbox',padding:'5',align:'middle'},items:[{xtype: 'filefield',itemId: 'goodsDescImg',emptyText: 'Select an image',   name: 'photo',width:250, buttonText: '浏览...',margin: '0 5 0 0',regex :/\.(?:jpg|png|bmp|gif|jpeg)\b/i},{xtype: 'hiddenfield',itemId: 'rowNo',name: 'rowNo',}]}]});this.callParent(arguments);}
});
/*** 商品属性列表*/
Ext.require(['Ext.selection.CellModel'
]);var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1});var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {clicksToMoveEditor: 1,autoCancel: false});var gridForm = new Ext.FormPanel({    id: 'goodsDescInfo',    applyTo:Ext.getBody(),    frame: false,hidden:true,autoHeight:true,    labelAlign: 'left',  bodyStyle:'padding:0px',    width: 0,    items:[{    xtype: 'fieldset',    labelWidth: 150,    title:'加载grid信息内容',    defaultType: 'textfield',    autoHeight: true,    items:[{    fieldLabel: 'photo',    name :'goodsDescImg',    }]    }]    });    Ext.define('goodsDescription.view.goodsdescription.GoodsDescriptionGrid' ,{extend: 'Ext.grid.Panel',alias : 'widget.goodsDescriptionGrid',store: 'GoodsDescriptionStore',
//        xtype : 'grid',
//        id : 'grid_jglb',
//        frame : true,
//        region : 'center',
//        columnLines : true,
//        loadMask : true,
//        viewConfig : {
//            forceFit : true,
//            scrollOffset : 0
//        },
//        anchor : '100%',
    columns: [    {xtype:'actioncolumn',header:'操作',width:50,id:'goodsDescGridDelAction',items: [{icon: 'resources/images/delete.jpg',tooltip: '删除',}],handler: function(grid, rowIndex, colIndex, item) {var rec = grid.getStore().getAt(rowIndex);this.fireEvent('delClick', {serviceDescriptionId: rec.get('serviceDescriptionId')});}},{header: '排序',dataIndex:'sortNum',width:80,align:'center',sortable : true,editable : false,field: {xtype: 'numberfield',allowBlank: false,minValue: 1,maxValue: 100000}},    {header: '标签名称',dataIndex:'labelName',width:150,align:'center',sortable : true,editable : false,field: {xtype: 'textfield',maxLength:30,allowBlank: false,maxLengthText :"最多可输入30个字符"}},{header: '标签描述',dataIndex: 'labelDescription',width:150,align:'center',sortable : true,editable : false,field: {xtype: 'textfield',allowBlank: false,maxLength:250,maxLengthText :"最多可输入250个字符"}},{header:'图片',dataIndex: 'labelIcon',width:100,editable : false,align:'center',sortable : true,renderer:function(value,cellmeta,record,rowIndex,columnIndex,stroe){
//                        var returnStr = "<img id='img"+rowIndex+"' src='"+value+"'>";//                        var returnStr = "<img id='img" + rowIndex + "' class='imgIconProduct' src='"+ value + "'>";
//                        return returnStr;if (value == null || value == ''){return"<img id='img" + rowIndex + "' class='imgIconProduct' src=' '>";}else{return"<img id='img" + rowIndex + "' class='imgIconProduct' src='"+ value + "'>";}}},{xtype:'actioncolumn',header:'上传',width:50,id:'goodsDescGridUploadAction',items: [{icon: 'resources/images/shangchuan.png',tooltip: '上传',}],handler: function(grid, rowIndex, colIndex, item) {this.fireEvent('uploadClick', {rowIndex : rowIndex});}}],selType: 'cellmodel',plugins: [Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1,listeners: {edit: function(){// refresh summaries//this.getSysCodeGrid().refresh();
            }}})],viewConfig : {forceFit : false,enableRowBody : true,getRowClass :function(record, rowIndex, p, ds) {var cls = 'blue-row';switch (rowIndex) {case 1: // 把第2行设置为红色cls = 'background: red'break;}return cls;}} ,initComponent:function(){Ext.apply(this,{selModel :Ext.create('Ext.selection.CheckboxModel',{mode:'MULTI'}),dockedItems:[{ dock: 'bottom', xtype: 'pagingtoolbar', store: 'GoodsDescriptionStore', pageSize: 15, displayInfo: true, displayMsg: '显示 {0} - {1} 条,共计 {2} 条', emptyMsg: '没有数据' }]});this.callParent(arguments);}
});/*** 根据显示方式ID获取显示方式描述* @return {String}*/
function showViewWayByID(viewWayID){return 'ccc' ;
}//Ext.getCmp("grid_jglb").getStore().on('load',setTdCls);//设置表格加载数据完毕后,更改表格TD样式为垂直居中
//function setTdCls(){
//            var gridJglb=document.getElementById("grid_jglb");
//            var tables = gridJglb.getElementsByTagName("table");//找到每个表格
//            for(var k = 0; k < tables.length; k++){
//                var tableV=tables[k];
//                if(tableV.className=="x-grid3-row-table"){
//                    var trs=tables[k].getElementsByTagName("tr");//找到每个tr
//                    for(var i = 0;i < trs.length;i++){
//                        var tds=trs[i].getElementsByTagName("td");//找到每个TD
//                        for(var j = 1;j<tds.length;j++){   
//                            tds[j].style.cssText="width:202px;text-align:center;line-height:130px;vertical-align:center;";
//                        }
//                    }
//                };
//            }
//        }
package com.founder.product.action;import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;import com.founder.common.BaseAction;
import com.founder.common.QueryResult;
import com.founder.kindeditor.action.KindEditor;
import com.founder.product.model.GoodsDescription;
import com.founder.product.model.ProductList;
import com.founder.product.service.GoodsDescriptionService;
import com.founder.sys.model.EcParams;
import com.founder.sys.model.SysCode;
import com.founder.sys.service.CodeService;
import com.founder.sys.service.SystemService;
import com.founder.util.DateUtil;
import com.founder.util.Upload;
import com.founder.util.UploadGoodsDescription;public class GoodsDescriptionAction extends BaseAction{private static final long serialVersionUID = 1L;private GoodsDescriptionService goodsDescriptionService;private CodeService codeService;private File photo;private String photoFileName;private String photoContentType;String dateStr = new SimpleDateFormat("yyyyMMdd").format(new Date());String uploaded = "upload/gs/"+dateStr;String detailUploaded = "upload/detail";private SystemService systemService;public CodeService getCodeService() {return codeService;}public void setCodeService(CodeService codeService) {this.codeService = codeService;}public File getPhoto() {return photo;}public void setPhoto(File photo) {this.photo = photo;}public String getPhotoFileName() {return photoFileName;}public void setPhotoFileName(String photoFileName) {this.photoFileName = photoFileName;}public String getPhotoContentType() {return photoContentType;}public void setPhotoContentType(String photoContentType) {this.photoContentType = photoContentType;}public String getDateStr() {return dateStr;}public void setDateStr(String dateStr) {this.dateStr = dateStr;}public String getUploaded() {return uploaded;}public void setUploaded(String uploaded) {this.uploaded = uploaded;}public String getDetailUploaded() {return detailUploaded;}public void setDetailUploaded(String detailUploaded) {this.detailUploaded = detailUploaded;}public SystemService getSystemService() {return systemService;}public void setSystemService(SystemService systemService) {this.systemService = systemService;}@Overridepublic void getAll() {List<GoodsDescription> goodsDescription=goodsDescriptionService.getAll();List list=goodsDescriptionService.getProList(goodsDescription);this.doJSONResponse(list);}/*** 引入相关的Service*/public GoodsDescriptionService getGoodsDescriptionService() {return goodsDescriptionService;}public void setGoodsDescriptionService(GoodsDescriptionService goodsDescriptionService) {this.goodsDescriptionService = goodsDescriptionService;}/*** 查询服务说明模板*/public void queryAllGoodsDesription() {try {String curr_page = getRequest().getParameter("page") ;Map<String, Object> queryParam = new HashMap<String, Object>();queryParam.put(QueryResult.CURR_PAGE, curr_page);queryParam.put(QueryResult.PAGE_SIZE, page_size);queryParam.put(QueryResult.SORT_FIELD,sort_field == null ? "SORT_NUM" : sort_field);queryParam.put(QueryResult.SORT_BY, "asc");queryResult = (QueryResult) goodsDescriptionService.queryForPage(new QueryResult(queryParam));entites = queryResult.getList();int total = Integer.parseInt(queryResult.getProperties().get("total_row").toString());this.doJSONPageResponse(entites,total) ;}  catch (Exception e) {e.printStackTrace();}}/*** 添加 模板服务说明*/public void saveGoodsDesription()throws Exception{Integer currentUserId = (Integer)getRequest().getSession().getAttribute("userId");String currentTime = DateUtil.getCurrentDateString();GoodsDescription gd=new GoodsDescription();if("".equals(this.getRequest().getParameter("serviceDescriptionId"))){gd.setLabelName(this.getRequest().getParameter("labelName"));gd.setLabelDescription(this.getRequest().getParameter("labelDescription"));if(this.getRequest().getParameter("sortNum").length()!=0){gd.setSortNum(Integer.parseInt(this.getRequest().getParameter("sortNum")));}else{gd.setSortNum(null);}gd.setLabelIcon(this.getRequest().getParameter("labelIcon"));gd.setIsDefault("Y");gd.setIsDelete("N");gd.setAddUserId(currentUserId);gd.setAddTime(currentTime);int result= goodsDescriptionService.insert(gd);this.printResult(result);}else{gd.setLabelName(this.getRequest().getParameter("labelName"));gd.setLabelDescription(this.getRequest().getParameter("labelDescription"));gd.setSortNum(Integer.parseInt(this.getRequest().getParameter("sortNum")));gd.setLabelIcon(this.getRequest().getParameter("labelIcon"));gd.setIsDefault("Y");gd.setIsDelete("N");gd.setAddUserId(currentUserId);gd.setAddTime(currentTime);int result= goodsDescriptionService.updateGoodsDescription(gd);this.printResult(result);}}/*** 删除模板服务说明*/public void deleteGoodsDesription() throws Exception{String  [] serviceDescriptionId = this.getRequest().getParameterValues("serviceDescriptionId") ;for(int i=0;i<serviceDescriptionId.length;i++){if(serviceDescriptionId[i].length()!=0){int result = goodsDescriptionService.delete(serviceDescriptionId[i]) ;this.printResult(result) ;}}}/*** 图片临时保存和预览*/public void preview() throws Exception {UploadGoodsDescription upload = new UploadGoodsDescription(photo, photoFileName, photoContentType);HttpServletRequest request =this.getRequest();EcParams ec = systemService.getDatailParams();String realUpload ="";String s =KindEditor.getDescUpConfig("max_upload_limit");long maxSize = Long.parseLong(s);MultiPartRequestWrapper wrapper = (MultiPartRequestWrapper) request; Collection errList = wrapper.getErrors();this.getResponse().setContentType("text/html; charset=utf-8");if((long)upload.getPhoto().length() > maxSize){this.getResponse().getWriter().print("{success:\"false\",msg:\"上传失败,图片大小超过限制!\"}");} else {String fileName = upload.myUpLoad(this.getResponse(),this.getRequest(), uploaded,true,ec);if (!"".equals(fileName) && fileName != null) {this.getResponse().getWriter().print("{success:\"true\",msg:\"/" + fileName + "\"}");} else {this.getResponse().getWriter().print("{success:\"false\",msg:\"上传图片不符合规则,请上传长度和宽度仅等于 45*45 PX的图片!\"}");}}}}
package com.founder.product.service.impl;import java.util.List;import com.founder.common.BaseServiceImpl;
import com.founder.common.QueryResult;
import com.founder.product.dao.GoodsDescriptionDao;
import com.founder.product.model.GoodsDescription;
import com.founder.product.service.GoodsDescriptionService;
import com.founder.sys.model.SysCode;public class GoodsDescriptionServiceImpl extends BaseServiceImpl implements GoodsDescriptionService{GoodsDescriptionDao goodsDescriptionDao; public GoodsDescriptionDao getGoodsDescriptionDao() {return goodsDescriptionDao;}public void setGoodsDescriptionDao(GoodsDescriptionDao goodsDescriptionDao) {this.goodsDescriptionDao = goodsDescriptionDao;}@Overridepublic List getProList(List<GoodsDescription> goodsDescription) {    try {return goodsDescriptionDao.getAll();} catch (Exception e) {// TODO Auto-generated catch block
            e.printStackTrace();}return null;}/*** 查询服务说明并进行分页*/public QueryResult queryForPage(QueryResult queryResult) {try {queryResult.calculate(goodsDescriptionDao.queryTotalNum(queryResult.getParam()));queryResult.setList(goodsDescriptionDao.queryForPage(queryResult.getParam()));} catch (Exception e) {// TODO Auto-generated catch block
            e.printStackTrace();}return queryResult;}public int insert( GoodsDescription gd){return goodsDescriptionDao.insert(gd);}@Overridepublic int updateGoodsDescription(GoodsDescription gd)  throws Exception{try{return goodsDescriptionDao.updateGoodsDescription(gd);}catch (Exception e){e.printStackTrace();throw e;}}/*** 删除服务说明模板*/@Overridepublic int delete(String[] serviceDescriptionId)  throws Exception {try {goodsDescriptionDao.delete(serviceDescriptionId) ;return 1 ;} catch (Exception e) {e.printStackTrace();throw e;}}/*** 删除服务说明模板*/@Overridepublic int delete(String serviceDescriptionId) throws Exception{// TODO Auto-generated method stubtry {goodsDescriptionDao.delete(serviceDescriptionId) ;return 1 ;} catch (Exception e) {e.printStackTrace();throw e;}}}
package com.founder.product.dao;import java.util.List;
import java.util.Map;import com.founder.common.BaseDao;
import com.founder.product.model.GoodsDescription;public interface GoodsDescriptionDao extends BaseDao,java.io.Serializable {@SuppressWarnings("unchecked")public Integer queryTotalNum(Map map) throws Exception;@SuppressWarnings("unchecked")public List<GoodsDescription> queryForPage(Map map) throws Exception;public int insert(GoodsDescription gd);public int updateGoodsDescription(GoodsDescription gd);public void delete(String[] serviceDescriptionId);public void delete(String serviceDescriptionId) throws Exception;}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="goods_description"><!--服务说明模板  -->
<resultMap class="goodsDescription" id="productServiceDescriptionMap"><result column="service_description_id" property="serviceDescriptionId"/><result column="label_name"  property="labelName"/><result column="label_icon"  property="labelIcon"/><result column="label_description"  property="labelDescription"/><result column="sort_num"  property="sortNum"/><result column="product_id"  property="productId"/><result column="is_default"  property="isDefault"/>
</resultMap><!-- 分页查询服务说明模板sql --><select id="query_for_page" parameterClass="map" resultMap="productServiceDescriptionMap">select * from (select rownum row_id, a.* from (select rownum r,psd.*from product_service_description  psdwhere 1 = 1and psd.is_delete='N'and psd.is_default='Y'<isNotNull property="sort_field">order by $order_by$</isNotNull>) a ) where  row_id between  1 and 15</select><!-- 查询分页服务说明数量 --><select id="query_total_num" parameterClass="map" resultClass="java.lang.Integer">select count(*) from product_service_description psdwhere 1 = 1 and psd.is_delete = 'N'and psd.is_default='Y'</select>    <!-- 新增 --><insert id="insert" parameterClass="goodsDescription"><selectKey resultClass="int" keyProperty="serviceDescriptionId" >  SELECT goods_description_SEQ.nextval AS service_description_id  from dual</selectKey>insert into product_service_description (service_description_id, label_name, label_icon,label_description,sort_num,product_id,is_default,is_delete,ADD_TIME,ADD_USER_ID,EDIT_TIME, EDIT_USER_ID)values (#serviceDescriptionId#,#labelName#,#labelIcon#,#labelDescription#,nvl (#sortNum#,  (SELECT MAX(sort_num) + 1FROM product_service_description) ),<!--#sortNum#,-->
        #productId#,#isDefault#,'N',#addTime#,#addUserId#,#editTime#,#editUserId#)</insert><!-- 删除商品属性 -->
<update id="deleteGoodsDescription" parameterClass="java.lang.Integer">update product_service_description set IS_DELETE='Y'where service_description_id=#value# 
</update><!--更新  --><update id="updateGoodsDescription" parameterClass="goodsDescription">update product_service_description<dynamic prepend="set"><isNotNull prepend="," property="labelName">label_name = #labelName#</isNotNull><isNotNull prepend="," property="labelIcon">label_icon = #labelIcon#</isNotNull><isNotNull prepend="," property="labelDescription">label_description = #labelDescription#</isNotNull><isNotNull prepend="," property="sortNum">sort_num = #sortNum#</isNotNull><isNotNull prepend="," property="productId">product_id = #productId#</isNotNull><isNotNull prepend="," property="isDelete">IS_DELETE = #isDelete#</isNotNull><isNotNull prepend="," property="isDefault">IS_DEFAULT= #isDefault#</isNotNull><isNotNull prepend="," property="addTime">ADD_TIME = #addTime#</isNotNull><isNotNull prepend="," property="addUserId">ADD_USER_ID = #addUserId#</isNotNull><isNotNull prepend="," property="editTime">EDIT_TIME = #editTime#</isNotNull><isNotNull prepend="," property="editUserId">EDIT_USER_ID = #editUserId#</isNotNull></dynamic>where  service_description_id= #serviceDescriptionId#</update></sqlMap>    

 

 

转载于:https://www.cnblogs.com/wangchuanfu/p/6046781.html

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

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

相关文章

取一定范围内随机小数 c_算伪随机概率中C值的快捷方法

目前计算伪随机概率C值的方法&#xff0c;一般是二分法。二分法是个非常讨厌的方法&#xff0c;因为虽然简单却麻烦&#xff0c;想算个稍微精确点的数&#xff0c;需要十分巨大的计算量。如果像高中时那样手动计算&#xff0c;真是要算到眼花。本文给出了一个十分简单快捷的方法…

AI实时特效,魔幻修图,Adobe Photoshop相机拯救PS菜鸟

图片来源&#xff1a;https://twitter.com/beckihagen/status/1191436317005008896/photo/3来源&#xff1a;机器学习研究会订阅号上传一张特效照片需要几步&#xff1f;常规来说需要三步&#xff1a;拍照→修图→发布。为了拯救手残党&#xff0c;Adobe 将 Photoshop 的部分功…

ajax传递json对象 php,ajax 和 php 相互传递 JSON对象(转载)

各位新年快乐,俺把俺写的东西拿出来秀秀,希望大家可以指点一下.原文出处:http://hi.baidu.com/tangtou/blog/item/603a24384674b120b8998f1f.html需要用到的文件有:ajax1.js 在本博客的另一篇文章里,点这里查看它json.js(请到网上下载 http://www.json.org/)json.class.php (请…

北斗卫星现在什么情况?这些数据不能不看

来源 | 微博林晓弈 (知名科学科普博主) 、太空精酿的空间站&#xff08;spacebrewer&#xff09;11月5日凌晨1时43分&#xff0c;在我国西昌卫星发射中心&#xff0c;北斗三号第3颗倾斜地球同步轨道&#xff08;IGSO-3&#xff09;卫星由长征三号乙运载火箭发射升空。至此&…

php调用文章标题,zblogphp标题格式的标签调用详细说明

天兴工作室之前写过好几篇跟首先&#xff0c;找到我们要修改的位置&#xff0c;标题一般在模板的header.php文件里面(如何找到這个文件请参考&#xff1a;zblogphp主题修改教程)。网页的标题一般是包含在“”里面的&#xff0c;zblogphp网页标题具体的标签如下&#xff1a;{$na…

ASP对XML的增、删、改、查

首先看一下xml文件 text.xmlencoding使用gb2312中文&#xff0c;如果要用英文则用utf-8 <?xml version"1.0" encoding"gb2312"?><root><row ID"2" COMPNAME"闪电儿" ADDR"河北省唐山市" 邮编"063000&…

下一代欺骗技术

来源&#xff1a;数据机器人 回想起当许多与会者听到“欺骗”一词时&#xff0c;蜜罐仍然是我想到的第一件事。的确&#xff0c;当欺骗技术在多年前首次出现时&#xff0c;蜜罐是描述欺骗工作方式的最类似技术&#xff0c;因为蜜罐试图欺骗攻击者与其进行交互。但是&#xff0c…

线程 协程 python_在Python 的线程中运行协程的方法

在一篇文章 理解Python异步编程的基本原理 这篇文章中&#xff0c;我们讲到&#xff0c;如果在异步代码里面又包含了一段非常耗时的同步代码&#xff0c;异步代码就会被卡住。那么有没有办法让同步代码与异步代码看起来也是同时运行的呢?方法就是使用事件循环的.run_in_execut…

php登录个性验证码,PHP七种不同的个性创意验证码例子

验证码图片html代码:第一个图像验证码类,其他6种验证码类请下载查看:class captcha{/**----------------------------------------------------------* 生成验证码----------------------------------------------------------* static* access public------------------------…

突发!ASML断供中芯国际

来源&#xff1a;芯榜据日经新闻6日报道&#xff0c;荷兰半导体设备供应商阿斯麦尔&#xff08;ASML&#xff09;供应极紫外光&#xff08;EUV&#xff09;光刻机给中芯国际的计划已经中止&#xff0c;多位ASML供应商关系人士指出&#xff0c;ASML是为了避免因供应最先进的设备…

字符串相似度匹配算法python_算法字符串相似度得分/哈希

有趣的问题。我在这一领域的经验有限&#xff0c;但由于Levenshtein距离满足三角形不等式&#xff0c;我认为必须有一种方法来计算到原点的某种绝对距离&#xff0c;以便在不与整个数据库中的所有条目进行直接比较的情况下找到彼此邻近的字符串。在第26页&#xff0c;他讨论了基…

马化腾:微信将被谁颠覆,领衔下一代互联网的终端居然是?

来源&#xff1a;梧桐会导语1&#xff64;10年一更替&#xff0c;互联网格局将如何演变&#xff1f;2&#xff64;第三代互联网谁主沉浮&#xff1f;3&#xff64;谁是下一个苹果&#xff0c;谁是下一个诺基亚&#xff1f;4&#xff64;全球科技巨头的下一步动作是什么&#xf…

PHP基础班初学感悟

不知不觉差不多一个月就过去了 刚到培训班那时候的心情&#xff0c;现在也还能有所感觉 作为今年6月份的毕业生&#xff0c;刚从大学的实习期出来&#xff0c;辞掉了上一份工作&#xff0c;本来是打算找一份更加与专业挂钩的工作做的 也许是90后对网络的情有独钟&#xff0c;亦…

matlab trendsurface,MATLAB 添加新的预测性维护产品

图1&#xff1a;源自脉宽调制波形的脉宽趋势和跟踪。中心迹线(橙色)是脉宽的跟踪。该波形包含与采集波形相同的100k个点。对每个测量值进行升采样(upsampled&#xff0c;即加大采样率)以匹配源波形每个周期的持续时间。跟踪图始终与源波形同步。由于跟踪功能具有时间同步特性&a…

苹果一键越狱工具_最新苹果越狱工具现世,可越狱所有iOS版本!

出于安全原因考虑&#xff0c;apple默认是不允许用户有iPhone和其他iOS设备的完全控制权限。越狱是指通过利用iOS操作系统中的漏洞使得可以通过定制的软件来获取设备的root和完全访问权限。近日&#xff0c;一个由黑客、安全研究人员和逆向工程师组成的团队——Unc0ver&#xf…

你认识的世界与客观世界间差了N光年

想象一下这样的场景&#xff0c;你得到一个金属盒子并被告知不可能知道盒子里的内容。你可以尝试钻它&#xff0c;烧它&#xff0c;用 X 射线照它&#xff0c;摇晃它&#xff0c;打破它以及其他各种手段&#xff0c;但是你永远无法打开它或者知道里面是什么。这个盒子里装着的就…

php.h: No such file or directory

建立一个php的include路径到/usr/include的软连接就好了 ln -s /usr/include/php-zts/* /usr/include/转载于:https://www.cnblogs.com/yangxunwu1992/p/6059286.html

区块链 matlab,matlab可以实现区块链吗?

用MATLAB实现区块链:把区块对象连成链现在可以把区块连成区块链了&#xff0c;我们用一个新的类叫做BlockChain来模拟它。 首先规定该链中的第一个block可以直接产生&#xff0c;就是genesisblock,这就是上面Block的construtor中&#xff0c;输入参数个数等于2是返回的对象.cla…

qt 通过类实现画图_QT案例IDE编写 通过枚举实现编码切换

低谷期一定要默默的熬过去&#xff0c;别去打扰任何人&#xff0c;否则留下的只是别人的笑柄&#xff0c;不论幸或不幸&#xff0c;你的挣扎无人能见&#xff0c;无人能懂。。。---- 网易云热评一、定义一个枚举enum MyCode{ utf_8,gbk};二、定义一个枚举变量&#xff0c;默…

美国在人工智能领域亟待解决的5大难题

来源&#xff1a;战略前沿技术据C4ISRNET网站报道&#xff0c;根据2018年《国防授权法案》&#xff0c;美国国会组建了由多名技术专家组成的人工智能国家安全委员会&#xff0c;以指导美国人工智能技术的发展。该委员会由谷歌母公司Alphabet前负责人埃里克施密特&#xff08;Er…