投稿時間:2022-04-01 05:32:55 RSSフィード2022-04-01 05:00 分まとめ(36件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita WindowsでminicondaとJupyterを導入する方法 https://qiita.com/_EorF/items/ab6d016f1a21ca379e93 Jupyterを開くAnacondaPromptminicondaからjupyternotebookと打って起動。 2022-04-01 04:03:34
技術ブログ Developers.IO エドモントンとルドゥークにワーケーションに行ってきました https://dev.classmethod.jp/articles/report-workation-edmonton-leduc/ classmethodcanda 2022-03-31 19:58:34
海外TECH Ars Technica E3 2022 crashes, burns with official cancellation of “all-digital” version https://arstechnica.com/?p=1844852 swoops 2022-03-31 19:35:58
海外TECH MakeUseOf How to Use Your Big Android Phone With Just One Hand https://www.makeuseof.com/tag/tips-big-android-phone-one-hand/ estate 2022-03-31 19:45:14
海外TECH MakeUseOf How to Fix a Missing NVIDIA Control Panel in Windows 11 and 10 https://www.makeuseof.com/windows-11-10-missing-nvidia-control-panel/ How to Fix a Missing NVIDIA Control Panel in Windows and The NVIDIA Control Panel is essential for tweaking your graphical settings so if it decides to hide from you here s how to bring it back 2022-03-31 19:16:15
海外TECH DEV Community How to save Google Cloud Text-to-Speech https://dev.to/shittu_olumide_/how-to-save-google-cloud-text-to-speech-199i How to save Google Cloud Text to Speech IntroductionWe keep testing new technologies and tools every day to make our life easier The ability to do something over the internet and save it locally to your computer is such an underrated joy You will agree with me that it s such a pain in the ass when you perform a task online maybe a design record a sound etc and when you are about to save it to your personal computer you get blocked from saving it this may be as a result of the fact that those websites are paid the website is experiencing issues and all other kinds of issues I had a similar experience working on a text to speech project and I had to just give the video editor the voice over so that he can add it to a video we were working on for commercial ads I had to use an online voice over software to convert the text to speech and when I tried downloading the voice the website was requesting that I pay for the service which is actually understandable In this article I will show you how I solved it using Google Cloud Text to Speech and the ipvoid com website The targets of this article are video editors and anyone who is doing research and needs to use a voiceover in their project or product Stay to the end I promise you it s definitely worth it Getting startedFirstly navigate to On the page you will find a dummy text there make sure you replace those text with your desired text or input Make sure you have your setting matching mine below Secondly you have to inspect the page by right clicking on the current page and clicking on inspect Once the Chrome development tabs are displayed click on Network Click on the clear icon to clear the development area You should have a clean environment now Thirdly click on the SPEAK IT button and check the I am not a robot box in other for Google text to speech to work You will notice that in the Chrome developer tools environment it gets filled up with texts and files Locate the proxy file under the name column and click on it You will notice that I pointed to the audioContent audio content refers to any type of published material or information that is absorbed through hearing This category includes any type of aural entertainment or marketing collateral including podcasts audiobooks and artificial intelligence AI voice assistant skills or actions Fourthly make sure to copy all the characters within the strings It is quite long but make sure that you copy it correctly else it will not give us the required output Once you have it copied go to this website and paste the characters in the input box then click on Submit now It should process the audiocontent characters and it generates the audio file you can download it now by clicking the Download as File button You should have it downloaded in your downloads folder or in your finder Click on it and play it ConclusionWe discussed how you can generate a voiceover without having to pay and also download it locally on your machine We talked about AudioContent and how we extract the voice over from it using the Base to Mp converter ipvoid com 2022-03-31 19:27:52
海外TECH DEV Community The magic combo: label what your code does and break it down to small pieces https://dev.to/latobibor/the-magic-combo-naming-and-breaking-down-to-smaller-pieces-3mie The magic combo label what your code does and break it down to small piecesI start with a statement without scientific data backing me so this will be the least mathematical most subjective and probably one of the most useful clean coding idea Most of us understand short concise and aptly named and labelled code If you think about this you will see that much of Clean Coding is achieving this very idea you want things to be short so you do not need to juggle a lot of context and details at the same time you toy with abstractions until you can achieve the most effectives onesyou want things to be concise and aptly named so you can trust that a getUrl function does not in fact sets up a server if it is not yet running this oddly specific example is from real life code so don t argue with me that Who would do such thing That s why we are grouping and categorizing and recategorizing stuff that s why you are breaking up that messy folder that has files to smaller ones Because you want to lower the cognitive load on your brain therefore you will be able to do quicker and smarter decisions With well isolated modules functions components abstractions you can be quite sure what the consequences of your changes will be The opposite is when everything is or can be connected with everything else That s when you read code for two days to write lines of code To best achieve this isolation you are grouping non obvious and coherent parts of your code into a named function method procedure or module with the name explaining the otherwise obscure inner workings The tyranny of templates and tutorials TTT While these two technique naming and breaking down long passages of code are very basic and taught very early in clean coding there are certain conditions when I saw otherwise excellent developers abandoning these two excellent tools You see most of us start writing code based on a template for instance create react app or from an existing tutorial These have to be fairly simple to so people get why things are there and cannot get all encompassing But then an aversion to breaking the template kicks in and people start writing s of lines of controllers in app js in case of express js since this was where the template tutorial instructed them to put their code into And that is exactly where you can apply these two techniques to force yourself out from the template to a working new categorization Examples to open your mind Using mixin of SCSS to explain CSSFor most developers myself included CSS is scary partly because that not all declarations do something unless a bunch of other declarations were also made These tend to be not intuitive for a lot of cases There is a very quiet revolutionary feature in SCSS or in LESS and that is named mixins This would allow us to name the obscure and break it down to small chunks In this little snippet a couple of statements make sure that the language input label will be the same width as the input below it language input label neatly sorted alphabetically flex grow font size var small space padding var spacing base text transform uppercase width Can you spot those Or could you even guess such feature would exist See this example instead language input label mixin make label equal width as inputs width flex grow padding var spacing base include make label equal width as inputs text transform uppercase font size var small space See how mixin is shining not as a tool to reuse code but to explain your goal with the properties make label of inputs equal width as the inputs the number of properties that need to work together to achieve the desired effectSo when dev B comes over to refine the component they would understand what needs to change in concerted effort Neat Chaining anonymous functions e g array iteration or RXjs There are certain iteration functions map filter reduce that we learnt to use with anonymous functions When those anonymous functions get obscure there is a tendency to leave them as is and say well yes programming can be hard functional programming is not for everybody ️You do not need to understand every line here don t waste your time if something looks magical It is obscure for the sake of example ️ Pseudo codechatStream filter chat gt if chat user name sender return true else return false map chat gt const copiedChat chat that neat snippet lifted from stackoverflow let d new Date new Date getFullYear d setDate d getDate d getDay let d new Date new Date getFullYear d setDate d getDate d getDay if chat timestamp gt d amp amp chat timestamp lt d copiedChat timestamp new Date copiedChat timestamp setHours d getHours very self explanatory return copiedChat reduce chat gt other things Raise your hand if you would be eager to touch any of this code Now let s do the unimaginable abomination and name those anonymous functions please observe that by defining them outside of the scope those can be exported reused and or tested separately function filterSenders chat Chat return chat user name sender now that everyone knows what this is all about maybe you can search or a standard solution function correctTimeWithHourDuringSummerTime chat Chat const copiedChat chat let d new Date new Date getFullYear d setDate d getDate d getDay let d new Date new Date getFullYear d setDate d getDate d getDay if chat timestamp gt d amp amp chat timestamp lt d copiedChat timestamp new Date copiedChat timestamp setHours d getHours return copiedChat Look how concise and readable it became chatStream filter filterSenders map correctTimeWithHourDuringSummerTime reduce createSomeObject describe how it is the only way in testingI do not wish to article to be too long so I will be using quite general terms here Another pattern I saw where people merrily copy paste gigantic amount of code and let a file grow larger than lines is testing The template for testing in jest for instance looks like this importsdescribe The block under test gt let mock let mock let object let object beforeEach gt setup afterEach gt tear down it does things gt it does other things gt it does even more other things gt When it gets too large why not a break it down to smaller chunks and b name them well you can import test helper functions you made for your cases describe The block under test gt let mock let mock let object let object beforeEach gt why not name these setup steps setupCommonMocks setupCommonObjects it does things gt it does other things gt it does even more other things gt function setupCommonMocks mock jest spyOn something mock jest fn Why copy paste the creation of that same complicated initial state function createComplicatedInitialState flagToDoSomethingDifferently return state state state flagToDoSomethingDifferently object object The takeawayWhat I wished to express that templates and tutorials are just scaffolding to start your code with Remember Templates the way of the tutorial lt your good sense to write short well named code Happy cleaning up 2022-03-31 19:14:36
海外TECH DEV Community [Conceito] - Paralelismo vs Concorrência https://dev.to/zanfranceschi/conceito-paralelismo-vs-concorrencia-20jl Conceito Paralelismo vs ConcorrênciaConteúdo original nessa thread do TwitterEntão quer dizer que vc faz tudo ao mesmo tempo paraleliza tudo éisso mesmo Vocêsabe a diferença entre PARALELISMO e CONCORRÊNCIA Quando era novo tomei um fora duma menina em uma festa sópq provei pra ela que ela não fazia tudo ao mesmo tempo Falando sério ésuper normal confundir esses dois conceitos pq olhando de fora eles se parecem mesmo Mas tem alguns aspectos que são fáceis de entender e que dão clareza sobre a natureza de cada um Ésuave confia INTERRUPÇÃOVc táaífazendo sua gambiarra aípára pra olhar o Twitter aíentra no Insta etc Ou seja vc estáatenta o àvárias coisas ao mesmo tempo mas FAZENDO mesmo apenas uma por vez Vc tem que interromper uma coisa pra fazer outra intercalar a gente éum a só INDEPENDÊNCIAVc e seu colega baixaram a branch da task cada um na sua máquina inserindo bugs adicionando complexidade criando variáveis com nomes horríveis etc Duas pessoas fazendo coisas ao mesmo tempo uma independente da outra Suave né Ou seja em CONCORRÊNCIA as operações devem ser interrompíveis e resumíveis P ex Épossível ter um modelo concorrente com uma única thread procure sobre o event loop do javascript Como tudo pode ser muito rápido dáa impressão que tudo tásendo feito ao mesmo tempo Paralelismo por outro lado tem a ver com independência Estáintimamente relacionado com multi thread São coisas realmente sendo executadas ao mesmo tempo de forma independente ResumindoCONCORRÊNCIA tem a ver com interrupção Realmente uma coisa muito rapidamente sendo feita por vez intercalando PARALELISMO tem a ver com independência Solte dois cachorros de apartamento na rua e vc teráduas merdas em paralelo Precisa nem falar né Chegou atéaqui éabraço mesmo que fique desconfortável 🫂Valeu demais pela moral 2022-03-31 19:10:43
海外TECH DEV Community How to handle irregular plurals in Ruby on Rails https://dev.to/charliekozey/how-to-handle-irregular-plurals-in-ruby-on-rails-2f0l How to handle irregular plurals in Ruby on RailsJoin me as I wander down the rabbit hole of word nerdery in Rails One of the key philosophies of Rails Active Record is convention over configuration which makes it easier for programmers to establish relationships between items in a more or less intuitive way Consider for a moment what the alternative would be an emphasis on configuration would require explicit instructions to the application in order for it to understand that for example the Student class represents the data in the students table However Rails emphasis on convention establishes the relationship based on the singular to plural relationship of student to Student Provided programmers follow the agreed upon convention it all happens under the hood This is all well and good but what happens when the thing you want to keep track of in your database is not a regular noun Say you have a lot of mice to keep track of If you create a Mouse class will it be expecting a table called Mouses Fortunately it will not Rails has a component called Active Support that takes care of a lot of the irregular cases for you FYI inflection is a linguistic term that describes the transformation of a part of a word usually an ending depending on its usage and context for example to differentiate number gender or tense Verb conjugation is a subtype of inflection inflections on other parts of speech are called declensions So Active Support takes care of irregular plurals but also a wider range of irregular word transformations But what about the cases that Active Support doesn t know about Or the cases it gets wrong Or at least wrong for your purposesーI m chill about what s right and wrong when it comes to grammar You do you Say for example you are building a networking platform for graduates of a fancy university and it s very important to your boss that the plurals of alumna and alumnus have their traditional Latin endings alumnae and alumni True these terms will only show up in the back end for you and your team to see but let s say your boss is a stickler for details In that case you can customize Active Support s inflections for your app As of Rails v those customizations are often stored in a file called config environment rb like so img alt ActiveSupport Inflector inflections en do inflect lt br gt inflect irregular alumna alumnae lt br gt inflect irregular alumnus alumni lt br gt end height src dev to uploads s amazonaws com uploads articles oewswwtwamlwzbxh png width This process is also useful and important if you re coding in a language besides English which is a topic that warrants a blog post of its own at the least As a bonus Active Support includes other built in methods that are helpful for modifying words in various ways including changing from snake case to camelCase A list of these methods can be found here Another use case for Active Support is to create custom rules for inputs For example if your app has a list of user inputted names and you use the method capitalize on the inputs for uniformity s sake it successfully turns vinay patel to Vinay Patel But it also turns Phil MacDougal to Phil Macdougal which is incorrect and also a bummer for Phil who s probably tired of that happening to his name So you d want to add a custom rule to Active Support that exempts names starting with Mac Mc La De etc Good luck and have fun wrangling words in Ruby Sources consulted further readingRails API docsGeeksforGeeks on capitalize This StackOverflow post on irregular plurals in rails a little outdated Rails Guides Active SupportNaming Conventions in Rails 2022-03-31 19:10:28
海外TECH DEV Community Going at your own pace in Tech in India https://dev.to/bhavzlearn/going-at-your-own-pace-in-tech-in-india-3a13 Going at your own pace in Tech in IndiaThis is not strictly going to be a programming post I will instead examine some reasons as to why people quit programming why I refuse to quit till now despite being not really successful and also trying to give you and myself some motivation to make it in the tech industry The BeginningI started coding when I was in grade and I loved it More so I loved explaining it to people I remember explaining C a subject we had to people arguably smarter than me These people were preparing for IIT JEE from grades th th they could solve an ultra complex physics or maths problem in the blink of an eye but struggled with classes and objects in C I remember creating a project for the same subject which overall just had inputs and outputs on the terminal but I loved the process of feeding input and getting that desired output It was such a thrill to imagine how a complex system like a company membership discount management system might work and code it in such a simple way using the basic topics we learned I got a score of in the board examinations and topped my school Life went on and I made it to a college not even close to the top ones in the country because I refused to take coaching or ask for external help I was insistent on going at my own pace Do I regret it Yes sometimes In preparing for an exam as tough as JEE you learn a lot of things such as a good work ethic building consistent habits and schedules which always help and no matter what anyone says brand names matter a lot to people in India and even around the world But you must move on CollegeCollege was such a fun time you really grow as a person and get to explore things meet and learn from different people I got into photography led two clubs traveled so much explored AI ML did an internship at a startup in Singapore in the same field But there was something wrong I had lost the ability to code Indian colleges have some good teachers but an outdated method of teaching Computer Science especially which has you copy pasting someone else s code onto the most outdated code editor or worse still copying it down into a handwritten file no encouragement to do problem solving questions regularly no encouragement to code and build actual projects it really sets you up to get the most disappointing jobs from a coding perspective During my placements the pandemic struck Everything was terrible I regularly consume news and keep myself updated which was a bad idea at the time I struggled I got depressed and anxious I didn t study Despite having a great GPA I couldn t make it I had trusted that the GPA would be enough It s not even close to being enough People who had regularly built the habit of coding and building real world projects using different languages irrespective of college GPAs took all the great jobs But I got back up and started from scratch I was determined to start coding again determined to get a good job determined to find the same thrill I got in th when writing a program That s when I found Neog Camp I started coding again started building projects again built a basic portfolio portfolio I loved it It was tiring and exhausting but god the thrill of seeing a complete website made by your own hands is something else NowI made it to the next level of the coding bootcamp after an interview And I m on the journey of relearning how to code I m struggling definitely I got Covid in January got diagnosed with PCOS recently gained a lot of weight during the lockdown became so inactive that climbing one flight of stairs exhausts me and hurts my knees I lost my precious dog of years who I grew up with this month It is hell I am struggling But I am not giving up I completed a UI library in HTML CSS and JavaScript Halcyon UI I am currently working on an E Commerce site Notes App and my version of Youtube in React js and I am relearning how to code There are endless guides written on how to learn programming But how do you relearn it How do you let go of the past let go of what you were doing wrong and relearn Here are the two cents that I can offer Let go of your failuresIt s over It doesn t matter anymore You have one life and it s slipping away every second There is no point in being hung up over the past All you can do is learn from it and try not to make the same mistakes again You might even repeat the mistakes we re only human after all But let that go too Stop comparingAs I write this I m still thinking about that one person who wrote that one great feature s code times better than me Or that one person in my bootcamp who is and shipping mock backends Or that one person who is and figuring out people s bugs in a second Or my own sister who works at Microsoft P or Point is there is not enough time in your life for comparison It will never end There will always be someone better It does not help you What will help you is learning how to get better from those people learning about their journey learning how they think and trying to see if their tips work for you everyone is different That is all The end There is no joy or lessons to be found by comparing yourself to someone else and feeling bad Actually codeDon t get stuck in tutorial hell What is that You watch the smartest guy on Youtube build and ship almost a complete product within hours Happily you think that you can do the same by just watching You open your code editor and you can t even remember the last line he wrote Or you copy code You re smart enough to make it work from different different places But you didn t write it It s okay to google and learn But if you don t try on your own first or just blindly copy paste entire projects that won t work This is something I struggle with a lot It s hard to code and build the logic yourself But it is what learning how to code entails what it means You will struggle and it will take more time but the process of trying to do it yourself will do wonders for your skill Take care of your healthNothing you do will matter if your health is bad Coding means a very inactive lifestyle but you can do small things to avoid this Install these two extensions and follow them Break TimereyeCare Protect your vision Eat well eat your fruits and vegetables Exercise days or at least hours per week Sleep well and early and for at least hours every day Your body will thank you with better focus and a clear mind for coding As I write this post I can see my own problems reflected I m hoping to make it and be successful Let s see I m hoping to do better To get a job to my liking in tech in the next couple of months To relearn I m determined to make it to try What s the worst that can happen What are the different ways and motivations which have helped you to get better at programming or break into tech 2022-03-31 19:07:41
海外TECH DEV Community Using vite-plugin-ssr with mdx-js, solving ESM only library problems, understanding vite configuration and writing vite plugins https://dev.to/naveennamani/using-vite-plugin-ssr-with-mdx-js-solving-esm-only-library-problems-understanding-vite-configuration-and-writing-vite-plugins-3b24 Using vite plugin ssr with mdx js solving ESM only library problems understanding vite configuration and writing vite pluginsvite plugin ssr is vite plugin which allows us to build websites with Server Side Rendering Client Side Rendering Single Page Applications and Static Site Generation all in one This plugin is like Next js but provides more control over each page and for any of your favorite frontend framework Please visit the website to learn how to use this plugin In this tutorial we ll learn how to setup mdx js library for vite project for building markdown based websites and to prerender them using vite plugin ssr to generate static websites The vite plugin ssr github repo contains example projects which you can clone and start with For example react full example already provides a setup for working with mdx js library The intention of this tutorial is to show how to solve some of the problems I encountered while using the mdx js library and vite plugin ssr prerender feature Project setupFirst of all we need to setup a vite vite plugin ssr based project To scaffold a vite plugin ssr project simply executenpm init vite plugin ssrGive your project a name I named it nn blog and select the frontend framework in this example react you would like to use Once the command runs simply go to your project folder and install all dependencies cd nn blognpm installThen run the dev server with npm run dev Congratulations you ve just setup a vite vite plugin ssr based project The setup comes initialized with a git repo so you can start modifying the code around And you ll notice how blazingly fast the vite dev server is Once you understand the filesystem routing concepts of vite plugin ssr create some pages and experiment When you re ready let s start with adding mdx js Adding mdx js to vite projectmdx js is a library which converts markdown content to jsx compatible content that you can then use with your jsx based libraries such as react preact vue MDX allows you to use JSX in your markdown content You can import components such as interactive charts or alerts and embed them within your content vite uses rollup under the hood to build bundles for production So for installing mdx js to a vite project we should use mdx js rollup and for handling custom MDX components we can use mdx js react for react based projects npm install mdx js rollup mdx js reactOnce the libraries are installed add mdx js to vite plugins in vite config js file and config the mdx plugin to use mdx js react as an proiderImportSource import react from vitejs plugin react import ssr from vite plugin ssr plugin import mdx from mdx js rollup export default plugins react ssr plugins react mdx providerImportSource mdx js react ssr Solving problem require of ES Module is not supportedNow after updating the vite config js if we try to run npm run dev we ll be given this confusing errorfailed to load config from workspace example nn blog vite config js workspace example nn blog vite config js undefined Error ERR REQUIRE ESM require of ES Module workspace example nn blog node modules mdx js rollup index js from workspace example nn blog vite config js not supported This problems occurs in the following order npm run dev runs node server index js file which is a commonjs fileThe script creates vite dev server using vite createServer The vite dev server converts vite config js to CJS module first and then loads the config from this file As CJS module tries to require mdx js rollup plugin which is a ESM only module the error will be generated To solve this problem we should inform vite to skip building config file to CJS This can be achieved by adding type module to package json file Solving problem require is not defined in ES module scopeOnce we inform node to enable ES modules we cannot use require syntax in js files This is exactly what you ll get when you run npm run devfile workspace example nn blog server index js const express require express ReferenceError require is not defined in ES module scope you can use import insteadThis file is being treated as an ES module because it has a js file extension and workspace example nn blog package json contains type module To treat it as a CommonJS script rename it to use the cjs file extension Luckily the error itself gave us a solution But you need to first stop scratching your head and learn to read those lines in to identify the solution If you look carefully what we need is just to rename our index js file to index cjs and Solving problem Cannot find modulenode internal modules cjs loader throw err Error Cannot find module workspace example nn blog server at Function Module resolveFilename node internal modules cjs loader at Function Module load node internal modules cjs loader at Function executeUserEntryPoint as runMain node internal modules run main at node internal main run main module code MODULE NOT FOUND requireStack Wait where is our file gone Node says it can t find it but it s there right in the server folder May be if you re patient enough or highly talented nerd enough you ll understand that node is trying to load server module and not server index js The index js file comes into picture as part of the CJS module loading sequence of node So we need to add a package json file with the following value main index cjs And congratulations you are now ready to go Adding a markdown pageNow go to pages directory and any markdown content with md or mdx extention For example for creating a naveennamani root add pages naveennamani page mdx or pages naveennamani index page mdx or pages index naveennamani page mdx file I prefer the last filename for this example Once you create the file add any markdown content hit localhost naveennamani url to see your markdown content getting converted into html For using react components inside your mdx files simply import them and use Hello worldimport Counter from Counter lt Counter gt This will show a heading with an interactive counter that is also shown on home page Prerendering and inventing new problemsWhen you stop the dev server and want to build your awesome website as a static content you can use vite plugin ssr prerender feature Just add the following script to package json scripts prerender npm run build amp amp vite plugin ssr prerender Now when you run npm run prerender you ll see that dist client and dist server folders are created and build files are populated there But prerendering is failing with workspace example nn blog dist server assets naveennamani page js var react require mdx js react Error ERR REQUIRE ESM require of ES Module workspace example nn blog node modules mdx js react index js from workspace example nn blog dist server assets naveennamani page js not supported Isn t that the same problem we solved earlier Yes But why again This time the problem is created in the following order When you run npm run build it runs vite build and vite build ssr with the first command building assets for dist client and second command for dist server While dist client assets are all esm modules dist client build output are cjs modules So again mdx js react which is a ESM only module is failed to import through require This time we can generate ES modules instead of CJS modules by configuring build options in vite config js as follows import react from vitejs plugin react import ssr from vite plugin ssr plugin import mdx from mdx js rollup import defineConfig from vite export default defineConfig plugins react mdx providerImportSource mdx js react ssr build rollupOptions output format es When you run npm run prerender again you can see that dist server folder contains files which are ES modules But you still get this complicated error Error ERR MODULE NOT FOUND Cannot find module workspace example nn blog node modules react jsx runtime imported from workspace example nn blog dist server assets index page b jsDid you mean to import react jsx runtime js Writing a vite plugin to solve our problemsAt first sight the error seems like a spelling mistake But if you google there is a long list of comments in the official react repo issue The problem can be simply solved by adding js extension to the import but how to do that automatically Let s write a vite plugin to do that for us Writing a vite plugin is very simple if you follow the Vite plugin API This is what I come with export default function fix ssr esm modules replacements function transform code id ssr if ssr ssr is true when vite build ssr is run return replacements reduce prevCode find replacement gt return prevCode replaceAll find replacement code return configuration of our plugin used by vite name vite plugin fix ssr esm modules apply build execute only for build tasks enforce post execute after build finished transform transform transformation function that returns transformed code Now place the code in fix ssr esm modules js file and then import and use this plugin in vite config js file as follows import fix ssr esm modules from fix ssr esm imports js export default defineConfig plugins react mdx providerImportSource mdx js react ssr fix ssr esm modules find react jsx runtime replacement react jsx runtime js find react dom server replacement react dom server js build rollupOptions output format es The plugin transforms the build files and replaces the import as given as options to the plugin Now you can run npm run prerender and serve the files in dist client statically using npx serve Congratulations you just built a static site using vite plugin ssr Final touchThe final version of the source code of the project is available in github naveennamani vite ssr mdx There is a small inconsistency with server index js file but that s an alternative I found while I m writing this article Sorry for the long post if you come here after all here is a potato for you 2022-03-31 19:01:28
海外TECH Engadget Facebook News Feed bug injected misinformation into users' feeds for months https://www.engadget.com/facebook-news-feed-bug-misinformation-195411369.html?src=rss Facebook News Feed bug injected misinformation into users x feeds for monthsA “bug in Facebook s News Feed ranking algorithm injected a “surge of misinformation and other harmful content into users News Feeds between last October and March according to an internal memo reported byThe Verge The unspecified bug described by employees as a “massive ranking failure went unfixed for months and affected quot as much as half of all News Feed views quot The problem affected Facebook s News Feed algorithm which is meant to down rank debunked misinformation as well as other problematic and “borderline content But last fall views on debunked misinformation began rising by “up to percent according to the memo while other content that was supposed to be demoted was not “During the bug period Facebook s systems failed to properly demote nudity violence and even Russian state media the social network recently pledged to stop recommending in response to the country s invasion of Ukraine according to the report More worrying is that Facebook engineers apparently realized something was very wrong ーThe Verge reports the problem was categorized as a “severe vulnerability in October ーbut it went unfixed until March th because engineers were “unable to find the root cause The incident underscores just how complex and often opaque Facebook s ranking algorithms are even to its own employees Whistleblower Frances Haugen has argued that issues like this one are evidence that the company needs to make its algorithms transparent to outside researchers or even move away from engagement based ranking altogether A Facebook spokesperson confirmed to The Verge that the bug had been fixed saying it “has not had any meaningful long term impact on our metrics Still the fact that it took Facebook so long to come up with a fix is likely to bolste calls for the company to change its approach to algorithmic ranking The company recently brought back Instagram s non algorithmic feed partially in response to concerns about the impact its recommendations have on younger users Meta is also facing the possibility of legislation that would regulate algorithms like the one used in News Feed 2022-03-31 19:54:11
海外TECH Engadget E3 2022 is canceled, but might be back next year https://www.engadget.com/e3-2022-fully-canceled-194216531.html?src=rss E is canceled but might be back next yearMultiple publications are reporting that E is fully canceled Both the physical and a planned digital version of the gaming convention have been scrapped for this year according to IGN and Variety The Entertainment Software Association ESA which organizes the show has yet to respond to Engadget s request for confirmation GamesBeat has received official statement confirming the cancelation though nbsp In January the ESA announced that E would be an online only event citing concerns over quot COVID and its potential impact on the safety of exhibitors and attendees quot That statement was provided to GamesBeat and according to today s statement to the publication the ESA said quot E will return in quot This story is developing please refresh for updates 2022-03-31 19:42:16
海外TECH Engadget Xbox Game Pass will reportedly get a family plan https://www.engadget.com/xbox-game-pass-reportedly-is-adding-a-family-plan-192723376.html?src=rss Xbox Game Pass will reportedly get a family planThe days of getting kicked off of Xbox because a partner or family member decides to sign in from another room may soon be over Microsoft is reportedly adding a family plan as a separate subscription tier to its Xbox Game Pass according to Windows Central nbsp Engadget reached out to Microsoft for confirmation of the news but the company is keeping its lips sealed for now “We are always looking for ways to improve the Game Pass experience and add more value for members which includes regularly testing and refining features based on community feedback However we have nothing to announce at this time quot wrote a Microsoft spokesperson in an email to Engadget Unlike Netflix Spotify and many other subscription services the Xbox Game Pass currently has no option for multiple users to share one account This has been a common frustration amongst Xbox players over the years particularly those who share a household with other people who love to play games Xbox Game Pass subscriptions are tied to specific Xbox profiles and not specific devices allowing players to sign in from anywhere While players can technically add a secondary Xbox console to their Game Pass subscription the primary account holder must be signed in for the second person to access their games Households with multiple gamers often get around this inconvenience by paying for multiple individual Game Pass subscriptions The family plan will reportedly allow up to five players on a single subscription and should debut later this year It is unknown what the exact pricing will be and whether the family plan will be exclusive to Xbox Game Pass Ultimate or include the other subscription tiers nbsp A family plan will likely give Microsoft an extra edge over Sony Playstation which this week announced a newly revamped set of subscription plans ーnone of which include a family plan ーto compete with the Xbox Game Pass nbsp As we ve noted in the past Microsoft has been very eager to grow its Xbox Game Pass subscriber base The cloud gaming service is currently at million subscribers as of this January The company s billion acquisition of Activision Blizzard is expected to close next summer meaning popular titles like Call of Duty Diablo and World of Warcraft are coming to Game Pass It s not surprising that one of the ways Microsoft will accommodate this larger subscriber base is by making it easier for households to share a subscription 2022-03-31 19:27:23
金融 金融庁ホームページ 「保険業法施行令の一部を改正する政令」について公表しました。 https://www.fsa.go.jp/news/r3/hoken/20220331.html 保険業法 2022-03-31 20:00:00
金融 金融庁ホームページ GビズID(デジタル庁所管)のサービス利用が復旧し、金融庁電子申請・届出システムのご利用ができるようになりました。 https://www.fsa.go.jp/news/r3/sonota/20220331-5.html 電子 2022-03-31 19:50:00
ニュース BBC News - Home Ukraine war: 'Most Russian troops' leaving Chernobyl, Ukraine says https://www.bbc.co.uk/news/world-europe-60945666?at_medium=RSS&at_campaign=KARANGA plant 2022-03-31 19:41:13
ニュース BBC News - Home Conversion therapy: Government plans for ban scrapped https://www.bbc.co.uk/news/uk-60947028?at_medium=RSS&at_campaign=KARANGA legislative 2022-03-31 19:26:25
ニュース BBC News - Home Ex-hostage recounts ordeal at trial of Islamic State jihadist https://www.bbc.co.uk/news/world-us-canada-60881825?at_medium=RSS&at_campaign=KARANGA syria 2022-03-31 19:28:09
ニュース BBC News - Home Rotherham: Grooming gang detective cleared of misconduct https://www.bbc.co.uk/news/uk-england-south-yorkshire-60940507?at_medium=RSS&at_campaign=KARANGA rotherham 2022-03-31 19:18:00
ニュース BBC News - Home Ukraine war: Russia blocks buses heading to Mariupol, says Ukraine https://www.bbc.co.uk/news/world-europe-60938429?at_medium=RSS&at_campaign=KARANGA deputy 2022-03-31 19:16:01
ニュース BBC News - Home Wolfsburg 2-0 Arsenal (agg: 3-1): London side knocked out at quarter-final stage https://www.bbc.co.uk/sport/football/60935406?at_medium=RSS&at_campaign=KARANGA Wolfsburg Arsenal agg London side knocked out at quarter final stageArsenal are knocked out of the Women s Champions League at the quarter final stage after being beaten on aggregate by Wolfsburg 2022-03-31 19:02:45
ビジネス ダイヤモンド・オンライン - 新着記事 池上彰が解説!プーチンの思考回路は「ロシア革命とレーニン」への恨みでつかめる【動画】 - 混迷ウクライナ https://diamond.jp/articles/-/300454 思考回路 2022-04-01 04:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 丸井のエポスカード「育ての親」が古巣を提訴、特許訴訟で露呈した“異形の王国”の全貌 - 丸井 レッドカード https://diamond.jp/articles/-/300577 2022-04-01 04:47:00
ビジネス ダイヤモンド・オンライン - 新着記事 40代で年収が高い職種ランキング【企画・管理系】 2位経営企画/事業企画、1位は? - DIAMONDランキング&データ https://diamond.jp/articles/-/300661 diamond 2022-04-01 04:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 中国が直面する「地政学的リスク」、“中華帝国”再建を画策も内外に懸念 - ウクライナ危機の本質がわかる「地政学」超入門 https://diamond.jp/articles/-/300252 中華帝国 2022-04-01 04:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 欧米中銀が金融正常化開始、取り残された日銀の「緩和維持リスク」 - 政策・マーケットラボ https://diamond.jp/articles/-/300660 中央銀行 2022-04-01 04:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 ウクライナ侵攻で高まる「デフレ圧力」、日本経済が資源高騰の抵抗力を高める方策 - 政策・マーケットラボ https://diamond.jp/articles/-/300672 ウクライナ侵攻で高まる「デフレ圧力」、日本経済が資源高騰の抵抗力を高める方策政策・マーケットラボ日本の物価の上がり方は、を一時的に超える程度で限定的だが、賃金の回復が緩慢なため、家計の実質可処分所得はほど減少する見込みだ。 2022-04-01 04:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 「シニアは勝海舟役に徹すべき」、松田公太と安宅和人が語る新たな日本 - 経営・戦略デザインラボ https://diamond.jp/articles/-/300385 安宅和人 2022-04-01 04:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 ウィル・スミス騒動に学ぶジョークの流儀、日本のビジネスマンに最適なあんばいは? - 今週もナナメに考えた 鈴木貴博 https://diamond.jp/articles/-/300658 ウィル・スミス騒動に学ぶジョークの流儀、日本のビジネスマンに最適なあんばいは今週もナナメに考えた鈴木貴博「やっちまったぁ」と両者ともに思っているのではないでしょうか。 2022-04-01 04:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 NATO加盟国、国防費増額急ぐ ウクライナ侵攻で認識新たに - WSJ発 https://diamond.jp/articles/-/300777 認識 2022-04-01 04:12:00
ビジネス ダイヤモンド・オンライン - 新着記事 韓国は「北朝鮮のICBM発射」に圧力で対抗すべき理由、元駐韓大使が解説 - 元駐韓大使・武藤正敏の「韓国ウォッチ」 https://diamond.jp/articles/-/300657 大陸間弾道ミサイル 2022-04-01 04:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 「友達ができず孤独で不安」外国人留学生が日本社会に溶け込みづらいワケ - China Report 中国は今 https://diamond.jp/articles/-/300568 「友達ができず孤独で不安」外国人留学生が日本社会に溶け込みづらいワケChinaReport中国は今月から始まる新学期や新生活を前に、多くの日本の外国人留学生が「果たして、日本人の友達はできるのだろうか」と悩んでいる。 2022-04-01 04:05:00
ビジネス ダイヤモンド・オンライン - 新着記事 コロナ感染拡大の上海、隠された高齢者病院の実態 - WSJ発 https://diamond.jp/articles/-/300778 感染拡大 2022-04-01 04:02:00
ビジネス 東洋経済オンライン 設置費用150億円、東海道線「村岡新駅」の課題 藤沢・鎌倉両市長と湘南モノレール社長に聞く | 駅・再開発 | 東洋経済オンライン https://toyokeizai.net/articles/-/578162?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-04-01 04:30:00
IT 週刊アスキー iOS 15.4.1配信開始 iOS 15.4でバッテリーの減りが早い問題などに対応 https://weekly.ascii.jp/elem/000/004/088/4088033/ iphone 2022-04-01 04:25:00

コメント

このブログの人気の投稿

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

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

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)