12월, 2021의 게시물 표시

What is Difference between async and async* in Dart?

## What is Difference between async and async* in Dart? async async keyword to a function that does some work that might take a long time. It returns the result wrapped in the Future. Future<int> doSomeLongTask() async { await Future.delayed(const Duration(seconds: 1)); return 42; } You can get that result by awaiting the Future:</int> main() async { int result = await doSomeLongTask(); print(result); // prints '42' after waiting 1 second } async* async* keyword to make a function that returns a bunch of future values one at a time. The results are wrapped in a Stream. Stream<int> countForOneMinute() async* { for (int i = 1; i <= 60; i++) { await Future.delayed(const Duration(seconds: 1)); yield i; } } You can use await to wait for each value emitted by the Stream.</int> main() async { await for (int i in countForOneMinute()) { print(i); // prints 1 to 60, one integer per second } }

How to install NodeJS offline without internet

## prepare python 3 [root@localhost ~]# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz --2021-12-14 15:06:13-- https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz Resolving www.python.org (www.python.org)... 146.75.48.223, 2a04:4e42:7c::223 Connecting to www.python.org (www.python.org)|146.75.48.223|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 23017663 (22M) [application/octet-stream] Saving to: ‘Python-3.7.4.tgz’ 100%[======================================================================================================================================================================>] 23,017,663 104MB/s in 0.2s 2021-12-14 15:06:13 (104 MB/s) - ‘Python-3.7.4.tgz’ saved [23017663/23017663] [root@localhost ~]# tar -xzvf Python-3.7.4.tgz && cd Python-3.7.4 Python-3.7.4/ Python-3.7.4/Doc/ Python-3.7.4/Doc/c-api/ Python-3.7.4/Doc/c-api/sys.rst Python-3.7.4/Doc/c-api/conversion.rst Python-3.7.4/Doc/c-api/marshal.rst Python-3.

install elasticsearch & kibana

## download elasticsearch & kibana [root@superset min]# wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.0-x86_64.rpm --2021-12-13 13:42:14-- https://artifacts.elastic.co/downloads/kibana/kibana-7.16.0-x86_64.rpm Resolving artifacts.elastic.co (artifacts.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to artifacts.elastic.co (artifacts.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 286976720 (274M) [binary/octet-stream] Saving to: ‘kibana-7.16.0-x86_64.rpm’ 26% [================> ] 77,127,104 91.8MB/s ^C [root@superset min]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.0-x86_64.rpm --2021-12-13 13:42:39-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.0-x86_64.rpm Resolving artifacts.elastic.co (artifacts.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to artifacts.elas

This system is not registered with an entitlement server. You can use subscription-manager to register. rhel7.9

## check cdrom  [root@localhost ~]# blkid /dev/mapper/rhel-root: UUID="c8959d98-4669-4520-a9f4-c99120c2219f" TYPE="xfs" /dev/sda2: UUID="dV5G8l-8D8L-9pl2-BQSr-izZh-CAc9-NPt2RP" TYPE="LVM2_member" /dev/sda1: UUID="b4e21b2c-2833-4dd3-aea0-8e9e11f95b4c" TYPE="xfs" /dev/sr0: UUID="2020-09-17-19-35-15-00" LABEL="RHEL-7.9 Server.x86_64" TYPE="iso9660" PTTYPE="dos" /dev/mapper/rhel-swap: UUID="74935535-3548-4e3a-9a78-acdf8d1f8d65" TYPE="swap" /dev/mapper/rhel-home: UUID="44377496-bac4-4af1-8a53-11045bcd7f84" TYPE="xfs"     ## mount cdrom  [root@localhost ~]# mount /dev/sr0 /dvd mount: /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# ## mount cdrom  [root@localhost ~]# mount /dev/sr0 /dvd mount: /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mount

centos 6.x yum update problem making ssl connection

이미지
## yum update [root@localhost ~]# yum update Loaded plugins: fastestmirror Setting up Update Process Loading mirror speeds from cached hostfile https://vault.centos.org/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] problem making ssl connection Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again ## fix repo [root@localhost ~]# cd /etc/yum yum/ yum.conf yum.repos.d/ [root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base update Cleaning up Everything Cleaning up list of fastest mirrors ## fix repo [root@localhost yum.repos.d]# vi CentOS-Base.repo [base] name= CentOS-6 - Base baseurl= http://mirror.nsc.liu.se/centos-store/6.6/os/x86_64/ gpgcheck=0 priority=1 protect=1 [update] name=CentOS-6 - Updates baseurl=https://archive.kernel.org/centos-vault/6.6/updates/x86_64/ gpgcheck=0 priority=1 protect=1

git merge branch

## git checkout master (base) sungmin@sungminyunui-MacBookPro git % git checkout master Already on 'master' Your branch is up to date with 'origin/master'. (base) sungmin@sungminyunui-MacBookPro git % git merge v2 merge: v2 - not something we can merge Did you mean this? origin/v2 ## prepare oracle client (base) sungmin@sungminyunui-MacBookPro git % git merge --squash origin/v2 error: Merging is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. (base) sungmin@sungminyunui-MacBookPro git % git push -f warning: redirecting to http://git.gnoti.com/gnoti/git.git/ Everything up-to-date (base) sungmin@sungminyunui-MacBookPro git % git merge --squash origin/v2 error: Merging is not possible because you have unmerged files. hint: Fix them up in the work t

nodejs connect oracle on ubuntu

## prepare oracle client (base) root@rasa-virtual-machine:~/node# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip --2021-12-06 15:48:54-- https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip download.oracle.com (download.oracle.com)을(를) 해석하는 중... 23.53.224.11 접속 download.oracle.com (download.oracle.com)|23.53.224.11|:443... 접속됨. HTTP 요청을 전송했습니다. 응답을 기다리는 중입니다... 200 OK 길이: 79386308 (76M) [application/zip] 다음 위치에 저장: `instantclient-basic-linuxx64.zip' instantclient-basic-linuxx64.z 100%[====================================================>] 75.71M 96.4MB/s / 0.8s 2021-12-06 15:48:55 (96.4 MB/s) - `instantclient-basic-linuxx64.zip' 저장됨 [79386308/79386308]   ## prepare oracle client 2 (base) root@rasa-virtual-machine:~/node# cd /opt/ (base) root@rasa-virtual-machine:/opt# mkdir oracle (base) root@rasa-virtual-machine:/opt# cd oracle/ ## unzip oracle client (base) root@rasa-vi

'Flutter/Flutter.h' file not found

## prepare  flutter clean rm ios/Podfile.lock pubspec.lock rm -rf ios/Pods ios/Runner.xcworkspace   ## Edit iOS/Podfile (Add Red) post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' end end end   ## Install Pod  (base) sungmin@sungminyunui-MacBookPro bang1126 % flutter pub get Running "flutter pub get" in gabang1126... 6.6s (base) sungmin@sungminyunui-MacBookPro bang1126 % cd ios (base) sungmin@sungminyunui-MacBookPro ios % pod install Analyzing dependencies firebase_analytics: Using Firebase SDK version '6.33.0' defined in 'firebase_core' firebase_auth: Using Firebase SDK version '6.33.0' defined in 'firebase_core' firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core' firebase_messa

Unknown host CPU architecture: arm64 , Android NDK M1 MacOS err

## Prepare  Finder -> Go To Folder(/Users/username/Library/Android/sdk/ndk/21.4.7075529)   ## Edit ndk-build $DIR/build/ndk-build "$@" -> arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"