분류 전체보기423 MyBatis, 마크업 에러 The content of elements must consist of well-formed character data or markup. mybatis에서 부등호를 사용할때 위 에러가 나올때가 있는데 그럴때는 해당 코드를 아래와같이 감싸줘야한다 DATE >= '2021-01-01' -- 이와같은 코드가 에러가 나오면 아래와같이 사용한다. = '2021-01-01']]> 2021. 10. 21. 프래그먼트에서 뒤로가기 버튼을 눌렀을때 이벤트 처리 // 변경된 값이 있으면 확인시켜주는 메시지 박스를 띄워주는 코드 override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) val positiveButtonClick = { dialogInterface: DialogInterface, i: Int -> Toast.makeText(this,"확인",Toast.LENGTH_SHORT).show() } dialog?.setOnKeyListener { _, keyCode, event -> Log.d("Fragment_Base backkey","테스트") if ((keyCode == KeyEvent.KEYCODE_BACK) && (e.. 2021. 10. 20. 이클립스 자동빌드 되지않을때 [임시방편] Project -> build automatically가 체크되어있어도 소스코드를 수정하면 바로 빌드되지 않을때는 좌측 Project Explorer 에서 F5를 누르면 된다 2021. 10. 18. [Java] 특정문자의 개수 구하는 법 아래 코드들은 char형이기때문에 2개이상의 문자의 개수를 구할수없다. 1. 반복문 사용 public class CharCount { public static void main(String[] args) { String str = "apple"; System.out.println(countChar(str, 'a')); // 1 System.out.println(countChar(str, 'p')); // 2 System.out.println(countChar(str, 'l')); // 1 System.out.println(countChar(str, 'e')); // 1 System.out.println(countChar(str, 'c')); // 0 } public static int countChar(.. 2021. 10. 14. 이전 1 ··· 78 79 80 81 82 83 84 ··· 106 다음