연쇄적으로 지워지게 하려면 cascade로 DDL 사용시 넣어주면 된다.

[링크 : https://sweeteuna.tistory.com/m/71]

 

ALTER TABLE PLAYER DROP CONSTRAINT CONSTRAINT_8CD;
ALTER TABLE PLAYER ADD FOREIGN KEY (team_id) REFERENCES TEAM (id) ON UPDATE CASCADE;

ALTER TABLE PLAYER DROP CONSTRAINT CONSTRAINT_8CD;
ALTER TABLE PLAYER ADD FOREIGN KEY (team_id) REFERENCES TEAM (id) ON DELETE CASCADE;

[링크 : https://papimon.tistory.com/90]

 

'Programming > 데이터베이스' 카테고리의 다른 글

데이터베이스 순환참조  (0) 2017.05.20
데이터베이스 1:n 관계 구현  (0) 2016.02.29
CRUD  (0) 2014.05.17
데이터베이스 - 키 관련  (0) 2014.04.28
카티젼 프로덕트, join  (0) 2014.04.26
Posted by 구차니
Programming/openGL2025. 5. 30. 09:14

어렵다. 함수들 하나하나 찾아보고 머하는건지 맞춰봐야 할 듯.

 

Name
glGenTextures — generate texture names

C Specification
void glGenTextures( GLsizei n,
  GLuint * textures);
 
Parameters
n
Specifies the number of texture names to be generated.

textures
Specifies an array in which the generated texture names are stored.

[링크 : https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGenTextures.xhtml]

 

Name
glBindTexture — bind a named texture to a texturing target

C Specification
void glBindTexture( GLenum target,
  GLuint texture);
 
Parameters
target
Specifies the target to which the texture is bound. Must be one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE or GL_TEXTURE_2D_MULTISAMPLE_ARRAY.

texture
Specifies the name of a texture.

[링크 : https://registry.khronos.org/OpenGL-Refpages/gl4/html/glBindTexture.xhtml]

 

void glTexStorage2D( GLenum target​, GLint levels​, GLint internalformat​, GLsizei width​, GLsizei height​ );
Valid target​s: GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, or GL_TEXTURE_1D_ARRAY.
For 1D array textures, the number of array layers in each mipmap level is the height​ value. For rectangle textures, the number of mipmap levels must be 1.
void glTexStorage3D( GLenum target​, GLint levels​, GLint internalformat​, GLsizei width​, GLsizei height​, GLsizei depth​ );
Valid target​s: GL_TEXTURE_3D, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_CUBE_MAP_ARRAY (this requires GL 4.0 or ARB_texture_cube_map_array)
For 2D array textures, the number of array layers in each mipmap level is the depth​ value.
For 2D cubemap array textures, the number of cubemap layer-faces is the depth​, which must be a multiple of 6. Therefore, the number of individual cubemaps in the array is given by depth​ / 6.

[링크 : https://www.khronos.org/opengl/wiki/Texture_Storage]

 

glTexImage2D(GL_TEXTURE_RECTANGLE, 0, internalformat​, width​, height​, 0, format​, type​, data​);

[링크 : https://www.khronos.org/opengl/wiki/Rectangle_Texture]

 

 

'Programming > openGL' 카테고리의 다른 글

openGL 은선제거  (0) 2025.07.29
openGL 스터디용 gemini 생성 코드  (0) 2025.07.16
blender in openGL  (0) 2025.04.28
opengl glortho gluperspective  (0) 2023.08.28
glReadPixels() 와 glUseProgram()  (0) 2022.11.17
Posted by 구차니
Programming/web 관련2025. 5. 14. 16:30

iptime 신형 ui에서 왜 크롬에서 ctrl-f로 검색이 안되는지 찾아보는데

flt 로 시작하는 이상한 태그들이 많아서 찾아보니

<flt-file-picker-inputs id="__file_picker_web-file-input"></flt-file-picker-inputs>

 

flutter web app으로 만든 녀석 같고 이녀석 특징인 것 같다.

[링크  https://grow-grow.tistory.com/53]

 

조금 더 찾아보니 custom tag 로 만든 것 같고 이로 인해서 크롬에서 보여는 지지만

디버그 모드에서 정상적으로 추적이 안되는 것 같다.

[링크  https://developer.mozilla.org/ko/docs/Web/API/Web_components/Using_custom_elements]

[링크  https://marcoding.tistory.com/26]

[링크  https://velog.io/@gil0127/Web-Components-커스텀-HTML-태그-만들기]

'Programming > web 관련' 카테고리의 다른 글

PWA - progressive web app  (0) 2025.09.05
restful API  (0) 2025.07.15
polypill  (0) 2025.03.05
css 캐로젤  (0) 2024.11.12
webgl + three.js를 이용한 GL 공부하기 (feat 클로드)  (0) 2024.10.18
Posted by 구차니
Programming/openGL2025. 4. 28. 19:06

Open Asset Import Library(assimp) 를 이용해서 blender를 읽어오고 openGL로 그릴수 있는 것으로 보인다.

 

Features

  • Reads more than 30 3D file formats, including Collada, X, 3DS, Blend, Obj
  • Converts them to a hierarchical in-memory data structure
  • Provides 'post-processing steps' to improve the input data, i.e. generate normals and tangents or fix import issues.
  • Provides APIs for both C and C++
  • Imports skeleton animations and skinning weights
  • Supports complex multi-layer materials
  • www.open3mod.com/ is an Open-Source viewer that is based off assimp to view models (Windows only)

[링크 : https://sourceforge.net/projects/assimp/]

 

Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(filename,aiProcessPreset_TargetRealtime_Fast);
aiMesh *mesh = scene->mMeshes[0]; //assuming you only want the first mesh

float *vertexArray;
float *normalArray;
float *uvArray;

int numVerts;
next extract the data

numVerts = mesh->mNumFaces*3;

vertexArray = new float[mesh->mNumFaces*3*3];
normalArray = new float[mesh->mNumFaces*3*3];
uvArray = new float[mesh->mNumFaces*3*2];

for(unsigned int i=0;i<mesh->mNumFaces;i++)
{
    const aiFace& face = mesh->mFaces[i];

    for(int j=0;j<3;j++)
    {
        aiVector3D uv = mesh->mTextureCoords[0][face.mIndices[j]];
        memcpy(uvArray,&uv,sizeof(float)*2);
        uvArray+=2;

        aiVector3D normal = mesh->mNormals[face.mIndices[j]];
        memcpy(normalArray,&normal,sizeof(float)*3);
        normalArray+=3;

        aiVector3D pos = mesh->mVertices[face.mIndices[j]];
        memcpy(vertexArray,&pos,sizeof(float)*3);
        vertexArray+=3;
    }
}

uvArray-=mesh->mNumFaces*3*2;
normalArray-=mesh->mNumFaces*3*3;
vertexArray-=mesh->mNumFaces*3*3;

[링크 : https://nickthecoder.wordpress.com/2013/01/20/mesh-loading-with-assimp/]

    [링크 : https://stackoverflow.com/questions/35111681/make-a-model-in-blender-and-load-in-opengl]

 

'Programming > openGL' 카테고리의 다른 글

openGL 스터디용 gemini 생성 코드  (0) 2025.07.16
opengl texture  (0) 2025.05.30
opengl glortho gluperspective  (0) 2023.08.28
glReadPixels() 와 glUseProgram()  (0) 2022.11.17
openCV + openGL  (0) 2022.02.08
Posted by 구차니
Programming/C++ STL2025. 4. 22. 14:51

SDL 이라던가 여러가지가 있지만 chatGPT 에서 추천해주는 좀 쉬워보이는 녀석들 목록

 

[링크 : https://libcinder.org/]

[링크 : https://openframeworks.cc/]

'Programming > C++ STL' 카테고리의 다른 글

crt0.o libstdc++.a  (0) 2025.08.12
cpp 기본 인자 prototype  (0) 2025.03.28
cpp std::to_string(int)  (0) 2025.02.20
cpp string 끝에 한글자 지우기  (0) 2025.02.06
cpp stoi (atoi)  (0) 2025.02.06
Posted by 구차니
Programming/C++ STL2025. 3. 28. 12:04

디폴트 매개변수 라고 하는데

프로토타입에다가 해당 변수에 기본 값을 넣어주면 된다.

함수 선언이 아님!

 

[링크 : https://code-studies.tistory.com/32]

'Programming > C++ STL' 카테고리의 다른 글

crt0.o libstdc++.a  (0) 2025.08.12
cpp 그래픽 라이브러리  (0) 2025.04.22
cpp std::to_string(int)  (0) 2025.02.20
cpp string 끝에 한글자 지우기  (0) 2025.02.06
cpp stoi (atoi)  (0) 2025.02.06
Posted by 구차니
Programming/web 관련2025. 3. 5. 14:58

구버전의 javascript 라던가 python에 필요한 기능이 있을 경우 새로운 기능을 확장해주는 것을 polyfill 이라고 하는 듯.

 

In software development, a polyfill is code that implements a new standard feature of a deployment environment within an old version of that environment that does not natively support the feature. Most often, it refers to JavaScript code that implements an HTML5 or CSS web standard, either an established standard (supported by some browsers) on older browsers, or a proposed standard (not supported by any browsers) on existing browsers. Polyfills are also used in PHP and Python.

[링크 : https://en.wikipedia.org/wiki/Polyfill_(programming)]

[링크 : https://toss.tech/article/smart-polyfills]

[링크 : https://babeljs.io/docs/babel-polyfill]

'Programming > web 관련' 카테고리의 다른 글

restful API  (0) 2025.07.15
html custom tag  (0) 2025.05.14
css 캐로젤  (0) 2024.11.12
webgl + three.js를 이용한 GL 공부하기 (feat 클로드)  (0) 2024.10.18
웹 브라우저에서 웹 캠 띄우기  (0) 2024.09.24
Posted by 구차니

좀 뜬금 없는 에러가 발생해서 멘붕(!!)

windows server 2016 / edge 86 버전이었는데 vue.js로 만든 애가 이런 에러가 나서 찾아보니

edge 92..?

Array.prototype.at()
Baseline Widely available
Array 인스턴스의 at() 메서드는 정숫값을 받아 해당 인덱스에 있는 항목을 반환하며, 양수와 음수를 사용할 수 있습니다. 음의 정수는 배열의 마지막 항목부터 거슬러 셉니다.

[링크 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/at#browser_compatibility]

  [링크 : https://stackoverflow.com/questions/68464114/why-am-i-getting-at-is-not-a-function]

 

2025.03.04 기준 최신이 133 인것 같은데 86이면 거~~~~업나 오래 되었네 -_-

 

 

[링크 : https://en.m.wikipedia.org/wiki/Microsoft_Edge]

'Programming > javascript & HTML' 카테고리의 다른 글

js DataView()  (0) 2024.08.21
javascript ... (rest parameter)  (0) 2024.08.12
qr decoder  (0) 2024.04.19
QR decoder로 로또 추첨하기  (0) 2024.04.16
javascript 집합(set) 내용 출력하기  (0) 2024.04.16
Posted by 구차니
Programming/C++ STL2025. 2. 20. 12:32

자동 형변환(?)은 지원안하는지

문자열 끝에 "blah blah : " + value 하니 에러가 발생해서 찾아보니

std::to_string() 이라는 착한 녀석이 존재함을 발견!

 

[링크 : https://en.cppreference.com/w/cpp/string/basic_string/to_string]

[링크 : https://developer-cat.tistory.com/19]

'Programming > C++ STL' 카테고리의 다른 글

cpp 그래픽 라이브러리  (0) 2025.04.22
cpp 기본 인자 prototype  (0) 2025.03.28
cpp string 끝에 한글자 지우기  (0) 2025.02.06
cpp stoi (atoi)  (0) 2025.02.06
std::string:npos  (0) 2025.02.05
Posted by 구차니
Programming/golang2025. 2. 18. 14:27

리눅스에서 일반실행파일을 systemctl에 등록해서 실행하는것과 다르게

윈도우에서는 윈도우 서비스 api를 통해서 구동을 해야 정상적으로 구동된다.

 

일반적인 네트워크 echo 프로그램을 빌드해서 실행해보니

서비스 등록 문제 없음

서비스 실행 -> 실행중 -> 중지됨 으로 어느정도 시간이 지난후 멈춰버린다.

[링크 : https://pkg.go.dev/golang.org/x/sys/windows/svc]

 

[링크 : http://golang.site/go/article/116-윈도우즈-서비스-프로그램]

[링크 : http://www.toughman.pe.kr/2020/09/gogolang-언어로-윈도우즈-서비스-프로그램-만들기/]

'Programming > golang' 카테고리의 다른 글

golang tcp socket timeout 주기(listen, read)  (0) 2024.04.08
golang reflect  (0) 2024.02.20
golang echo i18n  (0) 2024.02.19
golang package  (0) 2024.02.19
golang html/template ParseFiles()  (0) 2024.02.16
Posted by 구차니