ICode9

精准搜索请尝试: 精确搜索
  • LATEX使用subfigure命令插入多行多列图片并且为子图模式2022-07-31 09:00:47

    最近在写论文,遇到了Latex插入2×2=4张图片作为一个大图片的子图模式的问题,转载一篇测试方法成功的文章进行记录,希望也能帮到有需要的人。 \usepackage{graphicx} %插入图片的宏包 \usepackage{float} %设置图片浮动位置的宏包 \usepackage{subfigure} %插入多图时用子图显示的

  • [LeetCode] 1161. Maximum Level Sum of a Binary Tree2022-07-31 06:31:07

    Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level x such that the sum of all the values of nodes at level x is maximal. Example 1: Input: root = [1,7,0,7,-8,null,null]

  • PAT (Advanced Level) Practice 1003 Emergency Python 解法2022-07-30 09:02:04

    题目: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are m

  • vue-blu之MenuItem封装记录2022-07-28 09:36:05

    描述 1、Menu菜单封装 2、多层菜单的事件建议用busEvent 问题记录 1、中配置click事件跳转路由无效 2、中同时配置click和to,click无效 3、路由跳转需在中使用to 4、与文档中click的说明相悖:[click 点击事件,设置此项 to 将失效] 5、文档: https://chenz24.github.io/vue-blu/#/compo

  • LeetCode 103 Binary Tree Zigzag Level Order Traversal 双端队列 Deque2022-07-28 04:33:41

    Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between). Solution 由于是 \(zigzag\) 的形式,刚开始的思路是用 \(stack\) 来维护反序,但是

  • 2022.7.26 LeetCode2022-07-26 10:36:04

    LeetCode 实现跳表 主要参考了以下几篇Bolg: https://www.acwing.com/blog/content/15081/ https://www.jianshu.com/p/9d8296562806 https://www.acwing.com/blog/content/4863/ https://www.luogu.com.cn/blog/your-alpha1022/SkipList class Skiplist { public: const stati

  • 跳表2022-07-26 02:31:20

    1. 跳表介绍 跳表是一种随机化的数据结构,可以被看做二叉树的一个变种,它在性能上和红黑树、AVL树不相上下, 但是跳表的原理非常简单,目前在Redis和LevelDB 中都有用到 跳表的期望空间复杂度为 O(n),跳表的查询,插入和删除操作的期望时间复杂度均为O(logn) 跳表实际为一种多层的有序链表

  • LeetCode 102 Binary Tree Level Order Traversal 层序BFS2022-07-24 06:00:14

    Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Solution 用 \(BFS\) 即可,每次将该层的节点 \(pop\), 然后 \(push\) 其子数的节点 点击查看代码 /** * Definition for a binary tree n

  • 树形插件 vue-treeselect 基本使用2022-07-22 19:03:29

    树形插件 vue-treeselect 基本使用   vue-treeselect 是一个多选组件,具有对 Vue.js嵌套选项支持。   支持嵌套选项的单选和多选 模糊匹配 异步搜索 延迟加载(仅在需要时加载深度选项的数据) 键盘支持(使用Arrow Up & Arrow Down键导航,使用键选择选项Enter等) 丰富的选项和高度

  • 2022.07.22-初读《大道至简——软件工程实践者的思想》2022-07-22 17:01:08

    本周一(2022.07.18),写了PAT (Basic Level) Practice (中文)1016、1017。本周二(2022.07.19),写了PAT (Basic Level) Practice (中文)1018,阅读《大道至简——软件工程实践者的思想》。本周三(2022.07.20),写了PAT (Basic Level) Practice (中文)1019,阅读《大道至简——软件工程实践者的思想

  • python队列Queue2022-07-22 10:07:58

    Queue Queue是python标准库中的线程安全的队列(FIFO)实现,提供了一个适用于多线程编程的先进先出的数据结构,即队列,用来在生产者和消费者线程之间的信息传递 基本FIFO队列 class Queue.Queue(maxsize=0) FIFO即First in First Out,先进先出。Queue提供了一个基本的FIFO容器,使用方法很

  • Tree level order--DFS /Queue2022-07-22 07:33:20

          public class Solution{ public List<List<Integer>> levelOrder( TreeNode root){ List<List<Integer>> res= new ArrayList<>(); if(root==null) return res; dfs(res, root,0); return res; } private void dfs( List<List&l

  • leveldb-Impl: Version.java2022-07-21 18:00:09

    Manifest与Current文件是LevelDB保存在稳定存储中的文件版本信息,在LevelDB被打开后,其会先通过Current文件找到当前的Manifest文件,读取并反序列化其中数据,并在内存中维护文件版本信息,以便后续操作。 先来说说Version,Version表示了当前leveldb的版本信息,版本信息内容包括:1当前每一层

  • NO44. 通配符匹配2022-07-21 17:36:19

    #和之前通配符匹配很像,dp的思路 class Solution: def isMatch(self, s: str, p: str) -> bool: vertical = len(p)+1 #纵向的长度,由于有初始start因此加一 level = len(s)+1 if set(p) == {"*"}: return True # *可以匹配包括空字符 #建表

  • 类的相关方法2022-07-20 23:03:07

    如何为创建大量实例节省内存: 定义类的__slots__ 它声明实例属性名字的列表,减少内存开销 #定义两个类: 查看占用内存大小 class player1(): def __init__(self,uid,name,status=0,level=1): self.uid = uid self.name = name self.status = status

  • sql查询树状结构某节点下的所有子节点2022-07-19 16:36:37

    with cte_child(id,areaName,pid,level)as( --起始条件 select id,areaName,pid,0 as level from erp_area where id = 1 -- 优先列出第一节点查询条件 union all --递归条件 select a.id,a.areaName,a.pid,b.level+1 from erp_area a inner join

  • 【流行前沿】QSFL: A Two-Level Uplink Communication Optimization Framework for Federated Learning2022-07-18 19:35:04

    今天分享一篇研究模型细粒度传输的联邦学习文章,作者Liping Yi来自于南开大学,发表在ICML 2022。 Intro 故事的起源还是来自于深度网络越来越大,导致上行链路达到了TB级别,这对于低带宽的无线上行链路来说太难传输了,因此要对通信过程进行优化。作者总结了现有的communication-effectiv

  • Codeforces 704 D2022-07-14 15:05:12

    这题有一些前置知识:有源汇有上下界最大流。 首先,如果\(r<b\),那么我们希望\(r\)更多;否则我们希望\(b\)更多。其实如果\(r<b\),那么我们可以将\(r\)看成\(1\),\(b\)看成\(0\),目标是那么我们相当于将贡献从\(r\)和\(b\)变成了\(0\)和\(1\)。 那么考虑一个有上下界的最大流: 我们对于每行

  • sqlMap使用技巧2022-07-12 01:02:37

    猜解是否能注入python sqlmap.py -u "http://110.40.250.105:8065/Less-6/?id=1"用于mysq注入 查找数据库python sqlmap.py -u "http://110.40.250.105:8065/Less-6/?id=1" --dbs查找数据库下的表(security库)python sqlmap.py -u "http://110.40.250.105:8065/Less-6/?id=1&

  • Tp5 where 中包含or 链式查询怎么写2022-07-07 17:05:12

    问题 当查询中有需要用到or,你可能是按照如下的写法 $where = ['user_id' => $user_id]; $whereor = ['uc.level' => 3,'u.account_type' => 2]; UserModel::alias('u') ->join(UserCheckLevelModel:

  • vcs xprop 仿真的一些理解2022-07-04 16:01:38

    本篇随笔参照vcs user guide,并进行了一个小实验用以加深理解。 在芯片前端开发的后期,验证工程师需要进行xprop仿真验证,之前我只是简单的打开xprop的功能,去回归一些case看会不会fail并进行debug。但是对为什么要进行xprop验证理解的并不是很清楚。 下面是一些我自己的理解: 1. xprop

  • pytest.mark.skip 跳过测试用例2022-06-29 15:34:12

    目录介绍执行打印额外现实跳过的信息通过标记的方式跳过测试用例在用例内通过判断强制跳过跳过整个模块:pytest.skip(reason, allow_module_level=True) 介绍 您可以标记无法在某些平台上运行或您预计会失败的测试功能,以便 pytest 可以相应地处理它们并提供测试会话的摘要,同时保持

  • Django中logging的配置2022-06-29 08:31:17

    LOGGING = { 'version': 1, #版本 'disable_existing_loggers': False, #是否禁用其他的logger 'formatters': { 'standard': { 'format': '%(asctime)s [%(threadName)s:%(thread)d] [%(name

  • Stairway to SQL Server Indexes2022-06-29 01:01:46

    Stairway to SQL Server Indexes Indexes are fundamental to database design, and tell the developer using the database a great deal about the intentions of the designer. Unfortunately indexes are too often added as an afterthought when performance issues ap

  • Level 1 (day 6)2022-06-28 09:05:13

    第一题 题目链接:https://leetcode.cn/problems/n-ary-tree-preorder-traversal/ 个人题解:DFS 代码: class Solution { public: vector<int> res; vector<int> preorder(Node* root) { dfs(root); return res; } void dfs(Node* root) {

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

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

ICode9版权所有