전체 글

개념 서로소 집합 : 공통 원소가 없는 두 집합 서로소 집합 자료구조 : 서로소 부분 집합들로 나누어진 원소들의 데이터를 처리하기 위한 자료구조 스택, 큐가 pop, push 연산을 사용하는 것 처럼 서로소 집합은 union, find 연산을 이용함 find - 속한 집합이 어떤 집합인지 찾기 union - 두 개의 집합을 합치기 싸이클인지 구하기 find해서 같다면 cycle 다르면 union 코드 # find - 부모 찾기 def find_parent(parent, x): if parent[x] != x: parent[x] = find_parent(parent, parent[x]) return parent[x] # union 두 집합의 부모를 비교, 더 작은 쪽을 부모로 대입 def union_par..
https://dart.dev/guides/language/effective-dart Effective Dart Best practices for building consistent, maintainable, efficient Dart libraries. dart.dev 두 가지 중요한 주제 Be consistent - formatting, casing 과 같은 것들은 주관적, 정답이 없음, 일관되게 짜는 것이 도움이 된다. Be brief - Dart는 많은 기능이 있다. 간결하게 작성하자. Identifiers UpperCamelCase, lowerCamelCase, lowercase_with_underscores 세가지가 쓰임 UpperCamelCase - class, enum, typedef, t..
성격 때문인지 실력 때문인지 주석을 잘 못지우겠다. 차라리 기능에 대한 부가 설명을 써놓은 주석이라면 좋겠지만, 내 주석은 거의 DateTime standardDate = DateTime(year, month); // print('standard date ${standardDate}'); int totalDays = daysInMonth(standardDate); // print('totalDays : ${totalDays}'); 이런 print 디버깅을 사용하고 잠시 주석처리 해놓은 것이거나 // child: Center( // child: Badge( // // shape: BadgeShape.square, // // borderRadius: BorderRadius.circular(10), // //..
자주 쓰이는 값을 한번에 관리하기 위해 혹은 틀리면 안되는 값을 조금 더 엄격하기 위해 상수를 사용한다. 내 프로젝트에서는 아래와 같이 관리했는데, common 폴더에 theme.dart 를 만들고 appTheme 클래스를 이용해서 상수를 설정해주었다. 앱 내의 색이 들어가는 모든 것들에 대해 변수를 만들어주고 거기서 또 할당해주었다. 이렇게 한 이유는 색이 들어가는 모든 것들에 각각의 변수를 주어서 하나의 파일에서 모든 색을 수정할 수 있게 하고 싶어서였다. // /common/theme.dart class appTheme { static const Color mainGreen = Color(0xFF111111); static const Color white = Colors.white; static c..
· ios
flutter_native_splash 패키지를 이용하여 스플래시 스크린을 만들었다. 근데 앱을 배포하고보니 흰 화면이 처음에 1초간 뜨고 스플래시 스크린이 보여졌다. 이미 해결해버려서 영상은 없지만 이것은 flutter의 문제가 아닌 ios에서의 고질적인 문제라고 한다. https://developer.apple.com/forums/thread/105790 First used launch screen file is f… | Apple Developer Forums For our app the only way to "fix" this was to delete the app from device, restart device, then install app again - but of course this w..
uzzam
uzzam.dev