달력

52024  이전 다음

  • 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
  • 29
  • 30
  • 31
반응형

애플코딩 보고 따라 처봄

https://www.youtube.com/watch?v=CojyGfCMvuU

<!DOCTYPE html>
<html lang="en">
<head>    
    <title>Document</title>
</head>
<body>
    
    <canvas id="canvas" width="300" height="300"></canvas>
    
    <script type="importmap">
    {
      "imports": {
        "three": "https://unpkg.com/three@0.141.0/build/three.module.js",
        "GLTFLoader" : "https://unpkg.com/three@0.141.0/examples/jsm/loaders/GLTFLoader.js",
        "OrbitControls" : "https://unpkg.com/three@0.141.0/examples/jsm/controls/OrbitControls.js"
      }
    }
  </script>

  <script type="module">
    import {GLTFLoader} from 'GLTFLoader';
    import * as THREE from 'three';
    import { OrbitControls } from 'OrbitControls';

    let scene = new THREE.Scene();
    let renderer = new THREE.WebGLRenderer({
        canvas : document.querySelector('#canvas'),
        antialias : true
    });

    renderer.outputEncoding = THREE.sRGBEncoding;

    let camera = new THREE.PerspectiveCamera(30, 1);
    camera.position.set(0,0,5);

    scene.background = new THREE.Color('white');
    //let light = new THREE.DirectionalLight(0xffff00, 10);
    //scene.add(light);
    
    let loader = new GLTFLoader();
    
    let controls = new OrbitControls( camera, renderer.domElement );
    controls.rotateSpeed = 1.0; // 마우스로 카메라를 회전시킬 속도입니다. 기본값(Float)은 1입니다.        
    controls.zoomSpeed = 1.2; // 마우스 휠로 카메라를 줌 시키는 속도 입니다. 기본값(Float)은 1입니다.        
    controls.panSpeed = 0.8; // 패닝 속도 입니다. 기본값(Float)은 1입니다.        
    //controls.minDistance = 5; // 마우스 휠로 카메라 거리 조작시 최소 값. 기본값(Float)은 0 입니다.        
    //controls.maxDistance = 100; // 마우스 휠로 카메라 거리 조작시 최대 값. 기본값(Float)은 무제한 입니다.

    loader.load('shiba/scene.gltf', function(gltf){
        scene.add(gltf.scene);
        
        function animate(){
          requestAnimationFrame(animate)
          //gltf.scene.rotation.y += 0.01;

          renderer.render(scene, camera);
          controls.update();
        }

        animate();
    });
  </script>
</body>
</html>

 

결과물 스샷

 

Posted by 유령회사
|
반응형

간단한 설정을 저장하고 지정할때 ini파일같은거도 만들기는 하는데

간단하게 설정하는 방법있다.

Settings.settings에 값을 넣어두고 설정하고 빼내기가 가능하다.

이렇게 설정을 하고

이런식으로 사용하면 된다. 

Posted by 유령회사
|
반응형
1
2
3
4
5
6
7
8
9
10
11
12
private void btnDel_Click(object sender, EventArgs e)
{
    this.dataGridView1.AllowUserToAddRows = false;
           
    //데이터그리드뷰 속성중 SelectionMode의 속성을 FullRowSelect로 바꿔주면 
//dataGridView1.SelectedRows 동작함
    foreach (DataGridViewRow item in this.dataGridView1.SelectedRows)
    {              
        dataGridView1.Rows.Remove(item);
    }
 
    this.dataGridView1.AllowUserToAddRows = true;
}
cs

DataGridView의 자동으로 한줄을 추가하는 속성을 사용할려고 하니 삭제시 오류가 발생해서

잠시꺼두고 다시 켜주면 해결됨

Posted by 유령회사
|
반응형

DataGridView 사용시 SelectedRows 속성을 사용할려고 하면

데이터그리드뷰 속성중 SelectionMode의 속성을 FullRowSelect로 바꿔주야 동작함

Posted by 유령회사
|
반응형

출처

http://csharphelper.com/blog/2021/10/remove-all-event-handlers-from-an-event-in-c/

Posted by 유령회사
|
반응형

//출처 https://hellocho.tistory.com/11
//추가 문자 인코딩이기 때문에 인코딩 등록자 지정이 필요하다고 함
var client = new WebClient();
int euckrCode = 51949;
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
client.Encoding = System.Text.Encoding.GetEncoding(euckrCode);

string strHtml = client.DownloadString("http://kind.krx.co.kr/corpgeneral/corpList.do?method=download");








Posted by 유령회사
|
반응형

See the Pen YzGgwyW by kcwchang00 (@it_ghost_company) on CodePen.

https://www.youtube.com/watch?v=gBA5zXPddtY&t=145s

 

원형이미지 만들기

Posted by 유령회사
|
반응형

GetCodeListByMarket 이건 종목코드를 가져오고 아래는 옵션이다

"0"  "장내"  "3", "ELW"  "4", "뮤추얼펀드"  "5", "신주인수권"  "6", "리츠"
"8", "ETF"  "9", "하이일드펀드"  "10", "코스닥"  "30", "제3시장"

GetCodeListByMarket(0)으로 실행하였을때 결과이다.

GetMasterCodeName 이건 종목코드에 대한 종목명을 가져온다.

GetMasterCodeName ("000020") 실행결과로 동화약품을 가져온다.

 

'프로그래밍 > 키움API C#' 카테고리의 다른 글

키움 API - 1일차 - 로그인  (0) 2020.11.11
Posted by 유령회사
|
반응형

C#을 하도 안써서 문법까먹고 그래서 머라도 만들어 볼까 해서 시작해봄...

 

키움 회원가입하고 

트레이딩채널에 Open API이동

사용 신청하고 Open Api+도 받아 설치하고 자료실가서 

C# 샘플도 받았다.

 

프로젝트 만들고 나서 ocx를 구성요소에 추가하고 

도구창에 생긴 컴포넌트를 드래그 해서 떨어트리면 OpenAPI라는 게 추가된다.

저걸 통해서 자료가 왔다갔다하나 보더라

 

메뉴 컨트롤 하나 추가해주고

axKHOpenAPI라는게 아까 드래그 해서 폼에 떨꾼걸 이용해서 로그인까지만 만들어봄

'프로그래밍 > 키움API C#' 카테고리의 다른 글

키움 API - 2일차 종목가져오기  (0) 2020.11.18
Posted by 유령회사
|
반응형

See the Pen date add by kcwchang00 (@it_ghost_company) on CodePen.

Posted by 유령회사
|