天然博客

走马灯动漫和一些小零件

2023-11-30 20:25:00 1550

文章目录

        

DARLING in the FRANXX

剧情介绍

他们拥有梦想。总有一天,飞向广阔天空的梦想。知晓被玻璃遮盖的这片天空有多么遥远。遥远的未来。人类在荒废的大地上建设
了移动要塞都市“种植园”,并讴歌着文明。在那当中建造的驾驶员居住设施“米斯特汀”,通称“鸟笼”。孩子们就住在那里。对外
面的世界一无所知。对自由的天空一无所知。他们被告知的使命,只有战斗而已。敌人是一切都被谜团覆盖的巨大生命体 “叫龙”。
为了对抗尚未见过的敌人,孩子们乘上被称为“FRANXX”的机器人。他们坚信,乘坐其中,就是对自己存在的证明。有一位曾被称作
神童的少年。代号016。名字是广。但他现在却跌落谷底。是不被人需要的存在。如果没有乘上FRANXX,就如同不存在一样。在这
样的广面前,某天,一位被称作02的神秘少女出现了。她的额头,长着两根艳丽的角。“——找到了哦,我的DARLING”


page2314123123123.PNG

小零件

sql查询是否有值,最有效率

  • select 1:有一条符合查询条件的记录就会返回一个1
  • limit 1:只要找到了对应的一条记录,就立马返回记录不会继续再向下扫描了
select 1 from tb_user where id = 'xxx' limit 1

获取request response

    public HttpServletRequest getRequest(){
        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        assert requestAttributes != null;
        return requestAttributes.getRequest();
    }

    public HttpServletResponse getResponse(){
        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        assert requestAttributes != null;
        return requestAttributes.getResponse();
    }

nginx.conf 无域名版本


#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    upstream nuxt {
      server 0.0.0.0:3000;
      keepalive 64;
    }

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            proxy_pass http://nuxt;
            index  index.html index.htm;
        }

        location /manage/ {
            root html;
            index index.html index.htm;
            try_files $uri $uri/ /manage/index.html;
        }
        location ^~ /user/ {
		# 配置跨域
		add_header "Access-Control-Allow-Origin" *;
		proxy_next_upstream http_502 http_504 error timeout invalid_header;
		proxy_set_header Host  $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		# 配置代理端口到提供 http 接口的服务端口
		proxy_pass http://172.27.221.170:2023;
	}
        location ^~ /admin/ {
                # 配置跨域
                add_header "Access-Control-Allow-Origin" *;
                proxy_next_upstream http_502 http_504 error timeout invalid_header;
                proxy_set_header Host  $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 配置代理端口到提供 http 接口的服务端口
                proxy_pass http://172.27.221.170:2023;
        }    
         	# 通过 location 前缀匹配 api/v1 

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

解决npm问题

1.删除用户界面下的npmrc文件(nuxt同上处理,linux下的用户目录,nuxtrc)(注意一定是用户C:\Users\{账户}\下的.npmrc文件下不是nodejs里面)

2.清除缓存,注意不要用npm cache clean --force,容易出现npm WARN using --force I sure hope you know what you are doing.要用:npm cache verify

3.设置镜像源:npm config set registry https://registry.npmmirror.com
4.查看下是否设置成功:npm config get registry

5.运行npm 安装东西即可

有域名版本 nginx.conf


#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    upstream nuxt {
      server 0.0.0.0:3000;
      keepalive 64;
    }

    server {
        listen       80;
        server_name  www.xtran.top;

        location / {
            proxy_pass http://nuxt;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

    server {
        listen      80;
        server_name mp.xtran.top;
        
        location / {
            root /usr/local/nginx/html/manage;
            index index.html index.htm;
            try_files $uri $uri/ /index.html;
        }
        
        location ^~ /user/ {
		# 配置跨域
		add_header "Access-Control-Allow-Origin" *;
		proxy_next_upstream http_502 http_504 error timeout invalid_header;
		proxy_set_header Host  $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		# 配置代理端口到提供 http 接口的服务端口
		proxy_pass http://172.27.221.170:2023;
	}
        location ^~ /admin/ {
                # 配置跨域
                add_header "Access-Control-Allow-Origin" *;
                proxy_next_upstream http_502 http_504 error timeout invalid_header;
                proxy_set_header Host  $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 配置代理端口到提供 http 接口的服务端口
                proxy_pass http://172.27.221.170:2023;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

}

win10到d盘

cd /d D:

更改anaconda源

https://www.cnblogs.com/zhouchengzhi/p/18163694#:~:text=anaconda%E5%A6%82%E6%9E%9C%E4%B8%8D%E9%85%8D%E7%BD%AE%E5%9B%BD%E5%86%85%E6%BA%90%EF%BC%8C%E5%9C%A8%E4%B8%8B%E8%BD%BD%E7%AC%AC%E4%B8%89%E6%96%B9%E5%BA%93%E6%97%B6%EF%BC%8C%E9%BB%98%E8%AE%A4%E8%BF%98%E6%98%AF%E4%BC%9A%E4%BD%BF%E7%94%A8%E5%AE%98%E6%96%B9%E6%BA%90%EF%BC%8C%E8%BF%99%E6%A0%B7%E5%B0%B1%E4%BC%9A%E6%97%B6%E5%B8%B8%E5%9B%A0%E8%AF%B7%E6%B1%82%E5%A4%96%E7%BD%91%E5%AF%BC%E8%87%B4%E7%BD%91%E9%80%9F%E8%BF%87%E6%85%A2%E6%88%96%E6%98%AF%E9%93%BE%E6%8E%A5%E8%B6%85%E6%97%B6%E3%80%82%20%E6%83%B3%E8%A6%81%E6%94%B9%E5%96%84%E8%BF%99%E4%B8%80%E4%BD%93%E9%AA%8C%EF%BC%8C%E6%88%91%E4%BB%AC%E5%B0%B1%E9%9C%80%E8%A6%81%E5%B0%86%E6%BA%90%E9%93%BE%E6%8E%A5%E5%88%87%E6%8D%A2%E5%88%B0%E5%9B%BD%E5%86%85%E6%BA%90%E3%80%82,%E5%9B%BD%E5%86%85%E5%90%84%E5%A4%A7%E9%95%9C%E5%83%8F%E6%BA%90%E5%9C%B0%E5%9D%80%EF%BC%9A%20%E6%B8%85%E5%8D%8E%E5%A4%A7%E5%AD%A6%EF%BC%9Ahttps%3A%2F%2Fpypi.tuna.tsinghua.edu.cn%2Fsimple%20%E9%98%BF%E9%87%8C%E4%BA%91%EF%BC%9Ahttps%3A%2F%2Fmirrors.aliyun.com%2Fpypi%2Fsimple%2F

sql server 安装

https://blog.csdn.net/m0_73776435/article/details/136178551

visual studio 安装vsix扩展

https://blog.csdn.net/qq_15977539/article/details/130005314

redis安装

https://blog.csdn.net/weixin_44893902/article/details/123087435

redis .net配置

  1. nuget包
dotnet add package StackExchange.Redis
  1. 添加配置文件
{
    "Redis": {
        "Configuration": "localhost:6379",
        "InstanceName": ""
    }
}
  1. 注册 Redis 服务
using Microsoft.Extensions.Configuration;
using StackExchange.Redis;

var builder = WebApplication.CreateBuilder(args);
var configuration = builder.Configuration;

var redisConfiguration = configuration.GetSection("Redis");
string redisConnectionString = redisConfiguration["Configuration"];
string instanceName = redisConfiguration["InstanceName"];

ConfigurationOptions options = new ConfigurationOptions
{
    EndPoints = { redisConnectionString },
    // 补充密码等设置
};
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(options);

builder.Services.AddSingleton<IConnectionMultiplexer>(redis);

var app = builder.Build();
// 后续API路由等代码
  1. 使用redis服务
using Microsoft.AspNetCore.Mvc;
using StackExchange.Redis;

[ApiController]
[Route("[controller]")]
public class MyController : ControllerBase
{
    private readonly IConnectionMultiplexer _redis;

    public MyController(IConnectionMultiplexer redis)
    {
        _redis = redis;
    }

    [HttpGet]
    public IActionResult Get()
    {
        IDatabase db = _redis.GetDatabase();
        db.StringSet("testKey", "testValue");
        string value = db.StringGet("testKey");
        return Ok(value);
    }
}

Dapper框架

https://blog.csdn.net/nmmking/article/details/129434872
联系方式
文章目录