목록전체 글 (42)
에라모르겠다(‘◇’)?

@api_view(['POST']) def test(request): mapping_datas = request.data['data'] query_parts = [] dynamic_tables = [] for data in mapping_datas: id = data['id'] where_filters = data['where_condition'] query_model = TotalQuery.objects.get(id=id) select_query = query_model.query if where_filters: where_query = " WHERE 1=1 " for filter in where_filters: filters = get_where_condition(filter) where_query ..

- create , insert 쿼리 CREATE TABLE Customers ( customer_id INT PRIMARY KEY, customer_name VARCHAR(50), email VARCHAR(100), phone_number VARCHAR(15) ); INSERT INTO Customers (customer_id, customer_name, email, phone_number) VALUES (1, 'John Doe', 'john.doe@example.com', '123-456-7890'), (2, 'Jane Smith', 'jane.smith@example.com', '987-654-3210'), (3, 'Bob Johnson', 'bob.johnson@example.com', '555-..

- request sample { "name" : "Lemon", "num" : 2, "partition" : { "value_info" : "Yellow" } } from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from django.db import connections # Create your views here. @api_view(['POST']) def test(request): table_name = request.data.get('name',None) data_num = request.data.get('num',No..

- 리눅스에서 c언어 코딩 ① gcc 패키지 설치 최고관리자 계정으로 로그인 yum -y install gcc ② vi t.c 명령어 입력 하여 편집기 통하여 main 함수 작성 gcc t.c (컴파일) ③ 목록 조회 시 (ls) a.out 이라는 파일 생성 ④ 컴파일 시 파일명 추가 옵션 gcc t.c -o aa(파일명) a.out과 aa 파일명에선 똑같은 결과가 나옴 ! - 터미널에서 ftp 사용 ftp에서 사용할 수 있는 명령어 들 핵심 명령어 : get(파일 가져올 때) / mget (여러 개 파일 가져올때) / put (파일 업로드) / mput (여러개 업로드) 예시 ) ftp 접속 현재 이 사이트에 접속한 것임 apache / httpd / httpd-2.4.57.tar.gz 파일 다운로드 ..

* 폴더 관련 명령어 설명 pwd 파일 현재 위치 clear (ctrl +l ) 화면 비우기 ls ls -l ls -a ls -R 폴더 확인 폴더 자세하게 확인 숨김폴더까지 확인 하위 디렉토리까지 확인 mkdir 디렉토리 생성 rmdir 디렉토리 삭제 rm 폴더 내 파일 삭제 rm -r 디렉토리 내 파일 있는 경우까지 모두 삭제 파일-분류-권한 | 하드링크 수 | 소유주 | 소유그룹 | 사이즈 | 수정시간 | 파일명 - 파일 d 디렉토리 권한 read, write, execute * 파일 관련 명령어 설명 cp 파일 복사 cat 파일 내용 보기 (행번호 x) nl 파일 내용 보기 (행번호 o) less 파일 내용 끊어서 보기 (enter) more 파일 내용 끊어서 보기 (enter = 라인단위 / sp..

* ssh 설치 확인 rpm -qa | grep ssh 리눅스 최소 설치 한 경우에도 설치 되어있음 확인 * 실행중인지 확인 ps -ef | grep ssh * putty 설치 및 설정 변경 (port open) 설정 -> 고급 -> 포트포워딩 호스트 포트 22 게스트 포트 22 * putty 다운 https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Download PuTTY: latest release (0.78) This page contains download links for the latest released version of PuTTY. Currently this is 0.78, released on 2022-10-29. When ..

[링크] 리눅스 설치 (Youtube) 유튜브로 양주종의 코딩스쿨 선생님의 강의를 참고하여 linux 공부를 시작하려고한당 1. vm virtualBox 다운 https://www.virtualbox.org/ Oracle VM VirtualBox Welcome to VirtualBox.org! News Flash New April 18th, 2023VirtualBox 7.0.8 released! Oracle today released a 7.0 maintenance release which improves stability and fixes regressions. See the Changelog for details. New April 18th, 2023VirtualBox 6.1.44 releas www..

1. other app / views.py from django.http import HttpResponse from .kafka_producer_consumer import send_to_kafka # 다른 app의 views.py에서 kafka에 message를 보내는 함수 호출 def other_view(request): send_to_kafka('test','hello') return HttpResponse("Message sent to Kafka") 2. send_to_kafka from kafka import KafkaProducer, KafkaConsumer def send_to_kafka(topic, message): producer = KafkaProducer( bootstrap_serv..