投稿時間:2023-04-10 07:08:13 RSSフィード2023-04-10 07:00 分まとめ(10件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ビジネス+IT 最新ニュース 期待されてやる気が出る人・出ない人の差は何か? 脳科学的「人を動かす」会話術 https://www.sbbit.jp/article/cont1/110775?ref=rss 期待されてやる気が出る人・出ない人の違いには、脳が無意識のうちにやってしまう思考のクセ「認知バイアス」が関係しています。 2023-04-10 06:10:00
Google カグア!Google Analytics 活用塾:事例や使い方 お肉ゴロゴロのレトルトカレー3種のお肉をレビュー※比較画像有り https://www.kagua.biz/family/gourmet-review/20210311.html 記事 2023-04-09 21:00:50
技術ブログ Developers.IO 【忘れず登録しておこう!】GitHub Copilot X および GitHub Next の Waitlist 公開中プロジェクトまとめ https://dev.classmethod.jp/articles/github-copilot-x-and-github-next-waitlist/ waitlist 2023-04-09 21:02:55
海外TECH DEV Community Making a Speedrun Timer: Chapter 3 https://dev.to/kevthedev/making-a-speedrun-timer-chapter-3-f8k Making a Speedrun Timer Chapter Abandon Ship Well after a few successful blog posts we ve finally hit our first big problem and it s a show stopper What do I mean by that Well it has to do with initial design considerations When I first designed our app I went down the PWA route thinking that the browser had everything we needed for our app to function properly But I was wrong I overlooked one of the most crucial features to our speedrun timer global shortcuts Global shortcuts are keys or key combinations that you can type on your keyboard to trigger some sort of functionality on your app or operating system e g the windows key opening the app launcher If you re familiar with LiveSplit and you ve been a speed runner for a decent amount of time you ll know that global shortcut keys are a lifesaver when it comes to tracking your splits It s not practical to make sure that your timer remains in the foreground while you re speed running a game Too often can you accidentally leave another application open and completely mess up your split times or your entire run So do you know what CAN T perform global shortcuts The browser Migrating from PWA to ElectronOh boy what do we do about this Well fortunately we re not out of options In fact I sort of accounted for this in the beginning One of the reasons I chose to write the frontend for this project in Vue JavaScript is that if I needed to I could easily migrate to an Electron application Electron js gives us a way to build cross platform desktop applications in JavaScript So through this migration we can utilize global shortcuts and run our app on all major desktop platforms Code ChangesI won t go over ever single code change as that would make for an insanely long post Furthermore our code is going to largely remain the same What will change is our project structure and the added global shortcut functionality Our project structure will be divided into parts The node js code that communicates between our app and the operating system The renderer code which is essentially just our frontend The preloader code which serves as a bridge between node js and the frontend Node js CodeOur node js code is mostly given to us by default when scaffolding a Electron Forge project A lot of the comments are generated from it as well The only code we ll change is we want to register the global shortcuts once the application is ready We handle this with node js because we need to listen to keyboard input on an operating system level not just on the application itself Once the callback function is triggered we then send the commands to the mainWindow to interact with our timer It s important to note that once binding a keyboard shortcut like the number shown here you won t be able to type with or use that key on any other application This limitation was a design choice by the Electron team to prevent the development of a keylogger There may be some sort of work around but I won t get into that here Feel free to comment if you know of another solution main jsconst app BrowserWindow globalShortcut require electron const path require path Handle creating removing shortcuts on Windows when installing uninstalling if require electron squirrel startup app quit let mainWindow const createWindow gt Create the browser window mainWindow new BrowserWindow width height webPreferences preload path join dirname preload js and load the index html of the app if MAIN WINDOW VITE DEV SERVER URL mainWindow loadURL MAIN WINDOW VITE DEV SERVER URL else mainWindow loadFile path join dirname renderer MAIN WINDOW VITE NAME index html Open the DevTools mainWindow webContents openDevTools This method will be used to setup our global shortcuts code app whenReady then gt globalShortcut register gt mainWindow webContents send global timer globalShortcut register gt mainWindow webContents send global timer globalShortcut register gt mainWindow webContents send global timer then createWindow Quit when all windows are closed except on macOS There it s common for applications and their menu bar to stay active until the user quits explicitly with Cmd Q app on window all closed gt if process platform darwin app quit app on activate gt On OS X it s common to re create a window in the app when the dock icon is clicked and there are no other windows open if BrowserWindow getAllWindows length createWindow In this file you can include the rest of your app s specific main process code You can also put them in separate files and import them here PreloaderAs mentioned before this code will serve as a bridge between the node js code operating system communication and the renderer code frontend Currently all we need to do is to expose the ipcRenderer API to allow the renderer to communicate with node preloader js See the Electron documentation for details on how to use preload scripts preload scriptsconst contextBridge ipcRenderer require electron contextBridge exposeInMainWorld electronAPI listenForTimerCommands listener gt ipcRenderer on global timer listener RendererFinally we have our renderer This code is simply our entry file the old main js from our PWA before renderer jsimport createApp from vue import style css import App from App vue createApp App mount app Let s go ahead and add the code on the frontend to react to a global shortcut input Stopwatch vue lt script setup gt import onMounted onUnmounted from vue import useStopwatch from composables stopwatch import WorkerCommands from helpers timer worker helper const timerTxt onTimerStart onTimerStop onTimerReset onTimerInit onTimerTeardown useStopwatch onMounted gt onTimerInit window electronAPI listenForTimerCommands data gt switch data case WorkerCommands START onTimerStart break case WorkerCommands STOP onTimerStop break case WorkerCommands RESET onTimerReset break onUnmounted gt onTimerTeardown lt script gt lt template gt lt div gt lt p gt timerTxt lt p gt lt button mousedown onTimerStart gt Start lt button gt lt button mousedown onTimerStop gt Stop lt button gt lt button mousedown onTimerReset gt Reset lt button gt lt div gt lt template gt lt style scoped gt button margin px lt style gt ConclusionThere you have it We have now successfully migrated from PWA to Electron I m actually very excited to see what desktop development will have in store for us I ve already learned a lot If there s any other code changes you want to see or want me to go over feel free to comment on the post with your questions You can also follow along in the GitHub repo 2023-04-09 21:08:31
ニュース BBC News - Home Coronation carriage will be a more comfortable ride https://www.bbc.co.uk/news/uk-65194594?at_medium=RSS&at_campaign=KARANGA westminster 2023-04-09 21:30:16
ビジネス 東洋経済オンライン 日米の株価はやっぱり年央にかけて下落しそうだ ただし「暴落パニック」が起きる可能性は低い | 市場観測 | 東洋経済オンライン https://toyokeizai.net/articles/-/665343?utm_source=rss&utm_medium=http&utm_campaign=link_back 世界市場 2023-04-10 06:30:00
ビジネス 東洋経済オンライン ジム・ロジャーズ「円安は日本復活の起爆剤になる」 日本が世界から「捨てられない」ための方策 | 投資 | 東洋経済オンライン https://toyokeizai.net/articles/-/662374?utm_source=rss&utm_medium=http&utm_campaign=link_back 少子高齢化 2023-04-10 06:30:00
海外TECH reddit Post Game Thread: The Los Angeles Lakers defeat The Utah Jazz 128-117 https://www.reddit.com/r/lakers/comments/12gwvn1/post_game_thread_the_los_angeles_lakers_defeat/ Post Game Thread The Los Angeles Lakers defeat The Utah Jazz Utah Jazz at Los Angeles Lakers Crypto com Arena Los Angeles CA ESPN TV Radio Time Clock Final Q Q Q Q Total UTA LAL Player Stats Utah Jazz Player MINS PTS FGM A PM A FTM A ORB DRB REB AST STL BLK TO PF L Samanic K Olynyk U Azubuike O Agbaji K Dunn D Jones S Fontecchio J Juzang J Toscano Anderson Los Angeles Lakers Player MINS PTS FGM A PM A FTM A ORB DRB REB AST STL BLK TO PF J Vanderbilt L James A Davis A Reaves D Russell M Beasley T Brown Jr R Hachimura W Gabriel M Christie M Bamba C Swider Team Stats Team FGM A PM A FTM A AST PF STL TO BLK OREB DREB REB UTA LAL Note This data is only as accurate as NBA com Please message u nba gdt bot if you have any suggestions or notice any bugs with the bot submitted by u nba gdt bot to r lakers link comments 2023-04-09 21:45:41
ニュース THE BRIDGE AlibabaがChatGPT対抗馬発表か、ChatGPTが中国発のアカウントを大量ブロックなど——中国スタートアップシーン週間振り返り(4月3日~7日) https://thebridge.jp/2023/04/technode-apr-3-apr-7 AlibabaがChatGPT対抗馬発表か、ChatGPTが中国発のアカウントを大量ブロックなどー中国スタートアップシーン週間振り返り月日日本稿は、Technode動点科技が、月日月日に配信した「NewsFeed」記事の中から主要ニュースを翻訳したものです。 2023-04-09 21:15:09
ニュース THE BRIDGE 韓国ソーシャルコマース三大巨頭の一つ「WeMakePrice」をQoo10が買収など——韓国スタートアップシーン週間振り返り(4月3日~7日) https://thebridge.jp/2023/04/startup-recipe-apr-3-apr-7 韓国ソーシャルコマース三大巨頭の一つ「WeMakePrice」をQooが買収などー韓国スタートアップシーン週間振り返り月日日月日月日に公開された韓国スタートアップの調達のうち、調達金額を開示したのは件で、資金総額は億ウォン約億円に達した。 2023-04-09 21:00:48

コメント

このブログの人気の投稿

投稿時間: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件)