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 { Signal, signal, WritableSignal } from '@angular/core'; | |
| import { IsArrayNullable, IsKnownRecordNullable, IsPrimitiveNullable } from './type-utils'; | |
| export type DeepModel<T> = IsPrimitiveNullable<T> extends true | |
| ? WritableSignal<T> | |
| : IsArrayNullable<T> extends true | |
| ? { [K in keyof T]: DeepModel<T[K]> } & WritableSignal<T> | |
| : IsKnownRecordNullable<T> extends true | |
| ? { [K in keyof T]: DeepModel<T[K]> } & WritableSignal<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
| @Injectable() | |
| export class AwsService { | |
| public async isMainInstance(): Promise<boolean> { | |
| /* | |
| * インスタンスメタデータを取得するための手続き。IMDSv2で実装。 | |
| * https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html | |
| */ | |
| const token = await firstValueFrom( | |
| this.http | |
| .put( |
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 { Component } from '@angular/core'; | |
| import { MenuController } from '@ionic/angular'; | |
| import { NgZone } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-tab1', | |
| templateUrl: 'tab1.page.html', | |
| styleUrls: ['tab1.page.scss'] | |
| }) | |
| export class Tab1Page { |
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 { Component } from '@angular/core'; | |
| import { Plugins, MotionEventResult, MotionOrientationEventResult } from '@capacitor/core'; | |
| @Component({ | |
| selector: 'app-home', | |
| templateUrl: 'home.page.html', | |
| styleUrls: ['home.page.scss'], | |
| }) | |
| export class HomePage { |
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
| alter table tweet drop index geom; | |
| alter table tweet modify geom geometry not null SRID 4326 ; | |
| alter table tweet add spatial index(geom); | |
| UPDATE tweet | |
| SET | |
| geom = CASE | |
| WHEN | |
| area_type = 1 | |
| THEN |
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
| package jp.rdlabo.capacitor.plugin.screenshotevent; | |
| import com.getcapacitor.JSObject; | |
| import com.getcapacitor.NativePlugin; | |
| import com.getcapacitor.Plugin; | |
| import com.getcapacitor.PluginCall; | |
| import com.getcapacitor.PluginMethod; | |
| import com.getcapacitor.util.HostMask; | |
| import android.os.FileObserver; |
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 Foundation | |
| import Capacitor | |
| import AVFoundation | |
| /** | |
| * Please read the Capacitor iOS Plugin Development Guide | |
| * here: https://capacitor.ionicframework.com/docs/plugins/ios | |
| */ | |
| @objc(MlkitPlugin) |
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
| let isAlert = false; | |
| setTimeout(() => { | |
| if (!isAlert) { | |
| // Alertをだしてユーザが選択したらreload | |
| } | |
| }, 2000); <= Timeout時間 | |
| this.afAuth.auth.currentUser.getIdToken(false) | |
| .then() | |
| .finally(() => isAlert = true); | |
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
| @Injectable({ | |
| providedIn: 'root', | |
| }) | |
| export class AuthService { | |
| constructor( | |
| public http: HttpClient, | |
| public storage: Storage, | |
| ) {} | |
| async getState() { |
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
| $ yarn add @ionic/[email protected] @ionic/[email protected] -D | |
| $ yarn add @angular-devkit/[email protected] @angular-devkit/[email protected] @angular-devkit/[email protected] @angular-devkit/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] | |
| (場合によってはここでnode_moduleを削除しないといけないかも) | |
| $ npx ng update @angular/[email protected] @angular/[email protected] |
NewerOlder