자바에서 입력한 IP 주소가 사설(private) 네트워크인지 확인한다./** * 사설 네트워크 여부를 확인한다. * * @param ipAddr IP 주소 * @return 사설 네트워크 여부 * @throws UnknownHostException 입력한 IP주소가 잘못되었음 */ public static boolean isPrivateNetwork(String ipAddr) throws UnknownHostException { InetAddress inetAddress = InetAddress.getByName(ipAddr); return inetAddress.isSiteLocalAddress(); }
Repository OperationsAtomic CommitsSupport for atomic commits means that if an operation on the repository is interrupted in the middle, the repository will not be left in an inconsistent state. Are the check-in operations atomic, or can interrupting an operation leave the repository in an intermediate state? CVS No. CVS commits are not atomic. AccuRev Yes. Commits are atomic Aegis Commits are a..
file.txt 파일에서 한줄씩 읽어서 curl로 호출하기more file.txt | xargs -I {} curl -X GET http://111.222.333.444/{}.json
launchctl unload -w /Library/LaunchAgents/${AGENT_PLIST_FILE}
brew tap caskroom/versionsbrew cask install java6
echo $([ ${UID} == 501 ] && echo "true" || echo "false")
ls | xargs rm -f
find $SRC/* -maxdepth 0 -type f -exec mv {} $DEST \;
import org.springframework.beans.factory.BeanNameAware;import org.springframework.beans.factory.NamedBean; public class MyBean implements NamedBean, BeanNameAware {/** * 빈 이름 */private String beanName; @Overridepublic String getBeanName() {return this.beanName;} @Overridepublic void setBeanName(String name) {this.beanName = name;}}
public class MyBean implements BeanNameAware, BeanFactoryAware {/** * 빈 이름 */protected String beanName; @Overridepublic void setBeanName(String name) {this.beanName = name;} @Overridepublic void setBeanFactory(BeanFactory beanFactory) throws BeansException {// scope가 prototype만 허용if (beanFactory.isPrototype(this.beanName) == false) {throw new BeanCreationException(this.beanName, "Scope of bean m..