저번에 toondere/image/ 폴더안에 이미지를 저장을했는데 서버주소/toondere/image/이미지파일 이름 하면 접근이 안된다 이때 media file을 이용하는데 Media file은 이용자가 웹에서 올리는(upload) 파일. 파일 자체는 고정되어 이지만, 언제 어떤 파일이 정적 파일로 제공되고 준비되는지 예측할 수 없다 urls.py 에서 from django.conf import settingsfrom django.conf.urls.static import static urlpatterns= [ ... ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 이부분만추가 settings.py 에서는미디어 경로와 접근 url을 ..
12345678910111213141516class MyClass: def __init__(self, value): self.value = value print("Class is created! Value = ", value) def __del__(self): print("Class is deleted!") # 인스턴스 객체 생성 - 생성자 호출(레퍼런스 카운터 : 1)c = MyClass(10)# 레퍼런스 카운터 증가 : 2c_copy = c# 레퍼런스 카운터 감소 : 1del c# 레퍼런스 카운터 감소 : 0 - 소멸자 del c_copyColored by Color Scriptercs 레퍼런스 카운터가 1개 이상 존재한다면 del 구문을 사용해도 소멸자는 호출되지 않음 객체가 참조될 때마다 카운터를..
123456789101112131415161718import timel = range(1000) t = time.mktime(time.localtime())for i in l: print(i,)t1 = time.mktime(time.localtime()) - t t = time.mktime(time.localtime())print(", ".join(str(i) for i in l))t2 = time.mktime(time.localtime()) - t print("for 문으로 각 인자를 출력")print("Take {0} seconds".format(t1))print("join() 메서드로 출력")print("Take {0} seconds".format(t2)) Colored by Color Script..
- Today
- Yesterday
- Spring
- Java
- iterable
- in-memory
- exception
- concurrency
- Effective JAVA
- 부하테스트
- reactive stream
- strategy
- Serializable
- template
- Serialize
- reactive
- nosql
- object
- 디자인패턴
- gslb
- jvm
- LAMBDA
- Concurrecy
- Observer Pattern
- Redis
- jdk11
- 영속성
- 메인보드#asrock b650m #조립pc #후기이벤트
- template method
- Design Pattern
- observable
- JMeter
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |