package main import ( "fmt" "time" ) var jobs chan int var results chan int func work(id int, jobs <-chan int, results chan<- int) { for i := range jo ...
                            
                            
                                分类:
其他好文   时间:
2021-06-25 17:24:48   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime,  ...
                            
                            
                                分类:
其他好文   时间:
2021-06-21 20:22:26   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                我们可以设置集群的平衡参数来暂时禁用掉平衡,具体步骤如下: 1.如果可能的话,先暂停掉数据新增和更新操作,这样会提高集群恢复的时间; 2.禁用集群分片平衡操作,直到告诉集群可以恢复平衡操作为止,禁用配置方式: PUT /_cluster/settings { "transient" : { "clu ...
                            
                            
                                分类:
其他好文   时间:
2021-06-02 12:58:20   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    1.提高 Webpack 打包速度 (1)优化loader的文件搜索范围 Babel 是编写下一代 JavaScript 的编译器 对于 Loader 来说,影响打包效率首当其冲必属 Babel 了。因为 Babel 会将代码转为字符串生成 AST,然后对 AST 继续进行转变最后再生成新的代码,项 ...
                            
                            
                                分类:
Web程序   时间:
2021-05-24 14:18:33   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    https://leetcode-cn.com/problems/find-minimum-time-to-finish-all-jobs/ 不会做,蹭个积分就走~ class Solution { /** * 最小的 工人最大用时 */ private int minId = Integer.MA ...
                            
                            
                                分类:
其他好文   时间:
2021-05-24 01:38:37   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    最近尝试了一下 GitHub 提供的自动化工具 Actions,简单实现了一下 CI/CD。 配置文件需要放在 Repo 对应的目录下:.github/workflows/deploy.yml deploy.yml 具体内容如下: name: Deploy on: push: branches: [ ...
                            
                            
                                分类:
Web程序   时间:
2021-04-07 11:13:16   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    Schedule timed jobs on macOS with launchd launchd is a robust scheduled job automation tool on macOS that allows you to schedule a task to be run at r ...
                            
                            
                                分类:
系统相关   时间:
2021-02-16 12:18:49   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    2021/2/9_第1次修改 ccb_warlock 在很多年前整理过的容器监控方案(https://www.cnblogs.com/straycats/p/9281889.html)中,曾经采用在docker swarm中运行cAdvisor、Prometheus、Grafana来实现对容器与宿主 ...
                            
                            
                                分类:
Web程序   时间:
2021-02-10 13:23:16   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                失败主要是有两种 1、yarn或者npm打包失败 这种情况return code不会改变,仍然会返回0,但是日志里会报error,所以可以通过解析日志里是否有error字段来判断。 一种方法是直接读log文件,如下 error_string=`sudo cat /root/jenkins/jobs/ ...
                            
                            
                                分类:
其他好文   时间:
2021-02-08 12:44:35   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    题目 题意:将n个数分成k组,使得k组中的最大值最小。 题解:暴力DFS,但是要注意两个地方剪枝,首先在DFS的过程中判断当前的最大值是不是已经超过了已有答案。 第二个剪枝的地方比较triky,由于我们对k组没有顺序要求的,所以当剩下的组都是空的时候,我们只需要DFS第一个组。 class Solu ...
                            
                            
                                分类:
其他好文   时间:
2021-02-02 11:23:19   
                                阅读次数:
0