Linux2020. 10. 14. 12:47

lshw 를 통해서는 아래와 같이 제조사 정도의 정보 밖에 없고

모델명이나 시리얼은 나오지 않는다.

$ sudo lshw -class storage
  *-storage                 
       description: Non-Volatile memory controller
       product: NVMe SSD Controller SM981/PM981
       vendor: Samsung Electronics Co Ltd
       physical id: 0
       bus info: pci@0000:3a:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: storage pm msi pciexpress msix nvm_express bus_master cap_list
       configuration: driver=nvme latency=0
       resources: irq:16 memory:92300000-92303fff
  *-storage
       description: Non-Volatile memory controller
       product: SK hynix
       vendor: SK hynix
       physical id: 0
       bus info: pci@0000:3b:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: storage pm msi msix pciexpress nvm_express bus_master cap_list
       configuration: driver=nvme latency=0
       resources: irq:16 memory:92200000-92203fff memory:92205000-92205fff memory:92204000-92204fff

 

사용중인 노트북에는 nvme가 2개가 있는데

/dev/nvme0로 잡히고

/sys/block/nvme0n1/devices

/sys/block/nvme1n1/devices 하위에

model, serial 등이 내가 nvme 모델명, nvme 시리얼 값이다.

/sys/block/nvme0n1/device$ ll
합계 0
drwxr-xr-x  4 root root    0 10월 14 09:29 ./
drwxr-xr-x  3 root root    0 10월 14 09:29 ../
-r--r--r--  1 root root 4096 10월 14 12:45 address
-r--r--r--  1 root root 4096 10월 14 12:45 cntlid
-r--r--r--  1 root root 4096 10월 14 12:45 dev
lrwxrwxrwx  1 root root    0 10월 14 09:31 device -> ../../../0000:3a:00.0/
-r--r--r--  1 root root 4096 10월 14 12:45 firmware_rev
-r--r--r--  1 root root 4096 10월 14 09:29 model
-r--r--r--  1 root root 4096 10월 14 12:45 numa_node
drwxr-xr-x 13 root root    0 10월 14 09:29 nvme0n1/
drwxr-xr-x  2 root root    0 10월 14 12:45 power/
-r--r--r--  1 root root 4096 10월 14 12:45 queue_count
--w-------  1 root root 4096 10월 14 12:45 rescan_controller
--w-------  1 root root 4096 10월 14 12:45 reset_controller
-r--r--r--  1 root root 4096 10월 14 09:29 serial
-r--r--r--  1 root root 4096 10월 14 12:45 sqsize
-r--r--r--  1 root root 4096 10월 14 12:45 state
-r--r--r--  1 root root 4096 10월 14 12:45 subsysnqn
lrwxrwxrwx  1 root root    0 10월 14 09:29 subsystem -> ../../../../../../class/nvme/
-r--r--r--  1 root root 4096 10월 14 12:45 transport
-rw-r--r--  1 root root 4096 10월 14 09:29 uevent

 

[링크 : https://unix.stackexchange.com/questions/273971/how-to-get-hard-disk-information-on-linux-terminal]

'Linux' 카테고리의 다른 글

bash 배열  (0) 2020.12.04
find -mmin  (0) 2020.12.04
linux page cache  (0) 2020.01.13
dmesg 시간 환산하기  (0) 2020.01.07
screen 사용법  (0) 2019.12.18
Posted by 구차니
Programming/c# & winform2020. 10. 14. 10:30

string?는 nullable한 string 변수를 사용하겠다는 의미인데

그냥 빌드하면 다음과 같은 경고를 내뱉는다.

warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

 

이 경우에는 아래와 같이 #nullable 어노테이션 컨텍스트를 이용해서 알려주면 경고가 뜨지 않게 된다.

using System;
using System.IO;

class test
{

static void Main()
{
string manyLines=@"This is line one
This is line two
Here is line three
The penultimate line is line four
This is the final, fifth line.";

using (var reader = new StringReader(manyLines))
{
#nullable enable
    string? item;
    do {
        item = reader.ReadLine();
        Console.WriteLine(item);
    } while(item != null);
}
}
}

[링크 : https://stackoverflow.com/questions/55492214/]

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/nullable-references]

 

특성(attribute)

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/concepts/attributes/]

 

+

내용만 보면. java annotation에 대응되는건 attribute이고

c#의 annotation은 compiler directive에 가까운 것 같기도 하고... 조금 더 찾아봐야겠다.

[링크 : https://stackoverflow.com/questions/553857/]

 

+

#define 처럼 #이니까 directive 맞네 -_-

Posted by 구차니
Programming/c# & winform2020. 10. 13. 14:52

.net framework로 만든 프로그램도 기본 컨트롤을 이용했기에 리눅스/mono 에서 구동이 되긴 한다.

 

 

동일한 파일을 리눅스 mono로 실행한 화면

메뉴는 너무 처참하게 깨지네.. 다 있는것 같지만 레이아웃도 너무 심각하게 깨지고..

Posted by 구차니
Programming/c# & winform2020. 10. 13. 14:45

.net core에는 멀티플랫폼 지원못하는 부분은 제외되다 보니 꽤 많은 컨트롤들이 누락된다.

일단은.. WebBrowser와 SerialPort가 빠지는게 커보인다.

 

 

공용 컨트롤 - WebBrowser

 

메뉴 및 도구 모음 - ToolStripContainer

데이터 - Chart / BindingNavigator / DataSet

구성요소 - BackgroundWorker / DirectoryEntry / DirectorySearcher / EventLog / FileSystemWatcher / MessageQueue / PerformanceCounter / Process / SerialPort / serviceController

 

WPF 상호 운용성

Posted by 구차니
Programming/c# & winform2020. 10. 13. 14:33

메뉴를 넣는데 인터넷 검색해보니

예전 MFC 처럼 메뉴를 클릭클릭하면서 생성해낼수 있을줄 알았는데

안되서 혹시? 라는 마음에 해보니

 

.net core는 메뉴는 생성되지만 개별 메뉴는 일일이 코딩으로 해야 한다면

 

.net framwork는 기존대로 생성이 가능하다.

 

멀티플랫폼 갈게 아니라면 .net core로 굳이 가야 하나 라는 생각이 드네..

'Programming > c# & winform' 카테고리의 다른 글

mono .net framework 실행  (0) 2020.10.13
.net core/.net framework 컨트롤 차이  (0) 2020.10.13
winform 에서 이미지 넣기  (0) 2020.10.12
c# strong type langugae  (0) 2020.10.08
c# delagate 대리자  (0) 2020.10.08
Posted by 구차니
embeded/raspberry pi2020. 10. 12. 20:05

라즈베리 파이 3부터 블루투스가 추가되었는데

비컨모드(advertise mode) 로 사용이 가능하면.. 페어링 없이 데이터를 주고 받을 수 있을 것 같아서 검색!

 

[링크 : http://scribles.net/running-ble-advertising-example-code-on-raspbian-stretch/]

[링크 : http://airpage.org/xe/project_data/27840]

Posted by 구차니
Programming/c# & winform2020. 10. 12. 13:55

VS2019 에서 정상적으로 넣는법은 찾지 못했고

Image 클래스를 이용해 넣은 후 컴파일 하면 자동으로 Form1.resx 파일에 추가되긴 한다.

 

[링크 : https://www.dotnetperls.com/picturebox]

[링크 : https://stackoverflow.com/questions/19910172/how-to-make-picturebox-transparent]

 

+ 2020.10.13

winform .net core로 해서 그런걸까?

'Programming > c# & winform' 카테고리의 다른 글

.net core/.net framework 컨트롤 차이  (0) 2020.10.13
.net core와 .net framework 차이 - winform menustrip  (0) 2020.10.13
c# strong type langugae  (0) 2020.10.08
c# delagate 대리자  (0) 2020.10.08
c# out  (0) 2020.10.07
Posted by 구차니

크롬으로 보라고 해놓고 머가 문제가 생겼나 재생이 되다 만다

아니 주말인데 왜죠 ㅠㅠ

그나저나 CORS 문제 같긴한데 예전에 쓰던 그 플러그인 아직도 작동하려나..

 

+

그냥 다음 동영상 넘어갈때 timeout 나면서

로그아웃 처리되었는데 해당 페이지는 쿠키가 남았는지 로그아웃으로 인식되지 않아서

그런 문제가 발생한 듯 -_-

 

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

편의점 택배 처음 써봄  (4) 2020.11.15
문득 일에 대한 고민  (0) 2020.11.13
아내몰래 지르자 ㅋ  (0) 2020.10.05
오늘자 득템?  (0) 2020.09.04
내일이면 이제 첫 출근..  (2) 2020.08.31
Posted by 구차니
개소리 왈왈/컴퓨터2020. 10. 11. 20:32

득템이라 할 수 있을지 모르겠지만

HPE 서버에 다른 벤더의 부품은 문제가 되어도

HPE의 부품을 다른 PC에 연결하는건 문제가 안될지 모르겠네?

 

HPE NC364T PCI-Ex Quad Port GbE Server Adapter

dual intel 82571EB

[링크 : https://support.hpe.com/hpesc/public/docDisplay?docId=c00885057&docLocale=en_US]

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

해외 배송은 갑작스럽다  (0) 2020.10.17
컴퓨터 득템?  (0) 2020.10.14
stormbook 14 pro 64GB 모델  (0) 2020.10.05
G840에 이어 G860..  (0) 2020.09.22
다이소 유선 마우스 뽑기 실패인가..  (6) 2020.09.14
Posted by 구차니

희한하게 오늘따라 앞에 있는 차들이 좌우로 오락가락에

예측 불가능하게 이상하게 움직이는 애들로 잔뜩 -_-

 

어딜 가던 먹히고

어딜 가던 이상한 차가 내 앞을 가로막고

운전할 날이 아니었나?

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

귀찮아!!!  (0) 2020.10.18
평온한.. 하루?  (0) 2020.10.16
분노분노분노  (0) 2020.10.09
애완조(?) 윙 트리밍!  (0) 2020.10.04
다 귀찮아  (0) 2020.10.03
Posted by 구차니