编程笔记
-
LeetCode 1151 Minimum Swaps to Group All 1's Together 滑动窗口
Given a binary array data, return the minimum number of swaps required to group all 1’s present in the array together in any place in the array. Solution 注意这里的交换 /(swap/) 并不是相邻两个元素的…
-
LeetCode 1901 Find a Peak Element II 二分
A peak element in a 2D grid is an element that is strictly greater than all of its adjacent neighbors to the left, right, top, and bottom. Given a /(0/)-indexed m x n matrix mat where no two adjacent…
-
LeetCode 325 Maximum Size Subarray Sum Equals k 贪心+Map
Given an integer array nums and an integer k, return the maximum length of a subarray that sums to k. If there is not one, return 0 instead. Solution 注意到是 subarray, 所以是连续的。因此我们用 /(map…
-
pytorch简单实现神经网络
一、基本 (1)利用pytorch建好的层进行搭建 import torch from torch import nn from torch.nn import functional as F #定义一个MLP网络 class MLP(nn.Module): ''' 网络里面主要是要定义__init__()、forward() '…
-
搜索模糊查询
<template> <div> <input placeholder="搜索姓名" v-model="inputValue"> <button @click="searchig"> 搜索 </button> <button @click="test">点击</button> </div&g…
-
@SuppressWarning
看到一个没见过的SuppressWarning(@SuppressWarnings("WeakerAccess")),网上也没搜到。 找到一篇文章(@SuppressWarnings values)介绍@SuppressWarning注解。大意是@SuppressWarning的value只是给IDE看的,所以…
-
第四次课
excel中的vba 可视化的所有操作都可以由vba实现 word的vba word调用excel: ppt中的vba:
-
[Typescript] 32. Medium - Permutation
Implement permutation type that transforms union types into the array that includes permutations of unions. type perm = Permutation<'A' | 'B' | 'C'>; // ['A', 'B', 'C'] | ['A', 'C', 'B'] | ['B'…
-
SDN环境安装配置
一、实验目的 熟悉实验环境 熟悉Linux基本操作 二、实验要求 (一)任务 请根据实验环境安装文档,完成特定开源软件的安装 (二)实验报告 请用Markdown排版,提交在博客园班级作业区,不熟悉Markdown的同学可参考M…
-
实验环境安装配置
一、实验目的 熟悉实验环境 熟悉Linux基本操作 二、实验要求 (一)任务 请根据实验环境安装文档,完成特定开源软件的安装 (二)实验报告 请用Markdown排版,提交在博客园班级作业区,不熟悉Markdown的同学可参…