步骤一: 创建一个本地git版本库,在项目目录下通过git init把它变成Git仓库;再通过git add .把项目所有文件添加到本地仓库; git init git add . 步骤二:将项目所有文件提交到本地仓库; git commit -m "first commit" 步骤三:登录在Gitee上设置好SSH密钥或使用HTTPS方式连接,新建一个远程仓库,将本
坑
1、查找内容不在查找区域的首列 根据工号查找相应的工资,而输入的公式为=VLOOKUP(C23,$B$2:$F$10,5,0),却不能查找内容。解决方法:更改引用区域,将A列区域选中,具体公式为=VLOOKUP(C23,$A$2:$F$10,6,0)PS:类似查找不到的原因还可能是因为引用区域没固定、返回的列号不在区域内或者第四参数输入不对等都会出现错误2、文本格式存在不统一查找值的是数字格式,而
List<Integer>转换为List<string>List<String> stringList = intList.stream().map(String::valueOf).collect(Collectors.toList());List<String>转换为List<Integer> List<Integer>
public static Date getStartOfDay(Date date) { LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), ZoneId.systemDefault()); LocalDat
public static Date getBeginTime(int year, int month) { YearMonth yearMonth = YearMonth.of(year, month); LocalDate localDate = yearMonth.atDay(1); LocalDateTime startOfDay = localD
简单时间格式:yyyy-MM-dd HH:mm:ss@Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$")private String createDate;
EasyExcel ExcelGenerateException: The index of ‘xx‘ and ‘xx‘ must be inconsistent@ExcelProperty(index=0)原因是两个字段的index索引值都是没按顺序来,导致异常,索引index从0开始递增
一、校验数字的表达式数字:^[0-9]*$n位的数字:^\d{n}$至少n位的数字:^\d{n,}$m-n位的数字:^\d{m,n}$零和非零开头的数字:^(0|[1-9][0-9]*)$非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})$正数、负数、和小数:^(\-|\+)?\d+(\
db.user.find({'addresses.city':{'$regex': /菏泽市定陶县/ }}).forEach( function(item) { var tmp = String(item.addresses.city) tmp = tmp.replace('菏泽市定陶县','菏泽市定陶县区') if (tmp == null){
// 取到第一页数据var page = db.test.find().sort({"_id":1}).limit(20);var last;// 判读是否有下一页数据while( page.hasNext() ){ latest = page.next();} // 查询下一页的数据db.test.find({"_id": {"$gt": latest._id} }).sort({"_i
q.addCriteria(Criteria.where("mongod库对应field") .regex(Pattern.compile(Pattern.quote(field对应的值), Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE)));eg:mongodb集合对应的属性fileNameCriteria criteria=new Criter
mongod库层面:useadminswitchedtodbadmindb.runCommand({getParameter:1,"internalQueryExecMaxBlockingSortBytes":1}){"internalQueryExecMaxBlockingSortBytes":33554432,"ok":1}Mongo
确定您使用的是不是搭载Apple芯片的Mac,然后按照相应的步骤操作:Apple芯片:将Mac开机并继续按住电源按钮,直至看到启动选项窗口,其中包含一个标有“选项”字样的齿轮图标。选择“选项”,然后点按“继续”。Intel处理器:确保您的Mac已连接到互联网。然后,将Mac开机并立即按住Command(⌘)-R,直至看到Apple标志或其他图像。命令行:点击“实用工具”,选择“终端”。在弹出的窗口
参考地址:https://docs.spring.io/spring-data/mongodb/docs/2.1.3.RELEASE/reference/html/#mapping-usagespring-data-mongodb中的实体映射是通过MongoMappingConverter这个类实现的。它可以通过注解把java类转换为mongodb的文档。@Document-把一个java类声明为
Stringdf="12.2";floata=Float.parseFloat(df);
基于使用Java8的一些参数来过滤此列表。但是如果参数是null,则抛出NullPointerException。如何过滤掉空值List<String>carsFiltered=Optional.ofNullable(cars).orElseGet(Collections::emptyList).stream().filter(Objects::nonNull)//filteringc
异常提示: Non-terminatingdecimalexpansion;noexactrepresentabledecimalresult备注:在加减乘时都没有出现问题,但是到除法运算时异常;一个无限循环小数,没有精确可表示的结果方法:四舍五入模式,将一个无限循环小数进行四舍五入解决方案:一:multiply求百分比BigDecimalbrokerage=financeStatisticDt
一:以毫秒为单位msDateTimeFormatterdf=DateTimeFormatter.ofPattern("yyyy-MM-ddHH:mm:ss.SSS");Stringdateformat=df.format(LocalDateTime.ofInstant(Instat.ofEpochMilli(1610367215462L),ZoneId.of("Asi
db.yourCollection.createIndex({<field>:<1or-1>})db.yourCollection.getIndexes()//查看当前collection的索引
springboot中多个配置文件,指定让配置文件生效,以便于达到在开发环境,测试环境,线上环境根据不同的配置灵活应用。springboot框架内部提供了2种方式用于加载YAML文档,以供启动时读取配置文件;YamlPropertiesFactoryBean会加载YAML变为Properties;YamlMapFactoryBean会转换YAML为map;springBoot中多环境配置文件名必须
环境:使用阿里FastjsonpublicstaticbooleanisJSON(Stringcontext){try{JSONObjectjsonObject=JSONObect.parseObject(context);returntrue;}catch(Excepitone){e.printStackTrace();returnfalse;}}
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号