EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

gorm manytomany many2many use go program


type RoleHasPermissionList struct {
	model.Roles
	Rolehaspermissions []CUS_Rolehaspermissions `json:"rolehaspermissions" gorm:"foreignkey:role_id; references:id"`
}

type CUS_Rolehaspermissions struct {
	PermissionId  int                 `json:"-"`
	RoleId        int                 `json:"-"`
	PermissinInfo model.Permission `gorm:"foreignkey:id; references:permission_id"`
}

func (CUS_Rolehaspermissions) TableName() string {
	return "RoleHasPermissions"
}

type FormaterResult struct {
	model.Roles
	Permission []model.Permission `json:"permission"`
}

func GetRoleList(c *gin.Context) serializer.Response {
	var req GetRoleListRequest
	c.ShouldBind(&req)

	var total int64
	var list []RoleHasPermissionList

	page := req.Page
	pageSize := req.PageSize

	model.DB.
		Scopes(util.Paginate(c, page, pageSize)).
		Preload("Rolehaspermissions.PermissinInfo").
		Find(&list).Offset(-1).Limit(-1).Count(&total)

	// 重新整理輸出格式
	var formater_result []FormaterResult
	for i, v := range list {
		formater_result = append(formater_result, FormaterResult{Roles: v.Roles})

		for _, v2 := range v.Rolehaspermissions {
			formater_result[i].Permission = append(formater_result[i].Permission, v2.PermissinInfo)
		}
	}

	return serializer.Response{
		Code:    0,
		Message: "成功",
		Data:    util.Pagination(c, page, pageSize, total, formater_result),
	}
}


    {
        "id": 1,
        "name": "company",
        "display_name": "公司",
        "guard_name": "admin_api",
        "created_at": "2020-03-26 14:34:25",
        "updated_at": "2020-03-26 14:34:25",
        "permission": [
          {
            "id": 1,
            "name": "add company",
            "display_name": "add company",
            "guard_name": "admin_api",
            "created_at": "2020-03-26 14:34:25",
            "updated_at": "2020-03-26 14:34:25"
          },
          {
            "id": 2,
            "name": "edit company",
            "display_name": "edit company",
            "guard_name": "admin_api",
            "created_at": "2020-03-26 14:34:25",
            "updated_at": "2020-03-26 14:34:25"
          },
        ]
    },
    ...

bytes32[] remix solidity


// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.7.0 <0.9.0;

contract Fix {

    bytes32[] questionList= [
            bytes32(0x52a6eb687cd22e80d3342eac6fcc7f2e19209e8f83eb9b82e81c6f3e6f30743b),
            bytes32(0x257f3de9149acf0a49d3f7668956aeb52490202fae9ec2e92c3caa7d5223c6ef)
        ];

    // constructor() {
    //     // questionList = [
    //     //     bytes32(0x52a6eb687cd22e80d3342eac6fcc7f2e19209e8f83eb9b82e81c6f3e6f30743b),
    //     //     bytes32(0x257f3de9149acf0a49d3f7668956aeb52490202fae9ec2e92c3caa7d5223c6ef)
    //     // ];
    // }

    // function addQuestion(bytes32 questionKey)
    //     public
    //     returns(bool success)
    // {
    //     questionList.push(questionKey);
    //     return true;
    // }

    function getQuestionCount()
        public view
        returns(uint questionCount)
    {
        return questionList.length;
    }

    function getQuestionAtIndex(uint row)
        public view
        returns(bytes32 questionkey)
    {
        return questionList[row];
    }

}

[轉]After 5 years, I'm out of the serverless compute cult

https://dev.to/brentmitchell/after-5-years-im-out-of-the-serverless-compute-cult-3f6d

I have been using serverless computing and storage for nearly five years and I'm finally tired of it. I do feel like it has become a cult. In a cult, brainwashing is done so gradually, people have no idea it is going on. I feel like this has happened across the board with so many developers; many don’t even realize they are clouded. In my case, I took the serverless marketing and hype hook, line, and sinker for the first half of my serverless journey. After working with several companies small and large, I have been continually disappointed as our projects grew. The fact is, serverless technology is amazingly simple to start, but becomes a bear as projects and teams accelerate. A serverless project typically includes a fully serverless stack which can include (using a non-exhaustive list of AWS services):


  1. API Gateway
  2. Cognito
  3. Lambda
  4. DynamoDB
  5. DAX
  6. SQS/SNS/EventBridge

Combining all of these into a serverless project become a huge nightmare for the following reasons.



Testing


All these solutions are proprietary to AWS. Sure, a lambda function is a pretty simple idea; it is simply a function that executes your code. The other services listed above have almost no other easy and testable solutions when integrated together. Serverless Application Model and Localstack have done some amazing work attempting to emulate these services. However, they usually only only cover basic use cases and an engineer ends up spending a chunk of time trying to mock or figure out a way to get their function to test locally. Or, they simply forget it and deploy it. Also, since these functions typically depend on other developer's functions or API Gateway, there tends to be 10 different ways to authorize their function. For example, someone might have an unauthorized API, one may use AWS credentials, another might use Cognito, and yet another uses an API key. All of these factors lead to an engineer having little to no confidence in their ability to test anything locally.


Account Chaos


Since engineers typically don't have a high confidence in their code locally they depend on testing their functions by deploying. This means possibly breaking their own code. As you can imagine, this breaks everyone else deploying and testing any code which relies on the now broken function. While there are a few solutions to this scenario, all are usually quite complex (i.e. using an AWS account per developer) and still cannot be tested locally with much confidence. Chaos engineering has a time and a place. This is not it.


Security


With all the possible permutations of deployments and account structures, security becomes a big problem. Good IAM practices are hard. Many engineers simply put a dynamodb:* for all resources in the account for a lambda function. (BTW this is not good). It becomes hard to manage all of these because developers can usually quite easily deploy and manage their own IAM roles and policies. And since it is hard to test locally, trying to fix serverless IAM issues requires deploying to AWS and testing (or breaking) in the environment.


Bad (Cult-like) Practices


No Fundamental Enforcement


Without help from frameworks, DRY (Don't Repeat Yourself), KISS (Keep It Simple Stupid) and other essential programming paradigms are simply ignored. In a perfect world, a team would reject PR's that do not abide by these basic principles. However, with the huge push for the cloud over the past several years, many junior developers have had the freedom to do what they want in the serverless space because of its ease of use; resulting in developers enmasse adopting something that doesn’t increase the health of the developer ecosystem as a whole. AWS gives you a knife by providing such an easy way to deploy code on the internet. Please don't hurt yourself with it.


Copy and Paste Culture


Most teams end up copying code to the new microservices and proliferating it across many services. I have seen teams with hundreds and even thousands of functions with nearly every function being different. This culture has gotten out of hand and now teams are stuck with these functions. Another symptom of this is not taking the time to provide a proper DNS.

DNS Migration Failures

Developers take the generic API Gateway generated DNS name (abcd1234.amazonaws.com) and litter their code with it. There will come a time when the teams want to put a real DNS in front of it and now you're faced with locating the 200 different spots it was used to change it. And, it's not as easy as a Find/Replace. Searching like this can become a problem when you have a mix of hard-coded strings, parameterized/concatenated strings, and environment variables everywhere that DNS name lies. Oh and telemetry? Yeah that's nowhere to be found.


Microservice Hell


This isn't a post about microservices. However, as teams and developers can decide and add whatever they want into their YAML files for deployment, you end up with hundreds of dependent services and hundreds of repositories. Many have different approaches and/or have different CI/CD workflows. Also, I've found that repository structures begin widely diverging. Any perceived cost savings has now been moved to managing all of these deployments and repositories. Here are a few examples of how developers choose to break up their serverless functions by Git repositories:

  1. Use a monolith for all their API's.
  2. Separate each API Gateway or queue processors
  3. Separate "domain" (i.e. /customers or /invoices)
  4. Separate by endpoint (I have seen developers break out a repository for POST:/customers while maintaining a separate one for GET:/customers/:id and so on…).

Many times, developers switch between different styles and structures daily. This becomes a nightmare not only for day-to-day development, but also for any developer getting to a quick-understanding of how the code deploys and what dependencies it has or impacts.


API Responses


The serverless cult has been active long enough now that many newer engineers entering the field don't seem to even know about the basics of HTTP responses. Now there are many veteran developers lacking this knowledge. While this is not strictly a serverless problem, I never have experienced this much abuse outside of serverless. I've seen endpoints returning 200, 400, 500 like normal. Yet another set of endpoints return all 2xx responses, with a payload like:

{
  "status": "ERROR",
  "reason": "malformed input"
}

Then, another set of endpoints implement inconsistent response patterns dependent on some permutation of query parameters. For example:
Query 1:
/customers?firstName=John

[{
  "accountId": "1234",
  "firstName": "John",
  "lastName": "Newman"
}]

Query 2:
/customers?lastName=Newman

{
  "accountId": "1234",
  "firstName": "John",
  "lastName": "Newman"
}

Inventing New Problems

As mentioned previously, initially deploying these types of services are easy. The reality is there are new problems with these kind of serverless structures that don't typically occur in server-backed services:

  1. Cold starts - many engineers don't care too much about this. But they suddenly start caring when Function A calls Function B which calls Function C and so on. Without some voodoo warm-up scripting solution, paying for provisioned concurrency, or ignoring it, you may be out of luck.
  2. In the past five years, prior to our work on our flooring installation marketplace, the teams I have been a part of have always chased the latest features because we had been doing workarounds like FIFO queues, state machines, provisioned concurrency, etc. As teams chase the latest features released by AWS (or your cloud provider of choice), things then become even harder to test and maintain since SAM or Localstack don't match these features for some time.
  3. Some awful custom eventing solution because… serverless. Engineers think simply putting an API Gateway in front of EventBridge will solve all their eventing problems. What about retries? What about duplicate events? What about replaying events? Schema enforcement? Where does the data land? How do I get the data? These are all questions that have to be answered or documented in a custom fashion. Ok, EventBridge supports a few of these things in some form but it does leave engineers chasing the latest features, waiting for these to become available. However, outside of the serverless cult, these issues can be solved with Kafka, NATS, or other technologies. Use the right tool.
  4. When it’s not okay to talk about the advantages and disadvantages of serverless with other engineers without fear of reprisal, it might be a cult. Many of these engineers say Lambda is the only way to deploy anymore. There isn't much thought to offline solutions when things need to be run onsite or separated from the cloud. For some companies this can be a fine approach. However, many medium to large organizations have (potentially) offline computing needs outside of the cloud. Lambda cannot provide a sensitive, remote pressure device real-time updates in the event of an internet outage in the middle of Canada during winter.

So, how do I get out of the cult?


In this article, I didn’t plan to address the many options you have to extricate yourself from the grips of mindless serverless abuse. If you're interested, please leave a comment and I will write a follow-up on the different solutions and alternatives to serverless I’ve found as well as some tips to incrementally shift back to a normal life. What I did want to do here was to express the pains I have experienced with serverless technologies over the past couple years now that I have helped architect more traditional VM and container-based tech stacks. I felt compelled to ensure individuals, teams, and organizations know what serverless can really mean for long-term sustainability in an environment.


What does serverless do well?


Deployment and scaling. That's really it for most organizations. For a lot of these organizations, it's hard to find the time, people, and money to figure out how to automatically provision new VM's, get access to a K8S cluster, etc. My challenge to you is to first fix your deployment and scaling problems internally before thinking about serverless compute.



Conclusion

Serverless is one of the hottest new cloud trends. However, I have found it leads to more harm than good in the long run. While I understand some of the problems listed above are not unique to serverless, they are much more prolific; leading engineers to spend most of their time with YAML configuration or troubleshooting function execution rather than crafting business logic. What I find odd is the lack of complaints from the community. If I’m alone in my assessment, I’d love to hear from you in the comments below. I’ve spent a significant amount of time over the last few years working to undo my own serverless mistakes as well as those made by other developers. Maybe I’m the one who has been brainwashed? Time will tell.

jenkins withCredentials sshUserPrivateKey

https://codeleading.com/article/11015806881/

Remeber sshCommand remote, remote infos have identityFile
identityFile need be at insdie identity

Don't understand identity be keep. Only can be used inside identity

def getRemoteHost(ip, user) {
    def remote = [:]
    remote.name = ip
    remote.host = ip
    remote.user = user
    remote.identityFile = identity
    remote.port = 22
    remote.allowAnyHosts = true

    return remote
}

pipeline {
    agent any

    environment {
        ssh_ip = 'ooo.xxx.ooo.xxx'
        ssh_user = 'ubuntu'
        ssh_jenkins_key_uid = 'oooooooo-xxxx-xxxx-xxxx-oooooooooooo'
        
        // SSH_CREDS = credentials('oooooooo-xxxx-xxxx-xxxx-oooooooooooo')
    }
    
    stages {
        stage('ssh Command'){
            steps {
                withCredentials([sshUserPrivateKey(credentialsId: "${ssh_jenkins_key_uid}", keyFileVariable: 'identity')]) {
                    sshCommand remote: getRemoteHost(ssh_ip, ssh_user), command: "whoami"  //在远程服务器执行echo命令
                }
                
            }
        }
        
        
    }
}

def runCommand(cmd) {
    def remote = [:]
    remote.name = "${ssh_ip}"
    remote.host = "${ssh_ip}"
    remote.user = "${ssh_user}"
    // remote.identityFile = identity
    remote.port = 22
    remote.allowAnyHosts = true
    
    withCredentials([sshUserPrivateKey(
        credentialsId: "${ssh_jenkins_key_uid}", 
        keyFileVariable: 'identity')]) 
    {
        remote.identityFile = identity
        sshCommand remote: remote, command: cmd
    }
}

pipeline {
    agent any

    environment {
        ssh_ip = 'ooo.xxx.ooo.xxx'
        ssh_user = 'ubuntu'
        ssh_jenkins_key_uid = 'oooooooo-xxxx-xxxx-xxxx-oooooooooooo'
        
        // SSH_CREDS = credentials('oooooooo-xxxx-xxxx-xxxx-oooooooooooo')
    }
    
    stages {
        stage('ssh Command') {
            steps {
                echo 'whoami start...'
                runCommand('whoami') 
                echo 'whoami success'
    		}
        }
    }
}

model y 車機掛幾次

保养花费差7倍?特斯拉Model Y蔚来EC6《真十万公里长测》报告 7 Times in Maintenance costs? Tesla Model Y vs NIO EC6 Test

https://youtu.be/UrCEOMQPRzk?t=1052

17:32

laravel schedule cron docker dockerfile docker-compose

cron

php laravel UI Boostrap jetstream docker-compose

laravel_docker

dokcer-compose.yml

  cron:
    build: ./infra/docker/cron
    env_file: ./env.mariadb.local.env
    stop_signal: SIGTERM
    depends_on:
      - app
    volumes:
      - ./backend:/work/backend
Dockerfile

FROM php:8.0.11-fpm-buster
LABEL maintainer="ucan-lab "
#SHELL ["/bin/bash", "-oeux", "pipefail", "-c"]

# timezone environment
ENV TZ=Asia/Taipei \
  # locale
  LANG=en_US.UTF-8 \
  LANGUAGE=en_US:UTF-8 \
  LC_ALL=en_US.UTF-8 \
  # Laravel environment
  APP_SERVICES_CACHE=/tmp/cache/services.php \
  APP_PACKAGES_CACHE=/tmp/cache/packages.php \
  APP_CONFIG_CACHE=/tmp/cache/config.php \
  APP_ROUTES_CACHE=/tmp/cache/routes.php \
  APP_EVENTS_CACHE=/tmp/cache/events.php \
  VIEW_COMPILED_PATH=/tmp/cache/views \
  # SESSION_DRIVER=cookie \
  LOG_CHANNEL=stderr \
  DB_CONNECTION=mysql \
  DB_PORT=3306 

RUN apt-get update
RUN apt-get -y install locales libicu-dev libzip-dev htop cron nano
RUN apt-get -y install default-mysql-client

RUN locale-gen en_US.UTF-8 && localedef -f UTF-8 -i en_US en_US.UTF-8
RUN docker-php-ext-install intl pdo_mysql zip bcmath exif

RUN apt-get clean && rm -rf /var/lib/apt/lists/* 

# 自訂
RUN mkdir -p /tmp/cache
WORKDIR /work/backend


# 這行超級重要 把初始環境的變數寫死
RUN printenv > /etc/environment

# 把log 輸出到 docker 上
RUN ln -sf /proc/1/fd/1 /var/log/laravel-scheduler.log


#ADD crontab /var/spool/cron/crontabs/root
#RUN chown root:crontab /var/spool/cron/crontabs/root
#RUN chmod 0600 /var/spool/cron/crontabs/root

#RUN crontab -l | { cat; echo "* * * * * . /usr/local/bin/php /work/backend/artisan config:cache && php artisan schedule:run >> /var/log/cron.log 2>&1"; } | crontab -
#RUN crontab -l | { cat; echo "* * * * * date >> /var/log/cron.log"; } | crontab -
#RUN crontab -l | { cat; echo "* * * * * echo hello > /proc/1/fd/1 2>/proc/1/fd/2"; } | crontab -


COPY crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
RUN crontab /etc/cron.d/crontab

CMD bash -c "/usr/local/bin/php /work/backend/artisan config:cache && cron -f"
cron

# 這行可有可無 主要是 dockerfile printenv 那行最重要 #!/usr/bin/env bash
# 這行可有可無 SHELL=/bin/bash
PATH=/usr/bin:/usr/local/bin:$PATH
* * * * * cd /work/backend && php artisan schedule:run >> /var/log/cron.log 2>&1
#* * * * * cd /work/backend && php artisan schedule:run >> /var/log/cron.log 2>&1 && echo schedule > /proc/1/fd/1 2>/proc/1/fd/2
#* * * * * date >> /var/log/cron.log
#* * * * * echo hello > /proc/1/fd/1 2>/proc/1/fd/2
#要多一行
app/Console/Kernel.php

protected function schedule(Schedule $schedule)
    {
        // $schedule->command('inspire')->hourly();

        $fileCronLog = '/var/log/laravel-scheduler.log';  // dockerfile RUN ln -sf /proc/1/fd/1 /var/log/laravel-scheduler.log

        // cron('* * 26 * *')
        $schedule->command('your command')->timezone(config('app.timezone'))->everyMinute()->onOneServer()  
            ->before(function () {
                Log::info("Schedule your command before!");
            })
            ->after(function () {
                Log::info("Schedule your command after!");
            })
            ->onSuccess(function (Stringable $output) {
                Log::info("Schedule your command onSuccess!");
            })
            ->onFailure(function (Stringable $output) {
                Log::error("Schedule your command onFailure!");
            })
            ->appendOutputTo($fileCronLog);

【事實釐清】媒體報導「歐盟主要成員國近日同意將核能納入『綠色轉型』,成為解決碳排放的一環;希望各國利用核能,趕在2050年前實現碳中和」?

【事實釐清】媒體報導「歐盟主要成員國近日同意將核能納入『綠色轉型』,成為解決碳排放的一環;希望各國利用核能,趕在2050年前實現碳中和」?

https://tfc-taiwan.org.tw/articles/2192 

黃其君


✔正常查核程序:
優先翻閱一手資料,若不懂則請教專家
✖ TFC 台灣事實查核中心:
請教(有偏見)專家,也無對專家言論做查對

然後第一個說核能列入歐盟綠色轉型的不是台灣報導也不是哪個擁核媒體平台,是世界最大的媒體通訊社,美聯社以《EU leaders include nuclear energy in green transition》為標題報導歐盟高峰會結論,然後有紐約時報、日本時報等轉載刊登,到台灣因為翻譯就變成歐盟將核能納入綠色轉型。不懂台灣反核怎麼一直說別人世界最大平台假消息呢?

▉美聯社
https://reurl.cc/5gmyV6

范建德老師以2020/01/10的法案文字來認定歐盟要非核,但1/10有好多版本討論,法案文字都不是最終版,反核的還是綠黨提的...裏頭還要求2030歐盟要非核無煤阿...所以最後全部被刪光光也不意外。

▉法案文字
2020/01/15(無反核定案版)
https://reurl.cc/RdNl3Z
2020/01/10(無反核草案)
https://reurl.cc/4gx79v
2020/01/10(反核草案)
https://reurl.cc/Gk1R2v

而台大風險中心趙研究員真的讓你看看什麼叫超譯...

歐盟的技術文件裡提到核能在低碳能源中的重要腳色顯而易見,但確實在風險管理例如核廢料上難以將do no harm排除,很重要的一點,他有表明是因為現階段尚無啟用的核發電燃料的深層處置設施,所以無實例可以做評估。該報告也會在近一步針對核能做詳細討論。

並非像趙研究員說的什麼沒有解方或要隔絕數百萬年...可以不要自己腦補嗎?明明裏投也跟你說有解法了...

▉報告這邊看
https://reurl.cc/9zlYz8

Regarding the long-term management of High-Level Waste (HLW), there is an international consensus that a safe, long-term technical solution is needed to solve the present unsustainable situation. A combination of temporary storage plus permanent disposal in geological formation is the most promising, with some countries are leading the way in implementing those solutions. Yet nowhere in the world has a viable, safe and long-term underground repository been established. It was therefore infeasible for the TEG to undertake a robust DNSH assessment as no permanent, operational disposal site for HLW exists yet from which long-term empirical, in-situ data and evidence to inform such an evaluation for nuclear energy.

Given these limitations, it was not possible for TEG, nor its members, to conclude that the nuclear energy value chain does not cause significant harm to other environmental objectives on the time scales in question. The TEG has not therefore recommended the inclusion of nuclear energy in the Taxonomy at this stage. Further, the TEG recommends that more extensive technical work is undertaken on the DNSH aspects of nuclear energy in future and by a group with in-depth technical expertise on nuclear life cycle technologies and the existing and potential environmental impacts across all objectives.

https://hugo-m9c19ra1o-sueboy.vercel.app/

[轉]PHP 8.2 Remove libmysql mysqli

https://m.facebook.com/story.php?story_fbid=10216824504164331&id=1815507975

《 PHP RFC: Remove support for libmysql from mysqli 》

» https://wiki.php.net/rfc/mysqli_support_for_libmysql

PHP 核心開發團隊投票通過移除 mysqli 的 libmysql 支援,將於 PHP 8.2 正式生效。這項討論從農曆年前關注到年後,最終於 2022/2/5 全數投票通過。

對於一般 PHP 開發者是好事,不用再考慮 MySQL 是選擇 libmysql 還是 mysqlnd;面試時也減少面試官詢問兩者差異的比較 (不過現在很多面試官也不知道了)。

如果想瞭解 libmysql / mysqlnd 的優缺點,官方 RFC 也貼心地條列整理了。不過 RFC 裡沒提關於「License (授權)」的考量,特別在商業上。這也是 PHP 與 Python 及 Ruby 等社群有著不太一樣的生態考量。

Python 要連結 MySQL,通常選用 MySQL Connector 或 MySQLdb,但這兩者底層都依賴 libmysqlclient (MySQL C Library),而 libmysqlclient 的授權 [1] 主要採用 GPL-2.0,進而連帶影響了整體產品/專案的授權。

Ruby 要連結 MySQL,通常選用 mysql2,而其底層同樣依賴 libmysqlclient,有著同樣的潛在商業問題。

更重要的是 libmysqlclient 背後的公司是 Oracle。

但為什麼 PHP mysqlnd 沒有此問題?因為 mysqlnd 不依賴 libmysqlclient 而採用純 PHP extension 開發,授權採用 PHP License,在商業上避免了許多不必要的麻煩。

Python 其實也有不依賴 libmysqlclient 的 PyMySQL [2],Ruby 則有 mysql-rb [3],但效能大多不如 libmysqlclient 的實現。不像 PHP mysqlnd 在效能上大多勝於或接近 libmysql。

當然,Python 或 Ruby 若要不犧牲效能繼續採用 MySQLdb 或 mysql2,也是有替代方案的。

[1] https://dev.mysql.com/downloads/c-api/

[2] https://github.com/PyMySQL/PyMySQL

[3] https://github.com/kirs/mysql-rb

==========

https://hugo-kuh8tm78y-sueboy.vercel.app/

vendure GraphQL Login

https://demo.vendure.io/shop-api

union ..........

Need use ... on


mutation {
  authenticate(
    input: {
      native: { username: "test@vendure.io", password: "test" }
    }
    rememberMe: true
  ) {
    ... on CurrentUser {
      id
      identifier
      channels {
        id
        token
        code
        permissions 
      }
    }
    ... on InvalidCredentialsError {
      message
    }
  }
}

aws ecr new account docker push policy

1. IAM User -> New User -> Demo_ECR

Add Permissions policies 新增許可

a. 直接連接現有政策 AmazonEC2ContainerRegistryPowerUser

b. 建立policies -> Demo_ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/security-iam-awsmanpol.html

2. install aws cli tools windows

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html

3. aws ecr repositories -> private -> create repository

input demo

Keep ooxxooxxooxxooxx.dkr.ecr.ap-northeast-1.amazonaws.com/demo

save

4. aws cli login powershell windows

aws configure

go back IAM, show Demo_ECR -> 安全登入資料 security login

run 建立存取金鑰 create Access Key

copy new Access Key ID and AWS Secret Access Key

back aws configure. Input Access Key ID, Secret Access Key, ap-northeast-1 and Enter

5. docker login

aws ecr get-login-password --region ap-northeast-1

copy return Text like: eyJwYXlsb2FkIjoieE9hcWgzYmdPOXpN...............

6. docker image craete

First check your docker image: docker image ls

REPOSITORY = Image Name.

Tag is import.

Example "demo" is my image that want to send to aws repository.

docker tag "your image name":"your image" tag "aws repository URI"

docker tag demo:latest ooxxooxxooxxooxx.dkr.ecr.ap-northeast-1.amazonaws.com/demo

check "docker image ls" again

Now you can see new repository: ooxxooxxooxxooxx.dkr.ecr.ap-northeast-1.amazonaws.com/demo

7. docker image push

docker push ooxxooxxooxxooxx.dkr.ecr.ap-northeast-1.amazonaws.com/demo

Finish.

ERROR

Q: error parsing HTTP 403 response body: unexpected end of JSON input: ""

A: When you step 3. Image scan settings:get error If you check true. You can change false then push success.

A. other way.

https://github.com/aws/aws-toolkit-azure-devops/issues/311

https://stackoverflow.com/questions/34423873/docker-push-to-aws-ecr-private-repo-failing-with-malformed-json

go back step 1. change policy.

livewire checkbox

php

public $check_items;

public function mount()
{
   $this->check_items = collect(["png" => true, "scs" => true, "scz" => false, "xml" => true, "pdf" => false, ]);
}

blade

@forelse($check_items as $index => $item)
  
@empty
@endforelse

Expected response code 250 but got an empty response laravel 8

https://blog.trippyboy.com/2021/laravel/laravel-expected-response-code-250-but-got-an-empty-response/


./config/mail.php

'local_domain' => env('MAIL_HOST'),


'default' => env('MAIL_MAILER', 'smtp'),
'mailers' => [
    'smtp' => [
        'transport' => 'smtp',
        'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
        'port' => env('MAIL_PORT', 587),
        'encryption' => env('MAIL_ENCRYPTION', 'tls'),
        'username' => env('MAIL_USERNAME'),
        'password' => env('MAIL_PASSWORD'),
        'timeout' => null,
        'auth_mode' => null,
        'local_domain' => env('MAIL_HOST'),
],

laravel rules validate multiple row for other column

Multiple parts (id, name, finish, finish_noe)

finish = 2 is Job OK


protected $rules = [
    'parts.*.finish_note' => ['required_if:parts.*.finish,2'],
]

firebase deploy use rastasheep/ubuntu-sshd


docker run -d -P -p 9005:9005 -p 2222:22 -v C:\Users\user\Downloads\ooxxooxx\public_html:/project --name test_sshd rastasheep/ubuntu-sshd:18.04 

> apt update
> apt install curl
> curl -sL https://deb.nodesource.com/setup_16.x | bash -
> apt-get install -y nodejs

> npm install -g firebase-tools
> cd /project
> firebase login
> firebase deploy

程式設計師是如何神不知鬼不覺的弄丟銀行1分錢的?

https://kknews.cc/zh-tw/finance/zpxln2q.html

[開發經驗分享][JavaScript]浮點數運算出現一堆小數位數

https://dotblogs.com.tw/WillianHsiaoDotNetBLog/2020/01/15/JavascriptFloatCaculateBug?fbclid=IwAR0SnYG7FnesbfENWCsOT_ceGxqab6Q1dksJ3qIr-pe65m55wNBlWLc0Ns0

精確的浮點數運算 ?

https://medium.com/pyladies-taiwan/%E7%B2%BE%E7%A2%BA%E7%9A%84%E6%B5%AE%E9%BB%9E%E6%95%B8%E9%81%8B%E7%AE%97-28d34e652e51

疫苗

【開放CALLIN】🐶高端「真的」超級安全!?世界最大三期人體試驗場?論實證醫學重要性! ft. 台灣白色巨砲鄭醫師|歷史哥Talk 110.8.27

35分開始

文件有等級表 1最高,5最低,5:是專家學者意見




July 21, 2021

https://www.nejm.org/doi/full/10.1056/NEJMoa2108891?query=featured_coronavirus

Table 2




AZ疫苗致死風險就是比較高!簡單的邏輯教您科學思考!|歷史哥短篇




50分




林全 東洋 16:40

https://youtu.be/STBO88yaRI8?t=1000






兴疫苗如何?有效性与安全性不如辉瑞,阿斯利康,强生的疫苗? 于博士在德国




COVID-19疫苗統計資料

https://www.cdc.gov.tw/Category/Page/9jFXNbCe-sFK9EImRRi2Og




迷思?!

英 登記打疫苗,官方的

https://www.nhs.uk/conditions/coronavirus-covid-19/coronavirus-vaccination/book-coronavirus-vaccination/

If you're under 40, you'll only be shown appointments for the Pfizer/BioNTech or Moderna vaccines. If you're 40 or over, you'll be asked if you're pregnant to make sure you're only shown appointments for these vaccines.




澳洲

https://www.health.gov.au/initiatives-and-programs/covid-19-vaccines/learn-about-covid-19-vaccines/about-the-astrazeneca-covid-19-vaccine The Australian Technical Advisory Group on Immunisation (ATAGI) recommends the COVID-19 vaccine by Pfizer (Comirnaty) is preferred in adults aged under 60 years. In people 60 years and over, ATAGI continue to advise that the benefits of vaccination with the AstraZeneca vaccine outweigh the risks associated with vaccination. This recommendation is based on:

the increasing risk of severe outcomes from COVID-19 in older adults (and hence a higher benefit from vaccination), and the increased risk of thrombosis with thrombocytopenia following AstraZeneca vaccine in those under 60 years. There appears to be a small risk of TTS in people 60 years and over, but this risk appears to be lower than in younger people. Cases overseas have been reported at all ages.

1) 輝瑞/BNT一劑:52%。

2) 莫德納一劑:69.5%。

3) #AZ一劑: 76%!!




https://youtu.be/S2QChiAocmc?t=41 40 秒

鄭運鵬:拿第二期、第三期試驗當作疫苗的條件,這是沒有必要的,只要有緊急授權就好。


https://youtu.be/BvH46GLx7xg?t=3494

完全不推國產疫苗


Fosun Pharma will commercialize the COVID-19 vaccine in Greater China upon regulatory approval, including mainland China, Hong Kong, Macau and Taiwan.

https://biontech.de/covid-19




柯P怨疫苗預約系統來不及做好 唐鳳聲明回擊

https://tw.news.yahoo.com/%E6%9F%AFp%E6%80%A8%E7%96%AB%E8%8B%97%E9%A0%90%E7%B4%84%E7%B3%BB%E7%B5%B1%E4%BE%86%E4%B8%8D%E5%8F%8A%E5%81%9A%E5%A5%BD-%E5%94%90%E9%B3%B3%E8%81%B2%E6%98%8E%E5%9B%9E%E6%93%8A-002907650.html

回覆台北市的內容意旨僅有,「這批日本124萬劑AZ疫苗,不會使用疫苗預約系統」等語,與柯文哲所謂「疫苗預約系統來不及做好」的說法不符


不認同二期解盲就使用 中研院研究技師:應加入英國株病毒數據

https://udn.com/news/story/122190/5525521

中研院研究技師詹家琮說明,高端疫苗臨床二期解盲會過是合理的,但這是使用原始病毒株的數據,就二期來說也是OK的,但不適合直接通過食藥署EUA給人使用;如果不做三期臨床試驗,二期解盲的血清中和效力試驗一定要加上變異病毒株的實驗數據。

詹家琮解釋,三期臨床試驗要檢驗的是,疫苗接種者在他們生活的環境中,感染病毒的機率與病理表現,也就是當時當地人們正遭遇的病毒,感染後是否有保護力;因此,若要以二期試驗取代三期臨床試驗,應當以疫苗接種者之後會遭遇到的病毒來做試驗,否則數據就會失真而不可信。

詹家琮表示,若國產疫苗企圖以增加二期臨床試驗人數達到數千人,來彌補或是取代三期臨床試驗,是不得已接受的現實,但只要沒有做英國或印度的變異病毒株的實驗數據,就緊急給國人使用,他絕對無法認同。





兩樣情!香港BNT疫苗打不完 趙少康呼籲開放台人接種

https://www.bcc.com.tw/newsView.6307210

香港政府預訂了750萬劑輝瑞BNT(港稱復必泰疫苗),根據港府5月25日的說明,輝瑞BNT已到貨200多萬劑,至今庫存約84萬劑,使用期限在8月中屆滿。





陳弘美老師表示:

不要拿中文的思維來想日文 。不能單取一個單字、要看前面的整個文脈 引導的順向。

並且日文不 一定要用像中、英文 般的明顯字眼、"只" 不一定要用のみ、だけ 表達、有太多太多表達的方法、就看前面文脈的 整個趨向。

同學們來學習一下。

要注意到、 這裡是前面有很長的、 雄厚的理論在説明台灣將有 非常充分的量、甚至到2000萬劑、 相較下100萬劑是非常少量、 所以用"只"是完全合乎文脈 的邏輯。

https://youtu.be/iotqkCOd1cE?t=6060






越南苦于疫苗到货率低,洽谈代工俄罗斯疫苗

https://baijiahao.baidu.com/s?id=1702095458974636136

1. 找更多來源:俄羅期,批准中国国药集团(Sinopharm)疫苗

2. 代工生產 洽谈代工生产俄国疫苗,促进磋商传讯核糖核酸(mRNA)技术转移

3. 越南一方面也自己研发疫苗,越南国产的COVID-19 疫苗Nanocovax从8日开始第三期人体临床试验,希望明年能够供货

4. 6月初鼓励所有地方、企业和单位参与寻找疫苗货源,并列出36家符合进口疫苗资格的企业




【BOSS工作室 中天#LIVE】黃義霖批疫苗政策根本有問題 6/28也無法解封三級 來聽黃義霖醫師解析 @中天新聞 20210609

https://youtu.be/NXwPjlEUO2o?t=251




據我們的認知,七月以後,台灣國內的疫苗生產機制就會逐漸完備,而眼前台灣有緊急的需求。

蔡英文:預計在7月底可以供應第一波的國產疫苗 6分46秒

0513總統府記者會 蔡英文發表談話

https://youtu.be/09OKKtsfbPo?t=405




到底是誰說了台灣只需要一百萬劑疫苗?震怒的蘇貞昌請千萬不要罰日本自民黨參議員佐藤正久三百萬! 1分06秒

https://youtu.be/EdhoEFbghGI?t=66

而台灣製的疫苗也從七月份起兩家公司準備一次1000萬劑




1100317社會福利及衛生環境委員會-「我國新冠肺炎(COVID-19)+疫苗整備情形+」書面報告.pdf

https://www.mohw.gov.tw/dl-67845-a6b3cffc-8fb0-4bf7-ab1b-fc32052f3ea5.html




======

【宅卡啦影片】民進黨如何讓台灣防疫,一步一步走向如此崩潰與失敗的境地!看看他們做了什麼蠢事!

https://www.youtube.com/watch?v=EDMuZIM9yPQ




兩岸觀策/自由民主掛嘴邊 責任政治甩一邊

https://udn.com/news/story/7331/5478399

最近與台灣同步發生疫情的安徽六安、遼寧營口,三月底的雲南瑞麗及自去年以來多地爆發的疫情,每一地的衛生健康委官員、醫療院所到上級的市長、書記,他們轄內一旦發生群聚性疫情,就被記警告、免職、撤職,下台官員多到不知凡幾。