[Python] Ubuntu 18.04 psycopg2 error: subprocess-exited-with-error
psycopg2 error 발생시 패키지 설치중 "psycopg2" 관련 오류 발생시 설치 sudo apt -y install libpq-dev python3-dev sudo apt -y install build-essential
키자드에 등록된 총 721개의 포스트를 확인하실 수 있습니다.
psycopg2 error 발생시 패키지 설치중 "psycopg2" 관련 오류 발생시 설치 sudo apt -y install libpq-dev python3-dev sudo apt -y install build-essential
pubspec.yaml iamport_flutter | Flutter Package Plugin that allows Flutter to use Iamport payment and certification functions. pub.dev iamport_flutter: ^0.10.1+2 안드로이드 설정 앱 스키마(App Scheme) 설정 "android\app\src\main\AndroidManifest.xml" "스키마이름://action" 으로 실행하면 "MainActivity"가 실행됩니다. AndroidManifest.xml <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> <data android:host="action" android:scheme="스키마이름" /> </intent-filter>
캐스케이드(Cascade) model class User { String name = ""; int age = 0; String changeName(String value) => name = value; } cascade User user = User(); ..name = "Emma" ..age = "13" get, set User user = User(); ..name = "Emma" ..changeName("Aaron"); => Araon 참고 링크
pubspec.yaml flutter_staggered_grid_view | Flutter Package Provides a collection of Flutter grids layouts (staggered, masonry, quilted, woven, etc.). pub.dev flutter_blurhash | Flutter Package Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium pub.dev flutter_staggered_grid_view: ^0.6.1 flutter_blurhash: ^0.6.4 언스플래시 가입하기 Beautiful Free Images & Pictures | Unsplash Beautiful, free images and photos that you can d
Error: ENOSPC: System limit for number of file watchers reached 위 오류는 서버 파일 감시자가 읽을 수 있는 한계에 도달했다고 하는것이기 때문에 아래 명령어로 제한을 풀어주시면 됩니다. 제한 확인 cat /proc/sys/fs/inotify/max_user_watches 제한 풀기 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
폰트어썸 무료 적용 무료 버전의 경우에는 "solid"와 "regular"만 지원이 된다. 코어 설치하기 npm i --save @fortawesome/fontawesome-svg-core npm i --save @fortawesome/react-fontawesome@latest ----- yarn add @fortawesome/fontawesome-svg-core yarn add @fortawesome/react-fontawesome@latest SVG 설치하기 npm i --save @fortawesome/free-solid-svg-icons npm i --save @fortawesome/free-regular-svg-icons ----- yarn add @fortawesome/free-solid-svg-icons yarn add @fortawesome/free-regular-svg-icons Babel Macros 적용 동적 아이콘 가져오기를 사용하면 개별 아이콘을 선언할 필요
npm install npm i react-responsive ----- yarn add react-responsive useMediaQuery 아래와 같이 크기를 감지하여 "모바일", "PC"를 구분할 수 있고 실시간으로 "넓이", "높이" 값을 가져올 수 있다. import React from "react" import { useMediaQuery } from "react-responsive"; const Home = () => { const isResponsive = useMediaQuery({ query: '(max-width: 424px)' }); return ( <div className={isResponsive ? 'layout mobile' : 'layout pc'}> {isResponsive && ( <> 모바일 일때 </> )} {!isResponsive && ( <> PC 일때 </> )} </div> ); }; export default Home;
인터페이스 Interface 인터페이스(Interface) interface PeopleInterface { name: string age: number } const me1: PeopleInterface = { name: 'yc', age: 34, } 인터페이스 확장시 interface PeopleInterface { name: string age: number } interface StudentInterface extends PeopleInterface { school: string } 인터페이스 선언적 확장 같은 이름으로 인터페이스를 만든다면 자동으로 확장된다. 선언적 확장에 대해서는 타입(Type)은 불가능 하고 인터페이스는 가능하다. 그 예제는 아래와 같다. interface Window { title: string } interface Window { ts: TypeScriptAPI } 인터페이스는 객체에만 사용이 가능 interface FooInterface { valu
pubspec.yaml sticky_headers | Flutter Package Flutter Sticky Headers - Lets you place headers on scrollable content that will stick to the top of the container whilst the content is scrolled. pub.dev sticky_headers: ^0.2.0 적용하기 ui.dart class StickyHeaderUi extends GetView<TestController> { const StickyHeaderUi({Key? key}) : super(key: key); @override Widget build(BuildContext context) => Scaffold( appBar: AppbarWidget(appBar: AppBar()), body: const SafeArea( child: StickyHeaderWidget(), ), ); }
package.json 스타일 컴포넌트(Styled Components) 설치 npm install styled-components ----- yarn add styled-components 바벨(babel) 설치 npm install --save-dev babel-plugin-styled-components npm install babe-preset-next ----- yarn add --dev babel-plugin-styled-components yarn add babe-preset-next .babelrc { "presets": ["next/babel"], "plugins": [ [ "styled-components", // https://www.npmjs.com/package/babel-plugin-styled-components/v/1.1.7 { "ssr": true, // 서버 측 렌더링 지원 여부 "displayName": true, // 클래스명에 해당 스타일 정보
스타일 컴포넌트 설치 [Next.js] 스타일 컴포넌트(Styled Components) 설정하기 package.json 스타일 컴포넌트(Styled Components) 설치 바벨(babel) 설치 .babelrc _documents.js "... blog.naver.com 파일 생성 "styles/theme/theme.ts" const color = { white: "white", black: "black", }; export const theme = { color, }; export type Theme = typeof theme; _app "<ThemeProvider>" 를 감싸주고 위에서 만든 글로벌 스타일 파일을 불러옵니다. import { ThemeProvider } from "styled-components"; import { theme } from "styles/theme/theme"; function MyApp({ Component, pageProps }: A
global.d.ts "global.d.ts" 파일 생성 후 아래 내용 넣기 declare module "*.css" { interface IClassNames { [className: string]: string; } const classNames: IClassNames; export = classNames; } tsconfig.json "include" 부분에서 위에서 만든 "global.d.ts" 파일 넣기 "include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx"], dynamic 이제 "import"를 통하여 ".css" 파일을 불러올 수 있습니다. import("styles/gloabal.css");
will-change 값 설명 auto 기본값 scroll-position 엘리먼트의 스크롤 위치가 바뀔때 contents 엘리먼트의 컨텐츠 중 일부가 바뀔때 opacity 투명도가 바뀔때 transform transform 값이 바뀔때 left, top 여러 속성을 동시 사용 (EX: will-change: left, top;) 참고 링크 will-change - CSS: Cascading Style Sheets | MDN will-change CSS 속성은 요소에 예상되는 변화의 종류에 관한 힌트를 브라우저에 제공케 한다. 그래서 실제 요소가 변화되기 전에 미리 브라우저는 적절하게 최적화할 수 있다. 이러한 종류의 최적화는 잠재적으로 성능 비용이 큰 작업을 그것이 실제로 요구되기 전에 미리 실행함으로써 페이지의 반응성을 증가시킬 수 있다. developer.mozilla.org
원인과 해결방법 데이터베이스를 새로 만들어 기존 백업 파일을 가져오는 상황에서 인덱스 부분이 매칭되지 않아서 발생되는 문제이다. idx는 자동증가이기 때문에 명시적으로 입력해주면 안된다. 기존 유저 테이블을 새로 만들면 해결이 되겠지만, 수동으로 idx 값을 재설정하여 해결하면 된다. SELECT setval('users_id_seq', (SELECT MAX(id) from "users")); 참고 링크 Python/ Django Key already exists. Postgres I Have a project built in django and it uses a postgres database. This database was populated by CSVs files. So when I want to insert a new object I got the error "duplicated key" because the objec... stackoverflow.com
천지인 키보드 대응 RegExp('[ㄱ-ㅎ|가-힣|ㆍ|ᆢ]') 참고 링크 Flutter TextField에서 'FilteringTextInputFormatter.allow' 한글 허용시 주의사항 프로그래밍 정보를 다루는 블로그입니다. Let's cool programing! blogdeveloperspot.blogspot.com
Install npm install zustand ----- yarn add zustand Store 생성 "store/useStore.js" import create from "zustand"; const useStore = create((set) => ({ count: 1, inc: () => set(state => ({ count: state.count + 1 })), dec: () => set(state => ({ count: state.count - 1 })) })); export default useStore; Store 사용 const { count, inc, dec } = useStore(); return ( <> <span>{count}</span> <button onClick={inc}>up</button> <button onClick={dec}>down</button> </> ) 참고 링크 Zustand - Redux, 간단하게 써보세요! "상태 관리" 하면 어떤
JSX https://goddaehee.tistory.com/296 JSX(JavaScript XML)는 Javascript에 XML을 추가한 확장한 문법이다. return 이 시작되는 엘리먼트는 1개만 지정하여 감싸는 형태여야 한다. const boolean = false; const variable = "World"; return ( <> <h1>Hello {variable}</h1> <p>{boolean ? "true 일때" : "false 일때"}</p> {/* 주석 */} <p className="description" // 주석 >{boolean ? (<div>엘리먼트도 넣을 수 있다</div>) : (<div>엘리먼트도 넣을 수 있다</div>)}</p> </> ) 참고 링크 [React] 2. JSX란? (정의, 장점, 문법) 2. JSX란? (정의, 장점, 문법) 안녕하세요. 갓대희 입니다. 이번 포스팅은 [ [React 에서 사용하는 JSX ] 입니다. : ) 이번
페이지 이동 감지 import { useRouter } from "next/router"; const router = useRouter(); useEffect(() => { console.log("페이지 이동 감지"); }, [router]); 다른 방법 routeChangeStart 경로 변경 시작 beforeHistoryChange 브라우저 location 변경전 routeChangeComplete 경로 변경 완료 import Router from 'next/router'; Router.events.on('routeChangeStart', console.log); Router.events.on('beforeHistoryChange', console.log); Router.events.on('routeChangeComplete', console.log);
공지사항 예제 NoticeComponent.tsx const items = [ { id: 1, title: "First Accordion", content: "Hello", datetime: "2022-01-01" }, { id: 2, title: "Click me", content: "Hello 2", datetime: "2022-01-01" }, { id: 3, title: "Third Accordion Accordion", content: "Hello 3", datetime: "2022-01-01" }, ]; const NoticeComponent: React.FC<GenericProps> = ({}) => { const [isExpanded, setExpanded] = useState<string>(""); // 아코디언 타입 type AccordionGenericProps = { value: string; }; // 아코디언 상태 변경 const handleChange =
코드 "onLoad"를 통해서 실시간으로 높이 값 만큼 패딩값을 더해주면 자동으로 100% 효과를 얻을 수 있다. import Image from "next/image"; // Component const EventDetailRightComponent: React.FC<GenericProps> = ({}) => { const [paddingTop, setPaddingTop] = useState("0"); return ( <div className={styles.eventDetailContentBox} style={{ paddingTop }}> <Image src={items.image} layout="fill" objectFit="contain" aria-label="image" onLoad={({ target }) => { const { naturalWidth, naturalHeight } = target as HTMLImageElement; setPaddingTop(`calc(1
해결방법 설정 재설정 npm cache clean --force npm audit fix --force npm install -g cnpm --registry=https://registry.npm.taobao.org npm config set registry https://registry.npm.taobao.org/ --global npm config set registry https://registry.npmjs.org/ 네임서버 재설정 sudo rm /etc/resolv.conf sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' sudo bash -c 'echo "[network]" > /etc/wsl.conf' sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf' sudo chattr +i /etc/resolv.conf 참고 링크 npm의 느린 다운로드 속도
해결방법 yarn config delete https-proxy yarn config delete proxy yarn config get https-proxy yarn config get proxy 참고 링크 Yarn - There appears to be trouble with your network connection. Retrying I have been trying to do the quickstart guide for react native, but kept getting this error There appears to be trouble with your network connection. Retrying... My connection works just fine. stackoverflow.com
const Component interface Props { name: string; } const Home: React.FC<Props> = ({ name }) => { return ( <div>Home</div> ) } functional Component interface Props { name: string; } function Home({ name } : Props) { return ( <div>Home</div> ) } 차이점 위에서의 차이점은 "React.FC" 입니다. "React.FC"를 유형으로 사용하려면 함수 유형 자체에 주석을 달아야 합니다. 매개 변수나 반환 값이 아니라 함수 값입니다. 함수 표현식(const Component)을 사용하면 적절한 상황에서 이러한 유형의 호이스팅이 가능하지만 TDZ(Temporal Dead Zone)를 유발할 수도 있습니다. 함수 선언(functional Component)이 더 안전한 선택입니다. 공식 문서에도 함수 선언(fu
Optional Properties 함수를 호출할때 해당 프로퍼티의 값이 생략되어도 된다고 표현할때 사용한다. function handler(name: any, age?: number) { .... } handler({ name: "john" }); // OK handler({ name: "john", age: 19 }); // OK
Defining a Union Type 타입을 2개 이상 조합하여 사용하는것이 조합형 유니온 타입이다. 하나의 유니온 타입을 구성하는 요소 타입을 유니온 멤버라고 한다. function handler(name: number | string) { .... } handler("john"); // OK handler(123); // OK handler(false); // NO 유니온을 사용하고 타입을 추론할때 "typeof"를 활용하면 된다. function handler(name: number | string) { if (typeof name === "string") { // 유니온 타입은 2개 이지만 타입을 추론하여 "string" 일 때 처리할 수 있다. } else { // "string" 타입이 아닌 "number" 일때 } }
Type Aliase type User = { name: string; age: number; }; function handler(user: User) { console.log(user.name); console.log(user.name); } function handler({ name, age }: User) { console.log(name); console.log(age); } handler({ name: "john", age: 19 }); 타입에도 유니온 타입을 적용할 수 있다. type User = { name: string; age: number; }; type UserReturn = number | string; function handler(user: User): UserReturn { return User; } 확장하는 방법은 아래와 같습니다. 참고로 "Type Aliase"는 같은 이름을 중복 선언하는 방식인 선언병합이 불가합니다. type PeopleType =
어썰션(Assertion) 아래와 같이 "HTMLCanvasElement"와 같은 수동으로 타입을 명시할때 어썰션(Assertion)을 사용할 수 있다. const myCanvas = document.getElementById('main_canvas') as HTMLCanvasElement; 꺽쇠 괄호(<>)를 이용하여 표현해줄 수도 있다. 다만, ".tsx"에서는 동작하지 않는다. const myCanvasAngleBracket = <HTMLCanvasElement>document.getElementById('main_canvas'); 어썰션(Assertion)은 타입의 특정성을 조절하는데에만 쓸 수 있다. const x = 'hello' as number; // Conversion of type 'string' to type 'number' maybe a mistake // because neither type sufficiently overlaps with the other.
Non-null Assertion Operator 표현식 뒤에 "!" 느낌표를 사용하게 되면, "null", "undefined" 타입이 아님을 명시할 수 있다. function liveDangerously(x?: number | null) { // No error console.log(x!.toFixed()); }
WAI-ARIA 접근성 항목 속성 기본값 설명 role HTML 기반의 애플리케이션의 다이얼로그 또는 콘텐츠를 분리하는 창 또는 다른 웹 애플리케이션의 UI 혹은 페이지를 마크업하는데 사용됩니다. aria-activedescendant string | undefined 메뉴, 그리드 및 도구 모음과 같은 포커스 가능한 여러 하위 항목이 포함된 대화형 요소에 대한 보조 기술에 대한 포커스를 관리하는 방법을 제공합니다. aria-atomic boolean | undefined https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-atomic aria-autocomplete "list" | "none" | "inline" | "both" | undefined 입력 텍스트가 콤보 상자, 검색 상자 또는 텍스트 상자에 대해 사용자가 의도한 값에 대한 하나 이상의 예측 표시를 트리거할 수 있는지 여부를 나
Readonly 타입앞에 "readonly"를 붙여주면, 읽기전용으로 값을 변경 할 수 없다. type User = { readonly name: string; age?: number; } const handler = (name:string) : User => ({name}) const test = handler("john"); test.name = "abc"; // Error
Call Signatures 일반적인 방법 function handler(a:number, b:number): number { return a + b; } "Call Signatures" 방법으로 함수가 어떻게 작동하는지 서술할 수 있다. type Add = (a:number, b:number) => number; const handler:Add = (a, b) => a + b;
오버로딩(Overloading) 콜시그니쳐(Call Signatures)가 여러개 있는것이 오버로딩(Overloading) 이라고 한다. 아래와 같이 해당 콜 시그니쳐가 여러개 있을때 "b"는 "number, "string" 둘다 받을 수 있다고 되어있다. 이런 경우에는 "typeof"를 이용하여 타입 체크를 하고 처리하면 된다. type Add = { (a: number, b: number) : number; (a: number, b: string) : number; } const add: Add = (a, b) => { if (typeof b === "string") { return a; } return a + b; }
Polymorphism 콜 시그니쳐를 통하여 "number", boolean", "string"을 허용해줬지만 문제는 해당 배열에서 타입을 섞어서는 처리할 수가 없다. 왜냐하면 타입을 섞은 배열에 대한 콜 시그니쳐가 없기 때문이다. 이런 경우에는 "Polymorphism"의 "제네릭(Generic)" 이용하여 처리하면 된다. type array = { (arr: number[]): void; (arr: boolean[]): void; (arr: string[]): void; } const handler: array = (arr) => { arr.forEach(i => console.log(i)); } handler([1, 2, 3, 4]); // OK handler([true, false, true, false]); // OK handler(["a", "b", "c", "d"]); // OK handler(["a", 1, 2, false]); // ERROR 아래 처럼 제네릭 형태로
예시 데이터 [ { idx: 1, name: "바나나", price: 5000, }, { idx: 2, name: "토마토", price: 3500, }, { idx: 3, name: "고구마", price: 4500, } ] SSR: Server-side rendering getServerSideProps 정적이 아닌 주기적으로 데이터가 변경되어 표시될때 사용하면 됩니다. interface TempJson { idx: number, name: string, price: number, } interface Props { status: number; data: TempJson[]; } function Home({ data }: Props) { // API 오류 처리시 // 다른 화면을 보여주거나, 별도 처리 if (status) { return <ErrorPage statusCode={status} />; } ... } HelpCenterEventDetailPage.getInitial
Error pages/error.tsx function ErrorPage({ statusCode }: any) { return <p>{statusCode ? `An error ${statusCode} occurred on server` : "An error occurred on client"}</p>; } ErrorPage.getInitialProps = ({ res, err }: any) => { const statusCode = res ? res.statusCode : err ? err.statusCode : 404; return { statusCode }; }; export default ErrorPage; pages/tempPage.tsx 빌드 후 API 호출때 실패 여부를 "status" props로 전달받아서 컴포넌트 출력전에 오류페이지로 보여준다. interface DefaultProps { status: number; data: any; } function TempPa
nextjs-progressbar nextjs-progressbar Nprogress component for Next.js app.. Latest version: 0.0.14, last published: 2 months ago. Start using nextjs-progressbar in your project by running `npm i nextjs-progressbar`. There are 2 other projects in the npm registry using nextjs-progressbar. www.npmjs.com npm i nextjs-progressbar OR yarn add nextjs-progressbar NextNProgress <NextNProgress color="#29D" startPosition={0.3} stopDelayMs={200} height={3} showOnShallow={true} /> _app.tsx import NextNProgr
pubspec.yaml optimize_battery | Flutter Package Check for battery optimization status and open settings or disable it pub.dev optimize_battery: ^0.0.4 사용방법 배터리 사용량 중지가 켜져있을때 팝업을 띄우거나 설정창으로 보내는 함수를 이용하면 된다. 사용자에게 먼저 alert을 통해서 안내를 해주고 처리하는것도 좋다. OptimizeBattery.isIgnoringBatteryOptimizations().then((onValue) { if (!onValue) { // 배터리 최적화 중일때 // 배터리 Allow 팝업을 띄움 OptimizeBattery.stopOptimizingBatteryUsage(); } });
pubspec.yaml toast | Flutter Package A Flutter Toast plugin. pub.flutter-io.cn toast: ^0.3.0 여기서 중요한 것은 위젯에다가 "context"를 꼭 전달해줘야 토스트 배경색상등을 커스텀하여 변경할 수 있따. // ignore_for_file: non_constant_identifier_names, must_be_immutable import 'package:toast/toast.dart'; Future<dynamic> GlobalToastWidget({ required context, required String message, }) async { ToastContext().init(context); Toast.show(message, gravity: Toast.bottom); } GlobalToastWidget(context: context, message: "이미지가 저장되었습니다");
패키지 종속성 문제해결 pubspec.yaml 아래 입력 후 완전히 종료했다가 재실행하면 됩니다. dependency_overrides: photo_view: git: url: https://github.com/bluefireteam/photo_view ref: master
OS 비중 확인 Android OS version market share over time | AppBrain The most up-to-date data about the what the market share of Android OS versions are. www.appbrain.com OS一覧(Android) | スペック検索とシェア率が役立つ国内スマホ・タブレット機種情報サイト スマタブinfoは、機種情報×バグ情報がまとめて見つかる開発者向けスマホ・タブレット情報サイトです。AndroidとiOSの詳細な機種別スペックやシェア情報を揃えて機種選定にお役立ちできるだけでなく、不具合や機種依存の情報も追加していきます。 smatabinfo.jp Mobile & Tablet Android Version Market Share Worldwide | Statcounter Global Stats This graph shows the market share of mobile & tablet android version
버젼 확인 코틀린 버젼 체크 https://kotlinlang.org/docs/gradle.html#plugin-and-versions 그레들 버젼 체크 https://services.gradle.org/distributions/ 그레들 툴즈(플러그인) 버젼 체크 https://developer.android.com/studio/releases/gradle-plugin?hl=ko https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google 포스팅 기준 최신 버젼 변경 "android\build.gradle" ext.kotlin_version = '1.6.21' classpath 'com.android.tools.build:gradle:7.2.0' "android\gradle\wrapper\gradle-wrapper.properties" distributionUrl=https\://services.gradl
create_engine 아래와 같이 비밀번호 구간에서 특수문자가 들어가 있다면 문자열 인식이 잘못되어 연결이 안됩니다. 따라서, "quote"를 통하여 "urlencoded" 변환 후 입력해주시면 됩니다. from urllib.parse import quote DATABASE_URL = f"postgresql://{quote(ENV.DB_USERNAME)}:{quote(ENV.DB_PASSWORD)}@{ENV.DB_HOST}:{ENV.DB_PORT}/{ENV.DB_DATABASE}" engine = create_engine(DATABASE_URL, pool_recycle=ENV.DB_POOL_RECYCLE, pool_size=ENV.DB_POOL_SIZE, max_overflow=ENV.DB_MAX_OVERFLOW, echo=ENV.DB_ECHO, echo_pool=ENV.DB_ECHO_POOL)
JWT Auth Exception(예외처리) 종류 함수 설명 AuthJWTException 모든 fastapi_jwt_auth 오류가 확장되는 경우를 제외한 기준 InvalidHeaderError Header 또는 JWT 헤더 정보를 가져오는 동안 오류 발생 JWTDecodeError JWT 디코딩 오류 발생 CSRFError CSRF 시도시 오류 발생 MissingTokenError 토큰이 헤더에 없을때 발생 RevokedTokenError 만료된 토큰이 액세스하려고 할 때 발생 AccessTokenRequired 만료된 Access Token이 액세스하려고 할 때 발생 (jwt_required, jwt_optional, fresh_subt_required) RefreshTokenRequired 만료된 Refresh Token이 액세스하려고 할 때 발생 (jwt_sublic_required) FreshTokenRequired 만료되지 않은 Refresh Token이 유효하지 않을때
node 설치 다운로드 | Node.js Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 설치 후 환경변수 적용을 위하여 재시작 (권장) 재시작 이후 CMD에서 명령어 확인 node -v npm -v 만약, CMD 에서 명령어가 안먹힌다면 환경변수 설정이 제대로 되지 않은것으로 확인해줍니다. flutterfire_cli 설치 해당 프로젝트 폴더 이동후 CMD에서 명령어 실행 dart pub global activate flutterfire_cli 파이어베이스에서 생성한 프로젝트 이름을 넣어주면 된다. flutterfire configure --project=프로젝트이름 FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. 위와 같은 오류가 발생한 경우는 결국은 Nod
Java 버전에 따른 옵션 추가 Java9 버전 부터는 "default storetype"이 "pcks12" 라고 합니다. Java8은 기본 방법대로 사용하면 됩니다. 기존 방법 keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key 뒤에 "-storetype JKS" 옵션을 넣으면 된다. keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key -storetype JKS 참고 링크 Flutter 앱 서명 key.jks 읽기 실패 Failed to read key key from store "android/app/key.jks" : Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm Hmac
프로가드와 안드로이드 앱 통합 AGP 7 부터는 "ProGuard"와 "Android" 앱이 통합됩니다. 그렇기 때문에 프로가드를 별도로 설정해줄 필요가 없어서 삭제해주면 오류가 사라집니다. "app/build.gradle" 아래 항목들 삭제 및 이외 프로가드를 설정한 곳 파일 삭제 useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 참고 링크 [Flutter] No signature of method: build_ (gradle 7.0+) Flutter 난독화 메뉴얼에 언급된 useProguard를 제거하면 된다. 에러로그 FAILURE: Build failed with an exception. * Where: Build file '/Users/melody/dev/sliding_puzzle/android/app/build.gradle'.. nowoodeel
depcheck npm install depcheck -g or yarn global add depcheck 아래 명령어로 실행하여 종속되지 않는 패키지를 검색할 수 있습니다. depcheck 참고 링크 [node.js] package.json에서 사용되지 않는 npm 패키지를 찾으십시오. - 리뷰나라 package.json 파일에 더 이상 필요하지 않은 패키지가 있는지 확인하는 방법이 있습니까? 예를 들어 패키지를 시험 해보고 나중에 주석을 달거나 코드를 삭제하지만 제거를 잊어 버린 경우 삭제할 수있는 몇 가지 패키지가 생깁니다. 패키지를 안전하게 삭제할 수 있는지 확인하는 효율적인 방법은 무엇입니까? 답변 depcheck 라는 npm 모듈을 사용할 수 있습니다 (노드 버전 10 이상 필요). 모듈을 설치하십시오 … [node.js] package.json에서 사용되지 않는 npm 패키지를 찾으십시오. 더 보기 » daplus.net
Proxy 설정 "next.config.js" 하단에 "redirects()" 부분에서 변경해주면 된다. "source"는 만약 사용자가 접근하는 URL 주소가 "/v1"이라면 프록시 시킨다. 즉, 사용자가 여러 페이지를 돌아다니다가 URL 주소가 "/v1"이 들어가 있다면, 아래의 "destination" 설정한 주소로 강제 프록시 된다. 뒤에 "/:path*"는 이하 주소 및 파라미터라고 보면 될것 같다. 아래 프록시 설정을 해주면 이제 실제 백엔드로 API 호출할 HTTP OR AXIOS에서 써주면 CORS 오류 없이 작동한다. module.exports = { ... async redirects() { return [ { source: '/v1/:path*', destination: `http://서버주소/:path*`, permanent: true, }, ] }, } 참고 링크 React와 Next.js의 Cors 에러 해결 (Proxy) BackEnd Developer가
BLE flutter_reactive_ble | Flutter Package Reactive Bluetooth Low Energy (BLE) plugin that can communicate with multiple devices pub.dev https://coding-oneday.tistory.com/entry/flutterreactiveble%EC%82%AC%EC%9A%A9%EB%B0%A9%EB%B2%95 [Flutter] Bluetooth(플러터 블루투스) flutter_reactive_ble 사용방법 지난번 플러터 블루투스에 관한 라이브러리를 사용하는 방법에 대해 포스팅을 했지만, 이번에는 다른 라이브러리를 사용하는 방법을 포스팅 하려고 합니다. 지난 1년동안 잘 써왔지만 이번에 프로젝트를 널세이프.. coding-oneday.tistory.com BLE 특징 https://toongsunni-s-real-life.tistory.com/entry/BLE-Bluetooth-L
https://wormwlrm.github.io/2022/06/20/Navigation-API.html?fbclid=IwAR0cOej53ppLjsfUX9LbZ2wfzDVYlK9WXvZB8zO_rmcMMLrPPNCEcPsC2-g&fs=e&s=cl History API는 가라! 이제는 Navigation API의 시대가 온다 - 재그지그의 개발 블로그 클라이언트 사이드 라우팅의 표준화를 위해 새롭게 제안된 Navigation API에 대해 알아봅니다. wormwlrm.github.io
안드로이드 운영체제 및 플랫폼 https://developer.android.com/guide/platform 플랫폼 버전과 API 레벨 https ://developer.android.com/about/dashboards/index.html?hl=ko 2021년 12월 기준 데이터이며, 배포율이 0.1% 이하인 버전은 표시되지 않습니다. 코틀린(Kotlin) 기존 안드로이드 플랫폼은 "리눅스 커널과 자바 API 프레임워크"가 결합된 형태로 과거의 안드로이드 플랫폼은 "JVM(DalvikVM)"으로 자바 가상 머신 위에서 앱이 동작했습니다. 현재는 안드로이드 런타인(Android RunTime, ART)를 사용하고 있으며, "JVM 형태에서 ART로 변경되었지만 가상 머신 위에서 동작하는 형태는 동일"합니다. "2017년 5월 Google I/O에서 코틀린(Kotlin)을 공식 언어로 채택"하여 메인 언어로 지원하고 있습니다. 자바 - 객체지향 class Hello { public
RxJava RxJava는 넷플릭스(Netflix)의 기술 블로그에서 처음 소개 되었다. 넷플릭스는 REST 기반의 서비스 API 호출 횟수와 서비스의 전반적인 성능을 개선하는 프로젝트를 진행한 결과 ".NET" 환경의 리엑티브 확장 라이브러리(Rx)를 "JVM에 포팅하여 RxJava를 만들었다." 넷플릭스의 "RxJava"를 만들게된 핵심적인 이유를 다음과 밝혔다. 동시성을 적극적으로 끌어안을 필요가 있다. 자바가 동시성을 처리를 하는데 번거로움이 있기 때문에 이를 해결하고자 넷플릭스는 클라이언트 요청을 처리하는 서비스 계층(Service Layer)에서 동시성을 처리하고자 다수의 비동기 실행 흐름(스레드 등)을 생성하고 결과를 취합하여 리턴하는 방식으로 내부 로직을 변경했다. 자바 Future를 조합하기 어렵다는 점을 해결해야 한다. 2013년 당시 자바8에서 제공하는 "CompletableFuture" 같은 클래스가 제공되지 않았기 때문에 "RxJava"에서 이를 해결하고자 비
DP Density-Independent Pixels UI 레이아웃을 정의할 때 레이아웃 치수나 위치를 지정하기 위해 사용하는 단위이다. 픽셀 독립 단위이며 화면의 크기가 달라도 동일한 비율로 보여주기 위해 안드로이드에서 정의한 단위이며 큰 화면, 작은 화면에 상관없이 같은 크기로 나타난다. SP와 다르게 DP로 설정하게 되면 시스템 설정의 텍스트 크기 값의 변화에 상관없이 일정한 크기를 유지한다. SP Scale-Independent Pixels UI 레이아웃을 정의할 때 텍스트의 크기를 지정하기 위해 사용하는 단위이다. 사용자가 디바이스 시스템 설정에서 텍스트 크기를 "최대크게" SP로 크기를 지정해놓은 TextView의 텍스트 크기가 영향을 받아 커지기 때문에, 크기를 고정하기 위해서는 앱의 폰트 크기 등을 우선적으로 적용하게끔 혹은 시스템 설정을 무시하게끔 할 수도 있다.
missingContairaints XML의 위젯의 위치를 설정해주지 않아서 뜨는 권장내용입니다. <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" tools:ignore="MissingConstraints" /> 아래와 같이 "layout_constraint" 위치들을 지정해주면 해결 됩니다. <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="pare
AppCompatActivity https://hongbeomi.medium.com/appcompatactivity-%ED%8C%8C%ED%97%A4%EC%B9%98%EA%B8%B0-4ed4fc231899 Android 3.0(API Level 11) 이후 부터, 앱바(Appbar)의 액션바(Actionbar)를 사용할 수 있기 때문에 3.0 이하 버젼에서도 동작할 수 있게 "AppCompatActivity"를 사용합니다. 물론, 마시멜로 이상의 기기들로 충분히 커버가 가능하지만 때로는 구형 기기들까지 지원해야될 경우에는 "Activity" 대신 "AppCompatActivity"를 사용하면 될것 같습니다. 참고 링크 [Andorid] Activity와 AppCompatActivity, 그 외의 차이 몇년 사이에 신규로 프로젝트를 생성한다면, AppCompatActivity부터 마주하는 분들이 있을 것 같습니다. 그러나 저처럼 오래된 프로젝트 코드를 마주하면, Activity와 Ap
라이프사이클(Lifecycle) 라이프사이클(Lifecycle) 사이클 설명 onCreate() 1. 첫번째로 호출 (라이플사이클 1회만 수행) 2. 해당 사이클에서 초기화 진행 (Layout 정의, View 생성, DataBinding) ※ 추가로 해당 사이클에서 finish() 메서드를 호출하면 먼저 전체 onCreate() 메서드를 실행한 다음 Destroy()에서 수명 주기 메서드를 실행하고 활동이 삭제됨 onStart() 1. Activity가 화면에 표시되기 직전 호출 2. 화면에 진입할때마다 실행됨 onResume() 1. Activity가 화면에 표시되기 직후 호출 2. 화면이 포커스인(보여지는) 상태 onPause() 1. Activity가 화면에 보여지지 않은 직후에 호출 2. 화면이 포커스아웃(보여지지 않은) 상태 ※ 다른 Activity가 호출되기 전에 실행되기 때문에 무거운 작업을 수행하지 않도록 주의해야함 onStop() 1. Activity가 다른 Acti
Format on Save Settings 액션 설명 Reformat code 코드 스타일에 따른 코드 포맷 Optimize imports import 최적화 Rearrange code 코드 스타일에 따른 코드 정렬 Run code cleanup batch-apply quick-fixes 빠른 수정을 일괄 적용 저장되지 않은 변경 내용으로 파일 표시 Settings 저장되지 않은 파일 탭에 * 표시 Apply Changes의 실행 대체 사용 설정 Settings Apply Changes and Restart Activity나 Apply Code Changes 오류 발생시 수동으로 앱을 재실행 Macro를 통한 자동 Reformat on save Macro "Start Macro" 이후 "CTRL + ALT + L" 키 입력 후 "CTRL + S" 후 "Stop Macro" 하면 이름을 저장하라고 나오며, 다시 설정의 "Keymap"에서 아래와 같이 "Macros"에서 방금 저장한 "
wrap_content "wrap_content"는 폭과 높이가 자식크기에 맞춰서 크기가 자동으로 설정된다. 1. "wrap_content" + "wrap_content" 간단히 설명하면, "wrap_content"는 현재 위젯의 크기 기준으로 맞춰진다. "wrap_content" + "wrap_content" <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:context=".MainActivity"> <Button android:id="@+id/
@SuppressLint 현재 프로젝트에 설정된 minSdkVersion 버젼 이후에 나온 API를 사용할때 warning을 없애고 사용할 수 있게 합니다 참고 링크 https://developer.android.com/studio/write/lint 린트 검사로 코드 개선 | Android 개발자 | Android Developers 테스트를 빌드하여 앱이 기능적 요구사항을 충족하는지 확인하는 것 외에도 린트를 통해 코드를 실행하여 코드에 구조적 문제가 없는지 확인하는 것이 중요합니다. developer.android.com
오류 해결 "you need to use a Theme.AppCompat theme (or descendant) with this activity" 오류는 액티비에서 풀스크린을 사용하거나 타이틀바를 없앨때 발생합니다. 따라서, 풀스크린 혹은 타이틀바를 없앨때에는 "AppCompatActivity" 대신 "Activity"를 사용하면 된다. <activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> public class MainActivity ext
변수, 상수 변수 (Variable) : 값을 수정할 수 있음 상수 (Constant) : 값을 수정할 수 없음 var 키워드 사용 var num = 5 num = 1 // 값 수정 가능 let 키워드 사용 let name = "John" name = "Jay" // 값 수정 불가능 Integer 내장 함수 let num = 360 3의 배수인지 확인하는 메소드 print(num.isMultiple(of:3)) 0 ~ 300 사이중 랜덤으로 수를 뽑아내는 메소드 let random = Int.random(in: 0...300) Boolean Boolean 값을 반전 시키는 함수 let isMan = true isMain.toggle() => false String Interpolation 변수의 값과 문자열 같이 표현하기 let name = "홍길동" let age = 26 let message = "저의 이름은 \(name) 이며, 나이는 \(age)세 입니다." => 저의 이름은
코루틴(Coroutine) 코루틴은 동시성 프로그래밍 개념을 도입한 비동기적(Async)으로 실행되는 방식입니다. build.gradle dependencies { ... implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2") } activity.kt import android.annotation.SuppressLint import android.app.Activity import android.content.Intent import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat.startActivity import kotlinx.coroutines.DelicateCoroutinesApi
OnClickListener() import android.os.Bundle import android.view.View import android.widget.Button import androidx.appcompat.app.AppCompatActivity class CheckUserActivity : AppCompatActivity() { private lateinit var mBtnUserconfirm: Button; override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_insert_user); mBtnUserconfirm = findViewById(R.id.btn_user_confirm); mBtnUserconfirm.setOnClickListener(ButtonListner()) } inner class Butto
https://dbanks.design/blog/dark-mode-with-style-dictionary/?utm_source=Nomad+Academy&utm_campaign=ba480c6af1-EMAIL_CAMPAIGN_2022_07_22&utm_medium=email&utm_term=0_4313d957c9-ba480c6af1-49637285&mc_cid=ba480c6af1&mc_eid=351fe96ded Dark Mode with Style Dictionary Dark mode is so hot right now. This article goes in depth into how dark mode works on Android, iOS, and the web as well as tips on how to structure your design tokens and 2 different implementations of dark mode in Style Dictionary. dbank
절대 경로 설정 우선 먼저 알아야 될 부분은 Next.js는 Next.js 9.4 이후 부터 tsconfig.json 및 jsconfig.json "경로" 및 "baseUrl" 옵션을 자동으로 지원합니다. 즉, 자동으로 지원하기 때문에 ".eslintrc"에서 설정을 잘못하면 계속 오류가 뜨고 안될 수 있으므로, 유의한다. jsconfig.json (tsconfig.json) { "compilerOptions": { "baseUrl": ".", "paths": { "@/components/*": ["components/*"], "@/pages/*": ["pages/*"], "@/config/*": ["config/*"], "@/styles/*": ["styles/*"], "@/store/*": ["store/*"], "@/utlis/*": ["utlis/*"] } } } .eslintrc.json 아래 사항을 체크한다. 1. "plugin:import/errors"가 있다면 삭제,
MUI(MaterialUI) 적용 베이스 템플릿 GitHub - REAFLA/mui-nextjs-javascript: MUI 테마를 적용한 NextJS 자바스크립트 베이스 템플릿 MUI 테마를 적용한 NextJS 자바스크립트 베이스 템플릿. Contribute to REAFLA/mui-nextjs-javascript development by creating an account on GitHub. github.com
TailWind 적용 베이스 템플릿 GitHub - REAFLA/tailwind-nextjs-javascript: TailWind 테마를 적용한 NetxJS 자바스크립트 베이스 템플릿 TailWind 테마를 적용한 NetxJS 자바스크립트 베이스 템플릿. Contribute to REAFLA/tailwind-nextjs-javascript development by creating an account on GitHub. github.com
부트스트랩(Bootstrap) 적용 베이스 템플릿 GitHub - REAFLA/bootstrap-nextjs-javascript: Bootstrap 테마를 적용한 NextJS 자바스크립트 베이스 템플릿 Bootstrap 테마를 적용한 NextJS 자바스크립트 베이스 템플릿. Contribute to REAFLA/bootstrap-nextjs-javascript development by creating an account on GitHub. github.com
Antd(Ant Design) 적용 베이스 템플릿 GitHub - REAFLA/antd-nextjs-javascript: ANTD 테마를 적용한 NextJS 자바스크립트 베이스 템플릿 ANTD 테마를 적용한 NextJS 자바스크립트 베이스 템플릿. Contribute to REAFLA/antd-nextjs-javascript development by creating an account on GitHub. github.com
설정 Settings -> Appearance & Behavior -> System Settings -> Project "New Window"으로 변경 Android Studio Settings
AndroidManifest.xml 해당 액티비티에 android:windowSoftInputMode="adjustResize" 옵션을 넣어준다. <activity android:name=".RegisterUserActivity" android:exported="true" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:windowSoftInputMode="adjustResize" /> 미적용 적용
https://github.com/ReactiveX/RxJava GitHub - ReactiveX/RxJava: RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. - GitHub - ReactiveX/RxJava: RxJava – Reactive E... github.com Observable "Obeservable"은 말 그대로 관찰자로 상태 변화가 있을때, 옵저버가 변화를 알려주어 감시한다. 함수 설명 o
관련 이슈 Issues · oven-sh/bun Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one. - Issues · oven-sh/bun github.com 기존 "Ubuntu 18.04"에서 "GLIBC_2.29" 이하인 상태에서는 "bun"을 별도로 사용할 수 없습니다. "Ubuntu 20.04"의 "GLIBC_2.31"이 설치된 버젼으로 사용이 가능합니다. 위의 링크에서 관련 이슈 확인하시면 됩니다.
Openssl 재설치 Google Code Archive - Long-term storage for Google Code Project Hosting. Projects Search About Project Source Issues Wikis Downloads openssl-for-windows File Summary + Labels Uploaded Size openssl-0.9.8k_WIN32.zip openssl-0.9.8k WIN32 Featured Jul 23, 2009 1.25MB openssl-0.9.8k_X64.zip openssl-0.9.8k X64 Featured Jul 23, 2009 1.42MB openssl-0.9.8e_X64.zip openssl-0.9.8e ... code.google.com openssl 먼저, 소셜 로그인 시도시 나오는 해시키와 Openssl에서 발급받은 해시키가 같은지 확인한다. 해시키가 다른 경우 위의 이미지와 같이 "openssl-0.
build.gradle "android\app\build.gradle" def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } 하단에 추가 def flutterCompileSdkVersion = localProperties.getProperty('flutter.flutterCompileSdkVersion') if (flutterCompileSdkVersion == null) { flutterCompileSdkVersion = '31' } def flutterTargetSdkVersion = localProperties.getProperty('flutter.flutterTarge
주석 예시 Markup 마크업 관련된 내용은 하단 공식 문서에서 확인 가능하며, 자주 쓰는 형태로 정리하여 쓰면 될것 같다. /** # 제목 설명 - Parameters: - param1: 파라미터1 - param2: 파라미터2 - Throws: 오류 타입 - returns: 리턴값 - Links: 참고 링크 For more information, see [The Swift Programming Language.](http://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/) - Note: 메모 - Author: 작성자 - Date: 날짜 자세한 추가 설명 */ 스니펫 단축키 "Xcode"에서 "Command + Shift + L"을 누르면 스니펫이 나오며, 주석전용 스니펫을 작성하여 단축키로 불러온 후 더블클릭하여 쉽게 추가할 수 있다. 참고 링크 Markup Form
SF Symbols SF Symbols - Apple Developer With over 4,000 symbols, SF Symbols is a library of iconography designed to integrate seamlessly with San Francisco, the system font for Apple platforms. developer.apple.com 4,000개가 넘는 기호가 있는 SF 기호는 Apple 플랫폼용 시스템 글꼴인 San Francisco와 원활하게 통합되도록 설계된 아이콘 라이브러리입니다. 기호는 9가지 가중치와 3가지 척도로 제공되며 자동으로 텍스트 레이블에 맞춰 정렬됩니다. 벡터 그래픽 편집 도구를 사용하여 내보내고 편집하여 디자인 특성과 접근성 기능을 공유한 사용자 정의 기호를 만들 수 있습니다. SF Symbols 4는 700개 이상의 새로운 기호, 가변 색상, 자동 렌더링, 새로운 통합 레이어 주석 기능을 제공합니다.
AutoLayout 오토레이아웃이란? 제약 조건(Constraints)에 따라 뷰 계층 구조에 있는 모든 뷰의 크기와 위치를 동적으로 지정하는 것이다. 뷰의 사이즈가 변경이 되어도, 위젯의 크기가 비율에 맞게 조정되지 않고 고정된다. "AutoResizing"과 다르게 내부를 포함한 외부 변화에도 대응할 수 있다. AutoResizing 부모의 뷰의 사이즈가 변경됨에 따라 자식 뷰의 크기나 위치를 조정하는 방식이다. 뷰의 사이즈가 작아진다면, 위젯도 비율에 맞게 크기가 조정 된다. 하지만 뷰 내부의 데이터가 변경되어 크기가 조정되어야 한다면 대응하지 못한다. "AutoLayout"과 "AutoResizing" 두개를 같이 적용해보려고 했으나, 둘 중 하나만 선택되게끔 풀리게 된다. 즉, 둘 중 하나만 사용가능하다. 참고 링크 Autolayout vs Autoresizing Masks iOS와 macOS의 사용자 인터페이스 레이아웃은 3가지 방법으로 구성할 수 있습니다. Frame-b
스택뷰(StackView) 스택뷰(StackView)sms 위젯(View)들을 일정한 간격으로 배치하기 위해 사용한다. Horizontal Stack View "Horizontal Stack View"는 View들을 가로로 배치한다. Horizontal Stack View Vertical Stack View "Vertical Stack View"는 View들을 세로로 배치한다. Vertical Stack View StackView - Distribution "Stack View" 옵션에 "Distribution" 이 있는데 해당 옵션에 따라서 정렬 할 수 있다. 해당 옵션들의 설명은 아래와 같다. Fill View들이 자신의 크기를 갖고, 크기가 설정되지 않은 마지막(혹은 처음) View는 남은 공간을 꽉 채우게 배치 된다. Fill Fill Equally 모두 같은 크기의 비율로 View가 정렬된다. Fill Equally Fill Proportionally 비율에 맞춰 배치된다.
Xcode Xcode -> Preferences -> Key Bindings "Move to Beginning of Text" "Move to End of Text" 위 두개의 키를 "Home", "End"로 변경해준다. Key Bindings Move to End of Text shift + home, end 삭제 "shift + home, end"를 누르면 최상단, 하단으로 긁으면서 이동되는것을 삭제 "Move to Beginning of Document Extending Selection" "Move to End of Document Extending Selection" 위 키에서 "shift + home, end"를 삭제한다. shift + up, down, left, right 키 재설정 "Move Up Extending Selection" "Move Down Extending Selection" "Move Left Extending Selection" "Move Right
do-catch enum TestError : Error { case outOfRange // 1 case invalidInput(testNum : Int) // 2 } do { let resultNumber = try object.printNumber(-20) } catch { print(error) } do { let resultNumber = try object.printNumber(-20) } catch TestError.outOfRange { // 오류처리 } catch TestError.invalidInput(let testNumber) { // 오류처리 } try "try"는 오류가 발생 할 수도 있다고 처리해주는것인데 "do-catch"를 무조건 감싸줘야 처리를 할 수 있습니다. 추가로 "try?", "try!" 옵셔널을 사용 할 수 있습니다. "try?"의 경우 오류가 발생되면, "nil" 값을 리턴 받을 수 있으며, "try!"의 경우에는 오류가 발생되면 "Runt
Xcode 앱은 IPad를 지원하지 않았는데, 심사시에 IPad 스크린샷 까지 요청한 경우에는 "Xcode" -> "Runner" -> "General"에서 Deployment Info에서 IPad가 체크되어 있어서 그렇다. 체크를 해제해주면 된다. 저의 경우 아래와 같이 피드백이 왔습니다. Please revise your screenshots to ensure that they accurately reflect the app in use on the supported devices. Keep in mind the following requirements: - Marketing or promotional materials that do not reflect the UI of the app are not appropriate for screenshots. - The majority of the screenshots should highlight your app's main featu
네이티브 충돌 지원 https://developer.android.com/studio/build/shrink-code#native-crash-support Google Play Console은 Android vitals에서 네이티브 충돌을 보고합니다. 몇 단계만 거치면 앱의 네이티브 디버그 기호 파일을 생성하고 업로드할 수 있습니다. 이 파일로 Android vitals에서 기호화된 네이티브 비정상 종료 스택 트레이스(클래스 및 함수 이름 포함)를 사용 설정하여 프로덕션에서 앱을 디버그할 수 있습니다. 이러한 단계는 프로젝트에서 사용하는 Android Gradle 플러그인의 버전과 프로젝트의 빌드 출력에 따라 다릅니다. Android Gradle 플러그인 버전 4.1 이상 https://developer.android.com/studio/build/shrink-code#native-crash-support "android\app\build.gradle" 디버그 기호 수준 설명 SYM
앱 설치 목록 조회 제한 구글은 2020년에 안드로이드 11을 출시하면서 앱 설치 목록에 접근하는 것을 기본적으로 차단하고, 이 정보에 접근 할 수 있게 하는 신규 권한인 "QUERY_ALL_PACKAGES"를 도입했다. 참고 링크 '앱 설치 목록' 볼 수 있는 안드 앱 제한된다 기기에 설치된 앱 목록에 접근할 수 있는 안드로이드 앱 종류가 제한될 전망이다. 불필요하게 사용자 몰래 설치된 앱 정보를 수집하고, 이를 광고업계 등 외부에 판매하는 것을 ... zdnet.co.kr
Logcat 색상 변경 "Settings" -> "logcat" 검색 Settings 아래와 같이 "Inherit values from"을 체크해제 후 "Foreground" 색상을 변경해준다. Android Logcat 스키마 색상코드 Assert 9777A9 Debug 6A98B9 Error FF6B68 Info 6A855A Verbose (모든 로그 메시지를 표시) BBBBBB Warning BC7739 유형에 맞게 색상을 변경하면 아래처럼 인식하기 쉬워진다. Android Logcat 참고 링크 [안드로이드] Android studio logcat color 변경 Assert : 9777A9 Debug : 6A98B9 Error : FF6B68 (기본) Info : 6A855A Verbose : BBBBBB (기본) Warning : BC7739 milkissboy.tistory.com
OS 체크하기 Build.VERSION.SDK_INT Log.d("Test1", Build.VERSION_CODES.BASE.toString()) Log.d("Test2", Build.VERSION.CODENAME.toString()) Log.d("Test3", Build.VERSION.SDK_INT.toString()) Log.d("Test4", Build.VERSION.BASE_OS.toString()) Log.d("Test5", Build.VERSION.INCREMENTAL.toString()) Log.d("Test6", Build.VERSION.RELEASE.toString()) Log.d("Test7", Build.VERSION.MEDIA_PERFORMANCE_CLASS.toString()) Log.d("Test8", Build.VERSION.PREVIEW_SDK_INT.toString()) Log.d("Test9", Build.VERSION.RELEASE_OR_CODENA
제조사, 브랜드, 모델명 체크 Log.d("[test] 디바이스ID", Settings.Secure.getString(this.contentResolver, Settings.Secure.ANDROID_ID)) Log.d("[test] 제조사", Build.MANUFACTURER) Log.d("[test] 브랜드", Build.BRAND) Log.d("[test] 모델명", Build.MODEL) Log.d("[test] OS 버전", Build.VERSION.RELEASE) Log.d("[test] SDK 버전", Build.VERSION.SDK_INT.toString()) 참고 링크 [안드로이드/Android] 기기 단말정보 가져오기 (단말ID, 제조사, 브랜드, 모델명, OS버전, SDK 버전) 안드로이드 휴대폰의 기기 단말정보 를 가져오는 코드입니다. DeviceInfoUtil 라는 Util 파일을 만들고 MainActivity 에서 DeviceInfoUtil 의 정보를 가져오
Kotlin class MainActivity : AppCompatActivity() { private var is_Permission = false var tele_num: TextView? = null var tele_country: TextView? = null @SuppressLint("HardwareIds") @RequiresApi(Build.VERSION_CODES.M) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) is_Permission = chkPermission() Log.d(TAG, "퍼미션 체크 값은? : $is_Permission") if (is_Permission) { Log.d(TAG, "체크 퍼미션 승인") // READ_PHONE_NUMBERS 또는 READ_PHONE_STATE 권한을 허가 받았는지 확인 if (ActivityCompat.ch
자동 업데이트 및 로그 남기기 - mkdir crontab && mkdir crontab/log - vi crontab/log/updatre.log - sudo chmod -R 777 ./crontab - 00 00 * * * root apt update && apt -y upgrade && apt -y autoremove > /home/crontab/log/update.log
pod update 기존 빌드 프로세스와의 충돌? sudo gem update cocoapods --pre pod update "Product" -> "Clean Build Folder" 이후 재빌드 Product -> Clean Build Folder 참고 링크 [iOS / Error] Unable to load contents of file list... 에러 해결 이전 포스터에서 문제를 해결하다가 새로운 에러에 봉착했습니다. 해당 문제는 Xcode 10.2에서 디폴트로 사용되는 새로운 빌드 프로세스와 관련된 에러입니다. 해당 에러를 해결해보겠습니다. [Step 1] terminal.. minny27.tistory.com
조건 Xcode9, IOS11 이상 USB 연결 먼저, USB로 맥과 연결 합니다. Xcode 실행 후 "Window" -> "Devices and Simulators" 이동하여 "Connect via network" 체크 Xcode -> Window -> Devices and Simulators -> Connect via network 이후, 선을 뽑은 뒤 Xcode에서 빌드하면 위 사진 처럼 지구본 형태 모양이 뜨면서 빌드가 진행된다.
Top layer 일반적으로 상위 레이어를 주기 위해서는 "z-index" 옵션을 사용합니다. 하지만 "<dialog></dialog>"를 사용하면 "Top layer(최상위 레이어)"를 사용하면 어디에 있든 항상 상위 "z-index"를 가질 수 있습니다. 아래의 코드는 "dialog"가 어디에 있든 "최상위 레이어" 배치 된다는 점 입니다. 즉, "postion: fixed, absolute"로 인덱스 값을 높일 필요가 없다는 말이죠. <dialog> <div>Rad! <span>c</span></div> <button class="close">Close Dialog</button> </dialog>
참고 링크 90's Cursor Effects I'd like to take the web back a little bit, into the wonderful days where knowing how to get your little mouse arrow to dance and sway was the most of your worries. Each of the cursor effects below are built for your modern browser (fast, efficient, mobile friendly), and are super easy t... tholman.com
참고 링크 GitHub - microsoft/Web-Dev-For-Beginners: 24 Lessons, 12 Weeks, Get Started as a Web Developer 24 Lessons, 12 Weeks, Get Started as a Web Developer - GitHub - microsoft/Web-Dev-For-Beginners: 24 Lessons, 12 Weeks, Get Started as a Web Developer github.com
Xcode Property List 추가 방법 Xcode Property List Info.plist 추가 방법 "ios/Runner/Info.plist" 모두 허용 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> 특정 도메인만 허용 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>daheenallwhite.github.io</key> <dict/> <key>NSIncludesSubDomains</key> <true/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> <key>NSAllowsArbitraryLoads</key> <false/> </dict>
Xcode "Signing & Capabilities > + 버튼 > Push Notifications 추가" Signing & Capabilities 참고 링크 iOS 응용 프로그램을 위한 유효한 ‘aps-environment’ 인타이틀먼트 문자열을 찾을 수 없습니다. 에러메시지 응용 프로그램을 위한 유효한 ‘aps-environment’ 인타이틀먼트 문자열을 찾을 수 없습니다. 해결 Signing & Capabilities > Capability 추가 버튼 클릭 > Push Notifications 을 추가한다 ghj1001020.tistory.com
Identifiers 생성 파이어베이스 연동 이전 식별자(Identifiers)를 먼저 등록해줘야 합니다. "Certificates, Identifiers & Profiles > Identifiers 추가" Identifiers App IDs 체크 후 다음 Register a new identifier App 선택 후 다음 Register a new identifier "App ID Prefix"는파이어베이스 연동때 사용됩니다. "Description", "Bundle ID" 작성 후 하단 "Capabilities"는 앱에서 사용할 권한을 체크해줍니다. 이후 생성 식별자가 생성되며, 클릭하면 "App ID prefix"코드 및 권한 부분은 다시 수정이 가능합니다. Register an App ID Apple Push Notifications service (APNs) 키 생성 "Keys" 메뉴로 이동하여 키 생성 Keys "Apple Push Notifications service
LTS(Long Term Support) 2년에 한번씩 배포하고 다음 5년 동안 지속 유지하는 릴리즈 형태 Ubuntu Releases 버전(LTS) 코드명 배포일 지원기간(데스크톱 / 서버) 18.04 Bionic Beaver 2018년 4월 26일 2023년 4월 / 2028년 4월 (ESM) 20.04 Focal Fossa 2020년 4월 23일 2025년 4월 / 2030년 4월 (ESM) 22.04 Jammy Jellyfish 2022년 4월 21일 2032년 Performance https://www.phoronix.com/review/xeonr-ubu1804-2004/9 "18.04 VS 20.04" 전체적으로 "Ubuntu 20.04"가 "Ubuntu 18.04" 대비 약 25% 성능이 높았다. (동일 CPU, 환경) OpenJDK, Python에서 Appleseed 렌더링, PHP에서 다른 머신러닝 소프트웨어에서 "Ubuntu 20.04"가 "Ubuntu 18.04"