import requests
def exists(path):
r = requests.head(path)
return r.status_code == requests.codes.ok
url='url='https://static01.nyt.com/images/2021/08/25/us/politics/25dc-lawmakers1/merlin_158041143_78d36ee5-264a-4431-b384-13d19ae386ec-superJumbo.jpg'
if (exists(url)):
print ('OK')
else:
print ('not exists:'+url)
'분류 전체보기'에 해당되는 글 663건
- 2021.08.26 python, check url image exists
- 2021.08.25 JPA, DTO, Could not resolve column name in result set
- 2021.08.23 mysql , recursive
- 2021.08.23 eclipse, web module version
- 2021.08.18 aws, python3 boto3 설치
- 2021.08.18 aws, upload data with python
- 2021.08.18 eclipse, WebContent rename
- 2021.08.05 java, class java version
- 2021.08.03 java, version5 download
- 2021.08.03 eclipse, java 버전
(X) SELECT COLUMN_NAME FROM ....
(O) SELECT COLUMN_NAME as columnName FROM ...
(https://unrealengine.tistory.com/163)
CREATE TABLE emp
(
id INT AUTO_INCREMENT PRIMARY KEY,
ename VARCHAR(255),
parent_id INT DEFAULT 0 REFERENCES id
);
INSERT INTO emp VALUES
(1, 'name1', 0),
(2, 'name2', 1),
(3, 'name3', 1),
(4, 'name4', 3),
(5, 'name5', 0),
(6, 'name6', 3),
(7, 'name7', 4),
(8, 'name8', 5),
(9, 'name9', 8),
(10, 'name10',8);
WITH RECURSIVE tmp1 AS
(
SELECT id, ename, parent_id,
ename AS path, 1 AS lvl
FROM emp WHERE parent_id=0
UNION ALL
SELECT e.id, e.ename, e.parent_id,
CONCAT(t.path,',',e.ename) AS path, t.lvl+1 AS lvl
FROM tmp1 t JOIN emp e ON t.id=e.parent_id
)
SELECT id, CONCAT(REPEAT(' ', lvl*4), ename) ename, parent_id, path, lvl
FROM tmp1
ORDER BY path; # path 임시컬럼을 사용하여 정렬하면 계층구조로 정렬된다
Servlet SpecJSP SpecEL SpecWebSocket SpecAuthentication (JASIC) SpecApache Tomcat VersionLatest Released VersionSupported Java Versions
6.0 | TBD | TBD | TBD | TBD | 10.1.x | 10.1.0-M4 (alpha) | 11 and later |
5.0 | 3.0 | 4.0 | 2.0 | 2.0 | 10.0.x | 10.0.10 | 8 and later |
4.0 | 2.3 | 3.0 | 1.1 | 1.1 | 9.0.x | 9.0.52 | 8 and later |
3.1 | 2.3 | 3.0 | 1.1 | 1.1 | 8.5.x | 8.5.70 | 7 and later |
3.1 | 2.3 | 3.0 | 1.1 | N/A | 8.0.x (superseded) | 8.0.53 (superseded) | 7 and later |
3.0 | 2.2 | 2.2 | 1.1 | N/A | 7.0.x (archived) | 7.0.109 (archived) | 6 and later (7 and later for WebSocket) |
2.5 | 2.1 | 2.1 | N/A | N/A | 6.0.x (archived) | 6.0.53 (archived) | 5 and later |
2.4 | 2.0 | N/A | N/A | N/A | 5.5.x (archived) | 5.5.36 (archived) | 1.4 and later |
2.3 | 1.2 | N/A | N/A | N/A | 4.1.x (archived) | 4.1.40 (archived) | 1.3 and later |
2.2 | 1.1 | N/A | N/A | N/A | 3.3.x (archived) | 3.3.2 (archived) | 1.1 and later |
$ sudo yum install python37
$ python --version
$ python3 --version
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ python3 get-pip.py --user
$ pip --version
$ pip install boto3
$cat upload_aws.py
# pip install boto3
import boto3
s3_resource = boto3.resource(
's3',
aws_access_key_id='XXXXXXXXXXXXXXXXXXX',
aws_secret_access_key='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
region_name='ap-northeast-2',
)
bucket_name='XXX'
souce_path='source.jpg'
target_path='to/target/path/target.jpg'
data = open(souce_path, 'rb')
s3_resource.Bucket(bucket_name).put_object(Body=data, Key=target_path, ACL='private')
$python3 upload_aws.py
.settings/org.eclipse.wst.common.component, and change following line:<wb-resource deploy-path="/" source-path="/WebContent"/>
Change /WebContent to your preferred directory. I use this for a several years now and encountered no problems with it.
$ javap -verbose HelloWorld|grep major
major version: 52