본문 바로가기
반응형

전체 글557

Android webview에서 kakaomap 표시 안될 때.. 크롬에서는 잘 보이는데... app안의 webview에서는 안보일 때. 다음과 같이 한다. 아마도 os가 9버전부터 허용되지 않은, 도메인은 접속 못하게 하는 기능 때문으로 보인다. 아마 app에서 나가는 요청은.. 다 해야 될 것으로 보인다. daum.net daumcdn.net dapi.kakao.com 192.168.18.13 daumcdn.net dapi.kakao.com 2021. 7. 26.
kakao map 관련 마커에 이벤트 등록할 때, vue데이터 접근을 못할 경우 아래와 같이 kakao.maps.event.addListener(marker, 'mouseover', function () {} ->kakao.maps.event.addListener(marker, 'mouseover', ()=> {} 2021. 7. 22.
AlertDialog AlertDialog AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);//this, LoginActivity.context(x) builder.setTitle("알림"); builder.setMessage("비밀번호를 발급받으시겠습니까?"); builder.setCancelable(false);//외부 클릭시 팝업 닫히는 것 무시 builder.setNegativeButton("취소", new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int id) { gotoWebView("miniforget.html").. 2021. 7. 19.
[error] java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference 위에러 해결법. 혹시, 다음과 같이 외부 class에 적용해 두었다면... 꼭 확인 해 볼 것. public class SettingData { public static SettingData singleTon; private Context context; private SharedPreferences appData; private SettingData() { .. 2021. 7. 19.
DateFormat DateFormat dateformat = new SimpleDateFormat("yyyyMMddHHmmss"); Date dt = new Date(); String fileName = "XX" + dateformat.format(dt) + ".jpg"; 2021. 7. 14.
actionbar 제거 제거 방법 1 res\values\themes\themes.xml의 내용을 수정. 위 두개의 theme.xml 수정함. false true 제거 방법 2 소스에서 제거 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_site); ActionBar actionBar = getSupportActionBar(); actionBar.hide(); String url = ""; webView = findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true.. 2021. 7. 11.
[error] ERR_CLEARTEXT_NOT_PERMIT webview에서 안드로이드 버전 9부터 나오는 에러로 아래 URL 참조하면됨. https://captainyellow.tistory.com/654?category=804032 [Tip] 안드로이드 9(pie) http 프로토콜 접속 에러 android 7 이하 버전에서는 정상 작동 하던 http 프로토콜이 버전 8이상부터 작동이 안될 때. AndroidManifest.xml에 다음 코드를 추가한다. android:allowBackup="true" .. captainyellow.tistory.com 추가로...www.naver.com -> naver.com으로 등록해야됨 2021. 7. 11.
[error] cannot infer type arguments for ArrayAdapter<> CallbackExecute에서 spinner에 바인드할 경우 발생 ArrayAdapter spnAdp = new ArrayAdapter(this, R.layout.support_simple_spinner_dropdown_item, arrGroup); 다음과 같이 변경. ArrayAdapter spnAdp = new ArrayAdapter(SearchActivity.this, R.layout.support_simple_spinner_dropdown_item, arrGroup); 2021. 6. 23.
MS-SQL 한글 자동 변환 현상 자판이 영문 상태에서 다른 창으로 이동 또는, Object Explorer 이동 후 편집창으로 돌아올 때 지 맘대로 한글로 변환이 되어 있다면... 다음과 같이 1.메뉴바에서 Query > Query Options...를 선택 2.한/영 전환 버튼을 클릭. 3.매 실행시마다 해야됨. 2021. 6. 23.
[Tip] 안드로이드 9(pie) http 프로토콜 접속 에러 android 7 이하 버전에서는 정상 작동 하던 http 프로토콜이 버전 8이상부터 작동이 안될 때. AndroidManifest.xml에 다음 코드를 추가한다. .............................. 그리고...res 폴더 밑에 xml 폴더를 만들고, network_security_config.xml을 만들고 다음 코드를 추가한다. app\src\main\res\xml\network_security_config.xml 192.168.18.13 해결 방법은 몇가지 있으나... 이 것이 제일 보편적임. 허용할 서버만 밑으로 추가만 하면됨. 이렇게 하는 방법도 있음. 딱 저 빨간 색만 AndroidManifest.xml에 추가 하면 됨. .............................. 2021. 6. 14.
[ERROR] You need to use a Theme.AppCompat theme (or descendant) with this activity. You need to use a Theme.AppCompat theme (or descendant) with this activity. 위 메세지는 AlertDialog를 사용할 때 나타나며... 해결 방법은 2가지가 있다. 첫번째는 import 를 다음과 같이 변경하는 것이다. import android.support.v7.app.AlertDialog; -> import android.app.AlertDialog; 두번째는 AndroidManifest에 다음 코드를 추가 하는 것 첫번째를 선택했을 경우, Unable to add window -- token null is not for an application 위에 같은 메세지가 나타날 수 있다. 이 경우에는 아래와 같이 코딩이 되어 있을 것이다. A.. 2021. 6. 11.
WPF & DevExpress wait indicator using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Windows; using System.Windows.Controls; using System.Threading; using DTO.Common.Common; using BIZ.Common.Dac; using System.Windows.Threading; using System.Threading.Tasks; namespace WpfSample.DevTest { /// /// Grid18CRUD.xaml에 대한 상호 작용 논리 /// public partial class Grid20CRUDList : Page { public Gri.. 2021. 5. 5.
"다른 스레드가 이 개체를 소유하고 있어 호출한 스레드가 해당 개체에 액세스할 수 없습니다." "다른 스레드가 이 개체를 소유하고 있어 호출한 스레드가 해당 개체에 액세스할 수 없습니다." 아래 메서드를 사용 하면 됨. Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate { To do })); 아래의 경우는, DB에서 데이터를 조회 후에, DevExpress Grid에 바인드 할 때 조회 되는 동안, wait indicator을 보여주려고 하였으나, 보여 줄 수가 없어서, 아래와 같이 함. private async Task GetBindGrid() { wiWait.Visibility = Visibility.Visible; await Task.Run(() => DoWork()); } private void DoWork() { Threa.. 2021. 5. 5.
.net socket chatting sample (4) SocketClient using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Net; using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using SocketClient.AsyncSocket; using SocketCommon; namespace SocketClient { public partial class Form1 : Form { pri.. 2021. 4. 15.
.net socket chatting sample (3) SocketServer using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using System.Net; using System.Net.Sockets; using SocketServer.AsyncSocket; using SocketCommon; using System.IO; using System.Runtime.Serialization.Formatters.B.. 2021. 4. 15.
.net socket chatting sample (2) SocketCommon Server Source SocketCommon Project using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace SocketCommon { public class AllowAllAssemblyVersionsDeserializationBinder : System.Runtime.Serialization.SerializationBinder { public override Type BindToType(string assemblyName, string typeName) { Type typeToDe.. 2021. 4. 15.
.net socket chatting sample (1) .net socket chatting 예제. 예외처리하지 않음. 정해진 시나리오를 벗어나면.. 에러날 수 있음. 원래 다른 목적으로 필요 로직 샘플로 만든거라... 예외 사항 충분히 있고... 기능 구현에만 중심을 두었음. 파일 전송도 추가하려고 했으나... 귀찮아서.. 안함. 하지만, 쉽게 추가 할 수 있을 것이라 생각됨. 파일 읽어서. binary추가만 하면됨. socket 관련 참고용및 학습용으로 사용바람. 추가로... disconnect가 제대로 작동안함. 자체버그 같음. 처리하려고.. 애를 썻으나... 답을 찾지 못함. 일단 꼼수로 처리를 함. close할 때 2번 호출하는데... 도대체 왜 2번 호출하는지 알 수가 없음. 자료도 찾을 수 없었음. server logic, client logic.. 2021. 4. 15.
github create github로 형상관리하기. 1.신규 저장소 생성. 2.저장소 이름및 공개, 비공개 설정. 3.주소 확인 4.생성된 저장소 확인 5.폴더 생성, Git Clone(파일 복사 해 놓으면 안됨.. 안되는 건 아닌데.. 지워야됨.) 6. Git 주소 입력 7.upload 제외 파일 설정 경로는 사진 참고 8.파일 복사 & Git에 올리기 9. All 선택해서 체크박스 활성화 10. upload 11.Git Check 12. 폴더 상태 확인 이상. Git에 파일 올리는 방법. 2021. 4. 14.
c# List 함수 아래 두 Method의 차이는.. Select()... 하나 행(?)만 List형태로 반환한다. Where()는 해당 조건이 맞는 데이터 row 통으로 반환한다. 일반적으로 Where()를 많이 사용할 것 같다. DataTable과 다르기 때문에 참고할 것. var mat = matData.Select(x => x.CocktailNo = m.CocktailNo); var mat = ((List)ViewBag.MatList).Where(x => x.CocktailNo == m.CocktailNo); 2021. 4. 13.
cocktail recipe 하나 하나 만들면서... 사진 찍어서 올리고 싶지만... 너무 많다... DB에 들어가 있는거... 귀찮아서.. 그냥 몽땅 올림. 레시피는 인터넷, YOUTUBE에서 모은 것이며, URL이 있는 것은 해당 YOUTUBE에서 본 것이며, 영상 한번씩 보기 바란다. Name 갓마더 Build Remark 빌드 Vodka 45 ml Amaretto Liqueur 15 ml Name 그린 스파이더 Shake Vodka 55 ml Peppermint Green Liqueur 25 ml Name 그린시 Stir Remark 믹싱 글라스에 스터 Vodka 35 ml Dry Vermouth 20 ml Peppermint Green Liqueur 20 ml Name 네그로니 Build Remark 올드 패션드 글라스에 .. 2021. 4. 13.
東野 圭吾 殺人の門(히가시노 게이고-살인의문) 2006년 06월 작품. 상당히 오래된 작품이다. 읽는 내내... 짜증이 많이 났다. 이 양반 책이나.. 다른 책, 영화를 봐도, 우유부단한 성격의 소유자가 주인공으로 많이 등장한다. 아무래도.. 읽는.. 보는 사람의 답답함이나.. 몰입을 유도하려고 하는 것이 아닌지... 모르겠다. 책이 600페이지가 넘는다. 번역서는 몇권인지는 모르겠으나... 2권은 되지 않을까? 싶다. 적어도 우리나라 출판사는 그래야 돈이 되니까. 살인의 문... 누구나 죽이고 싶은 사람 하나정도 있을 거라 생각한다. 하지만.. 인간은 이성이라는 것을 가지고 있기 때문에... 쉽게 실행에 옮기지 못한다. 주인공도 마찬가지다. 처음에는 완벽한.. 동기.. 등등을 따지다 결국 죽이지 못한다. 책 후반부에 가면, 형사가 사람이 사람을 죽.. 2021. 4. 11.
WPF & DevExpress mask mask 적용 using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using BIZ.Common.Dac; namespace WpfSample.DevTest { /// /// Grid17Mask.xaml에 대한 상호 작용 논리 /// public partial class Grid17Mask : Page { public Grid17Mask() { InitializeComponent(); GetBindGrid(); } private void GetBindGrid() { Dictionary dic = new Dictionary(); dic.Add("param1", "111"); var.. 2021. 4. 11.
WPF & DevExpress TreeView devexpress treeview using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shap.. 2021. 4. 10.
Excel File Export (2) template copy 특정 서식을 반복해서 사용하고, 내용물을 채운다. 위치계산만 잘하면 쉽게 복사된다. Range["D6:G6"], Cells[4, 3])에서 사용하는 좌표(?)가 다르니 주의해야 함. 핵심 소스 private void BtnExcelAll_Click(object sender, RoutedEventArgs e) { try { Excel.Application application = new Excel.Application(); Excel.Workbook workbook = null; Excel.Worksheet worksheet = null; workbook = application.Workbooks.Open(@"C:\work\03.GitHub\dotnet\WPF\WPF_Dev_Sample\WpfSample\.. 2021. 4. 8.
Excel File Export 양식있는 엑셀 파일 읽어들여서, 내용추가. 일부 양식(row or column)을 복사해서 내용추가. Microsoft Excel 16.0 Object Library 참조 추가해야됨. 참고: 오피스가 설치되어 있으면, 따로 설치할 필요는 없으나.. 버전이 다를 수 있음. 오피스가 없으면, nuget에서 받을 수 있다고함. 위 libray는 solution 탐색기> 참조 > 참조추가 > COM항목 밑에 있음. 예제는 WPF로 만들었으나.. 다 쓸 수 있음. using System; using System.Collections.Generic; using System.Windows; using System.Data; using System.Windows.Controls; using Excel = Microso.. 2021. 4. 7.
WPF & DevExpress GridControl Master Detail Grid current data row 많이 쓰는 형태의 master, detail 형태의 그리드. using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using BIZ.Common.Dac; namespace WpfSample.DevTest { /// /// Grid14MasterDetail.xaml에 대한 상호 작용 논리 /// public partial class Grid14MasterDetail : Page { public Grid14MasterDetail() { InitializeComponent(); GetBindGrid(); } private void GetBindGrid() { Dictionary dic.. 2021. 4. 4.
Android FileList 파일 탐색기 안드로이드 파일 탐색기 중간에 필터로 걸린 부분있으나.. 강제로 모든 파일 조회되게 변경해 놓음. FileTreeListViewAdapter에서 파일 선택하는 부분은, 폴더, 파일 이미지 인터넷이나 개인이 사용하는 이미지 사용바람. 따로 올려 놓지 않음. 저작권 문제가 있을 수 있어서... *주의사항 external 저장장치와 SD card는 착각하면 안된다... 네이밍도 그지같이 해 놓음. ㅡㅡ; test device : note 4 android os : Marshmallow 6.0 package com.example.sampleproject; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; imp.. 2021. 4. 4.
WPF & DevExpress GridControl Dynamic Add Columns c# code로 grid column 생성. using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using DevExpress.Xpf.Grid; using BIZ.Common.Dac; namespace WpfSample.DevTest { /// /// Grid13DynamicAddColumns.xaml에 대한 상호 작용 논리 /// public partial class Grid13DynamicAddColumns : Page { public Grid13DynamicAddColumns() { InitializeComponent(); //GetBindGrid(); } private .. 2021. 4. 3.
WPF & DevExpress GridControl Column Fixed devexpresss fixed column 방법 고정하고 싶은 컬럼에 Fixed="Left" 을 추가해준다. 여러 컬럼을 고정하고 싶으면, 고정하고 싶은 컬럼 다 추가해준다. 왼쪽은 "Left", 오른쪽은 "Right"로 하면된다. 고정된 컬럼과 비고정 컬럼의 구분 라인은 View에 FixedLineWidth="5" 을 추가하면된다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System... 2021. 4. 3.
Android Dialog Android Dialog로 사용가능한 모든 예제... 더 있나?? test device : note 4 android os : Marshmallow 6.0 package com.example.sampleproject; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.widget.EditText;.. 2021. 4. 2.
반응형