ICode9

精准搜索请尝试: 精确搜索
  • Centos7 常用优化脚本2022-09-04 03:00:16

    #!/bin/bash #服务器一键优化工具 function define_check_network() { echo 主机名为`hostname -f` ping www.baidu.com -c 6 } function define_yum () { #关闭selinux sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config #常用软件安装

  • b站如何一次性取关10人2022-09-03 19:00:30

    在当前页面控制台输入 $(".be-dropdown-item:contains('取消关注')").click() 出现如下提示 刷新即可

  • wait与sleep区别2022-08-30 13:31:04

    wait与sleep区别在于: wait会释放所有锁而sleep不会释放锁资源. wait只能在同步方法和同步块中使用,而sleep任何地方都可以. wait无需捕捉异常,而sleep需要. 两者相同点:都会让渡CPU执行时间,等待再次调度! class Allocator { private List<Object> als; // 一次性申请所有资源

  • Eclipse 新建 Maven项目太慢了2022-08-18 21:33:41

    免费的maven的archetype-catalog.xml文件下载 http://repo1.maven.org/maven2/archetype-catalog.xml 链接:https://pan.baidu.com/s/1HaBh-Xiq2BnxIvZYJZl_xA 提取码:0lnx hwenlong提供的9.5M版本 链接:https://pan.baidu.com/s/1zeOE_bSzRb330pothxth6Q 提取码:trug 配置本地catalog

  • MERGE Statement in SQL Explained2022-08-02 15:31:14

    MERGE Statement in SQL Explained Prerequisite – MERGE Statement As MERGE statement in SQL, as discussed before in the previous post, is the combination of three INSERT, DELETE and UPDATE statements. So if there is a Source table and a Target table that ar

  • Tortoise-ORM使用filter查询时忽略值为None的参数2022-07-28 10:34:49

    首先看一个官网的filter示例 Users.filter(id=user_id, name=user_name).all() 在如下实际应用中,我们需要忽略参数值为None的情况,不传参表示查询全部数据 @app.get('/users', response_model=User_Pydantic) async def get_users(user_name: str|None=None, email: str|None=None

  • mysql分组查询出现错误:Expression #1 of SELECT list is not in GROUP BY clause and contains nonagg2022-07-25 17:00:15

    MySQL分组查询出现错误:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘XXX’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by这是由于MySQL启用了ON

  • 【Java】查找 List/String字符串 中是否包含指定的 元素/字串 contains方法实现2022-07-13 21:03:30

      /** * 查找list中是否有指定元素 */ @Test public void findListEl() { List<Integer> integers = Arrays.asList(3, 5, 2, 7, 8, 1, 9); Integer kw1 = 9; Integer kw2 = 6; System.out.println(integers.contains(kw

  • ArrayList2022-07-12 14:34:07

    1.indexof: 1,传递一个元素给它,如果此列表不包含这个元素,则返回-1。2,如果包含这个元素:分两种情况。若为null,找到它对应的索引返回。不为null,同样找到对应索引返回。   public int indexOf(Object o) { if (o == null) { for (int i = 0; i < size; i++)

  • 一键同步mysql到数仓(airflow调度)2022-07-09 23:35:52

    经常会接到产品的需求:同步***表到hive,做分析。(做多了感觉很烦,就写一个工具) 一:背景、功能、流程介绍 1.背景:     1.数仓使用hive存储,datax导数据、airflow调度    2.虽然数据产品同学对datax进行了封装,可以点点点完成mysql表的同步,但是过程太复杂了        还需

  • Collection集合2022-07-05 18:05:30

       boolean add(E e);  问集合中添加元素 booLean remove(E e);  删除集合中的某个元素 void clear();   清空集合所有的元素 bodLean contains(E e);  判断集合中是否包含某个元素 booLean isEmpty();  判断集合是否为空 int size();  获取集合的长度 object[] t

  • vue中点击其他任意位置关闭弹框2022-06-29 18:34:16

    mounted() { //点击任意位置关闭区域弹窗 document.addEventListener('click', (e) => { //获取弹窗对象 const userCon = document.getElementsByClassName('tanKuang')[0]; const userCon1 = document.getEl

  • LeetCode 0217 Contains Duplicate2022-06-07 09:31:53

    原题传送门 1. 题目描述 2. Solution 1 1、思路分析 Approach #1 (Naive Linear Search) [Time Limit Exceeded] 2、代码实现 package Q0299.Q0217ContainsDuplicate; public class Solution1 { // Approach #1 (Naive Linear Search) [Time Limit Exceeded] public boo

  • Number of Groups (区间重叠问题(时间线性)+贪心优化时间复杂度+优先队列(或者set))2022-06-04 20:35:20

    大佬的题解:CodeCraft-22 and Codeforces Round #795 (Div. 2) A-E - 知乎 (zhihu.com) Number of Groups time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given n colored segments on the number line.

  • 关于Xpath定位方法2022-06-04 19:33:33

      1、通过绝对路径方式定位/html/body/div[1]/div[2]/div[5]/div[1]/div/form/span[1]/input /html/body/div[1]/div[1]/div[5]/div/div/form/span[1] /html//input[@id='su'] /html//input[@id='kw'] 2、通过相对路径方式定位//input //input[#'su'] //input[#'

  • Java获取本地IP地址(Linux)2022-05-30 09:35:47

        package com.cfcc.cfcs.common.utils; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; public class IPUtils { /** * 获取本地IP地址 * * @throws Exception */ public static String get

  • [leetcode] 217. Contains Duplicate2022-05-16 00:01:49

    题目 Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Inpu

  • 【selenium】25、Xpath定位之contains2022-04-18 19:32:39

    contains:模糊匹配文本contains:模糊匹配元素属性1、模糊匹配文本,比如a标签<a class="index-font" href="/">回到首页</a>2、模糊匹配其他属性如class属性3、Contains()总结定位其他id、name等属性方式跟class一样//*[contains(@xx, "index")]除了text文本属性定位不一样//*[contain

  • PHP如何实现类似java中hashset,hashmap2022-03-19 13:31:37

    php常用的数据类型 数组是只能以整型或字符串类型作为key,value可以是任意类型的数据,但是如何在php里面使用类似java中的hashset、hashmap结构或python中的字典dict,set结构,来存储以对象等其他非字符串整型为key的数据;这就要用到php的扩展spl,里面有个SplObjectStorage,它可以

  • C# bindingnavigatro删除事件修改&&遍历指定容器的控件2022-03-01 15:02:58

    bindingnavigatro自带的事件,不能修改,如果想在删除前加入提醒,需要做以下改变: 1、 在bindingnavigatro图标上点右键,选 编辑项   2、删除系统默认带的DeleteItem项目,选为空即可      3、在控件的Click事件中重写代码,可以加入删除提示。。。。 //导航栏的删除事件,重写;

  • Mybatis Result Maps collection already contains value for com.mgys.tpsm.steel.SteelTypeMapper.Steel2022-02-28 16:07:02

    使用mybatis一直报: Result Maps collection already contains value for com.mgys.tpsm.steel.SteelTypeMapper.SteelTypeModelMap 自己的mapper文件写的没有问题。 后面发现是因为:在mybatis的配置文件mybatis.xml内使用了<mapper/>标签加载xxxMapper.xml的映射文件报错,因为如果

  • Messager Problem(NOIOPJENGLISH20)2022-02-08 00:02:37

    Messager Problem https://acs.jxnu.edu.cn/problem/NOIOPJENGLISH20  1000ms  65536K 描述: There are N nodes in the graph. Given the length of edges between the nodes, find the shortest path of size N and the nodes in the path are all different. 图上有n个节点

  • 【java web】web核心技术(Filter&Listener)2022-02-04 10:03:09

    Filter 过滤器 完成通用的操作 案例:登录验证 public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException { // 强制转换 HttpServletRequest request = (HttpServletRequest) req; // 获取资源

  • springboot 关于 Class path contains multiple SLF4J bindings.警告的maven解决2022-02-01 19:34:05

    启动时报错信息 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/cb/.m2/repository/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding

  • Java判断两个集合比较containsAll、Java集合判断对象相等contains2022-01-25 10:03:29

    containsAll() :用于检测 arraylist 是否包含指定集合中的所有元素 两个集合一样返回true,不一样返回false 注意:有一种特殊情况3,重点理解,注意两个集合的使用前后顺序,避免业务中影藏bug 情况1: public static void main(String[] args) { List<String> list1 = Arrays.asList(

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

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

ICode9版权所有