반응형

 

Java에서 Inner Class 사용시 발생하는 No enclosing instance of type is accessible 해결 방법이다.

 

아래와 같이 java 파일들이 구성되어있고 Hello.java 파일안에 World 라는 inner class가 있을 경우

public class Hello {
	private int id;

	public Hello() {
		super();
	}

	public Hello(int id) {
		super();
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public class World {		
		private String name;

		public World() {
			super();
		}

		public World(String name) {
			super();
			this.name = name;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}			
		
	}
}

 

Hello안에있는 World Class를 사용하기 위해서 Hello Class를 먼저 생성 후 World Class를 호출한다.

import test3.Hello.World;

public class Main {

	public static void main(String[] args) {

		Hello hello = new Hello();
		World world = hello.new World();
				
	}

}
반응형
반응형

다운로드 - https://github.com/wonkwangyeon/Add-Windows-Run/releases

 

Releases · wonkwangyeon/Add-Windows-Run

Windows의 실행에서 파일을 실행하고 관리하는 프로그램. Contribute to wonkwangyeon/Add-Windows-Run development by creating an account on GitHub.

github.com

git source - https://github.com/wonkwangyeon/Add-Windows-Run

 

GitHub - wonkwangyeon/Add-Windows-Run: Windows의 실행에서 파일을 실행하고 관리하는 프로그램

Windows의 실행에서 파일을 실행하고 관리하는 프로그램. Contribute to wonkwangyeon/Add-Windows-Run development by creating an account on GitHub.

github.com

 

Winodws 의 실행에서 파일을 실행하기위해 레지스트리를 편집해서 작성해야하지만

해당 프로그램을 이용하면 레지스트리 편집기를 열지않아도 추가가능하며,

어느것을 추가했는지 관리가능하며, 삭제까지 가능한 프로그램.

 

1. 소개

Windows의 실행에서 파일을 실행할 수 있도록 등록 및 관리하는 프로그램

사용언어 - Python

사용 DB - SqlLite

2. 기능

  • 실행할 파일 레지스트리에 추가
  • 추가한 파일 삭제

3. 사용방법

  1. 추가

  • Run Name :
    • 실행에서 파일을 실행할 명령어 등록 ex) vscode.exe
  • Run File Path :
    • 실행 파일이 위치한 폴더 경로 ex) C:\Users\VSCode
  • Run File.exe :
    • 실제 exe 파일 ex) Code.exe
  1. 삭제
  • 삭제할 항목 클릭 후 Delete 버튼 클릭
  1. 확인

  • 실행창에서 등록한 명령어를 통해 실행확인

  • 레지스트리편집기에서 추가 및 삭제 확인
  1. 실행 및 실패 로그는 4번의 DB 및 Log경로에서 확인가능

4. DB 및 Log 경로

C:\addWindowsRun

  • DB.log
    • DB 실행 로그
  • AddWindowsRun.log
    • 프로그램 시작 로그
  • Run.log
    • 실행 로그
  • addWindowsRun.db
    • 추가한 파일 및 경로를 저장하는 DB
반응형
반응형

Nginx에서 client에서 파일 업로드와 같은 작업 수행시

응답으로는 이미 max_client_body_size 설정으로 에러인 상황에서 Request가 중단되어야하지만

Request가 끝까지 진행되는 경우가 있는데

이 경우 send_timeout, proxy_send_timeout, proxy_connect_timeout, client_body_timeout 등의 설정이아니라

 

lingering_time으로 설정해야한다.

Syntax:	lingering_time time;
Default: lingering_time 30s;
Context: http, server, location

This directive applies to client requests with a request body. As soon as the number of uploaded data exceeds max_client_body_size, Nginx immediately sends a 413 Request entity too large HTTP error response. However, most browsers continue uploading data regardless of that notification. This directive defines the number of time Nginx should wait after sending this error response before closing the connection.

 

http://nginx.org/en/docs/http/ngx_http_core_module.html#lingering_time

https://www.oreilly.com/library/view/nginx-http-server/9781788623551/97c141a3-0e51-4786-b865-8c8770a643a5.xhtml

반응형

+ Recent posts