ICode9

精准搜索请尝试: 精确搜索
  • Asp.Net Core 如何获取IWebHostEnvironment2022-09-03 11:05:59

    一、IWebHostEnvironment  服务器主机信息: 网站硬盘目录,网站名称,环境变量名称 // // 摘要: // Provides information about the web hosting environment an application is running // in. public interface IWebHostEnvironment : IHostEnvironme

  • pod概念,部署pod应用2022-09-03 01:33:52

    pod概念,部署pod应用 zoukankan      html  css  js  c++  java pod概念,部署pod应用 一:kubectl工具的使用 kubectl 是操作k8s的命令行工具,能连接到apiserver上实现k8s中各种资源的增删改查。 kubectl --help 查看kubectl的帮助命令,有哪些参数,常

  • vue(vue.js) 计算属性2022-09-02 15:32:13

    原文链接:vue(vue.js) 计算属性 – 每天进步一点点 (longkui.site)   0.案例 一个需求,将一个人姓和名 拼接起来,但是这个人的姓或者名比较长,有可能需要裁剪,但是不希望在HTML中写的太复杂。 比如,出来现实这个人的姓名以外,要求将这个人的姓名中的大小写反转,截取前3位,将某一位变成随机

  • Es(ElasticSearch)-理解及使用(二)2022-08-31 23:30:10

    一、ElasticSearch核心概念 概述 索引(数据库) 字段类型(表) 文档(数据) 分片(Lucene索引,倒排索引) 前期可以理解为数据库 数据库-r-es DB ElasticSearch 数据库 索引 表 类型(弃用) 行 文档 字段 fields elasticsearch中可以包含多个索引,索引中可以包含多个类型,类

  • 【django学习-05】视图之HttpRequest常见属性与方法2022-08-31 22:31:49

    对于Django来说,当它接收到Http请求之后,会根据Http携带的请求参数与请求信息来创建一个WSGIRequest对象,并且作为视图函数的第一个参数,这个参数通常写成request,该参数包含用户所有的请求信息。 WSGIRequest继承HttpRequest 下面对一些常用的属性进行说明 COOKIE:获取客户端

  • C#小知识特殊的DefaultValueAttribute2022-08-31 21:01:26

    public class People { private string _Name = "小明"; public string Name { get { return _Name; } set { _Name = value; } } private int _Age = 15; public int Age { get { return _Age; } set

  • gpio_get()的处理过程2022-08-31 18:04:39

    struct of_phandle_args #define MAX_PHANDLE_ARGS 16 struct of_phandle_args { struct device_node *np; int args_count; uint32_t args[MAX_PHANDLE_ARGS]; }; 1 gpiod_get() /* * 1. 函数适用于只有一个gpio,index为0,即list = <&phandle1 1 2>

  • 桶排序2022-08-31 17:32:07

    package com.inforcreation; import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; /**" * 桶排序(Bucket sort)是一种基于计数的排序算法,工作的原理是将数据分到有限数量的桶子里, * 然后每个桶再分别排序(有可能再使用别的

  • Error: Could not get apiVersions from Kubernetes2022-08-31 14:31:28

    问题 部署pod时遇到问题 # helm install chart.tgz Error: Could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request 解决 找到出问题的apiservice并

  • EF codeFirst映射多出一个Discriminator列2022-08-31 14:00:59

    我有一个EF类需要映射到数据库,然后有一个其他的类继承了这个类,使用code first便会出现该问题 解决方法:加上NotMapped public class A { [Key] public int Id { get; set; } } [NotMapped] public class B : A { public string Name { get

  • Day25封装2022-08-31 00:32:52

    封装(数据的隐藏) 通常,应禁止直接访问一个对象中数据的实际表示,而应通过操作接口来访问,这称为信息隐藏。(该露的露,该藏的藏) 程序设计要追求“高内聚,低耦合”。高内聚就是类的内部数据操作细节自己完成,不允许外部干涉,低耦合:仅暴露少量的方法给翻不适用。 记住这句话就够了:属性私有,get/

  • Webdriver浏览器属性2022-08-30 22:01:29

    请参照 https://www.cnblogs.com/wrwangrong/p/16428981.html from selenium.webdriver import Chrome from webdriver_helper import get_webdriver driver=get_webdriver()#刚启动浏览器,是空白页面 # input("按下回车继续执行") driver.get("https://www.baidu.com/") #访问指

  • ES常用操作2022-08-30 17:33:25

    查询index GET /_cat/indices 创建索引 PUT /itcomp 获取映射 API GET /itcomp/_mapping 插入数据 POST /itcomp/_doc/953ef33351f6434d8e8fa5c6165d2dc2 { "fristTypeUuid":"953ef33351f6434d8e8fa5c6165d2dc2" } 获取指定id数据 GET /itcomp/_doc/953ef33351f6434d

  • Docker版本的Jenkins 安装 npm2022-08-30 16:33:21

    在实现docker版本的 jenkins 时遇见 jenkins npm not found 的错误。 原因: 容器中没有安装 nodejs , npm 。故 自定义构建镜像并安装nodejs ,npm Dockerfile FROM jenkins/jenkins USER root RUN apt-get update && apt-get install -y nodejs npm USER jenkins docker-compos

  • AtCoder Beginner Contest 2662022-08-30 00:32:39

    比赛链接: https://atcoder.jp/contests/abc266 C - Convex Quadrilateral 题意: 平面图上有一个四边形,按照逆时针顺序给定四个点的坐标,判断四边形是不是凸的。 思路: 求两条临边的向量积是不是 > 0 即可。 代码: #include <bits/stdc++.h> using namespace std; int main(){ ios::sy

  • 分析 F1 统计数据 - 第一部分2022-08-29 17:01:45

    分析 F1 统计数据 - 第一部分 介绍完 Ergast 数据集的使用方法之后,就到了分析的时候了! Photo by author 在里面 上一篇文章 这 F1Stats 类被引入作为一种方便的方法来分析历史 F1 数据 厄加斯特 .所以现在是时候开始使用它了! 可能性几乎是无穷无尽的。下面的列表显示了一些可能的

  • 7.4 字典元素的获取2022-08-29 12:34:12

      '''字典元素的获取''' '''第一种创建 使用[]''' #注意[]里没有的元素会报错 scores={'张三':100,'李四':98,'王五':45} print(scores['张三']) '''第二种创建 使用get()函数'''

  • PowerShell教程 - 模块管理(Modules Management)2022-08-29 08:01:18

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 模块管理(Modules Management) 模块和管理单元(Modules and Snap-Ins) Modules were introduced with the release of PowerShell version 2.0 Modules represented a significant step forward o

  • Django_request学习2022-08-28 23:33:00

    Django_request (1)请求方式 这里使用一个接口测试软件postman 可以看到里面有非常多的发起请求的方式,最常用的就是GET和POST请求,但是这些方法无法在网页的url里显示 在学习request参数之前,django框架中首先接到浏览器发来的请求第一站是经过框架自带的wsgi.py文件 """ WSGI conf

  • get 和 post 请求在缓存方面的区别2022-08-28 16:03:42

    get 请求类似于查找的过程,用户获取数据,可以不用每次都与数据库连接,所以可以 使用缓存。 post 不同,post 做的一般是修改和删除的工作,所以必须与数据库交互,所以不能使用 缓存。因此 get 请求适合于请求缓存。

  • LeetCode 859. Buddy Strings2022-08-28 15:30:41

    原题链接在这里:https://leetcode.com/problems/buddy-strings/ 题目: Given two strings s and goal, return true if you can swap two letters in s so the result is equal to goal, otherwise, return false. Swapping letters is defined as taking two indices i 

  • Python Selenium使用cookie实现自动登录微博2022-08-28 15:02:55

    @目录前言一、预登陆获取cookie1) cookie处理2) 预登陆二、登录测试 前言 模拟登录微博是实现微博网页爬虫的第一步,现在的微博网页版有个sina visit system,只有登录过后才能获取更多微博内容。本文使用selenium通过预登陆保存cookie到本地,之后重复登录只需要提取本地cookie即可免

  • Drf视图集合2022-08-28 15:01:55

    1.背景:        技术储备,drf适合前后端分离项目,比较适合单表操作的业务,另外丰富的视图集合配合路由自动生成,开发速度能得到极大的提升。   2、视图分类:          2.1:视图超类:                              from rest_framework.views import APIVie

  • EFCore join table and AutoMapper2022-08-28 14:32:48

    EFCore join table and AutoMapper Question I want to query all users from my ASP.net Identity Users table and map them to a simple DTO like this: public class UserDto { public string Firstname { get; set; } public string Lastname { get; set; }

  • LeetCode 1166. Design File System2022-08-28 09:32:57

    原题链接在这里:https://leetcode.com/problems/design-file-system/ 题目: You are asked to design a file system that allows you to create new paths and associate them with different values. The format of a path is one or more concatenated strings of the form: /

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

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

ICode9版权所有