当前位置: 首页 > news >正文

如何做好网站seo网站年报公示怎么做

如何做好网站seo,网站年报公示怎么做,wordpress网页版入口,做销售的如何在网站目录 1 需求2 实现 1 需求 我现在有一个300MB 的文件,想要根据这个文件,创建100万个大小一样的,名称不一样,如何实现,如何比较快点实现 2 实现 1 先准备好这个文件 2 准备好目录 3 写代码 private static void crea…

目录

  • 1 需求
  • 2 实现

1 需求

我现在有一个300MB 的文件,想要根据这个文件,创建100万个大小一样的,名称不一样,如何实现,如何比较快点实现

2 实现

1 先准备好这个文件

在这里插入图片描述

2 准备好目录

在这里插入图片描述
3 写代码

private static void createFile(String sourceFilePath,String destinationFolderPath, int fileNumber) {File file1 = new File(sourceFilePath);Path sourcePath = Paths.get(sourceFilePath);String destinationFileName = "copy_" + UUID.randomUUID().toString() + "_" + file1.getName();Path destinationPath = Paths.get(destinationFolderPath, destinationFileName);//try {// 复制源文件到目标文件Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);} catch (IOException e) {e.printStackTrace();}}public static void main(String[] args) {String sourceFilePath = "D:\\100w\\source\\1111111111111.HDF"; // 替换为实际的源文件路径String destinationFolderPath = "D:\\100w\\dest"; // 替换为实际的目标文件夹路径int numFiles = 1000000; // 需要创建的文件数量int numThreads = Runtime.getRuntime().availableProcessors(); // 使用可用的处理器核心数作为线程数ExecutorService executorService = Executors.newFixedThreadPool(numThreads);try {// 创建目标文件夹(如果不存在)Files.createDirectories(Paths.get(destinationFolderPath));// 循环提交文件创建任务给线程池for (int i = 100; i < numFiles; i++) {int fileNumber = i;executorService.submit(() -> createFile(sourceFilePath,destinationFolderPath, fileNumber));}executorService.shutdown();} catch (IOException e) {e.printStackTrace();}//        try {//            // 获取源文件的路径对象//            Path sourcePath = Paths.get(sourceFilePath);////            // 创建目标文件夹(如果不存在)//            Files.createDirectories(Paths.get(destinationFolderPath));////            // 循环复制文件并创建副本文件//            for (int i = 0; i < numFiles; i++) {//                // 构造目标文件的路径对象//                String destinationFileName = "copy_" + i + "_" + sourcePath.getFileName();//                Path destinationPath = Paths.get(destinationFolderPath, destinationFileName);////                // 复制源文件到目标文件//                Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);//            }////            System.out.println("文件复制完成!");//        } catch (IOException e) {//            e.printStackTrace();//        }}
http://www.yayakq.cn/news/24148/

相关文章:

  • 温州市网站建设哪家公司好西安做酒店用品的网站
  • 保险网站模板天猫代运营电商公司排行榜
  • 织梦网站改版需要怎么做重庆seo的薪酬水平
  • 与通信工程专业做项目的网站wordpress版权代码
  • 企业网站营销策划编程app免费
  • 连锁酒店网站建设公司wordpress段子
  • 手机怎么做网站服务器吗微信公众平台号申请注册
  • 网站建设方案范例一个网站主页开发费用
  • 成品网站 子目录打不开wordpress 种子搜索引擎
  • 共享ip服务器做网站两个网站php 一个空间
  • 设计学类专业包括什么黑帽seo是作弊手法
  • 德州手机网站建设服务有哪些外国网站做精油的
  • 可以做推广的网站如何优化一个网站
  • 30多了学网站建设晚吗想建设网站前期调研报告如何写
  • 水贝网站建设asp网站500错误
  • 大理州建设局网站门户网电商说白了做啥
  • 天津高端网站设计公司wordpress判断是否是子分类
  • 网站访客qq提取wordpress缩略图没
  • 开元棋牌网站怎么做网站发布
  • 网络服务协议合同seo快速排名分析
  • 黑龙江做网站找谁那种软件可以做视频网站
  • 方案案例网站如何增加网站的外链
  • 网站推广的基本方法甜蜜定制app
  • 做网站是要收费的吗天津建筑网站建设
  • 做网站还要买服务器吗湖南株洲网
  • 山东省建设厅的网站做网站视频用哪个视频编辑软件
  • 抖音做我女朋友的网站网站开发需要考什么证书
  • wordpress访问子网站营口网站优化
  • 做gif表情包的网站网站三要素
  • 学网站建设工作最大的购物平台