Playlist 设计

XmlOperationTool.java

package com.cemso.util; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; import com.cemso.dto.OnebyoneDTO; import com.cemso.dto.PlaylistDTO; import com.cemso.dto.ProgramDTO; import com.cemso.dto.ResourceDTO; import com.cemso.dto.TemplateDTO; import com.cemso.dto.TemplateModelDTO; public class XmlOperationTool { private static final String RESOURCEXMLPATH = "c:/cross/CPSolution/XmlDB/ResourceDB.xml"; private static final String TEMPLATEXMLPATH = "c:/cross/CPSolution/XmlDB/TemplateDB.xml"; private static final String PROGRAMXMLPATH = "c:/cross/CPSolution/XmlDB/ProgramDB.xml"; private static final String PLAYLISTXMLPATH = "c:/cross/CPSolution/XmlDB/PlaylistDB.xml"; public static final String DB_TYPE_RESOURCE = "resource"; public static final String DB_TYPE_TEMPLATE = "template"; public static final String DB_TYPE_PROGRAM = "program"; public static final String DB_TYPE_PLAYLIST = "playlist"; // 查询所有的数据 public static List<?> list(String dbType) throws JDOMException, IOException { List<ResourceDTO> resourceList = null; List<TemplateDTO> templateList = null; List<ProgramDTO> programList = null; List<PlaylistDTO> playlistList = null; SAXBuilder builder = new SAXBuilder(); String xmlPath = null; if ("resource".equals(dbType)) { xmlPath = RESOURCEXMLPATH; resourceList = new ArrayList<ResourceDTO>(); // 获得文档对象 Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); while (it.hasNext()) { Element e = (Element) it.next(); ResourceDTO resource = new ResourceDTO(); resource.setId(e.getAttributeValue("id")); resource.setResourceName(e.getAttributeValue("name")); resource.setResourceType(e.getAttributeValue("type")); Iterator<?> eIt = e.getChildren().iterator(); while (eIt.hasNext()) { Element ec = (Element) eIt.next(); if (ec.getAttributeValue("name").equals("remark")) { resource.setParamRemark(ec.getText()); } if (ec.getAttributeValue("name").equals("createtime")) { resource.setParamCreatetime(ec.getText()); } if (ec.getAttributeValue("name").equals("createby")) { resource.setParamCreateby(ec.getText()); } } resourceList.add(resource); } } if ("template".equals(dbType)) { xmlPath = TEMPLATEXMLPATH; templateList = new ArrayList<TemplateDTO>(); // 获得文档对象 Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); while (it.hasNext()) { Element e = (Element) it.next(); TemplateDTO template = new TemplateDTO(); template.setId(e.getAttributeValue("id")); template.setName(e.getAttributeValue("name")); Iterator<?> eIt = e.getChildren().iterator(); while (eIt.hasNext()) { Element ec = (Element) eIt.next(); if (ec.getAttributeValue("name").equals("remark")) { template.setRemark(ec.getText()); } if (ec.getAttributeValue("name").equals("createtime")) { template.setCreateTime(ec.getText()); } if (ec.getAttributeValue("name").equals("createby")) { template.setCreateBy(ec.getText()); } if (ec.getAttributeValue("name").equals("models")) { Iterator<?> itModels = ec.getChildren().iterator(); List<TemplateModelDTO> models = new ArrayList<TemplateModelDTO>(); while (itModels.hasNext()) { TemplateModelDTO modelDTO = new TemplateModelDTO(); Element model = (Element) itModels.next(); modelDTO.setId(model.getAttributeValue("id")); modelDTO.setName(model.getAttributeValue("name")); modelDTO.setType(model.getAttributeValue("type")); modelDTO.setGradation(model .getAttributeValue("gradation")); modelDTO.setDimension(model .getAttributeValue("dimension")); models.add(modelDTO); } template.setModels(models); } } templateList.add(template); } } // program list if("program".equals(dbType)){ xmlPath = PROGRAMXMLPATH; programList = new ArrayList<ProgramDTO>(); // 获得文档对象 Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); while (it.hasNext()) { Element e = (Element) it.next(); ProgramDTO program = new ProgramDTO(); program.setId(e.getAttributeValue("id")); program.setName(e.getAttributeValue("name")); Iterator<?> eIt = e.getChildren().iterator(); while (eIt.hasNext()) { Element ec = (Element) eIt.next(); if (ec.getAttributeValue("name").equals("remark")) { program.setRemark(ec.getText()); } if (ec.getAttributeValue("name").equals("createtime")) { program.setCreatetime(ec.getText()); } if (ec.getAttributeValue("name").equals("createby")) { program.setCreateby(ec.getText()); } if (ec.getAttributeValue("name").equals("length")) { program.setLength(ec.getText()); } if (ec.getAttributeValue("name").equals("template")) { program.setTemplateId(ec.getText()); } if (ec.getAttributeValue("name").equals("onebyones")) { Iterator<?> itOnebyone = ec.getChildren().iterator(); List<OnebyoneDTO> onebyones = new ArrayList<OnebyoneDTO>(); while (itOnebyone.hasNext()) { OnebyoneDTO onebyoneDTO = new OnebyoneDTO(); Element onebyone = (Element) itOnebyone.next(); onebyoneDTO.setDimension(onebyone.getAttributeValue("dimension")); onebyoneDTO.setResource(onebyone.getAttributeValue("resource")); onebyoneDTO.setGradation(onebyone.getAttributeValue("gradation")); onebyones.add(onebyoneDTO); } program.setOnebyoneList(onebyones); } } programList.add(program); } } // playlist list if("playlist".equals(dbType)){ xmlPath = PLAYLISTXMLPATH; playlistList = new ArrayList<PlaylistDTO>(); // 获得文档对象 Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); while (it.hasNext()) { Element e = (Element) it.next(); PlaylistDTO playlist = new PlaylistDTO(); playlist.setId(e.getAttributeValue("id")); playlist.setName(e.getAttributeValue("name")); Iterator<?> eIt = e.getChildren().iterator(); while (eIt.hasNext()) { Element ec = (Element) eIt.next(); if (ec.getAttributeValue("name").equals("remark")) { playlist.setRemark(ec.getText()); } if (ec.getAttributeValue("name").equals("createtime")) { playlist.setCreatetime(ec.getText()); } if (ec.getAttributeValue("name").equals("createby")) { playlist.setCreateby(ec.getText()); } if (ec.getAttributeValue("name").equals("startnow")) { playlist.setStartnow(Boolean.valueOf(ec.getText())); } if (ec.getAttributeValue("name").equals("starttime")) { playlist.setStarttime(ec.getText()); } if (ec.getAttributeValue("name").equals("endtime")) { playlist.setEndtime(ec.getText()); } if (ec.getAttributeValue("name").equals("programs")) { Iterator<?> itt = ec.getChildren().iterator(); List<ProgramDTO> programs = new ArrayList<ProgramDTO>(); while (itt.hasNext()) { ProgramDTO programDTO = new ProgramDTO(); Element program = (Element) itt.next(); programDTO.setId(program.getAttributeValue("id")); programDTO.setIndex(program.getAttributeValue("index")); programs.add(programDTO); } playlist.setProgramList(programs); } } playlistList.add(playlist); } } if("resource".equals(dbType)){ return resourceList; } if("template".equals(dbType)){ return templateList; } if("program".equals(dbType)){ return programList; } if("playlist".equals(dbType)){ return playlistList; } return null; } // 在原有的ResourceDB.xml文件中添加数据 public static void add(ResourceDTO resource) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = RESOURCEXMLPATH; Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); // 创建节点resource Element element = new Element("resource"); // 给resource节点添加属性id,name,type element.setAttribute("id", resource.getId()); element.setAttribute("name", resource.getResourceName()); element.setAttribute("type", resource.getResourceType()); // 给resource节点添加子节点并赋值 Element param1 = new Element("param"); param1.setAttribute("name", "remark"); param1.setText(resource.getParamRemark()); Element param2 = new Element("param"); param2.setAttribute("name", "createtime"); param2.setText(resource.getParamCreatetime()); Element param3 = new Element("param"); param3.setAttribute("name", "createby"); param3.setText(resource.getParamCreateby()); element.addContent(param1); element.addContent(param2); element.addContent(param3); // 给父节点添加person子节点 root.addContent(element); XMLOutputter output = new XMLOutputter(Format.getPrettyFormat()); output.output(document, new FileOutputStream(xmlPath)); } // 在原有的ProgramDB.xml文件中添加数据 public static void add(TemplateDTO template) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = TEMPLATEXMLPATH; Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); // 创建节点template Element element = new Element("template"); // 给template节点添加属性id,name element.setAttribute("id", template.getId()); element.setAttribute("name", template.getName()); // 给template节点添加子节点并赋值 Element param1 = new Element("param"); param1.setAttribute("name", "remark"); param1.setText(template.getRemark()); Element param2 = new Element("param"); param2.setAttribute("name", "createtime"); param2.setText(template.getCreateTime()); Element param3 = new Element("param"); param3.setAttribute("name", "createby"); param3.setText(template.getCreateBy()); Element param4 = new Element("param"); param4.setAttribute("name", "models"); // 添加model for (TemplateModelDTO model : template.getModels()) { Element paramChild = new Element("model"); paramChild.setAttribute("id", model.getId()); paramChild.setAttribute("name", model.getName()); paramChild.setAttribute("type", model.getType()); paramChild.setAttribute("dimension", model.getDimension()); paramChild.setAttribute("gradation", model.getGradation()); param4.addContent(paramChild); } element.addContent(param1); element.addContent(param2); element.addContent(param3); element.addContent(param4); // 给父节点添加person子节点 root.addContent(element); XMLOutputter output = new XMLOutputter(Format.getPrettyFormat()); output.output(document, new FileOutputStream(xmlPath)); } // 在原有的TemplateDB.xml文件中添加数据 public static void add(ProgramDTO program) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = PROGRAMXMLPATH; Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); // 创建节点program Element element = new Element("program"); // 给program节点添加属性id,name element.setAttribute("id", program.getId()); element.setAttribute("name", program.getName()); // 给program节点添加子节点并赋值 Element param1 = new Element("param"); param1.setAttribute("name", "remark"); param1.setText(program.getRemark()); Element param2 = new Element("param"); param2.setAttribute("name", "createtime"); param2.setText(program.getCreatetime()); Element param3 = new Element("param"); param3.setAttribute("name", "createby"); param3.setText(program.getCreateby()); Element param4 = new Element("param"); param4.setAttribute("name", "length"); param4.setText(program.getLength()); Element param5 = new Element("param"); param5.setAttribute("name", "template"); param5.setText(program.getTemplateId()); Element param6 = new Element("param"); param6.setAttribute("name", "onebyones"); // 添加onebyone for (OnebyoneDTO onebyone : program.getOnebyoneList()) { Element paramChild = new Element("onebyone"); paramChild.setAttribute("resource", onebyone.getResource()); paramChild.setAttribute("dimension", onebyone.getDimension()); paramChild.setAttribute("gradation", onebyone.getGradation()); param6.addContent(paramChild); } element.addContent(param1); element.addContent(param2); element.addContent(param3); element.addContent(param4); element.addContent(param5); element.addContent(param6); // 给父节点添加person子节点 root.addContent(element); XMLOutputter output = new XMLOutputter(Format.getPrettyFormat()); output.output(document, new FileOutputStream(xmlPath)); } // 在原有的PlaylistDB.xml文件中添加数据 public static void add(PlaylistDTO playlist) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = PLAYLISTXMLPATH; Document document = builder.build(xmlPath); // 获得根节点 Element root = document.getRootElement(); // 创建节点program Element element = new Element("playlist"); // 给program节点添加属性id,name element.setAttribute("id", playlist.getId()); element.setAttribute("name", playlist.getName()); // 给program节点添加子节点并赋值 Element param1 = new Element("param"); param1.setAttribute("name", "remark"); param1.setText(playlist.getRemark()); Element param2 = new Element("param"); param2.setAttribute("name", "createtime"); param2.setText(playlist.getCreatetime()); Element param3 = new Element("param"); param3.setAttribute("name", "createby"); param3.setText(playlist.getCreateby()); Element param4 = new Element("param"); param4.setAttribute("name", "startnow"); param4.setText(String.valueOf(playlist.isStartnow())); Element param5 = new Element("param"); param5.setAttribute("name", "starttime"); param5.setText(playlist.getStarttime()); Element param6 = new Element("param"); param6.setAttribute("name", "endtime"); param6.setText(playlist.getEndtime()); Element param7 = new Element("param"); param7.setAttribute("name", "programs"); // 添加programs int size = playlist.getProgramList().size(); for (int i = 0; i < size; i++) { ProgramDTO program = playlist.getProgramList().get(i); Element paramChild = new Element("program"); paramChild.setAttribute("id", program.getId()); paramChild.setAttribute("index", String.valueOf(i)); param7.addContent(paramChild); } element.addContent(param1); element.addContent(param2); element.addContent(param3); element.addContent(param4); element.addContent(param5); element.addContent(param6); element.addContent(param7); // 给父节点添加person子节点 root.addContent(element); XMLOutputter output = new XMLOutputter(Format.getPrettyFormat()); output.output(document, new FileOutputStream(xmlPath)); } // 修改数据 public static void edit(Object object) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = ""; // resource object if(object instanceof ResourceDTO){ xmlPath = RESOURCEXMLPATH; ResourceDTO resource = (ResourceDTO)object; Document document = builder.build(xmlPath); Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); for (int i = 0; i < list.size(); i++) { Element e = (Element) it.next(); if (e.getAttributeValue("id").equals(resource.getId())) { List<?> paramList = e.getChildren(); for(int j = 0; j < paramList.size(); j++){ Element ee = (Element)paramList.get(j); if(ee.getAttributeValue("name").equals("remark")){ ee.setText(resource.getParamRemark()); } if(ee.getAttributeValue("name").equals("createtime")){ ee.setText(resource.getParamCreatetime()); } if(ee.getAttributeValue("name").equals("createby")){ ee.setText(resource.getParamCreateby()); } } } } XMLOutputter output = new XMLOutputter(); output.output(document, new FileOutputStream(xmlPath)); } // template object if(object instanceof TemplateDTO){ xmlPath = TEMPLATEXMLPATH; TemplateDTO template = (TemplateDTO)object; Document document = builder.build(xmlPath); Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); for (int i = 0; i < list.size(); i++) { Element e = (Element) it.next(); if (e.getAttributeValue("id").equals(template.getId())) { List<?> paramList = e.getChildren(); for(int j = 0; j < paramList.size(); j++){ Element ee = (Element)paramList.get(j); if(ee.getAttributeValue("name").equals("remark")){ ee.setText(template.getRemark()); } if(ee.getAttributeValue("name").equals("createtime")){ ee.setText(template.getCreateTime()); } if(ee.getAttributeValue("name").equals("createby")){ ee.setText(template.getCreateBy()); } // models update List<?> eee = ee.getChildren(); /** * * * * * models update here. * * * * * */ } } } XMLOutputter output = new XMLOutputter(); output.output(document, new FileOutputStream(xmlPath)); } // program object if(object instanceof ProgramDTO){ xmlPath = PROGRAMXMLPATH; } } // 删除 public static void del(String dbType, String elementId) throws JDOMException, FileNotFoundException, IOException { SAXBuilder builder = new SAXBuilder(); String xmlPath = ""; // delete resource element if(dbType.equals("resource")){ xmlPath = RESOURCEXMLPATH; } if(dbType.equals("template")){ xmlPath = TEMPLATEXMLPATH; } if(dbType.equals("program")){ xmlPath = PROGRAMXMLPATH; } Document document = builder.build(xmlPath); Element root = document.getRootElement(); List<?> list = root.getChildren(); Iterator<?> it = list.iterator(); for (int i = 0; i < list.size(); i++) { Element e = (Element) it.next(); if (elementId.equals(e.getAttributeValue("id"))) { root.removeContent(e); break; } } XMLOutputter out = new XMLOutputter(); out.output(document, new FileOutputStream(xmlPath)); } public static void main(String[] args) throws FileNotFoundException, JDOMException, IOException { del("template","template_1329281108962"); System.out.println(RESOURCEXMLPATH); } }
PlaylistDTO.java

/* * Created on Feb 17, 2012 * * PlaylistDTO.java * * Copyright (C) 2012 by Citicorp Software & Technology Services (Shanghai) Limited. * All rights reserved. Citicorp Software & Technology Services (Shanghai) Limited * claims copyright in this computer program as an unpublished work. Claim of copyright * does not imply waiver of other rights. * * NOTICE OF PROPRIETARY RIGHTS * * This program is a confidential trade secret and the property of * Citicorp Software & Technology Services (Shanghai) Limited. Use, examination, * reproduction, disassembly, decompiling, transfer and/or disclosure to others of * all or any part of this software program are strictly prohibited except by express * written agreement with Citicorp Software & Technology Services (Shanghai) Limited. */ /* * --------------------------------------------------------------------------------- * Modification History * Date Author Version Description * Feb 17, 2012 gl65293 1.0 New * --------------------------------------------------------------------------------- */ /** * */ package com.cemso.dto; import java.util.List; /** * @author gl65293 * */ public class PlaylistDTO { private String id; private String name; private String remark; private String createtime; private String createby; private boolean startnow; private String starttime; private String endtime; private List<ProgramDTO> programList; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getCreatetime() { return createtime; } public void setCreatetime(String createtime) { this.createtime = createtime; } public String getCreateby() { return createby; } public void setCreateby(String createby) { this.createby = createby; } public boolean isStartnow() { return startnow; } public void setStartnow(boolean startnow) { this.startnow = startnow; } public String getStarttime() { return starttime; } public void setStarttime(String starttime) { this.starttime = starttime; } public String getEndtime() { return endtime; } public void setEndtime(String endtime) { this.endtime = endtime; } public List<ProgramDTO> getProgramList() { return programList; } public void setProgramList(List<ProgramDTO> programList) { this.programList = programList; } }
PlaylistService.java

/* * Created on Feb 17, 2012 * * PlaylistService.java * * Copyright (C) 2012 by Citicorp Software & Technology Services (Shanghai) Limited. * All rights reserved. Citicorp Software & Technology Services (Shanghai) Limited * claims copyright in this computer program as an unpublished work. Claim of copyright * does not imply waiver of other rights. * * NOTICE OF PROPRIETARY RIGHTS * * This program is a confidential trade secret and the property of * Citicorp Software & Technology Services (Shanghai) Limited. Use, examination, * reproduction, disassembly, decompiling, transfer and/or disclosure to others of * all or any part of this software program are strictly prohibited except by express * written agreement with Citicorp Software & Technology Services (Shanghai) Limited. */ /* * --------------------------------------------------------------------------------- * Modification History * Date Author Version Description * Feb 17, 2012 gl65293 1.0 New * --------------------------------------------------------------------------------- */ /** * */ package com.cemso.service; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import org.jdom.JDOMException; import com.cemso.dto.PlaylistDTO; /** * @author gl65293 * */ public interface PlaylistService { public boolean addPlaylist(PlaylistDTO playlist) throws FileNotFoundException, JDOMException, IOException; public List<PlaylistDTO> getPlaylist() throws JDOMException, IOException; }

PlaylistServiceImpl.java/* * Created on Feb 17, 2012 * * PlaylistServiceImpl.java * * Copyright (C) 2012 by Citicorp Software & Technology Services (Shanghai) Limited. * All rights reserved. Citicorp Software & Technology Services (Shanghai) Limited * claims copyright in this computer program as an unpublished work. Claim of copyright * does not imply waiver of other rights. * * NOTICE OF PROPRIETARY RIGHTS * * This program is a confidential trade secret and the property of * Citicorp Software & Technology Services (Shanghai) Limited. Use, examination, * reproduction, disassembly, decompiling, transfer and/or disclosure to others of * all or any part of this software program are strictly prohibited except by express * written agreement with Citicorp Software & Technology Services (Shanghai) Limited. */ /* * --------------------------------------------------------------------------------- * Modification History * Date Author Version Description * Feb 17, 2012 gl65293 1.0 New * --------------------------------------------------------------------------------- */ /** * */ package com.cemso.service.impl; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import org.jdom.JDOMException; import com.cemso.dto.PlaylistDTO; import com.cemso.service.PlaylistService; import com.cemso.util.XmlOperationTool; /** * @author gl65293 * */ public class PlaylistServiceImpl implements PlaylistService { /* (non-Javadoc) * @see com.cemso.service.PlaylistService#addPlaylist(com.cemso.dto.PlaylistDTO) */ public boolean addPlaylist(PlaylistDTO playlist) throws FileNotFoundException, JDOMException, IOException { XmlOperationTool.add(playlist); return true; } /* (non-Javadoc) * @see com.cemso.service.PlaylistService#getPlaylist() */ @SuppressWarnings("unchecked") public List<PlaylistDTO> getPlaylist() throws JDOMException, IOException { List<PlaylistDTO> list = (List<PlaylistDTO>) XmlOperationTool.list(XmlOperationTool.DB_TYPE_PLAYLIST); return list; } }
PlaylistDB.xml

<?xml version="1.0" encoding="UTF-8"?> <playlists> <playlist id="playlist_1329462432344" name="222"> <param name="remark">22</param> <param name="createtime">2012-02-17 15:07:12</param> <param name="createby"></param> <param name="startnow">true</param> <param name="starttime"></param> <param name="endtime"></param> <param name="programs"> <program id="" index="1" /> <program id="" index="1" /> <program id="" index="1" /> <program id="" index="1" /> </param> </playlist> </playlists>


OneOS远程升级能力实操演示 | OTA升级 OneOS远程升级能力实操演示,差分算法提升效率,OTA升级,OTA差分算法,全量升级、压缩升级、差分升级,有线网络连接,bootloader,升级平台,在线差分包制作,触摸屏以及GUI图形操作 阅读详情

相关推荐

SqlSugar避坑指南:C#操作MySQL时你可能会忽略的5个细节

本文分享了使用C#和SqlSugar框架操作MySQL数据库时的实战避坑指南。针对连接配置、实体映射、查询性能、事务处理等关键环节,深入剖析了5个容易被忽略但至关重要的细节,帮助开发者提升项目稳定性和执行效率,避免常见陷阱。

delta的博客 243

Python习题 178:设计 Playlist 类管理歌单

编码题)设计一个 Python 类 Playlist,用于管理歌单的基本功能。

2202_76035290的博客 282

yolo目标检测数据集-危化品运输车数据集3059张(油罐车、天然气运输车等)含voc和yolo格式标签.zip

1、该数据集用于危化品运输车识别检测,比如油罐车、天然气运输车、化学品运输车等,标签分别包含为yolo格式和voc格式(xml),一共3059张,数据分布均匀,标注精准,训练时拟合好,欢迎下载,有问题可以留言或者私信。【重要提醒】1、csdn上资源保证是完整最新,会不定期更新优化;2、通过第三方代下载,而不是直接自己账号在csdn官方下载,博主不对下载的资源作任何保证,且不提供任何形式的技术支持和答疑!!!

Data-Science-Gen-AI-Playlist-2024配套代码库解析:项目结构与模块设计

你是否正在寻找一个全面的数据科学与生成式人工智能(Generative AI,生成式人工智能)学习资源库?是否希望通过实战项目快速掌握机器学习、深度学习和自然语言处理(Natural Language Processing,NLP)技能?本文将带你深入解析Data-Science-Gen-AI-Playlist-2024代码库的项目结构与模块设计,帮助你高效利用该资源,提升数据科学实战能力。读完本...

gitblog_00682的博客 1062

vue-music 关于playlist (底部播放列表组件)

建立playlist.vue 组件,在player.vue 组件中引用,点击迷你播放器的播放列表按钮由下至上弹出这个层,所以在player.vue 播放器组件中引用 在playlist.vue 组件中首先设置对外的方法可以控制该组件的显示隐藏,通过mapGetters 获取歌单数据 播放列表功能操作:   当前播放歌曲显示正确的icon   点击当前歌曲播放该歌曲,对应相应的icon ...

weixin_34194379的博客 213

推荐视频播放器插件:VideoJS Playlist

推荐视频播放器插件:VideoJS Playlist 如果你正在寻找一个强大的、可定制的视频播放器,能够处理播放列表功能,那么videojs-playlist无疑是你的最佳选择。这个开源项目由Brightcove开发并维护,稳定可靠,并且完全免费。 项目介绍 videojs-playlist是专为流行的HTML5视频播放库Video.js设计的一个插件,它扩展了Video.js的基本功能,使其支持...

gitblog_00020的博客 756

【亲测免费】 视频播放利器:videojs-playlist 插件推荐

视频播放利器:videojs-playlist 插件推荐 在现代网络应用中,视频播放功能已成为不可或缺的一部分。无论是教育、娱乐还是商业应用,用户都期望能够无缝切换和播放多个视频内容。为了满足这一需求,videojs-playlist 插件应运而生。本文将详细介绍 videojs-playlist 插件的功能、技术特点及其应用场景,帮助开发者更好地理解和使用这一强大的工具。 项目介绍 videoj...

gitblog_00808的博客 1148

探索音乐的新维度:yun-playlist-downloader

探索音乐的新维度:yun-playlist-downloader yun-playlist-downloader 是一个专为网易云音乐爱好者设计的强大工具,它允许您轻松地批量下载你的歌单、专辑甚至是电台节目。这个开源项目不仅注重功能的实用性,还强调用户体验,让用户在享受音乐的同时也能感受到科技的魅力。 项目简介 yun-playlist-downloader 是一款基于 Node.js 的命令行工...

gitblog_00056的博客 376

高效管理你的Google音乐播放列表:gmusic-playlist项目推荐

高效管理你的Google音乐播放列表:gmusic-playlist项目推荐 项目介绍 gmusic-playlist 是一个专为Google音乐用户设计的开源项目,旨在帮助用户轻松管理和迁移他们的播放列表。通过这个项目,用户可以方便地将Google音乐中的播放列表导出为CSV文件,或者将CSV文件导入到Google音乐中,从而实现播放列表的备份、迁移或编辑。 项目技术分析 gmusic-play...

gitblog_00831的博客 569

**MPV Playlist Manager —— 管理播放列表的高效利器**

在多媒体播放的世界里,一个好的播放器不只是能播放音频或视频那么简单。它应该能够帮助你管理你的播放列表,让你随心所欲地添加、删除和重新排序文件。**MPV Playlist Manager** 正是这样一款为 MPV 播放器量身打造的 Lua 脚本。通过直观的界面和一系列实用功能,它让管理播放列表变得前所未有的轻松。 ## **项目技术分析** ### 核心技术亮点: - 动态键绑定系统允许你

gitblog_00276的博客 856

基于 Flutter × HarmonyOS 6.0 的「忆影 MemoPlay」视频播放器—数据变量与数据结构设计深度解析

本文介绍了基于Flutter和HarmonyOS 6.0开发的跨端视频播放器"忆影MemoPlay"的数据结构设计。重点阐述了视频业务中的核心数据模型(视频、分类、标签、播放列表)及其状态变量组织方式,展示了如何通过清晰的数据结构为UI展示、业务逻辑和未来扩展(如推荐算法)奠定基础。文章强调了"数据结构即产品骨架"的理念,指出优秀的数据模型设计应具备高内聚低耦合、可扩展性强等特点,并能为AI推荐算法提供良好支持。通过实际案例说明了先设计数据模型、再开发UI的成熟开发流

一键难忘的博客 1万+

从脚本到自动化:Playlist-AutoUpdater开发架构深度剖析

Playlist-AutoUpdater是一款强大的M3U播放列表自动更新工具,它能够帮助用户每天自动更新播放列表,无需安装额外应用,保持播放列表链接不变。本文将深入剖析其开发架构,从脚本实现到自动化流程,为新手和普通用户提供全面的技术解读。 ## 📋 项目核心功能解析 Playlist-AutoUpdater的核心功能是实现M3U播放列表的每日自动更新。通过分析项目结构,我们可以看到其主要

gitblog_01031的博客 382

TataSky Playlist AutoUpdater终极指南:免费电视节目表自动更新神器

想要拥有一个永不失效的IPTV播放列表吗?TataSky Playlist AutoUpdater就是你的完美解决方案!🚀 这个开源工具能够自动更新你的Tata Play M3U播放列表,让你每天都能享受最新的电视节目内容,而无需手动更新链接。 ## 🔥 项目核心功能解析 ### 智能自动更新系统 TataSky Playlist AutoUpdater基于GitHub Actions工作

gitblog_00005的博客 450

Educational Codeforces Round 62 (Rated for Div. 2)

文章目录A. Detective Book(思维)B. Good String(思维)C. Playlist()D. Minimum Triangulation() A. Detective Book(思维) 原题链接:http://codeforces.com/contest/1140/problem/A 题意: lvan看一本页数为 n 页的书,每页书可能有秘密,其答案在相对应的页数 a[...

360°顺滑 259

MPV Playlist Manager:让媒体播放列表管理更高效的全能工具

### 核心痛点:传统播放列表管理的三大困境 - **操作割裂**:频繁在文件浏览器与播放器间切换,打断媒体欣赏体验 - **效率低下**:手动维护播放顺序,缺乏批量操作能力 - **配置复杂**:原生MPV播放列表功能隐藏较深,新手难以快速上手 ### 解决方案:MPV Playlist Manager的四大核心能力 **「可视化管理」让播放列表一目了然** 通过半透明悬浮面板实现播放列表

gitblog_00222的博客 625

微信小程序组件化实现歌单效果

需要实现的效果如下: 我们将歌单的每一项作为一个组件。 playlist组件 新建components目录,并在其目录下新建playlist目录,然后右键 - 新建Component,输入playlist,自动为我们创建了playlist组件。 playlist组件如下: playlist.wxml: <view class="playlist-container" bind:tap=...

hongxue8888的博客 1973

MusicBox开发揭秘:多平台API整合原理与播放器组件设计详解

MusicBox是一款一站式收听多平台音乐(网易云、虾米、QQ)的跨平台音乐播放器,通过巧妙的API整合与组件化设计,实现了不同音乐平台资源的无缝聚合与播放体验。本文将深入剖析其核心技术架构,包括多平台API适配方案、播放器组件设计及关键功能实现原理。 ## 多平台API整合架构:打破音乐平台壁垒 MusicBox的核心竞争力在于对网易云、虾米、QQ三大音乐平台的API整合能力。项目通过模块化

gitblog_00422的博客 1045

MLT 视频编辑框架简介(二):框架设计简述

作者在中阐述了 MTL 框架的设计思想。本文对这篇文档进行总结和梳理,选择重点内容进行详细说明。MTL 是一个用 C 写的库(它其实也提供了 C++ 接口),它采用 Producer/Consumer 设计模式进行开发。在 MTL 中最常见的「图结构」是 Producer 连接另一个 Consumer。Consumer 从 Producer 中请求一个 MLT frame,然后消费这个 MLT frame,最后释放 MLT frame。

记录学习的过程 2191

基于 Flutter × OpenHarmony 的跨端视频播放器数据模型设计实践

本文探讨了基于Flutter和OpenHarmony的跨端视频播放器数据模型设计实践。重点分析了视频业务场景下的核心数据结构设计,包括视频分类模型(VideoCategory)、视频标签模型(VideoTag)、核心视频模型(Video)和播放列表模型(Playlist)。这些模型采用面向对象的设计思路,通过对象嵌套对象的方式实现业务语义表达。文章还详细阐述了页面状态变量的设计方法,包括筛选状态变量、数据源变量和播放器状态变量,并展示了如何在initState中进行数据初始化。这种数据模型设计方法不仅能提高

m0_71592416的博客 688

Java开源在线考试系统怎么选?从技术选型到落地部署的完整指南

Java开源在线考试系统怎么选?本文从技术选型、核心功能、部署运维、二次开发等维度,梳理了Java开源在线考试系统的选型要点。

麦塔在线考试培训系统 355
上一篇: Eclipse - template
下一篇: javascript 浏览器提示有消息
wapysun
博客等级 码龄19年 14粉丝 3原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值