최근 국방부오픈소스아카데미라는 곳에서 안드로이드 강좌를 듣고 있는데 한 가지 궁금한 것이 생겼다. 뭐냐하면... 안드로이드는 특정 객체를 만들때 이런 방법을 사용한다. 단순 예이므로 문법은 틀림 Menu.Builder menu = new Menu.Builder(); menu.setImage(mainImg); menu.setText(mainText); Menu mainMenu = menu.build(); 보통 이런 경우 그냥 menu객체를 생성해서 setter를 쓰면 되지않나싶었는데... 단점이 있다고 한다. 객체 일관성이 깨지고(객체를 1회의 호출로 생성하지 않고 이미 생성된 객체에 값을 설정) immutable 클래스를 만들 수 없다고 한다.(=스레드 안전성 확보가 어려움) 좀 더 자세한 내용은 나도 ..
전체 글
게임 좋아합니다. 연락처: khd1323@naver.com 깃허브: https://github.com/virtus2원래 목적은 부대에서 컴퓨터들 포맷하고 여러 프로그램 설치 중 수동으로 설치하는게 불편해서 이를 자동화하고 싶었음설치프로그램 확장자는 msi, exe인데 한번 검색해봤음. msi는 msiexec.exe /? 해보면 옵션이 나옴/quiet /passive /q[n,f,...] 등등 해보니까 됐음엄청 간단했다. 근데 exe는 뭘로 만들었냐에 따라 다른듯InstallShield도 있고 NSIS도 있고 sfx도 있다는데 보통 /s로 silent install이 가능하다나와있었지만 다 안됐음몇몇 프로그램은 반디집으로 열면 그 안에 dotnet.msi, install.msi 이런식으로 있었는데 install.msi만 빼서 위의 방법으로 해도 되는진 모르겠음프로그램마다 옵션은 있는것같은데 /s로 해도 잘안됨
Semaphore vs. Monitors - what's the difference? Monitor A Monitor is an object designed to be accessed from multiple threads. The member functions or methods of a monitor object will enforce mutual exclusion, so only one thread may be performing any action on the object at a given time. If one thread is currently executing a member function of the object then any other thread that tries to call ..