반응형
반응형

[여행] 2023-05-27~29, 울진 여행

 

울진, 죽변항, 금바위민박, 민물고기생태공원, 울진은어다리, 덕구온천, 울진읍

 

대관령휴게소 강릉방향 에서 첫 휴식 

- 식사 후 덕구온천까지 논스톱

덕구온천 스파는 네이버로 예약하고 바로 입성

- 놀다 지칠때 라면은 국룰이지!

울진읍내 하나로마트

- 하나로마트에서 일단 크림빵(딸기쨈들어있는)을 산다.

- 회도 조금, 돼지고기도 조금 구매. 로컬김치도 구매

금바위민박 체크인

- 언제와도 익숙하고 정겹다. 

울산 사시는 남자 사장님이 계셔서 반갑게 맞아주시고. 

- 사온거 먹으면서 밥 하고, 

- 일단 휴식~~~

- 사장님이 애들 카누 태워 주셔서 모래사장에서 놀고. 

둘째날, 오전 성당 스케쥴이 있어서 난 숙소에서 휴식.

- 사장님이 홍합 채취해오셔서 나도 같이 손질. 덤으로 자연산 굴도 맛볼수 있었음.

- 비가 와서 짜장면 시켜먹고

울진은어다리 걷고

울진민물고기생태체험관으로 관람. 

오는길에 하나로마트 새로운 지점 방문.

- 바베큐 용품/고기 다 있구나. 여기 축협한우프라자에서 다음에 식사 한번 해야겠다.

배가 부르다고 생각했지만, 저녁에 홍합탕에 고기 지글지글. 

셋째날, 새벽 6시에 출발. 

오전 11시에 서울 집 도착

 

 

 

 

 

 

 

2023-05-27

 

2023-05-29

반응형
반응형

빛나는 하얀치아

반응형

'아침편지' 카테고리의 다른 글

재능만 믿지 말고...  (0) 2023.05.30
지금 내 가슴을 뛰게 하는 것은  (0) 2023.05.29
내 인생의 '가장 젊은 날'  (0) 2023.05.26
얼굴의 주름, 지혜의 주름  (0) 2023.05.25
정신력을 단련하는 곳  (0) 2023.05.24
반응형

화면 리사이즈시 사이즈 확인 및 미디어쿼리 확인

 

Typical Media Query Breakpoints

https://jsfiddle.net/mill01/1jedsc76/8/

 

media queries - JSFiddle - Code Playground

 

jsfiddle.net

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>

.example {
  padding: 20px;
  color: white;
}
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .example {background: red;}
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .example {background: green;}
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .example {background: blue;}
} 

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .example {background: orange;}
} 

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .example {background: pink;}
}
</style>
<script>
$( window ).resize(function() {
   //창크기 변화 감지
   var windowWidth = $( window ).width();
   $("#width_size").val(windowWidth);
});
</script>
</head>
<body>

<h2>Typical Media Query Breakpoints</h2>
<input type="text" id="width_size" >
<p class="example">Resize the browser window to see how the background color of this paragraph changes on different screen sizes.</p>

</body>
</html>

반응형
반응형

[python] 소스경로와 실행경로가 다를때 os.chdir()

# 파이썬 컴파일 경로가 달라서 현재 폴더의 이미지를 호출하지 못할때 작업디렉토리를 변경한다.
import os
from pathlib import Path
# src 상위 폴더를 실행폴더로 지정하려고 한다.
real_path = Path(__file__).parent.parent
print(real_path)
#작업 디렉토리 변경
os.chdir(real_path)
# 파이썬 컴파일 경로가 달라서 현재 폴더의 이미지를 호출하지 못할때 작업디렉토리를 변경한다. 
import os
from pathlib import Path
# src 상위 폴더를 실행폴더로 지정하려고 한다.
real_path = Path(__file__).parent.parent
print(real_path)
#작업 디렉토리 변경
os.chdir(real_path)
처리내용 os 및 os.path pathlib
현재의 디렉토리를 취득 os.getcwd() Path.cwd()
맨 앞의 ~를 홈 디렉토리에 치환 os.path.expanduser() Path.expanduser(), Path.home()
경로의 존재 확인 os.path.exists() Path.exists()
디렉토리인가를 판단 os.path.isdir() Path.is_dir()
파일인가를 판단 os.path.isfile() Path.is_file()
심볼릭 링크인가를 판단 os.path.islink() Path.is_symlink()
절대경로인가를 판단 os.path.isabs() PurePath.is_absolute()
절대경로로 변환 os.path.abspath() Path.resolve()
status를 취득 os.stat() Path.stat(), Path.owner(), Path.group()
경로를 연결 os.path.join() PurePath.joinpath()
파일명을 취득 os.path.basename() PurePath.name
새로운 디렉토리를 취득 os.path.dirname() PurePath.parent
확장자를 분할·취득 os.path.splitext() PurePath.suffix

Pathlib - 객체 지향 파일 시스템 경로

객체 지향 파일 시스템 경로, 즉 파일을 객체로 관리하겠다는것 같음.
아래 그림은 Pathlib 내부 객체들의 상속관계로, 가장 기본적인 객체는 PurePath임을 알 수있음.
대략적인 객체간 의미와 관계를 알기 위해 라이브러리를 뜯어봄 -> pathlib.py

차이점

os.path  Pathlib의 가장 큰 차이점은, 경로를 문자열로 다루냐, 객체로 다루냐 차이인데, 모든 것이 객체로 이루어진 python 인 만큼, Pathlib가 자연스러운 모듈이며 객체 내부적으로 정의된 연산자를 사용할 수 있어 경로에 있어 더 자연스러운 표현이 가능함.

기본적인 사용법은 알아야, 나중에 쓸 일이 있으면 찾아보지 않고 쓸 수 있으니 대충정리해보자.

1. 탐색

논리적 경로와, 절대 경로와의 구분을 잘 해야 함. 논리 경로 상에서, 앵커나 빈 경로는 넘어갈 수 없음. 코드상으로 경로 탐색에 사용할 수 있는 것은, .parent, .parents, .iterdir() 등이 있음.

상위 디렉토리로 넘어가기 위해선, .parent를 사용하나, 사용하기 전 절대경로로 바꾸고, 현재 경로가 디렉토리이면, .iterdir()를 통해 자식 경로를 얻을 수 있음.

from pathlib import Path

p = Path('.') # PosixPath('.')
p.resolve() # os.path.abspath()

p.resolve().parent
list(p.iterdir()) # iteration, list 변환, = os.listdir()

2. 연산자

연산자를 사용하여 경로 조합 가능.

from pathlib import Path

p = Path.home() # os.path.expanduser()
p_sub = p / 'foo' / 'bar' # PosixPath('/Users/kyuu/foo/bar')
p_sub = Path(p, 'foo', 'bar') # os.path.join() 모방

https://docs.python.org/ko/3/library/pathlib.html

반응형
반응형

Program made with Python and Pygame module for visualizing sorting algorithms

Support this project by leaving a ⭐

 

  • Run: python3 src/main.py

https://github.com/LucasPilla/Sorting-Algorithms-Visualizer/tree/master

 

GitHub - LucasPilla/Sorting-Algorithms-Visualizer: Program made with Python and Pygame module for visualizing sorting algorithms

Program made with Python and Pygame module for visualizing sorting algorithms - GitHub - LucasPilla/Sorting-Algorithms-Visualizer: Program made with Python and Pygame module for visualizing sorting...

github.com

반응형
반응형

KeyboardEvent keyCode

<!DOCTYPE html>
<html>
<body>
<h1>Keyboard Events</h1>
<h2>The keyCode Property</h2>

<p>Press a keyboard key in the input field and display the value:</p>

<input type="text" size="40"   onkeypress="myFunction(event)">

<p id="demo"></p>
<p>The keyCode property is deprecated, use the key property instead.</p>

<script>
function myFunction(event) {
  let value= event.which;
  document.getElementById("demo").innerHTML = value;
}  
</script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
	$("#inp").keypress(function(e){
		//검색어 입력 후 엔터키 입력하면 조회버튼 클릭
		if(e.keyCode && e.keyCode == 13){
			$("#btn").trigger("click");
			return false;
		}
		//엔터키 막기
		if(e.keyCode && e.keyCode == 13){
			  e.preventDefault();	
		}
	});
	$("#btn").click(function(){
		alert("이벤트 감지");
	});
});
</script>
<input type="text" class="form-control input-sm" id="inp" name="inp">
<button type="button" class="btn btn-primary btn-sm" id="btn" name="btn">조회</button>
</body>
</html>

 

 

반응형

+ Recent posts