programming computer using isom

Tokio Marine & Nichido Fire Insurance Programming Contest 2020

A - Nickname 直接输出前三个字符。 代码: #include<iostream> #include<cstdio> using namespace std; const int N=25; char s[N]; int main() { scanf("%s",s+1); printf(" ......
Programming Insurance Contest Nichido Marine

Keyence Programming Contest 2020

A - Painting 每次取 \(H,W\) 中较大者涂就是了,输出 \(\lceil \frac{n}{\max(H,W)}\rceil\)。 代码: #include<iostream> #include<cstdio> using namespace std; int h,w,n; int ......
Programming Keyence Contest 2020

diverta 2019 Programming Contest 2

A - Ball Distribution \(k=1\) 时答案为 \(0\),否则答案为 \(n-k\)。 #include<iostream> #include<cstdio> using namespace std; int n,k; int main() { scanf("%d%d",&n ......
Programming diverta Contest 2019

Dwango Programming Contest V

A - Thumbnail 直接按照题意模拟。。。 #include<iostream> #include<cstdio> #include<cmath> using namespace std; const int N=105; int n; int a[N]; int main() { scan ......
Programming Contest Dwango

NIKKEI Programming Contest 2019-2

A - Sum of Two Integers 分奇偶讨论一下就好了,答案为 \(\lfloor \frac{n-1}\{2\}\rfloor\)。 #include<iostream> #include<cstdio> using namespace std; int n; int main() ......
Programming Contest NIKKEI 2019

Dwango Programming Contest 6th

A - Falling Asleep 找到第一个相等的位置,然后暴力往后加就是了。 #include<iostream> #include<cstdio> using namespace std; const int N=55; int n; string s[N]; string t; int a ......
Programming Contest Dwango 6th th

M-SOLUTIONS Programming Contest

A - Sum of Interior Angles 答案为 \(180(n-2)\)。 #include<iostream> #include<cstdio> using namespace std; int n; int main() { scanf("%d",&n); printf("%d", ......
M-SOLUTIONS Programming SOLUTIONS Contest

diverta 2019 Programming Contest

A - Consecutive Integers 答案为 \(n-k+1\)。 #include<iostream> #include<cstdio> using namespace std; int n,k; int main() { scanf("%d%d",&n,&k); printf("%d ......
Programming diverta Contest 2019

CS61A: Structure and Interpretation of Computer Programs 笔记

Functions Environment Diagrams:左侧为 Frames,右侧为 Objects。 Name 类似变量名,它们存储在 Frame 中,指向各种各样的 Objects,比如值或函数。一个 Name 同时只能指向一个 Object,但可以改变自身指向,不受“类型”影响(Name ......

How to get the original size of an image using JavaScript All In One

How to get the original size of an image using JavaScript All In One 如何使用 JavaScript 获取一个图片像的原始大小 naturalWidth & naturalHeight aspect ratio / 纵横比 ......
JavaScript original image using size

Go - Using channels to receive interrupts in a program

Within the Kubernetes deployment environment, applications will actually be sent the SIGTERM signal first if it has been decided the pod holding the a ......
interrupts channels receive program Using

How to fix TypeScript error: expression of type can't be used to index type All In One

How to fix TypeScript error: expression of type can't be used to index type All In One type guard ......
type TypeScript expression error index

using wget utility to download files while keeping path structure

From man wget: -x, --force-directories: [...] create a hierarchy of directories, even if one would not have been created otherwise. E.g. wget -x http: ......
structure download keeping utility using

Computer Architecture 缓存技术杂谈

Computer Architecture 缓存技术杂谈 关于缓存系统的笔记告一段落,整理了所有的笔记链接,并且总结了每一个优化方法对于性能的影响。 (注:MP = Miss Penalty 错失成本,MR = Miss Rate 错失率,BW = Memory Bandwidth 内存带宽) 关于 ......
缓存 Architecture 杂谈 Computer 技术

你还在用UseState,use-immer了解下?

你还在用UseState,use-immer了解下? zobor.zh ChatGPT:https://bproxy.cn/chat ​关注 1 人赞同了该文章 use-immer库是一个非常实用的JavaScript库,它可以帮助开发者更加方便地管理和更新JavaScript对象和数组。在本篇技术 ......
use-immer UseState immer use

use-immer

use-immer 0.9.0 • Public • Published 6 months ago Readme Code Beta 0 Dependencies 308 Dependents 26 Versions use-immer A hook to use immer as a React  ......
use-immer immer use

[886] Some useful functions in ArcPy

Exists: Determines the existence of the specified data object. This function tests for the existence of various data types including feature classes, ......
functions useful ArcPy Some 886

Consider using `allow_partial_search_results` setting to by

Elasticsearch data node 重啟導致 sharding 找不到家 今天遇到單位同仁重啟 Elasticsearch data node 後發現 Cluster 狀態變成 Red 的狀況,這篇記錄遇到這個問題時該怎麼處理 會遇到這個問題通常是「遺失的 Data node」大於「in ......

UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.解决办法

87iuiu由于ii from torchvision import models # 旧版本的写法,将在未来的torchvision 0.15版本中被Deprecated model_old = models.resnet50(pretrained=True) # deprecated model ......

全面分析 Vue 的 computed 和 watch 的区别

全面分析 Vue 的 computed 和 watch 的区别 一、computed介绍 computed 用来监控自己定义的变量,该变量在 data 内没有声明,直接在 computed 里面定义,页面上可直接使用。 //基础使用 {{msg}} <input v-model="name" /> ......
computed watch Vue

C++中using的四大用法总结

请直接看:C++中using的四大用法总结 补充说明:第四点就是为了防止如下错误: #include <iostream> using namespace std; class base { public: void test() { cout << "base::test()" << endl; ......
using

'main' attribute cannot be used in a module that contains top-level code 问题解决

核心是@main 注解在main.swift 文件中,可以重新命名下 参考资料 https://stackoverflow.com/questions/73431031/swift-cli-app-main-attribute-cannot-be-used-in-a-module-that-cont ......
attribute top-level contains cannot module

How to use a shell script to check whether a command had been installed in the Linux server All In One

How to use a shell script to check whether a command had been installed in the Linux server All In One shell script error [: :需要整数表达式 / [: -eq:需要一元表达... ......
installed command whether script server

2021-2022 ICPC Northwestern European Regional Programming Contest (NWERC 2021)

A. Access Denied 先问若干次,问出长度,然后再一位一位的问即可。 #include <bits/stdc++.h> using namespace std; int input() { string s; getline(cin, s); if (s == "ACCESS GRANT ......

Go - Run an application using systemd

The systemd tool fits our simple case of requiring the application to start on server boot-up as well as ensuring that the application is restarted in ......
application systemd using Run Go

一个监控数据的思考-sockets_used

一个监控数据的思考-sockets_used 背景 最近跟踪一个项目问题. Grafana的监控了里面有一个tcp的使用监控 CurrEstab 的数据量是: 700-2000 左右 但是同时有一个非常大的: Sockets_used的数据 数据量一般是 CurrEstab的十倍以上. 大家看起来感 ......
sockets_used sockets 数据 used

[883] Install Python package using Jupyter Notebook

In the installation of packages in Jupyter Notebook, I encountered an issue. I installed packages using Command Prompt (CMD), but when I try to import ......
Notebook Install Jupyter package Python

The 2021 China Collegiate Programming Contest (Harbin) JBEID

The 2021 China Collegiate Programming Contest (Harbin) JBEID J. Local Minimum 模拟 题意:一个数当且仅当它是当前列最小值同时也是当且行的最小值它才算入贡献。 思路:直接\(for\),预处理出每一行每一列的最小值,然后去\ ......
Programming Collegiate Contest Harbin China

更新wsl,docker无法启动wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.解决方案

PS C:\Users\xxxx> wsl -vWSL 版本: 2.0.0.0内核版本: 5.15.123.1-1WSLg 版本: 1.0.57MSRDC 版本: 1.2.4485Direct3D 版本: 1.608.2-61064218DXCore 版本: 10.0.25880.1000-2306 ......
superblock bad codepage 解决方案 missing

How to print a string with a variable by using the echo command in the shell script All In One

How to print a string with a variable by using the echo command in the shell script All In One Node.js & nvm ......
the variable command string script