自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Free Labor 的专栏

生活就像一杯白開水,每天都要去品償他!

  • 博客(76)
  • 资源 (5)
  • 收藏
  • 关注

原创 How to authenticate on mulitple IdentityServer4?

背景:客户为增加系统可靠性,在公司内部分别部署了多套IndentityServer4,分别使用不同的AP、DB server和域名,我分别叫它们:IDS-A和IDS-B,程式都相同。例如:HR业务系统使用IDS-A,RD业务系统使用IDS-B,当用户登录HR业务系统后,打开RD业务系统仍需要重新登录。在登录其中一台IDS时,呼叫另一台IDS的API,那么用户将获得IDS-A和IDS-B的cookie,即实现了SSO。注册IDS服务(如下代码)时,并没有指定 issuer,如果指定,业务系统都无需修改。

2024-06-13 09:57:13 246

原创 How to limit request by IP on nginx?

这个配置指令将为每个客户端 IP 地址创建一个限制区域,并将其与请求速率设置关联。当 Nginx 收到请求时,会根据客户端的 IP 地址和限制区域来判断请求是否超过了设置的速率限制。是一个 Nginx 配置指令,用于定义请求限制区域和速率限制。

2024-05-23 16:37:16 224 1

原创 How to start a docker container on Linux?

【代码】How to start a docker container on Linux?

2024-05-23 16:04:44 94

原创 How to record real IP of user on nginx?

由于没有WAF权限,所以在 docker上启动了两个container,一个模拟WAF(r-proxy),一个模拟应用(webapp)。1.r-proxy (nginx下的 default.config, /etc/nginx/conf.d/default.conf)docker上如何启动container,查看另一篇文章。2.webapp (无需设置)

2024-05-23 15:50:06 183

原创 EFCore sharing

EF Core

2023-09-07 11:56:29 170

原创 [Angular] Import TranslateModule in Angular 16

Angular 更新至V16版后,支援 standalone,故移除了 NgModule,而TranslateModule 又要在AppModule中 import,那该如何做呢?

2023-07-24 22:10:42 1448

原创 [Angular] 主从表结构,从表记录在主表固定栏位上呈现

主从表结构,有时为了方便数据呈现,在UI上不显示从表资料,那么需要动态把从表的资料加载到主表的固定栏位上。例如:主表是人员信息,从表是银行卡信息,一个人在同一家银行可能有多张银行卡,且一个人可能在多家银行开户。

2023-07-24 20:57:53 238

原创 [Angular] Export excel from table or json

【代码】[Angular] Export excel from table or json。

2023-07-24 19:30:24 1379

原创 [Angular] Custom a DatePipe to support special time zone conversion from user

【代码】[Angular] Custom a DatePipe to support special time zone conversion from user。

2023-07-24 13:06:18 886

原创 How to start a gitlab-runner in wsl?

Becasue I've installed the Ubuntu 18.04 LTS in my wsl, I click the icon to start.1.Start wls2 and docker 2.Download the gitlab-runner docker image3.Show docker images 4.Start the docker container (Docker run)5.Go to the gitlab-runner container

2022-06-14 09:29:32 316 1

原创 How to start the dotnetsdk docker image for test?

Following the last articleHow to run a Docker on Windows 10 with WSL?https://blog.csdn.net/wish366/article/details/125011890 1. Start wsl2 and docker 2.Download the dotnetsdk docker image 2.1 If it's showing the error: x509: certificate signed by

2022-06-08 21:01:44 204

原创 How to upload a UT coverage report of angular to SonarQube?

1. Preconditions: you've deployed a SonarQube service.2. In order to test the processes, I'll install the sonar-scanner in your local computer, it's located on the left of the image above. Becasue I use a Windows system, I get the package from the webs

2022-05-31 19:46:46 136

原创 nz-modal of ng-zorro supports browser height

If you know the setting, maybe it will very easy.Please see the code, we only set some css to support it.<nz-modal [nzStyle]="{height:'100vh', top:0}"> … </nz-modal>vh,是指CSS中相对长度单位,表示相对视口高度(Viewport Height),1vh = 1% * 视口高度。...

2022-05-31 18:55:08 409

原创 How to run a Docker on Windows 10 with WSL?

1.Install Linux on Windows with WSLPlease refer to the URL:Install WSL | Microsoft DocsWSL: windows subsystem for linuxYou must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.If not, please upgrade your Windo..

2022-05-27 23:54:52 213

原创 How to use a rancher CLI to run kubectl command?

How to use a rancher CLI to run kubectl command?

2022-05-20 14:25:22 201

原创 DB migration automatically with DB first (using PostgreSQL) in .NET 5

Please see the content first:DB first (using PostgreSQL) in .NET 5We knowed that our program's release path is from DEV to QAS to PRD.1. Create new objects in your DB of DEV, and export all sql scripts into a file.for exapmle: I have exported a file.

2022-05-12 13:39:59 153

原创 A CSP(Content Security Policy) issue on Web UI

A Content Security Policy issue

2022-03-26 16:00:02 1233

原创 DataTable 列转行

接上篇JSON to DataTable_Free Labor 的专栏-CSDN博客1. Json fileappsettings.json "UploadData": [ { "item_a": "", "item_b": "", "item_c": "", "d1": "Jan-22", "d2": "Jan-22", "d3": "Jan-22", "d4": "Jan-22", "d5": "Jan-22", "d6": "Feb-22", https://blog.csdn.net/wish3

2022-03-01 12:10:21 819

原创 JSON to DataTable

1. Json fileappsettings.json "UploadData": [ { "item_a": "", "item_b": "", "item_c": "", "d1": "Jan-22", "d2": "Jan-22", "d3": "Jan-22", "d4": "Jan-22", "d5": "Jan-22", "d6": "Feb-22",

2022-03-01 11:52:43 522

原创 [NgZorroAntdMobileModule] 使用ImagePicker组件上传图片并压缩

直接上代码:app.module.tsimport { NgxImageCompressService } from 'ngx-image-compress';import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { BrowserAnimationsModule } from '@angular/platform-browser

2022-01-06 19:11:07 805

原创 Using command to move file in Rancher

Rancher

2021-11-20 15:02:20 319

原创 DB first (using PostgreSQL) in .NET 5

1.Create a projectunder your solution, there is DbFirst.API2. Install EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design,Microsoft.EntityFrameworkCore.Tools, Npgsql.EntityFrameworkCore.PostgreSQL by NuGet4. Installdotnet-efdotnet tool in...

2021-09-17 14:05:05 198

原创 Using NiFi to sync data between table to table

1.Add aExecuteSQL processor1.1 Add Controller Service (DBCPConnectionPool)1.2Input SQL select query2. Add aConvertAvroToJSONProcessor3. Add aConvertJSONToSQLProcessor4. Add aPutSQLProcessorAttach Ni...

2021-09-16 16:13:48 183

原创 NiFi 从PostgreSQL同步资料报: table does not exist.

1.问题:如下图,左边能成功,右边不成功。两者的差异:左边SQL有schema name。2.原因:经过分析,发现PgAdmin工具在做ROLE与SCHEMA绑定,它在存储时自动转成小写,造成当前用户登录后,找不到默认的SCHEMA NAME。查看当前默认SCHEMA NAME:show search_path;3.解决方案3.1 指定用户对应的SCHEMAALTER ROLE "USER_NAME" IN DATABASE "DATABASE" SET search_path.

2021-09-16 14:24:42 614

原创 Code first (using PostgreSQL) in .NET 5

1. Open your VS and create two projects, there are CodeFirst.API and CodeFirstModel.1.1 CodeFirst.API project1.2 CodeFirst.Model2. Add a user class in CodeFirst.Model project.using System;using System.Collections.Generic;using Sys...

2021-09-16 08:30:45 144

原创 PostgreSQL Trigger

1. Create two tables, there are a1 and a2.table: a1table a2:2. Create a function:record_a1CREATE OR REPLACE FUNCTION record_a1() returns trigger as $$declarenCnt int;begin select count(0) into nCnt from a2 where column1=new.column1; if ...

2021-08-20 16:37:46 624

原创 How to get a access token from IdentityServer4?

1.Get token with client_credentials grant typePost url: https://xxx.com/auth/connect/tokenPost data: client_id: xx client_secret: secret grant_type: client_credentials scope: api1Content-Type: application/x-www-form-urlencoded2.

2021-06-24 13:01:24 897

原创 How to grant table in PostgreSQL?

常常漏掉这一句:grant usage on schema...-- Permissionsgrant usage on schema "A" to "B";grant usage on schema "A" to "C";ALTER TABLE "A".tablename OWNER TO "A" ;GRANT ALL ON TABLE "A".tablename TO "A" ;GRANT SELECT ON TABLE "A".tablename TO "B" ;GRANT ..

2021-05-18 16:15:15 172

原创 多线程实现方法 (threadpool and async method) in .Net Core.

.NET CORE 中实现多线程的两种方法(个人经验总结),两种方法使用的场景不同1.使用ThreadPoolusing System;using System.Collections.Generic;using System.Text;using System.Threading;using System.Threading.Tasks;namespace ConsoleApp1{ public class MyThreadPool { public

2021-05-13 16:16:23 293

原创 WeChat小程序如何获得用户的unionId?

前提条件,必要申请了微信开发平台帐号,并绑定此小程序,如下图:安装cryptojs.jsnpm install cryptojs新增一个js文件(DataCrypt.js),并引用cryptojs.js文件,使用 getUnionId 方法将返回unionid。DataCrypt.jsvar Crypto = require('cryptojs/cryptojs.js').Crypto;var APPID = 'wx....';var APPsecret = '....';

2021-04-23 09:50:10 877

原创 WeChat小程序如何获取用户的个人信息(头像、昵称、性别与地区)?

由于WeChat小程序发布了新的规范,获取用户的个人信息将使用新的方法。“2021年4月13日后发布的新版本小程序,开发者通过组件调用wx.getUserInfo将不再弹出弹窗,直接返回匿名的用户个人信息,获取加密后的openID、unionID数据的能力不做调整;若开发者需要获取用户的个人信息(头像、昵称、性别与地区),可以通过wx.getUserProfile接口进行获取。具体参考公告:https://developers.weixin.qq.com/community/develop/doc/00

2021-04-23 08:19:58 3906

转载 Loading on page

本文包含两部分内容:即loading.css和loading.html,以下是范例。loading.css body { margin: 0; padding: 0; background-color: rgba(0, 0, 0, 0.7); } .load-container { display: inline-block; position: absolute; top: 50

2021-04-23 08:06:28 120

原创 Table固定表头

Table固定表头使用CSS position:sticky<!DOCTYPE html><html><head><style>table { border-collapse: collapse; width: 100%;}th, td { text-align: left; padding: 28px;}tr:nth-child(even) {background-color: #f2f2f2;}tr:hov.

2021-03-25 13:54:45 364

原创 IDM trust Keycloak

IDM trust Keycloak提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加例如:第一章 Python 机器学习入门之pandas的使用提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录系列文章目录 前言 一、pandas是什么? 二、使用步骤 1.引入库 2.读入数据 总结前言由于项目原因,需要启用Keycloak做SSO,但是项目中又使用IDM管制访问权限,我使用的方法如下。一、实...

2021-03-23 13:07:50 481

原创 How to call a WebAPI in Excel?

前置條件:電腦需安裝Excel1. 選擇資料來源:從Web2. 輸入WebAPI URL地址,并點確認按鈕data2.json[["2018-03-27","",""],["1980-12-12",28.75,"abc"],["2018-03-27","b",""]]3. 在Power Query編輯器上點擊’到表格’4. 分隔符號選擇“無”,然後點‘確定’5. 在標題欄的圖示點擊鼠標左鍵,然後選擇’擷取值’6.分隔符號選擇‘Tab鍵’,然後點‘確定’.

2021-03-10 10:02:53 172

原创 I come back.

由于工作的原因,多年未登录CSDN。今天找回了密码,将分享自己的一起心得以及解决方案。

2021-03-10 09:25:17 104

原创 解決ASP.NET CrystalReports 用戶限制的處理方法

由於ASP.NET CrystalReports不支援多用戶同時在線,此時可以用以下的方法來處理:把WEB前端列印傳遞到WINDOWS後端來處理,這樣只有一個USER在使用CrystalReports. 一.WindowsService1.使用VS2008新建項目:WindowsService2.在Service1.cs上添加時間控件,一定是System.Timers.Time

2010-04-17 09:30:00 595

原创 數據庫訪問類(Query,Insert,Update,Delete)

 數據庫訪問類:SQLHelp(原創,轉載請注明出處) 1.接口類:IDAL.csusing System;using System.Collections.Generic;using System.Text;using System.Data;namespace DB.SQLHelp.DAL{    public interface IDAL    {        bool i

2009-11-06 10:21:00 671

转载 打工还是创业,思路决定出路

打工还是创业,思路决定出路http://blog.sina.com.cn/s/blog_5ec7577b0100dgm0.html~type=v5_one&label=rela_prevarticle

2009-05-06 16:47:00 606

原创 ASP.NET GridView中鏈結打開模式窗口,當模式窗口關閉時,刷新父頁.

 ASP.NET打開模式窗口,當模式窗口關閉時,刷新父頁.1.使用Javascript: showModelessDialog打開模式窗口JS代碼:function showDialog(url, width, height){   showModelessDialog(url, window, dialogWidth: + width + px;dialogHeight: +

2009-03-27 16:44:00 1725

How to limit request by IP on nginx?

How to limit request by IP on nginx?

2024-05-23

A NiFi template

using NiFi to sync data between table to table.

2021-09-16

ThreadSample.7z

原创文章范例:多线程实现方法 (threadpool and async method) in .Net Core. https://blog.csdn.net/wish366/article/details/116754427?spm=1001.2014.3001.5501

2021-05-13

ASP.NET徹底研究

ASP.NET徹底研究,供高级程序员使用,新手勿用

2007-09-15

web.config加密工具

web.config加密工具,本人无偿共享,支持中国共享软件发展

2007-09-15

Web开发一些图示

Web开发一些图示,本人经典收藏

2007-09-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除