분류 전체보기 41

[ Rabbitmq ] Rabbitmq 사용하기 2 _ Request, Response 방식

Rabbutmq rpc 방식으로 클라이언트에서 버튼 클릭시 서버에서 랜덤으로 영문자를 보내는 테스트 코드 작성 1. .Net에서 Rabbitmq 를 편하게 사용하기 위해 Easynetq 를 NuGet 패키지에서 설치한다. 2. 서버코드 작성 랜덤으로 7자리 문자열을 받아온다 public static StringData GetRandomString() { StringData strResult = new StringData(); Random rand = new Random(); string strRandomChar = "qwertyuiopasdfghjklzxcvbnm"; StringBuilder rs = new StringBuilder(); for (int i = 0; i < 7; i++) { rs.Appe..

Rabbitmq 2022.12.27

[ Rabbitmq ] 서버에서 클라이언트로 hello world 보내기

서버 Rabbitmq 서버에 연결은 만든다 채널을 만든다. 채널이 생성되어 있는동안 큐를 선언해서 메시지를 클라이언트로 보낸다 using RabbitMQ.Client; using System; using System.Text; namespace RabbitmqServer { class Program { static void Main(string[] args) { var factory = new ConnectionFactory() { HostName = "localhost" };//ip using (var connection = factory.CreateConnection()) using (var channel = connection.CreateModel()) { channel.QueueDeclare(qu..

Rabbitmq 2022.12.27

[ Rabbitmq ] Rabbitmq 사용하기 1. Window 에 RabbitMQ 설치, management 띄우기

1. Rabbitmq 설치 https://www.rabbitmq.com/install-windows.html#installer Installing on Windows — RabbitMQ Installing on Windows This guide covers RabbitMQ installation on Windows. It focuses on the two recommended installation options: The guide also covers a few post-installation topics in the context of Windows: and more. These topics are covered in more det www.rabbitmq.com 여기서 직접 다운로드 눌러서 다운로드..

Rabbitmq 2022.12.27

[ c# ] EF Core vs Dapper vs MySqlConnecter 성능 비교

비교 결과는 내 상황에 맞춘거라 모든 상황에 맞지 않을 수 있음 select 총 데이터 개수 : 1,105,704 데이터 개수 SqlConnector Dapper EFCore MySqlData MySqlDataCore 2,151 637ms 248ms 1992ms 25ms 29ms 5,499 658ms 730ms 2207ms 539ms 51ms 13,203 658ms 726ms 2195ms 546ms 126ms 28,611 675ms 728ms 2102ms 543ms 230ms 49,347 692ms 743ms 2218ms 563ms 378ms 984,915 1948ms 1226ms 7264ms 6268ms 4182ms 1,007,154 1799ms 1794ms 7155ms 6449ms 4236ms 1,0..

C#/c# 2022.12.27

[ Linux ] scp, 다른 서버에서 파일 가져오기

scp : secure copy 약자 , ssh 기반으로 파일이나 폴더 전송하거나 가져올때 사용 폴더 전체 가져오기 scp -r [원격자 계정]@[원격자 ip]:[파일명] [저장될 로컬 위치] scp -r code094@1.1.1.1:/home/program.cs . 단일 파일 -r 빼면 됨 scp code094@1.1.1.1:/home/program.cs . 여러 파일 가져오기 scp [옵션] [원격자 계정]@[원격자 ip]:"[파일명] [파일명] [파일명]" [저장될 로컬 위치] scp -r code094@1.1.1.1:"/home/program.cs /home/program1.cs" .

linux 2022.12.27

[ wpf ] wpf Live chart _ Stack chart 1초마다 업데이트 해보기

1. NuGet 패키지 관리에서 LiveChart를 다운 받는다. 2. xaml 에서 네임 스페이스 추가 3. View 와 ViewModel을 만든다. 4. xaml 디자인 코드 작성 5. View 와 VIewModel을 연결한다. 6. ViewModel 코드 작성 - 생성할때 한번 ChartList 보여줌 public class ChartViewModel { public SeriesCollection SeriesCollection { get; set; } public string[] Labels { get; set; } = new string[] { "Maria", "Sujan" }; Timer timer = new Timer(); public ChartViewModel() { ChartList(); ..

WPF 2022.12.26

[ wpf ] Listview Filter

1. ObservableCollecton 에서 View 생성 2. 생성된 view에 filter 적용 3. 조건 변경시 View refresh 완전히 일치하는 데이터만 보이게 필터링함 , 띄어쓰기 기준으로 다른 여러 데이터 필터링 xaml c# public class MainViewModel { List students = null; public MainViewModel() { student = new ObservableCollection(); ShowListView(); CollectionViewSource = new CollectionViewSource(); CollectionViewSource.Source = this.student; CollectionViewSource.Filter += TextF..

WPF 2022.12.26