2020년 8월 28일 금요일

python 상속

 class Parent():

    def __init__(self):
        print("부모 클래스")

        self.money = 50000000000

class Child_1():
    def __init__(self):
        print("첫번째 자식입니다.")
        print(self.money)

class Child_2():
    def __init__(self):
        print("두번째 자식입니다.")

Child_1()
Child_2()

첫번째 자식입니다.
두번째 자식입니다.



상속 받은 후

class Parent():
    def __init__(self):
        print("부모 클래스")

        self.money = 50000000000

class Child_1(Parent):
    def __init__(self):
        super().__init__()
        print("첫번째 자식입니다.")
        print(self.money)

class Child_2(Parent):
    def __init__(self):
        print("두번째 자식입니다.")

Child_1()
Child_2()

부모 클래스
첫번째 자식입니다.
50000000000
두번째 자식입니다.


잘못된 상속

class Parent():
    def __init__(self):
        print("부모 클래스")

        self.money = 50000000000

class Child_1(Parent):
    def __init__(self):
        super().__init__()
        print("첫번째 자식입니다.")
        print(self.money)

class Child_2(Parent):
    def __init__(self): -------------- Super를 받지않음
        print("두번째 자식입니다.")
        print(self.money)

Child_1()
Child_2()

Traceback (most recent call last):
  File "C:/Users/ejdrm/PycharmProjects/untitled/Test.py", line 45in <module>
    Child_2()
  File "C:/Users/ejdrm/PycharmProjects/untitled/Test.py", line 42in __init__
    print(self.money)
AttributeError'Child_2' object has no attribute 'money'
부모 클래스
첫번째 자식입니다.
50000000000
두번째 자식입니다.




함수는 SUper없이 가져올수있음!!

#상속
class Parent():
    def __init__(self):
        print("부모 클래스")

        self.money = 50000000000
    def book(self):
        print("부모의 서재입니다.")

class Child_1(Parent):
    def __init__(self):
        super().__init__()
        print("첫번째 자식입니다.")
        print(self.money)


class Child_2(Parent):
    def __init__(self):
        print("두번째 자식입니다.")
        self.book() ############가능하다

Child_1()
Child_2()


부모 클래스
첫번째 자식입니다.
50000000000
두번째 자식입니다.
부모의 서재입니다.

python class 기초

 #class 기초

#클래스는 구분하기위한 용도로 맨 앞글자는 대문자로 쓴다
class B_school():
def __init__(self):
print("B클래스 입니다")

self.student_name = "원빈"

class A_school():
def __init__(self):
print("A클래스 입니다")
bb = B_school()

self.student_name_a =bb.student_name;
print(self.student_name_a)


#B_school().stock()
A_school()

2020년 8월 27일 목요일

Python - 함수의 인자로 함수전달

 c#에서는 복잡한 이 기능이 python에서는 아주 단순하다.


ex

def english():
print("영어과 입니다")


def math(name,eng):
print("수학과 입니다.")
eng() ->해당받은 인자를 실행해준다


#3 - 함수의 인자로 함수 전달
math(name='원빈',eng=english)

수학과 입니다.
영어과 입니다



잘못된 예

ex

def english():
print("영어과 입니다")


def math(name,eng):
print("수학과 입니다.")
eng() ->해당받은 인자를 실행해준다 # 에러발생


#3 - 함수의 인자로 함수 전달
math(name='원빈',eng=english()) =>이런식으로 여기서 실행해버리면 에러가 난다.

영어과 입니다
수학과 입니다.
Traceback (most recent call last):
  File "C:/Users/ejdrm/PycharmProjects/week1/basic/python.py"line 23in <module>
    math(name='원빈',eng=english())
  File "C:/Users/ejdrm/PycharmProjects/week1/basic/python.py"line 19in math
    eng()
TypeError'NoneType' object is not callable



    

2020년 8월 26일 수요일

c#에서 외부파일 실행하기

 리스트 과제에서 외부 파이선을 실행해야하는 상황이 생겨서 해본것


%주의 -> 왠만한 에러는 콘솔창에 나오게 할수 있지만 

나오지 않는 에러도 있으니 차근차근 디버깅 해야함(호출하는곳,실행되는곳)

실행되는 원본(파이썬)에서는 에러 없이 되지만 호출하여서 인자를 받아서 실행할때는 안될수도있다.

인자를 통하여 외부프로그램이 돌아가는지 하나씩 확인하여 디버깅하여야한다.




//호출부분


public void PythonStart(string key, string data, int TotalLen, string PATH_p)

        {

            var psi = new ProcessStartInfo();

            Console.WriteLine("PATH_p:" + PATH_p);

            Console.WriteLine("data:" + data);

            //string psi_args = PATH_p + data; //경로를 지정한 실행파일


            string[] dataitem = data.Split(' ');

            dataitem[3] =dataitem[3].Replace("'", "");

            dataitem[4] =dataitem[4].Replace("'", "");

            dataitem[5] = dataitem[5].Replace("'", "");

            string newresult = "";

            for (int i = 0; i < dataitem.Length; i++)

            {

                newresult += dataitem[i]+" ";

            }

            string psi_args = PATH_p + newresult; //경로를 지정한 실행파일

            //string psi_args = PATH_p + data; //경로를 지정한 실행파일

            Console.WriteLine("psi_args:" + psi_args);

            psi.FileName = @"C:\scheduler\rist_env\Scripts\python.exe"; //파이썬 가상환경 설치 경로

            psi.Arguments = psi_args; //파일경로

            //psi.Arguments = string.Format("\"{0}\"\"{1}\"", PATH_p, data);


            //3) Proecss configuration

            psi.UseShellExecute = false;

            psi.CreateNoWindow = true;

            psi.RedirectStandardOutput = true;

            psi.RedirectStandardError = true;


            //4) return value def

            var errors = ""; // 출력은 하지 않습니다.

            var results = "";


            //using (var process = Process.Start(psi))

            //using (var process = System.Diagnostics.Process.Start(psi))

            using (var process = Process.Start(psi))

            {

                Console.WriteLine("프로세스 실행 하고 기다리기!!");

                //process.WaitForExit();


                results = process.StandardOutput.ReadToEnd();

                errors = process.StandardError.ReadToEnd();

                RxBox.AppendText("Error : " + errors + Environment.NewLine);

                RxBox.AppendText("Result : " + results + Environment.NewLine);

                //while (process.StandardOutput.Peek() > -1)

                //{


                //    process.StandardOutput.Close();

                //    RxBox.AppendText("break!!!! process.StandardOutput.Peek()");

                //    break;

                //}

                //while (process.StandardError.Peek() > -1)

                //{


                //    process.StandardError.Close();

                //    RxBox.AppendText("process.StandardError.Peek()");

                //    break;

                //}


                //using (StreamReader reader = process.StandardOutput)

                //{

                //    results = reader.ReadToEnd();

                //    Console.WriteLine(results);

                //}

                //using (StreamReader reader = process.StandardError)

                //{

                //    errors = reader.ReadToEnd();

                //    Console.WriteLine(errors);

                //}

            }

            

            RxBox.AppendText("Error : " + errors + Environment.NewLine);

            RxBox.AppendText("Result : " + results + Environment.NewLine);

        }







//키받아서 외부로 보내는것 관리하는 함수

try

                    {

                        switch (key)

                        {

                            case "predict_schedule_to_db":

                                Console.WriteLine("predict_schedule_to_db 요청 들어옴");

                                //path = @"C:\scheduler\pzpy\rist\app\predict_schedule_to_db.py";

                                path = $"\"C:\\scheduler\\pzpy\\rist\\app\\predict_schedule_to_db.py\"";

                                Form1.instance.PythonStart(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                //Form1.instance.PythonTest(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                break;

                            case "verify_model":

                                Console.WriteLine("verify_model 요청 들어옴");

                                //path = @"C:\scheduler\pzpy\rist\app\verify_model.py";

                                path = $"\"C:\\scheduler\\pzpy\\rist\\app\\verify_model.py\"";

                                Form1.instance.PythonStart(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                //Form1.instance.PythonTest(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                break;


                            case "test_hubiz":

                                Console.WriteLine("test_hubiz 요청 들어옴");

                                path = $"\"C:\\scheduler\\pzpy\\rist\\app\\test_hubiz.py\"";

                                Form1.instance.PythonStart(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                //Form1.instance.PythonTest(key, value.Substring(1, value.Length - 1), e.RawData.Length, path);

                                break;

                        }

                        //맨앞에 공백 하나 제거

                        //Form1.instance.PythonTest(key, value.Substring(1, value.Length-1), e.RawData.Length, path);

                        

                    }

                    catch (Exception ex)

                    {

                        MessageBox.Show(ex.ToString());

                        return;

                    }

2020년 8월 25일 화요일

[Python] Error Non-UTF-8 code starting with '\xeb',해결방법

해당 에러가 발생하면 

밑에 코드를 위에 적어주면 된다
#!/usr/bin/python
# -*- coding: utf-8 -*-

2020년 8월 22일 토요일

[Unity] Interface, 유니티 인터페이스 사용예제


인터페이스를 사용하면 이런 코드를

public class Bullet : MonoBehaviour{

    private void OnTriggerEnter2D(Collider2D collider)
    {
        Enemy enemy = collider.GetComponent<Enemy>();
        if(enemy != null)
        {
            //Hit a Enemy
            enemy.Damage();            
        }

        Crate crate = collider.GetComponent<Crate>();
        if(crate != null)
        {
            //Hit a Crate
            crate.Damage();            
        }

    }

}

매우간단하게 이런식으로

public Interface IDamageable{

    void Damage();
}

인터페이스를 추가하고


public class Enemy : MonoBehaviour , IDamageable{

    public void Damage();
}

public class Crate : MonoBehaviour , IDamageable{

    public void Damage();
}



이런식으로 변경할수있다.

public class Bullet : MonoBehaviour{

    private void OnTriggerEnter2D(Collider2D collider)
    {
       IDamageable damageable = collider.GetComponent<IDamageable>();

        if(damageable != null)
        {
            //Hit a Damageable Object
            damageable.Damage();
        }
    }

} 


원하는 어떤객체든지 IDamageable을 상속시키면 모두 사용가능하다




2020년 8월 20일 목요일

unity 프로젝트 깃 저장시 팁

 


일단 깃 저장소를 만든뒤

.gitignore 파일을 저장소에 등록하고

Assets

Packages

ProjectSettings

만 저장한다


[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*

# Visual Studio cache directory
.vs/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.opendb

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.unitypackage

[Unity] XML 저장,C# XML 파일 체크

 


간단한 저장...


using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.IO;

public class XmlManager : MonoBehaviour
{
    /// <summary>
    /// 생활용품 리스트
    /// </summary>
    public List<GameObjectgameObjects;
    string _filePath;

    public Transform ContentsParent;
    public GameObject Prefab;

    private void Awake()
    {
        _filePath = Application.dataPath + "/Resources/XML/LifeItems.XML";

    }

    public void SaveInfo()
    {
        try
        {
            ///파일이 있는지 없는지 확인하는 로직은 만들어야함 일단은 진행하도록함if()

            XmlDocument document = new XmlDocument();
            XmlElement FList = document.CreateElement("LifeItems");

            foreach (var obj in gameObjects)
            {
                XmlElement objElement = document.CreateElement("item: " + obj.name);
                objElement.SetAttribute("Type""생활용품");
                objElement.SetAttribute("이름"obj.name);
                objElement.SetAttribute("유통기한"obj.transform.position.ToString());
                FList.AppendChild(objElement);
            }

            document.Save(_filePath);

        }
        catch (System.Exception e)
        {
            Debug.Log("Error:" + e.ToString());

        }
    }

    public void LoadInfo()
    {
        try
        {
            XmlDocument document = new XmlDocument();
            document.Load(_filePath);
            XmlElement LifeItemList = document["LifeItems"];

            GameObject targetObj;

            foreach (XmlElement item in LifeItemList.ChildNodes)
            {
                GameObject lifeItem = Instantiate(PrefabContentsParent);
                lifeItem.name = item.GetAttribute("이름");
            }

        }
        catch (System.Exception e)
        {
            Debug.Log("Error:" + e.ToString());
        }
    }
}

###################################
//파일정보 있는지 확인하여 새로운파일 만드는것
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.IO;

public class XmlManager : MonoBehaviour
{
    /// <summary>
    /// 생활용품 리스트
    /// </summary>
    public List<LifeItemm_LifeItems;
    string _filePath;
    public LifeItemTableViewController m_LifeItemTableViewController;

    public Transform ContentsParent;
    public GameObject Prefab;

    private void Awake()
    {
        m_LifeItems = new List<LifeItem>();
        _filePath = Application.dataPath + "/Resources/XML/LifeItems.XML";
        Debug.Log("_filePath"_filePath);
        m_LifeItemTableViewController = FindObjectOfType<LifeItemTableViewController>();
        Prefab = FindObjectOfType<LifeItemTableViewCell>().gameObject;
    }

    private void Update()
    {
        if (Input.GetKeyDown("1"))
        {
            AddLifeItem();
        }
        if (Input.GetKeyDown("2"))
        {
            LoadInfo();
        }
    }

    public void AddLifeItem()
    {
        LifeItem item = new LifeItem("칫솔""생활용품""20200820"System.DateTime.Now.ToString());
        m_LifeItems.Add(item);
        m_LifeItemTableViewController.AddData(item);
        m_LifeItemTableViewController.ItemUpdate();
        SaveInfo();
    }


    public void SaveInfo()
    {
        
        try
        {
            ///파일이 있는지 없는지 확인하는 로직은 만들어야함 일단은 진행하도록함if()

            FileInfo fileInfo = new FileInfo(_filePath);

            if (fileInfo.Exists)
            {
                ///파일이 존재한다면
                XmlDocument document = new XmlDocument();
                document.Load(_filePath);
                XmlElement FList = document["LifeItems"];
                foreach (var obj in m_LifeItems)
                {
                    XmlElement objElement = document.CreateElement("물건정보");
                    objElement.SetAttribute("이름"obj.name);
                    objElement.SetAttribute("타입"obj.type);
                    objElement.SetAttribute("유통기한시작"obj.startDate);
                    objElement.SetAttribute("유통기한끝"obj.endDate);
                    objElement.SetAttribute("유통기한"obj.startDate + "~" + obj.endDate);
                    FList.AppendChild(objElement);
                }

                document.Save(_filePath);
            }
            else
            {
                ///파일이 존재하지않는다면
                XmlDocument document = new XmlDocument();
                XmlElement FList = document.CreateElement("LifeItems");
                document.AppendChild(FList);

                foreach (var obj in m_LifeItems)
                {
                    XmlElement objElement = document.CreateElement("물건정보");
                    objElement.SetAttribute("이름"obj.name);
                    objElement.SetAttribute("타입"obj.type);
                    objElement.SetAttribute("유통기한시작"obj.startDate);
                    objElement.SetAttribute("유통기한끝"obj.endDate);
                    objElement.SetAttribute("유통기한"obj.startDate + "~" + obj.endDate);
                    FList.AppendChild(objElement);
                }

                document.Save(_filePath);
            }

           

        }
        catch (System.Exception e)
        {
            Debug.Log("Error:" + e.ToString());

        }
    }

    public void LoadInfo()
    {
        try
        {
            XmlDocument document = new XmlDocument();
            document.Load(_filePath);
            XmlElement LifeItemList = document["LifeItems"];
            m_LifeItems = new List<LifeItem>();
            GameObject targetObj;

            foreach (XmlElement item in LifeItemList.ChildNodes)
            {
                LifeItem Li = new LifeItem(item.GetAttribute("이름"), item.GetAttribute("타입"), item.GetAttribute("유통기한시작"), item.GetAttribute("유통기한끝"));
                m_LifeItems.Add(Li);
                m_LifeItemTableViewController.AddData(Li);
            }
            m_LifeItemTableViewController.ItemUpdate();

        }
        catch (System.Exception e)
        {
            Debug.Log("Error:" + e.ToString());
        }
    }
}

2020년 8월 19일 수요일

[Unity] UI animation (Feat. Platinio Tween ), UI 효과 주기

 무료에셋 중에


Platinio Tween라는 앱이 있는데 상당히 사용하기 쉽고 좋다


간단하게 2가지 사용할만한게 있는데

Platinio.Popup은 Ui에 바로 붙여서 효과를 적용할수있다


간단하게 커스텀한 코드

using UnityEngine;
using Platinio.TweenEngine;
using Platinio.UI;

namespace Platinio
{
    public class Popup : MonoBehaviour
    {
        [SerializeFieldprivate Vector2 startPosition = Vector2.zero;
        [SerializeFieldprivate Vector2 desirePosition = Vector2.zero;
        [SerializeFieldprivate RectTransform canvas = null;      
        [SerializeFieldprivate float time = 0.5f;
        [SerializeFieldprivate Ease enterEase = Ease.EaseInOutExpo;
        [SerializeFieldprivate Ease exitEase = Ease.EaseInOutExpo;

        private bool isVisible    = false;
        private bool isBusy       = false;       
        private RectTransform thisRect = null;

        private void Start()
        {
            thisRect = GetComponent<RectTransform>();   
            
            thisRect.anchoredPosition = thisRect.FromAbsolutePositionToAnchoredPosition(startPosition , canvas);
        }

        public void Show()
        {
            thisRect.MoveUIdesirePositioncanvastime).SetEase(enterEase).SetOnComplete(delegate
            {
                isBusy = false;
                isVisible = true;
            });
            
        }

        ///좌우로 움직이게 만들기위해 커스텀한 코드
        public void MoveSide(Vector2 targetPosition)
        {
            thisRect.MoveUI(targetPositioncanvastime).SetEase(enterEase).SetOnComplete(delegate
            {
                isBusy = false;
                isVisible = true;
            });
        }
        ///좌우로 움직이게 만들기위해 커스텀한 코드

        public void Hide()
        {
            thisRect.MoveUIstartPositioncanvastime).SetEase(exitEase).SetOnComplete(delegate
            {
                isBusy = false;
                isVisible = false;
            });
        }

        public void Toggle()
        {
            if (isBusy)
                return;

            isBusy = true;

            if (isVisible)
                Hide();
            else
                Show();
        }
    }

}




PopUp이 달린 객체들을 왼쪽 오른쪽으로 움직여주는 함수


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//using Platinio.UI;
using Platinio;

public class SceneChange : MonoBehaviour
{

    public Popup[] Popups;
    public Vector2 CenterPos;
    public Vector2 LeftPos;
    public Vector2 RightPos;
    public int currentIdx;
    public int max;
    // Start is called before the first frame update
    void Start()
    {
        max = Popups.Length;
    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetKeyDown("1"))
        {
            Next();
        }

        if (Input.GetKeyDown("2"))
        {
            Prev();
        }
    }

    public void Next()
    {
        if (currentIdx+1 > max)
            return;

        Popups[currentIdx].MoveSide(LeftPos);
        Popups[++currentIdx].MoveSide(CenterPos);

    }
    public void Prev()
    {
        if (currentIdx - 1 < 0)
            return;

        Popups[currentIdx].MoveSide(RightPos);
        Popups[--currentIdx].MoveSide(CenterPos);
    }
}



2020년 8월 13일 목요일

git 되돌리기

 git 되돌리기




reset


 Reset은 시계를 다시 맞추는 것입니다.

 돌아 가려는 커밋으로 리파지토리는 재설정되고, 

해당 커밋 이후의 이력은 사라집니다.



git reset --hard [id]


를 하면 commit의 이력이 사라지면서 파일도 전부 변경된다


만약 다시 돌아가고 싶다면(reset을 취소하고싶다면)

$ git reflog

를 이용해서 나오는 id를 참고해서 돌아가야한다 (git log --oneline에는 더이상 나오지않음)






reset을 해도 원격저장소에는 적용되지않는다


원격저장소에도 적용하고 싶다면


git push -f origin master를 해서 적용하면된다


만약 에러가 뜬다면 

저장소의 셋팅에서 


Setting - > Repository -> Protected Branches의

master에 Roles 부분을 Maintainers 에서 -> Developers + Maintainers 로 변경하면 된다



2020년 8월 12일 수요일

[Unity] LogManager

 using UnityEngine;

using System.Collections;
using System.Collections.Generic;

using System.IO;
using System;
using UnityEngine.UI;

public class LogManager : MonoBehaviour
{
    //해야할일
    //컨텐츠가 추가되면 스크롤이 가장 밑으로 내려가는 기능 추가해야함~


    public string logTimetext;
    public GameObject prefab;
    public Transform Log_Content;

    //test
    public int textidx;
    //test


    public delegate void handleEventLog(string log);
    public static handleEventLog del_eventLog;


    void Start()
    {
        Screen.fullScreen = false;

        del_eventLog += func_Write;

        func_Write ("Start--------------------------" +System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
    }

    void Update()
    {
        if (Input.GetKeyDown("a"))
        {
            func_Write("dnddbd"textidx);
            textidx++;
        }
    }

    void OnApplicationQuit()
    {
        func_Write ("End-----------------------------" + System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
    }



    public void func_Write(string strData)
    {
        WriteData(strData);
    }


    private IEnumerator ForceScrollDown()
    {
        yield return new WaitForEndOfFrame ();
        Canvas.ForceUpdateCanvases ();
        
        Log_Content.transform.parent.parent.GetComponent<ScrollRect>().verticalNormalizedPosition = 0;
        Canvas.ForceUpdateCanvases ();
    }

//    private IEnumerator TextRead(string strData)
//    {
////        logTimetext = "";
       
//        WriteData(strData);//파일에 write
//        yield return new WaitForSeconds(0.1f);
////        logTimetext += "[" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss.fff tt") + "]" + " :";
//        //testtext.text += ReadLastLine() + "\n";
       
////        GameObject G;
////        G =Instantiate(prefab, Log_Content);
////        G.GetComponent<Text>().text += logTimetext + ReadLastLine();
////        StartCoroutine (ForceScrollDown ());
//      //맨밑으로 초기화 
//      //Log_Content.transform.parent.parent.GetComponent<ScrollRect>().normalizedPosition = new Vector2(0,0);
//    }


    public void WriteData(string strData)
    {
        // FileMode.Create는 덮어쓰기.
        FileStream f = new FileStream(Application.dataPath"/StreamingAssets" + "/"+"Log_"+System.DateTime.Now.ToString("yyyy-MM-dd") +".txt"FileMode.Append,FileAccess.Write);//, FileAccess.Write);

        StreamWriter writer = new StreamWriter(fSystem.Text.Encoding.Unicode);
        writer.WriteLine("[" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss.fff tt") + "] :" + strData);

        logTimetext = "";
        logTimetext += "[" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss.fff tt") + "]" + " :";

        GameObject G;
        G =Instantiate(prefabLog_Content);
        G.GetComponent<Text>().text += logTimetext + strData ;
        StartCoroutine (ForceScrollDown ());

        writer.Close();
    }

    //모든 데이터 읽기 지금은 필요없음
    //public void ReadData()
    //{
    //    StreamReader sr = new StreamReader(Application.dataPath + "/StreamingAssets" + "/" + "Log.txt");
    //    Debug.Log("Read Data: " + sr.ReadLine());
    //    sr.Close();
    //}

  //  public string ReadLastLine()
  //  {
        //StreamReader sr = new StreamReader(Application.dataPath + "/StreamingAssets" + "/" +"Log.txt");
  //      string result;
  //      result = "";
  //      while (!sr.EndOfStream)
  //      {
  //          result = sr.ReadLine();
  //      }
  //      sr.Close();
  //      return result;
  //  }

}

git rejected error(feat. cherry-pick)

 문제 아무 생각 없이 pull을 받지않고 로컬에서 작업! 커밋, 푸시 진행을 해버렷다. push에선 remote와 다르니 당연히 pull을 진행해라고 하지만 로컬에서 작업한 내용을 백업하지 않고 진행하기에는 부담스럽다(로컬작업 유실 가능성) 해결하려...