- 저자 KoRoN/香り屋
- 번역 marocchino
- 발행일 2011/12/31
- 번역일 2012/07/02
- 원문 http://files.kaoriya.net/goto/c81pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- AppLauncher: 단일 키로 앱(bundle ID) launchOrFocus + Finder 단축키를 통합 처리. | |
| -- Obsidian vault 단축키는 별도 모듈(obsidian_launcher) 사용. | |
| -- | |
| -- Source: https://github.com/Hammerspoon/Spoons/tree/master/Source/AppLauncher.spoon | |
| -- (Mathias Jean Johansen, ISC) — 원본 구조 차용, bundle ID 기반 + 다른 | |
| -- 단축키 종류 통합 형태로 변경. | |
| -- | |
| -- 사용 예 (호스트 init.lua): | |
| -- | |
| -- require("app_launcher"):new({ |
테스팅시
beforeAll(()=>{
await container.clearInstances()
container.register<TypeDB>('DB_CONFIG', {
useFactory: instanceCachingFactory(() => new TypeDB()),
})
})
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AbstractControl, FormArray, FormGroup } from '@angular/forms'; | |
| import { map, toPairs, fromPairs, differenceWith, isEqual, isNull, isUndefined } from 'lodash'; | |
| import { Observable, OperatorFunction, defer, empty, of, merge, pipe } from 'rxjs'; | |
| import { distinctUntilChanged, filter, map, shareReplay, pairwise } from 'rxjs/operators'; | |
| /** | |
| * Convenience RxJS operator that filters out undefined & null and modifies the downstream type | |
| * appropriately. | |
| */ | |
| export function exists<T>(): OperatorFunction<T | undefined | null, T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| DynamoDBClient, | |
| PutItemCommand, | |
| GetItemCommand, | |
| UpdateItemCommand, | |
| DeleteItemCommand, | |
| } from '@aws-sdk/client-dynamodb'; | |
| import { | |
| marshall, | |
| unmarshall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { APIGatewayProxyEventV2, APIGatewayProxyResultV2 } from "aws-lambda"; | |
| import { DynamoDB, PutItemInput } from '@aws-sdk/client-dynamodb' | |
| import { marshall } from '@aws-sdk/util-dynamodb' | |
| import { v4 as uuid } from 'uuid' | |
| interface TodoInput { | |
| id?: string | |
| title: string | |
| done: boolean | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const raw = [ | |
| {a:'a', b:'b', c:'c', max: 10, min: 2 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 2 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 3 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 4 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 5 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 6 }, | |
| {a:'a', b:'b', c:'c', max: 10, min: 7 }, | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const initialData = { | |
| servers: [ | |
| { | |
| url: 'https://1.example.com/', | |
| title: 'Server 1', | |
| online: null, | |
| }, | |
| { | |
| url: 'https://2.example.com/', | |
| title: 'Server 2', |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
NewerOlder