'2020/09/23'에 해당되는 글 7건

  1. 2020.09.23 rsync with ssh
  2. 2020.09.23 arm64 server sysbench
  3. 2020.09.23 ubuntu용 cad 프로그램
  4. 2020.09.23 c# 오버라이드, 하이드, 쉐도우
  5. 2020.09.23 c# 상속
  6. 2020.09.23 c#은 main()이 아니다 Main()이다 -_-
  7. 2020.09.23 방문자 급감중 ㅠㅠ
Linux/Ubuntu2020. 9. 23. 16:53

두개 노트북에 자료가 있어서 하나를 매번 지우고 복사하려니 귀찮기도 하고..

양쪽으로 변경되는게 있을 경우 어떻게 해야 하나 고민하다가 생각나서 찾아보는데..

이걸 내가 글쓴적이 한번도 없을리가 없는데 안나오네...

 

아무튼 mtime(modified time)을 기준으로 복사한다고 한데..

       Rsync finds files that need to be transferred  using  a  "quick  check"
       algorithm  (by  default) that looks for files that have changed in size
       or  in  last-modified  time.   Any  changes  in  the  other   preserved
       attributes  (as  requested by options) are made on the destination file
       directly when the quick check indicates that the file’s data  does  not
       need to be updated.

[링크 : https://linux.die.net/man/1/rsync]

 

영 찜찜하면 --checksum 옵션으로 다를 경우 하는게 안전할지도 모르겠다.

 

src, dest 순서로 지정하고 복사하면 되는데 일단 백업해놓고 해봐야겠다..

Access via remote shell:
  Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
  Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

 


기본적으로 rsync는 파일의 크기와 수정 시간(modification)을 비교하는 것으로 파일을 전송할지 말지를 결정한다. 이 방법은 아주 작은 CPU 자원을 소모하지만 실수가 발생할 수 있다. 일반적으로 파일의 내용을 변경하면 크기와 수정시간이 변하지만 항상 그렇다고 단정할 수는 없기 때문이다.
--checksum 옵션을 이용하면 비교 방법을 개선할 수 있다. 이 옵션을 켜면, 파일의 checksum을 비교한다. 크기/시간을 이용한 비교 방법보다 안전하지만 더 느리고 더 많은 자원을 사용한다.

[링크 : https://www.joinc.co.kr/w/Site/Tip/Rsync]

 

rsync 는 파일이 목적지에 존재할 경우 생성 시간과 크기를 비교해서 동일할 경우 건너뜀.

[링크 : https://www.lesstif.com/system-admin/rsync-data-backup-12943658.html]

Posted by 구차니
embeded/ARM2020. 9. 23. 12:28

예전에 2651v2 48 코어에서 돌린거 시간을 저장을 안해놔서 아쉽네..

 

# sysbench --test=cpu --cpu-max-prime=200000 --num-threads=96 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 96

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 200000


Test execution summary:
    total time:                          6.8619s
    total number of events:              10000
    total time taken by event execution: 652.8527
    per-request statistics:
         min:                                 65.21ms
         avg:                                 65.29ms
         max:                                129.36ms
         approx.  95 percentile:              65.30ms

Threads fairness:
    events (avg/stddev):           104.1667/0.42
    execution time (avg/stddev):   6.8005/0.03

 

# sysbench --test=cpu --cpu-max-prime=200000 --num-threads=48 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 48

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 200000


Test execution summary:
    total time:                          13.6361s
    total number of events:              10000
    total time taken by event execution: 652.2536
    per-request statistics:
         min:                                 65.20ms
         avg:                                 65.23ms
         max:                                 66.83ms
         approx.  95 percentile:              65.26ms

Threads fairness:
    events (avg/stddev):           208.3333/0.47
    execution time (avg/stddev):   13.5886/0.03

'embeded > ARM' 카테고리의 다른 글

ampere altra  (0) 2020.11.23
arm cl  (0) 2020.10.29
cavium thunderX / thunderX2  (0) 2020.09.18
thunderX 아키텍쳐  (0) 2020.09.16
keil window 버전별 지원버전  (0) 2018.07.19
Posted by 구차니
프로그램 사용/freecad2020. 9. 23. 11:53

18.04 에서 한번 돌려보니 아래와 같이 4개 정도 나오는데 어느게 쓰기 편하려나?

freecad는 윈도우에서도 돌려보긴 했는데 쓰기가 좀 어려웠는데.. ㅠㅠ

$ apt-cache search cad | grep cad
kicad - 전자 회로 및 PCB 설계 소프트웨어
freecad - Extensible Open Source CAx program
librecad - Computer-aided design (CAD) system
sagcad - CAD/CAM of 2D program

[링크 : https://kicad-pcb.org/] pcb에 특화?

[링크 : https://www.freecadweb.org/] 3d cad

[링크 : https://librecad.org/] 2d cad 

[링크 : https://www.qcad.org/en/] 2d cad, 설치 파일 제공

'프로그램 사용 > freecad' 카테고리의 다른 글

freecad 첫 드로잉  (2) 2023.08.31
freecad 설명  (0) 2018.01.22
Posted by 구차니
Programming/c# & winform2020. 9. 23. 11:33

변수에는 오버라이드 개념이 없고

변수에게 있어서 동일 이름이라 숨겨지는 건 하이드라고 표현하는 듯.

기존의 scope를 다른게 표현 하는 느낌이기도 하고(객체로 확장시키면서)...

조금 더 봐야 할 듯?

 

섀도잉(shadowing)

클래스내 멤버 변수가 멤버 메소드내에 선언한 변수에 의해 가려지는 경우

 

하이딩(hiding)

상속 관계에서 상위 객체의 변수가 하위 객체에서 선언한 변수에 의해 가려지는 경우

 

오버라이드(overriding)

상속 관계에서 상위 객체의 메소드가 하위 객체에서 선언한 메소드에 의해 가려지는 경우

해당 내용에 다음과 같은 설명이 있습니다.

case 2:
When you override a member variable in a child class (actually its hiding, not overriding),
which version of that variable will be called depends on the reference, the object, unlike method lookup. 
 
In your sample code, variable a and b are not actually member variable,
they are class variable since static.
Lets change the sample code a bit,
making the 'a' in class 'A' public and adding some test code in main. 

즉, 변수는 override되는 것이 아니라 hiding되는 것이며 dynamic하게 lookup되는 것이 아닙니다.
한 마디로, B의 a는 A의 a를 그저 hiding하는 것이고 A의 a와는 별개의 변수이며,
getA는 자기가 정의된 시점의 a를 a로 생각하게 됩니다. B의 a에 대해서는 아예 모르죠.

[링크 : https://kldp.org/node/110902]

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

c# conditional attribute  (0) 2020.09.29
mono로 sln 프로젝트 빌드가 되네?  (2) 2020.09.28
c# 상속  (0) 2020.09.23
c#은 main()이 아니다 Main()이다 -_-  (0) 2020.09.23
c# base, is  (0) 2020.09.22
Posted by 구차니
Programming/c# & winform2020. 9. 23. 11:10

sealed 는 java의  final 역활.(더 이상 상속을 할 수 없도록)

 

set, get 키워드

java에서 setter/getter의 축약 문법 느낌?

변수에 대해서 사용하며, set의 경우 value 라는 생략된 인자를 받아서 사용

private string name = "John";
public string Name
{
    get
    {
        return name;
    }
    set
    {
       name = value;
    }
}

// ...
static void Main(string[] args)
{
    MyClass mc = new MyClass();
    Console.WriteLine(mc.Name);
    mc.Name = "Bree";
    Console.WriteLine(mc.Name);
}

[링크 : https://blog.hexabrain.net/142]

 

+

2020.09.29

Effective c#을 읽다 보니 property 라고 표현 함.

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/classes-and-structs/properties]

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

mono로 sln 프로젝트 빌드가 되네?  (2) 2020.09.28
c# 오버라이드, 하이드, 쉐도우  (0) 2020.09.23
c#은 main()이 아니다 Main()이다 -_-  (0) 2020.09.23
c# base, is  (0) 2020.09.22
c# xml 주석  (0) 2020.09.22
Posted by 구차니
Programming/c# & winform2020. 9. 23. 10:37

국룰을 이렇게 파괴하는 MS 이대로 좋은가?!

아무튼 함수이름들도 죄다 Capitalize 했으니 Main()도 당연한거긴 한데..

하긴 한데.. 꽁기꽁기 하네?

 

$ csc cons.cs 
Microsoft (R) Visual C# Compiler version 3.6.0-4.20224.5 (ec77c100)
Copyright (C) Microsoft Corporation. All rights reserved.

error CS5001: Program does not contain a static 'Main' method suitable for an entry point

 

아래 코드를 테스트 하는데 너무 단순해서 그런가.. Child()와 Child() : base()의 실행 결과에 차이는 없다.

단순히 명시적으로 해주었을뿐 어짜피 부모 생성자 실행 후 자식 생성자를 실행 하는 것은 변하지 않기 때문일 듯.

using System;

class Program
{
	class Parent
	{
		public Parent() {Console.WriteLine("부모 생성자");}
	}
	
	class Child:Parent
	{
//		public Child() : base()
		public Child()
		{
			Console.WriteLine("자식 생성자");}
	}

	static void Main(string[] args)
	{
		Child child = new Child();
	}
}

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/keywords/base]

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

c# 오버라이드, 하이드, 쉐도우  (0) 2020.09.23
c# 상속  (0) 2020.09.23
c# base, is  (0) 2020.09.22
c# xml 주석  (0) 2020.09.22
c# 프로그래밍, 문법 공부(문자열)  (0) 2020.09.22
Posted by 구차니
개소리 왈왈/블로그2020. 9. 23. 10:10

아니 저 수직으로 하락하는 경향은 도대체 멀까!?!!?

그래도 주중에는 어느정도 유지되었었는데! ㅠㅠ

 

Posted by 구차니