ICode9

精准搜索请尝试: 精确搜索
  • 解决 Error running ‘Application‘: Command line is too long.2022-09-16 18:33:33

    原文链接:https://blog.csdn.net/weixin_44768683/article/details/126095839 问题描述 Error running 'Application': Command line is too long. Shorten command line for Application or also for Spring Boot default configuration? 翻译翻译: 运行“Application”时出错:命令

  • sed高阶用法2022-09-16 13:04:00

    sed高级用法 a 追加 [root@localhost ~]# cat test hello world jjjd aaaaaaa //向第二行后面追加'hi world' [root@localhost ~]# sed '2ahi world' test hello world jjjd hi world aaaaaaa //过滤包含'world'的行,在其后面追加'hi world' [root@localhost ~

  • sed命令用法2022-09-16 12:34:00

    [sed命令] sed 的工作流程主要包括读取、执行和显示三个过程。 读取:sed 从输入流(文件、管道、标准输入)中读取一行内容并存储到临时的缓冲区中(又称模式空间,pattern space)。 执行:默认情况下,所有的 sed 命令都在模式空间中顺序地执行,除非指定了行的地址,否则 sed 命令将会在所有的行

  • 正则表达式常用2022-09-16 11:03:53

    import re #---------------------------正则表达式,用于爬取出来的文本进行再次筛选 url  还有其他数据的筛选 # . (任意字符) # ^ (以前面字符开头) # $ (以前面字符结尾) # ? (非贪婪匹配模式,自左向右,默认贪婪匹配模式,自右往左,最大长度匹配) # 特殊字符 +   出现至少一次

  • Python 笔记2022-09-16 08:32:41

    Python 简介 Python 由 Guido van Rossum(荷兰

  • pandas 转化DataFrame后输出报错 AttributeError: 'NoneType' object has no attribute 'total_sec2022-09-14 21:33:54

    pandas 转化 数据为DataFrame后,DataFrame不能够print 否则会报错AttributeError: 'NoneType' object has no attribute 'total_seconds' #data的数据结构大致为[{...,'datetime':datetime.datetime(2022, 7, 4, 13, 55, 0, 500000, tzinfo=zoneinfo.ZoneInfo(key=�

  • 322022-09-13 23:00:26

    1 #include <iostream> 2 #include <string> 3 #include <cstring> 4 using namespace std; 5 template <class T> 6 class myclass { 7 private: 8 T* p; 9 int size; 10 public: 11 myclass(T* _p,int _size = 0):size(_siz

  • APP性能测试——冷启动耗时测试2022-09-13 15:31:46

    冷启动耗时:     即后台没有该应用的进程(我们使用am force-stop命令结束app运行),打开软件,直到进入到首页activity页面,并计算耗时。 示例代码: import os import time # 测试冷启动时间 # 创建App进程, 加载相关资源, 启动Main Thread, 初始化首屏Activity def startUpTime(pg_

  • APP性能测试——热启动耗时测试2022-09-13 15:30:37

    热启动耗时:     即当启动应用时,后台已有该应用的进程(我们模拟按下HOME键),打开软件,直到进入到首页activity页面,并计算耗时。 示例代码: import os import time def hotTime(device, pg_name, pga_name): """ :param device: :param pg_name: :param pga_name:

  • http文件服务器2022-09-13 11:02:25

    原代码地址:GitHub仓库:JevenM 本代码删除了原仓库中的一些个人用不到的功能(生成目录树?),另外稍微给页面加了一点格式,美化了一点点。 运行步骤: 查看帮助信息: $ python httpServer.py -h usage: httpServer.py [-h] [-p PORT] [--path PATH] [--bind ADDRESS] options: -h, --help

  • .NET使用StackTrace获取方法调用信息2022-09-12 00:34:35

    原文 https://www.cnblogs.com/netry/p/dotnet-stacktrace-stackframe.html 在日常工作中,偶尔需要调查一些诡异的问题,而业务代码经过长时间的演化,很可能已经变得错综复杂,流程、分支众多,如果能在关键方法的日志里添加上调用者的信息,将对定位问题非常有帮助。 介绍 StackTrace, 位于

  • Hadoop+Python测试wordcount2022-09-11 11:33:01

    1、将测试数据上传到HDFS目录下,这里放到根目录下:/test.txt 2、在master节点中某个目录下:创建mapper、reducer以及run.sh mapper.py import sys for line in sys.stdin: line = line.strip() words = line.split() for word in words: print "%s\t%s" % (wor

  • LCD1602代码记录2022-09-10 23:33:13

    LCD1602.c代码: #include <REGX52.H> //引脚配置: sbit LCD_RS=P2^6; sbit LCD_RW=P2^5; sbit LCD_EN=P2^7; #define LCD_DataPort P0 //函数定义: /** * @brief LCD1602延时函数,12MHz调用可延时1ms * @param 无 * @retval 无 */ void LCD_Delay() { unsigned char i, j

  • 统计字符串中每个字符出现的次数2022-09-10 13:30:47

    /** * **统计字符串中每个字符出现的次数** * 思路: * 用一个Map保存统计结果,key保存出现的字符,value保存该字符出现的次数 * 利用字符串的charAt方法可以遍历字符串中每一个字符 * 如果map中该字符不存在,则存入,并且对应的次数为1 * 如果map中该字

  • linux按行读取 (while read line与for-loop)2022-09-08 18:03:53

    转自: linux按行读取 (while read line与for-loop) 在linux下一般用while read line与for循环按行读取文件。现有如下test.txt文件:      1. while read line while read line; do echo $line done < test.txt 输出结果与上图一致。 这里也可以写为: cat test.txt | while r

  • Revit二次开发——创建墙2022-09-07 12:32:28

    创建墙测试 [Autodesk.Revit.Attributes.Transaction(TransactionMode.Manual)] [Autodesk.Revit.Attributes.Regeneration(RegenerationOption.Manual)] public class AxWallCreate : IExternalCommand { Autodesk.Revit.ApplicationServices.Application

  • PAT_A 1037 Magic Coupon2022-09-04 23:31:52

    PAT_A 1037 Magic Coupon 分析 尽量增大总回报值即可得到结果。 PAT_A 1037 Magic Coupon 题目的描述 The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get

  • [Google] LeetCode 562 Longest Line of Consecutive One in Matrix2022-09-03 03:00:49

    Given an m x n binary matrix mat, return the length of the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal, or anti-diagonal. Solution 我们需要统计行、列以及对角线中最长的连续的 \(1\) 的数量。 直接考虑 \(dp[i][j

  • 【C++】Debugging Segmentation Faults2022-09-01 12:32:15

      背景 linux下的程序,在遇到空指针解引用、栈错误等原因崩溃时,bash会输出一条: Segmentation fault(core dump) 如果你看到core dumped字样,并且在目录下也找到了一个叫core的文件,那你可以直接用gdb定位到程序崩溃的位置。但是,我在实践中发现,在我的ubuntu 20.04环境下,程序段错误

  • ak日记 831 dxm2022-08-31 20:02:14

    import sys from math import inf line = sys.stdin.readline().strip() vs = list(map(int, line.split())) n, k = vs[0], vs[1] line = sys.stdin.readline().strip() vs = list(map(int, line.split())) dp = [[0]*n for _ in range(n)] ans = 0 for i in range(n-1, -1,

  • ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("Id",getId())防止内存泄漏2022-08-30 22:31:00

    public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("Id",getId()) .append("AdClientId",getAdClientId()) .append("AdOrgId",getAdOrgId()) .append("Posid",getPosid())

  • 【Manim CE】常用Mobject2022-08-28 15:33:30

    当前文档版本:v0.16.0.post0 VMobject 继承自Mobject V的意思是向量化的,vectorized mobject fill_color=None, fill_opacity=0.0, stroke_color=None, stroke_opacity=1.0, stroke_width=DEFAULT_STROKE_WIDTH, background_stroke_color=BLACK, background_stroke_opacity

  • sparkcore案例三:获取每一种状态码对应的访问量2022-08-27 11:32:37

    题目描述: /** * 清洗完成的数据中包含一个用户的响应状态码,获取每一种状态码对应的访问量 * 1、读取清洗完成的数据成为RDD[String] * 2、可以把上一步得到的RDD通过map算子转换成一个键值对类型的RDD,以状态码为key 以不同用户的访问日志为value的数据 * 3、键值对类

  • Examples of regular expressions2022-08-27 07:32:28

    https://support.google.com/a/answer/1371417?hl=en#Match-Word-or-Phrase-in-a-List   Examples of regular expressions The following examples illustrate the use and construction of simple regular expressions. Each example includes the type of text to match

  • 备份2022-08-25 17:33:48

    <template> <el-container> <el-header> <router-link to="/">首页</router-link> | <router-link to="/about">写作台</router-link> </el-header> <el-container> <el-as

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有