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 { Module } from '@nestjs/common'; | |
| import { AppController } from './app.controller'; | |
| import { AppService } from './app.service'; | |
| import { GraphQLModule } from '@nestjs/graphql'; | |
| import { UserModule } from './user/user.module'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { join } from 'path'; | |
| @Module({ | |
| imports: [ |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions | |
| // - XState (all XState exports) |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions | |
| // - XState (all XState exports) |
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 React, {createContext, useEffect, useContext} from 'react'; | |
| import Realm from 'realm'; | |
| const HomeServiceSchema = { | |
| name: 'HomeService', | |
| properties: { | |
| channel_url: 'string', | |
| channel_image: 'string', | |
| channel_type: 'string', | |
| channel_name: 'string', |
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
| #!/bin/bash | |
| echo "Switch version by Chnirt"; | |
| # * node v16.14.2 | |
| # * ruby 3.1.2 | |
| # * cocoapod 1.11.3 | |
| node_version_default=16.14.2 | |
| ruby_version_default=3.1.2 |
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
| echo "Encrypt & Decrypt with PGP by Chnirt" | |
| # install gpg | |
| # https://gpgtools.org/ | |
| # gpg --full-generate-key | |
| choice="Encrypt Decrypt Exist" | |
| select option in $choice | |
| do | |
| echo "$option" |
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 numeral from 'numeral'; | |
| export const formatCurrency = (number, symbol = '$') => { | |
| const formatScientificNotationNumber = Number(number).toFixed(8); // format for case number = 9.322320693172514e-12 | |
| if (formatScientificNotationNumber.includes('e+')) { | |
| var formatter = new Intl.NumberFormat('en-AU', { | |
| style: 'currency', | |
| currency: 'AUD', | |
| minimumFractionDigits: 0, |
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
| // You are trying to figure out how many binary numbers there are that have N digits and k 1s, and are multiples of 3. Binary numbers that have N digits also include ones that start with 0. | |
| // Suppose that N = 3 and K = 2. Binary numbers with three digits in this case include the following: 000, 001, 010, 011, 100, 101, 110, and 111--8 binary numbers in total. Among these numbers, the ones that have two 1s are 011, 101, and 110. Among these three numbers, two--011 and 110--are multiples of 3. | |
| // Suppose parameters N and K are given, where N represents the number of digits of the given binary number(s) and K the number of 1s in these binary numbers. Please write a function solution that returns the number of binary numbers that have N digits and k 1s and are multiples of 3 | |
| // Constraints | |
| // N is a natural number between 1 and 50. | |
| // K is a natural number between 1 and N. | |
| // Examples |
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
| // There are strings that are made of brackets—[,], braces—{,}, and parentheses—(,). A string is regarded as a valid string of brackets when it meets the following conditions: | |
| // In brackets, there can be brackets, braces, and parentheses. | |
| // In braces, there can only be braces and parentheses. | |
| // 2-1. "{[]()}" is invalid, because brackets are in braces. | |
| // In parentheses, there can only be other parentheses. | |
| // 3-1. "({()})" is invalid, because braces are in parentheses. | |
| // All open brackets, braces, and parentheses must be closed by the corresponding number of brackets, braces, and parentheses. |