投稿時間:2023-02-06 04:17:52 RSSフィード2023-02-06 04:00 分まとめ(20件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita ブロックチェーンを実装してみる(入門編) https://qiita.com/BAMV/items/e76eafa83f5188c5422f 部分 2023-02-06 03:11:28
海外TECH MakeUseOf Does Your GPU Usage Spike to 100 Percent on Windows? How to Fix It https://www.makeuseof.com/gpu-usage-spikes-100-percent-windows/ windows 2023-02-05 18:16:16
海外TECH DEV Community Configure Touch ID for sudo access in Terminal.app without prompting for a password to authenticate. https://dev.to/xakrume/configure-touch-id-for-sudo-access-in-terminalapp-without-prompting-for-a-password-to-authenticate-4ijd Configure Touch ID for sudo access in Terminal app without prompting for a password to authenticate Devices listed below have fingerprint scanner Touch ID to simplify login process but this is not exposed in Terminal app So each time you run commands with elevated privileges you need to type in your password Compatibility list MacBook Air Retina MacBook Air M MacBook Pro Four Thunderbolt ports MacBook Pro MacBook Pro MacBook Pro M MacBook Pro M Magic Keyboard with Touch ID May Magic Keyboard with Touch ID and Numeric Keypad May Magic Keyboard s Touch ID functionality is compatible with the following MacBook iMac models MacBook Air M MacBook Pro M MacBook Pro MacBook Pro iMac M Mac mini M Please note that the keyboard will still pair and function with devices older than those listed but that Touch ID functionality will not be enabled Setup PAM module to use Touch ID To allow Touch ID on your Mac to authenticate you for sudo access instead of a password prompt you need to do the following simple changes Open Spotlight Type terminal in Spotlight input field and open it Open Terminal Switch to the root user Switch to the root user by typing the command sudo su and enter the password sudo su Open the  etc pam d sudo file with you favorite editor such as vim or nano nano etc pam d sudo The contents of this file should look like one of the following example Add the following line to the top of the file auth sufficient pam tid soThe modified contents of  etc pam d sudo file should look like following example Save the file for nano press the specified combination with sign “ of keys simultaneously CTRL o CTRL xfor vim lt ESC gt wq Allow the system to save the changes Press OK button Also note that pam smartcard so may not be present on older MacOS versions Tested with macOS Ventura Exit from the root shell by typing command  exit Try to use sudo and you should be prompted to authenticate with Touch ID as shown below If you click Cancel you can just enter your password at the terminal prompt If you click Use Password you can enter your password in the dialog box If you connect to your macOS via SSH it will revert to using your password since you cannot send Touch ID fingerprints over SSH Note  Recent MacOS updates may remove the entry If Touch ID stops working for sudo then check if the entry was removed and add it back in following these instructions again 2023-02-05 18:24:59
海外TECH DEV Community Creating a Discord bot with Slash Commands https://dev.to/mrrobot/creating-a-discord-bot-with-slash-commands-51fa Creating a Discord bot with Slash CommandsINFORMATION This tutorial is for creating a Discord robot with Slash Commands Learn more about using Slash Commands →Also available in French language Prerequisites before startingBefore you start this tutorial follow these instructions You need to install several tools for the robot to work and create a folder with any name preferably short and without spaces This will be your folder containing your robot files List of tools and things to know Know the basics of JavaScriptInstall the latest stable version of Node jsHave access to the terminalHave a good Internet connectionA text editor or IDE Notepad Atom WebStorm VSCode Be able to read English for documentationWe will first check if everything has been installed open your command prompt and not the one installed by Node js if you are on Windows and type node versionIt is supposed to tell you which version you have installed Leave this window open for the rest of the installation What we are going to do for this tutorialBefore you read on you should understand that you need to alter some values such as IDs and command names We ll make a simple Discord bot with Slash Commands and with that we ll add a module to synchronize our command list very easily And finally an example command ping Sample image for the body of the ping commandIt should also be noted that the packages in this example of package json are offered with a fixed version so do not hesitate to check if there is an update for each of them Installation of the project and packagesAfter you have correctly installed the latest version of Node js you need to go to your robot s folder To move to the command prompt cd nameOfTheFolderFor simplicity go to your folder using the GUI and not the command prompt and copy the URL at the top Then paste it into the command prompt by adding cd before your copied text If you are not in your bot folder with the command prompt please review the lines at the top We are going to install the package to make the bot work This package is called Discord js it is a library to help interact with the Discord API and is developed in JavaScript The different packagesWe will need different Node packages npm to make the robot work discord js For creating the bot and reply to messagesdiscord api types v For creating the Slash Commandsdiscord sync commands This is not a package but we will use it as a module to synchronize our Slash commands npm install discord js discord api types v fs Example of package jsonYou can in itself have the same package json name example discord bot slash commands version main app js scripts start node app js keywords discordapp bot discordjs author Thomas Bnt lt contact git thomasbnt fr gt license GPL only dependencies discord api types discord js As you can read we have specified in the script a file app js is the file where we will run the bot We will therefore install all packages npm install Creation of the robot on the platformNow you have to create the bot on the Discord platform and add it to your server We will do this in two steps Follow this process you must be logged in to your Discord account in order to access this page Go to Then Applications →New Application Fill in the form Once done click on Create Go to the Bot tabClick on Add Bot then click on Yes do it All that remains is to add it to your own server To do this just go to the OAuth tab give it the necessary permissions for the bot to work properly and generate your link Copy it and open it in a new tab you are asked to select a server Select yours and click Allow You now have your robot on your server but it is offline This is perfectly normal Follow the steps below to turn it on Create the first commandHere we are This is the moment when we will create our first command The main file app jsAfter you have installed everything correctly you need to create the app js file It simply serves as your project s root I like to call it its heart Because it s where everything starts from Here is an example of a file named app js document app js author Thomas Bnt version copyright Thomas Bnt license GNU General Public License v repository description Un robot Discord gérant et aidant les utilisateurs pour un serveur const fs require fs const Client Collection GatewayIntentBits Options require discord js const client new Client The intents will depend on what you want to do with the robot but don t forget to activate them in your discord dev dashboard at the address ID bot section Privileged Gateway Intents intents GatewayIntentBits Guilds GatewayIntentBits GuildMessages We create a collection for commandsclient commands new Collection const commandFiles fs readdirSync commands filter file gt file endsWith js for const file of commandFiles const command require commands file client commands set command data name command Events like ready js when the robot turns on or messageCreate js when a user robot sends a message const eventFiles fs readdirSync events filter file gt file endsWith js for const file of eventFiles const event require events file if event once client once event name args gt event execute args client else client on event name args gt event execute args client The interactionCreate event directly here as this is the heart of the robot client on interactionCreate async interaction gt if interaction isCommand return const command client commands get interaction commandName if command return We log when a user makes a command try await console log interaction commandName ーPar interaction user username await command execute interaction client But if there is a mistake then we log that and send an error message only to the person ephemeral true catch error console error error return interaction reply content An error occurred while executing this command ephemeral true fetchReply true The token of your robot to be insertedclient login NICE TOKEN NEVER TO BE DISCLOSED Synchronisation of Slash CommandsThis file will be put in the modules folder and called as soon as the bot is launched with the Ready event events ready js I took it from this GitHub repository made by Androz It allows you to easily synchronize and update your list of commands Here is the Slash Commands synchronization file modules sync commands js const Discord require discord js module exports async client commands options debug false guildId null gt const log message gt options debug amp amp console log message const ready client readyAt await Promise resolve new Promise resolve gt client once ready resolve await ready const currentCommands await client application commands fetch options guildId amp amp guildId options guildId log Synchronizing commands log Currently currentCommands size commands const newCommands commands filter command gt currentCommands some c gt c name command name for const newCommand of newCommands await client application commands create newCommand options guildId log Created newCommands length commands const deletedCommands currentCommands filter command gt commands some c gt c name command name toJSON for const deletedCommand of deletedCommands await deletedCommand delete log Deleted deletedCommands length commands const updatedCommands commands filter command gt currentCommands some c gt c name command name let updatedCommandCount for const updatedCommand of updatedCommands const newCommand updatedCommand const previousCommand currentCommands find c gt c name updatedCommand name let modified false if previousCommand description newCommand description modified true if Discord ApplicationCommand optionsEqual previousCommand options newCommand options modified true if modified await previousCommand edit newCommand updatedCommandCount log Updated updatedCommandCount commands log Commands synchronized return currentCommandCount currentCommands size newCommandCount newCommands length deletedCommandCount deletedCommands length updatedCommandCount A loooot of things but just remember that it limits Discord s API requests and it syncs your commands without difficulty It s a module so we ll have to call it in an event which is the Ready The Event Ready fileWhen you turn on your bot each time this event will run So we can make sure that we put in a function or some other code that should run from the beginning const synchronizeSlashCommands require modules SyncCommands const ActivityType require discord js module exports name ready async execute client console log Connected as client user username client user setActivity bord type ActivityType Watching This is when the Slash Commands synchronisation starts await synchronizeSlashCommands client client commands map c gt c data The parameters to be modified for synchronisation debug true If you set a server ID then it will ONLY be for the targeted server If you don t put guildID it will be in GLOBAL So on all servers guildId client config serverId The ping command as an exampleSo it s a basic command but it can also be used to detect anomalies in the connection So it s not that useless const EmbedBuilder require discord js module exports data is the body of the command this is what we will find when we type ping data name ping description Get the ping from the robot options and all this is the logic of the order async execute interaction client For example here we create an embed with EmbedBuilder from discord js We add a name and iconURL to it and then modify it with the values const PingBeforeEmbed new EmbedBuilder setAuthor name The bird will come back with the bot ping iconURL client user avatarURL const sent await interaction reply embeds PingBeforeEmbed fetchReply true ephemeral true const TotalPing sent createdTimestamp interaction createdTimestamp const PingEmbed new EmbedBuilder setAuthor name Ping of client user username iconURL client user avatarURL addFields name Total ping value TotalPing ms inline true name Websocket value client ws ping ms inline true await interaction editReply embeds PingEmbed ephemeral true What I should have in my projectCreate the app js fileCreate the events folder and the events ready js fileCreate the modules folder and the modules sync commands js fileCreate the commands folder and the commands ping js file ├ーapp js├ーcommands│└ーping js├ーevents│└ーready js├ーmodules│└ーsync commands js└ーpackage jsonIf you re missing something you haven t read everything Start the bot You need to copy your robot s token from the Discord page for developers And insert it with this code at the end of your app js client login YOUR TOKEN HERE WITHOUT SPACES AND NEVER TO BE REVEALED Save your file and do this command in the command prompt node app jsThat s it Your bot is on An example of a robotBord Pi A robot specifically designed for its own Discord server NOTE The documentation is written in French language but the code isn t Here is an example of slash commands feel free to download the repository and modify it This is a Discord bot that runs on the Discord js library and is set up for your Discord server It is accessible and easy to configure it your way Photo by Clem Onojeghuo on Unsplash Check my Twitter account You can see many projects and updates You can also support me on Buy Me a Coffee Stripe or GitHub Sponsors Thanks for read my post 2023-02-05 18:06:30
海外TECH Engadget Google's HD Chromecast with Google TV is cheaper than ever https://www.engadget.com/googles-hd-chromecast-with-google-tv-is-cheaper-than-ever-183616152.html?src=rss Google x s HD Chromecast with Google TV is cheaper than everSince Chromecast with Google TV has been one of the better ways to add more streaming options to an existing setup thanks in part to the fact you can frequently find the devices on sale To that point Amazon has discounted both variants of the streaming stick ahead of the Super Bowl weekend Following a percent discount you can buy the K version for just under at the moment At meanwhile the HD variant is at a new all time low Both the K and HD versions of Chromecast with Google TV are excellent options if you re on a budget or prefer how Google does things over its competitors Engadget gave the K version a score of in Highlights included excellent Google Assistant integration a comfortable and easy to use remote and the inclusion of Dolby Vision and Atmos support The HD variant is similarly excellent and is a compelling option if you haven t upgraded to a K TV yet Poor performance used to be one of the reasons to skip a Chromecast with Google TV system but this past summer Google released a software update to address that issue For that reason unless you re willing to spend significantly more on something like an Apple TV it s hard to go wrong with one of Google s streaming sticks Follow EngadgetDeals on Twitter and subscribe to the Engadget Deals newsletter for the latest tech deals and buying advice 2023-02-05 18:36:16
ニュース @日本経済新聞 電子版 メタバース専用の保険 あいおいニッセイ、情報流出補償 https://t.co/AJBn0sJLCw https://twitter.com/nikkei/statuses/1622294670268301314 情報流出 2023-02-05 18:02:44
ニュース BBC News - Home China balloon: US searches in Atlantic for wreckage https://www.bbc.co.uk/news/world-us-canada-64530102?at_medium=RSS&at_campaign=KARANGA carolina 2023-02-05 18:26:13
ニュース BBC News - Home Tottenham Hotspur 1-0 Manchester City: Harry Kane passes Jimmy Greaves as Spurs' all-time top scorer https://www.bbc.co.uk/sport/football/64442953?at_medium=RSS&at_campaign=KARANGA Tottenham Hotspur Manchester City Harry Kane passes Jimmy Greaves as Spurs x all time top scorerHarry Kane becomes Tottenham s all time record scorer surpassing the great Jimmy Greaves as his th goal for the club dents Manchester City s title ambitions at a raucous Tottenham Hotspur Stadium 2023-02-05 18:51:37
ニュース BBC News - Home Nottingham Forest 1-0 Leeds United: Brennan Johnson strike raises pressure on Jesse Marsch https://www.bbc.co.uk/sport/football/64442954?at_medium=RSS&at_campaign=KARANGA Nottingham Forest Leeds United Brennan Johnson strike raises pressure on Jesse MarschBrennan Johnson scores the only goal as Nottingham Forest beat Leeds to move six points clear of the Premier League relegation places 2023-02-05 18:25:20
ビジネス ダイヤモンド・オンライン - 新着記事 部下の仕事ぶりが一変する「リーダーの話し方」、刺激すべき部下の感情とは - 要約の達人 from flier https://diamond.jp/articles/-/317177 部下の仕事ぶりが一変する「リーダーの話し方」、刺激すべき部下の感情とは要約の達人fromflier年から年まで年連続で「一番読まれたビジネス書」日販調べに輝いた大ベストセラー『人は話し方が割』。 2023-02-06 03:55:00
ビジネス ダイヤモンド・オンライン - 新着記事 進学校の理系に通う息子が突然「声優学校」を志望、困惑する親が迎えた劇的結末 - ニュースな本 https://diamond.jp/articles/-/316714 進学校の理系に通う息子が突然「声優学校」を志望、困惑する親が迎えた劇的結末ニュースな本中流・富裕家庭に育った子どもたちは、衣食住に不自由せず、家庭の金銭問題が進路に影響しないー。 2023-02-06 03:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 就活の実態調査で判明、企業が新卒採用時のミスマッチを防ぐ重要なポイント - 親と子の「就活最前線」 https://diamond.jp/articles/-/316991 実態調査 2023-02-06 03:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 生産性上昇に資する対日直接投資・国内投資回帰、政府の財政膨張が妨げ - 数字は語る https://diamond.jp/articles/-/317212 人当たり 2023-02-06 03:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 FRBのタカ派姿勢は「ブラフ」 信じない投資家 - WSJ PickUp https://diamond.jp/articles/-/317176 wsjpickup 2023-02-06 03:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 メタ復活の兆し、カギはAI投資と広告シフト - WSJ PickUp https://diamond.jp/articles/-/317175 wsjpickup 2023-02-06 03:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 印アダニの株価急落、知っておきたい背景 - WSJ PickUp https://diamond.jp/articles/-/317174 wsjpickup 2023-02-06 03:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 レクサスIS500Fスポーツパフォーマンス、貴重な5L・V8で最高に気持ちいい走り【試乗記】 - CAR and DRIVER 注目カー・ファイル https://diamond.jp/articles/-/317173 caranddriver 2023-02-06 03:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 対話を重ね、人間中心の価値創造を社内に根付かせる - Virtical Analysis https://diamond.jp/articles/-/317047 対話を重ね、人間中心の価値創造を社内に根付かせるVirticalAnalysisビジネスにおける「デザイン」の役割が拡張し続ける中、企業内のデザイン組織はどのように変化しているのだろうか。 2023-02-06 03:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 不登校の「本当の原因」とは? - 不登校ー親子のための教科書 https://diamond.jp/articles/-/316719 2023-02-06 03:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 【制限時間10秒】「17×12」と「19×11」はどっちが大きい? - 小学生がたった1日で19×19までかんぺきに暗算できる本 https://diamond.jp/articles/-/316934 暗算 2023-02-06 03:05:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)