ICode9

精准搜索请尝试: 精确搜索
  • nginx父子进程间通信2021-02-17 12:32:33

    父子进程间通信 1 内部流程 — socketpair 基础 主要是通过socketpair()函数实现的,下面捋一下内部流程: 1. 话说要从ngx_start_worker_processes函数讲起: static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n, ngx_int_t type) { ngx_int_t i;

  • 寻找图中的有向环-java2021-01-21 14:03:13

    判断图中是否有一个有向环: edgeTo 数组找到有向环的所有顶点 onStack 调用dfs时将其设置为true,调用结束时设为false。 public class DirectedCycle { private boolean[] marked; // marked[v] = has vertex v been marked? private int[] edgeTo; /

  • 软件中的一些速度2021-01-17 18:03:35

    软件中的一些速度 软件性能光速真空30万千米/秒,光纤 20万千米/秒,地球周长4万千米,绕一次大概0.2秒,一个点到最远需要0.1秒(这里忽略一次全球网络请求可能经过上百个路由器的事实)机械硬盘5400 60-90M,7200 130-190M固态硬盘300M+Registers和MOB(Memory Ordering Buffers)~ 1 cycle <

  • 深度学习——UMRL2021-01-02 12:31:03

    CVPR2019原论文:Uncertainty Guided Multi-Scale Residual Learning-using a Cycle Spinning CNN for Single Image De-Raining 开源代码(pytorch框架):https://github.com/rajeevyasarla/UMRL–using-Cycle-Spinning 1.主要工作: 提出了不确定性引导的多尺度残差学习(UMRL)网络。

  • Nginx 学习 2: nginx进程模型2021-01-01 10:59:55

    一. 概述 nginx有两类进程,一类称为master进程(相当于管理进程),另一类称为worker进程(实际工作进程)。启动方式有两种: 单进程启动:此时系统中仅有一个进程,该进程既充当master进程的角色,也充当worker进程的角色。多进程启动:此时系统有且仅有一个master进程,至少有一个worker进程工

  • 457. Circular Array Loop2020-10-02 13:01:53

    You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, if it's negative (-k), move backward k steps. Since the array is circular, you may assume that the l

  • Fast and slow pointers for cycle detection in linked list2020-08-26 20:02:00

    The blog aims to provide a sound proof for the approach to solve leetcode 142. Problem   Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Most programmers know that the fast/slow pointers approach is able to

  • Princeton ELE 475 - 3 single-cycle implementation2020-05-29 22:08:34

    Big Picture: Classic 5 Components of A Processor -- Control Unit  (in the processor) -- Datapath      (in the processor) -- Memory -- Input -- Output  HARDWARE DESIGN STEPS 1. analyze instruction set => datapath requirements       ISA model => RTL

  • Nginx启动流程概览2020-04-07 23:54:27

    Nginx启动流程概览 1、 Init Cycle 2、 Init Process 3、 Start Worker 4、 Event Handle Init Cycle ngx_cycle 是nginx全局配置,类型为ngx_cycle_t,其结构如下(已精简): struct ngx_cycle_s {

  • 刷题142. Linked List Cycle II2020-03-19 21:00:25

    一、题目说明 题目142. Linked List Cycle II,判断一个链表是否有环,如果有返回环的第一个元素,否则返回NULL。 这个题目是141. Linked List Cycle的升级版本,难度是Medium! 二、我的解答 最直观的解答就是用一个unordered_map<ListNode*,int> dp来统计节点出现的次数,如果出现2,则这个就

  • 1150 Travelling Salesman Problem2020-03-15 23:51:09

    1150 Travelling Salesman Problem (25分) The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and retur

  • FPGA学习笔记17--always块产生波形2020-03-12 16:05:58

    module test2; reg clk1,clk2; parameter CYCLE = 100; always begin {clk1,clk2} = 2'b10; #(CYCLE/4) {clk1,clk2} = 2'b01; #(CYCLE/4) {clk1,clk2} = 2'b11; #(CYCLE/4) {clk1,clk2} = 2

  • 日志-2020-01-102020-02-28 09:38:36

    nginx 源码初探 nginx 1.17.7 :src/core/nginx.c /* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ /* 预处理器导入了三个头文件 */ #include <ngx_config.h> #include <ngx_core.h> #include <nginx.h> static void ngx_show_version_info(void); s

  • SDNU_ACM_ICPC_2020_Winter_Practice_1st2020-01-22 20:50:50

    A Petya is a big fan of mathematics, esecially its part related to fractions. Recently he learned that a fraction is called proper iff its numerator is smaller than its denominator (a < b) and that the fraction is called irreducible if its numerator a

  • nginx 平滑重启的实现方法2019-12-18 19:07:24

    一、背景 在服务器开发过程中,难免需要重启服务加载新的代码或配置,如果能够保证server重启的过程中服务不间断,那重启对于业务的影响可以降为0。最近调研了一下nginx平滑重启,觉得很有意思,记录下来供有兴趣的同学查阅。 二、重启流程  重启意味着新旧接替,在交接任务的过程中势必会

  • Python中使用class(),面向对象有什么优势2019-12-09 22:57:38

    首先我是辣鸡,然后这个问题的确有点意思 首先,类是一个集合,包含了数据,操作描述的一个抽象集合 你可以首先只把类当做一个容器来使用 class Cycle: def __init__(self,r): self.pi=3.14 self.r=r a=Cycle(4) b=Cycle(7) 你看,我们定义了一个 Cycle 类,我们现在只是将它

  • Python中使用class(),面向对象有什么优势2019-12-09 22:56:43

    首先我是辣鸡,然后这个问题的确有点意思 首先,类是一个集合,包含了数据,操作描述的一个抽象集合 你可以首先只把类当做一个容器来使用 class Cycle: def __init__(self,r): self.pi=3.14 self.r=r a=Cycle(4) b=Cycle(7) 你看,我们定义了一个 Cycle 类,我们现在只是将它

  • javascript-jQuery循环插件未按预期工作2019-12-01 15:35:34

    我正在尝试在新网站上实现滚动库.我正在使用Cycle插件.当我将插件设置为“淡入淡出”或“随机播放”效果以及其他几个效果时,效果很好,但是当我尝试使用所需的效果(scrollLeft或scrollHorz)时,我的图像消失了吗?我不明白,我相信这可能与我的CSS有关.有人可以看看我是否错过了什么吗?

  • 另一个“只能迭代数组或java.lang.Iterable实例”的问题2019-11-21 22:01:55

    我有这段代码返回java.lang.iterable错误.我知道我在哪里出错,但是我不知道该如何解决. 这是代码: public class ManagementServiceHandler implements ManagementService.Iface { private Map<Node, Integer> nodes; private int portCount = 1025; public Managemen

  • Javascript:在主窗口中弹出带有电影的电影2019-11-08 00:39:55

    我是一个刚接触Javascript的新手,并且正在一个网页上尝试该网页,按下按钮后,会弹出一个窗口,其中显示了带有主窗口中图像的循环“电影”.从我尝试过谷歌搜索的过程中,我可以感觉到我已经很接近了,但是有一些东西使我难以理解. 我知道随后的结果将导致两个独立的问题,其中有两个独立

  • Nginx源码分析 - 主流程篇 - 多进程的惊群和进程负载均衡处理2019-10-29 19:01:11

    Linux2.6版本之前还存在对于socket的accept的惊群现象。之后的版本已经解决掉了这个问题。 惊群是指多个进程/线程在等待同一资源时,每当资源可用,所有的进程/线程都来竞争资源的现象。 Nginx采用的是多进程的模式。假设Linux系统是2.6版本以前,当有一个客户端要连到Nginx服务器上,Ngi

  • Linux服务器开发——Nginx(三)启动main函数解析2019-10-25 10:03:30

    Nginx的主流程的实现函数在./src/core/nginx.c文件中 其中的重点模块会在后面的文章里详解 ------------------------------------------------- 大部分初始化工作的中心,变量cycle解析: ------------------------------------------------- static ngx_uint_t ngx_show_help

  • 基于内存的类似redis的缓存方法2019-10-18 13:55:36

    项目中需要用到redis,业务起来之后用到的地方更多,问题来了,因为操作redis太频繁,导致操作redis成为整个项目的瓶颈,经过调研和比较这时候基于内存的cache登场,简单来说就是纯内存层面的cache,可以实现1、缓存数量的限制(不能无限制的堆内存,会撑爆)2、能设置过期时间(内存中只缓存高频出现的

  • Django模板语言-2:simple_tag和filter2019-10-16 15:55:20

    标签simple_tag:    标签:在HTML中使用{% %}标记    常见的系统内自带的标签:load、for 、if、with、csrf_token、verbatim、    block-endblock\extends\comment-endcomment\cycle(silent)\自定义标签    1、with:        在html里给变量赋值{% with name=obj

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

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

ICode9版权所有