파이썬

https://www.python.org/downloads/windows/

 

Python Releases for Windows

The official home of the Python Programming Language

www.python.org

 

아나콘다

https://www.anaconda.com/distribution/

 

Anaconda Python/R Distribution - Free Download

Anaconda Distribution is the world's most popular Python data science platform. Download the free version to access over 1500 data science packages and manage libraries and dependencies with Conda.

www.anaconda.com

 

파이참

https://www.jetbrains.com/pycharm/download/#section=windows

 

Download PyCharm: Python IDE for Professional Developers by JetBrains

Intelligent Python IDE with refactorings, debugger, code completion, on-the-fly code analysis and coding productivity orientation

www.jetbrains.com

 

파이참 설치후 No R interpreter is defined 에러시 아래 설치

https://cran.r-project.org/

 

The Comprehensive R Archive Network

 

cran.r-project.org

 

 private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 1; i <= 255; i++)
            {
                new Thread(() =>
                {
                    int ip = i;
                    try
                    {
                        Ping ping = new Ping();
                        int timeout = 10;

                        PingReply reply = ping.Send(IPAddress.Parse("192.168.0." + ip.ToString()), timeout);

                        if (reply.Status == IPStatus.Success)
                        {
                            Console.WriteLine("Succeess");
                            ListViewItem temp = new ListViewItem("192.168.0." + ip.ToString() + "Succeess");
                            listView1.Items.Add(temp);
                        }
                        else
                        {
                            Console.WriteLine("Fail");
                            ListViewItem temp = new ListViewItem("192.168.0." + ip.ToString() + "Fail");
                            listView1.Items.Add(temp);
                        }
                    }
                    catch
                    {
                    }
                    finally
                    {
                    }

                }).Start();
            }
        }

버튼 생성

listview 생성

 

핑테스트가 완료되면 listview에 추가됨

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

c# ListView 추가한 아이템 포커스  (0) 2020.01.29
c# 크로스 스레드  (0) 2020.01.29
monodevelop Mysql  (0) 2020.01.29
C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
string connectionString =
	"Server=127.0.0.1;" +
	"Database=test;" +
	"User ID=root;" +
	"Password=password;" +
	"Pooling=false";
IDbConnection dbcon;

dbcon = new MySqlConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();

string sql ="SELECT * FROM mamber";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
	string FirstName = reader[name].ToString();
	Console.WriteLine("Name: " + FirstName);
}

reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;

 

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

c# 크로스 스레드  (0) 2020.01.29
c# ping test  (0) 2020.01.29
C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
c# MessageBox 예 아니오 선택  (0) 2020.01.29
if (listView1.SelectedIndices.Count > 0)
{
	string idx = listView1.Items[listView1.FocusedItem.Index].SubItems[0].Text.ToString();
}

 

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

c# ping test  (0) 2020.01.29
monodevelop Mysql  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
c# MessageBox 예 아니오 선택  (0) 2020.01.29
c# textbox 비밀번호  (0) 2020.01.29
private static MySqlConnection mySqlConn; //선언

public static void DBConn()
{
	//연결
	try
	{
		string strconn = "Server=127.0.0.1;Database=test;Uid=root;Pwd=apmsetup;";
		mySqlConn = new MySqlConnection(strconn);
		mySqlConn.Open();
	}
	catch (Exception ex)
	{
		Console.WriteLine("연결 실패\n인터넷 연결을 확인해주세요\n" + ex.Message);
	}
	finally
	{
	}
}
public static MySqlConnection getInsent()
        {
            if (mySqlConn == null || mySqlConn.State != System.Data.ConnectionState.Open || mySqlConn.Ping() == false)
            {
                DBConn();
                Console.WriteLine("DB재연결");
            }

            return mySqlConn;
        }


public void sendMSG()
{
	try
	{
		// MYSQL 내보내기                
		string msg = "SELECT * FROM member WHERE Idx = 1;";
		// MYSQL 내보내기
		// 날릴 쿼리가 있으면
		string str = "";
		if (!(msg == ""))
		{
			using (MySqlCommand count = new MySqlCommand(msg, mySqlConn))
			{
				//count.ExecuteNonQuery(); 
				MySqlDataReader myCount = count.ExecuteReader();
				while (myCount.Read())
				{
					str = myCount["Name"].ToString();
				}
				myCount.Close();
			}
		}
	}
	catch (Exception ex)
	{
		Console.WriteLine("READ Error!\n" + ex.Message);
	}
	finally
	{
	}
}

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

monodevelop Mysql  (0) 2020.01.29
C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# MessageBox 예 아니오 선택  (0) 2020.01.29
c# textbox 비밀번호  (0) 2020.01.29
c# ini  (0) 2020.01.29
if (MessageBox.Show("확인 취소 테스트", "확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
     //확인시 내용
     MessageBox.Show("확인버튼 누름");
}

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

C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
c# textbox 비밀번호  (0) 2020.01.29
c# ini  (0) 2020.01.29
c# 시리얼통신  (0) 2020.01.29

텍스트 박스 선택

 

속성에서 PasswordChar 에서 대체할 기호를 입력

 

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

C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
c# MessageBox 예 아니오 선택  (0) 2020.01.29
c# ini  (0) 2020.01.29
c# 시리얼통신  (0) 2020.01.29
[DllImport("kernel32")] 
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); 
[DllImport("kernel32")] 
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);


public void iniTest() 
{ 
    StringBuilder str = new StringBuilder(); 

    //쓰기
    WritePrivateProfileString("LOGIN", "ID", "1111111", "./init.ini"); 

    //읽기
    GetPrivateProfileString("LOGIN", "ID", "(NONE)", str, 1024, "./init.ini"); 

    MessageBox.Show(str.ToString()); 

    //삭제
    WritePrivateProfileString("LOGIN", null, null, "./init.ini");
}

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

C# ListView 선택된 아이템 가져오기  (0) 2020.01.29
c# Mysql  (0) 2020.01.29
c# MessageBox 예 아니오 선택  (0) 2020.01.29
c# textbox 비밀번호  (0) 2020.01.29
c# 시리얼통신  (0) 2020.01.29

+ Recent posts