간단한 해결책이 있다; 그냥 https 접속은 안해서 해결하는것이지; 


Created by Andrey Durow 22 Mar 2016 02:16
 
Updated by Rajesh Patel 05 Dec 2016 14:30
IDEA-153423 IDEA 2016.1 cant use corp proxy
After update to 2016.1 IDEA cant go through corporate proxy with message

"Problem with connection: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to request target"

It happens every time when i try to check proxy in IDEA settings. When i press "update or restart" button in update window, then IDEA trying to download update, then silently restarts with same version.

previous version - 144.3891.8
current version -
IntelliJ IDEA 2016.1
Build #IU-145.257, built on March 15, 2016
JRE: 1.8.0_60-b27 x86
JVM: Java HotSpot(TM) Server VM by Oracle Corporation
Comments9
History
Linked Issues3
Similar Issues
Time Tracking
:) Andrey Durow  22 Mar 2016, 02:54
Comment was deleted.
:)  Yaroslav Bedrov  22 Mar 2016, 08:16
Does turning off "Settings | Appearance & Behavior | System Settings | Updates | Use secure connection" option helps?



boom 을 깔아서 써본적이 있는데 필요 없어서 (혼동되어서)지웠다. 근데 장치에 있네??

역시.. 찾으니 아래와 같은 답변이 있었고 이게 잘 동작했다. (시에라)


from https://superuser.com/questions/868637/how-can-i-delete-the-boom-application-output-device-from-my-system/969814#969814


Open Terminal app and run the following command(s)...

  • To remove BoomDevice
sudo kextunload -b com.globaldelight.driver.BoomDevice
  • To remove Boom2Device
sudo kextunload -b com.globaldelight.driver.Boom2Device

This should do the trick and you even don’t need to reboot your Mac.

shareedit


쉽게이해하도록 그림으로 그려봤다.
이론상 틀린 그림형태이거나 구조일순있으나 컨셉자체를 잡고 가는데 도움이 될것이다.

이 모든건 자바가 call by value 이기 때문이다.

package com.javaTest.Ref;

import java.util.HashMap;
import java.util.Map;

/**
* Created by macbookpro on 2016. 12. 12..
*/
public class Ref001 {

public static void main(String[] args) {
Ref001 main = new Ref001();
main.ref001();
}

public void ref001() {
int a= 1;
Map map = new HashMap<>();

Map entireMap = new HashMap();

entireMap.put("map",map);
entireMap.put("a",a);

if(entireMap.get("map") == map) {
System.out.println("== same...");
}
if(entireMap.get("map").equals(map)) {
System.out.println("equals same...");
}

doTest(entireMap);
System.out.println("changed::"+entireMap.toString());

doTest2(entireMap);
System.out.println("no changed 2::"+entireMap.toString());

doTest3(entireMap);
System.out.println("no changed 3::"+entireMap.toString());
}

private void doTest(Map entireMap) {
System.out.println(entireMap.toString());
entireMap.put("a",2); // 이 값은 바뀜
Map m = (Map) entireMap.get("map");
m.put("change","Y");

}

private void doTest2(Map entireMap) {
// 이건 지워지지 않는다. 왜냐면 자바는 COV 이다 copy of value. 해서 지워지지 못한다
// 다만 primitive 타입이 아니면 참조복사가 되어 수정된다 해서 doTest 는 수정된것이다.
entireMap = new HashMap();

}

private void doTest3(Map entireMap) {
// cpv 이다 해당 레퍼런스에 직접 뭔가 하지 않는이상 모든 행위는(각종 재선언. 즉 new 나 다른 레퍼런스 대입) 복제된곳에 하는거다.
Map newMap = new HashMap();

entireMap = newMap;

}

}


결과

== same...
equals same...
{a=1, map={}}
changed::{a=2, map={change=Y}}
no changed 2::{a=2, map={change=Y}}
no changed 3::{a=2, map={change=Y}} 




intelilj 에서 리모트의 브랜치 리스트가 최신이 아닌경우 두가지 행위를 할 수 있다고 한다.


1. git > fetch 를 실행해서 가져온다.(fetch 에 대해서 두려워하지 마라.. 그냥 가져오는것 뿐이다)

2. 프로젝트 업데이트. 맥의 경우는 cmd+t 를 통해서 프로젝트(버전관리툴)를 업데이트하는데 이때도 동기화 되더라..


참고바란다.




2017-04-12 

http && !arp && http and not (http contains "/upnp")




http && !arp && ip.dst != 111.111.111.111







intellij 를 쓸때 한가지 주의사항이 있다.


바로 inspection 의 내용인데... 만약 당신이 작성한 혹은 당신이 봐야 할 소스.. 보통은 메서드에 뭔가 표시가 되어있고 too complex to analyze 라고 되어있다면 그 메서드는 inspection 이 되지 못한 상태란걸 알아야 한다.

사실 복잡하다는게 어떤 행위로 인한것인지는 정확히 모른다... 다만 루프등이 들어가고 상태가 변하거나... 너무 길거나 등등 모르겠다;

아무튼 분석하기 복잡하다고 나오는순간 그 메서드 내부에서.. 아래 와 같은 코드가 작성되도 에러를 미리 파악해서 알려주지 못한다는 사실이 중요하다.

예로

List<String> list = null;

list.add("a");


위의 코드는 사실상 널포인터익셉션이 나지만 놀랍게도 분석하지 않은 상태라 에러노티를 하지 않는다. 
참고로 위의 에러에 해당하는 inspection 항목은 'Constant conditions & exceptions' 이다.


그리고 too complex to analyze 에 대해서도 체크를 해보고 싶다면 FindBugs-IDEA 플러그인을 설치할것을 권한다. 잘된다 +_+




2017-05-26 

자바스크립트에서는

$.isNumeric or isNaN or 정규식 정도가 있습니다.



previous... 이하 


from http://stackoverflow.com/questions/1102891/how-to-check-if-a-string-is-numeric-in-java


NumberUtils.isNumber or StringUtils.isNumeric from Apache Commons Lang.

You can also use StringUtils.isNumericSpace which returns true for empty strings and ignores internal spaces in the string. (The linked javadocs contain detailed examples for each method.)

shareimprove this answer



from  http://codereview.stackexchange.com/questions/57078/more-elegant-way-to-increment-integers-in-map



map.merge(arr[11],1,(existValue,initValue) -> existValue+initValue);


위의 의미는 map 안에 arr[11] 의 키로 값이 없으면 1(initValue) 을 설정하고, 있으면 교체하기를 BiFunction 함수로 정의된대로 교체된다.

함수를 보면 existValue( 즉 arr[11] 에 있던 값) + initValue(arr[11] 다음에 정의된 값인 1 이다) 로 된다.

결과 처음에는 1 일테고, 다음에 또 해당 키로 put 이 들어오면 2가 되고(1+1이니까) 그 다음은 2+1 == 3 이 되고... 이런식이다. 



occurrences.compute(token, (tokenKey, oldValue) -> oldValue == null ? 1 : oldValue + 1);



아래는 javadoc


  • compute

    public V compute(K key,
                     BiFunction<? super K,? super V,? extends V> remappingFunction)
    Description copied from interface: Map
    Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). For example, to either create or append a String msg to a value mapping:
     
     map.compute(key, (k, v) -> (v == null) ? msg : v.concat(msg))
    (Method merge() is often simpler to use for such purposes.)

    If the function returns null, the mapping is removed (or remains absent if initially absent). If the function itself throws an (unchecked) exception, the exception is rethrown, and the current mapping is left unchanged.

    Specified by:
    compute in interface Map<K,V>
    Parameters:
    key - key with which the specified value is to be associated
    remappingFunction - the function to compute a value
    Returns:
    the new value associated with the specified key, or null if none

  • merge

    public V merge(K key,
                   V value,
                   BiFunction<? super V,? super V,? extends V> remappingFunction)
    Description copied from interface: Map
    If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value. Otherwise, replaces the associated value with the results of the given remapping function, or removes if the result is null. This method may be of use when combining multiple mapped values for a key. For example, to either create or append a String msg to a value mapping:
     
     map.merge(key, msg, String::concat)
     

    If the function returns null the mapping is removed. If the function itself throws an (unchecked) exception, the exception is rethrown, and the current mapping is left unchanged.

    Specified by:
    merge in interface Map<K,V>
    Parameters:
    key - key with which the resulting value is to be associated
    value - the non-null value to be merged with the existing value associated with the key or, if no existing value or a null value is associated with the key, to be associated with the key
    remappingFunction - the function to recompute a value if present
    Returns:
    the new value associated with the specified key, or null if no value is associated with the key


+ Recent posts