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.

繼續閱讀

// 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.

繼續閱讀

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.

繼續閱讀

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: "echo" //在远程服务器执行echo命令 } } } } } def runCommand(cmd) { def remote = [:] remote.

繼續閱讀

保养花费差7倍?特斯拉Model Y蔚来EC6《真十万公里长测》报告 7 Times in Maintenance costs? Tesla Model Y vs NIO EC6 Test https://youtu.be/UrCEOMQPRzk?t=1052 17:32

繼續閱讀

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 <yes@u-can.pro>" #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.

繼續閱讀

【事實釐清】媒體報導「歐盟主要成員國近日同意將核能納入『綠色轉型』,成為解決碳排放的一環;希望各國利用核能,趕在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.

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan