投稿時間:2021-11-25 01:35:40 RSSフィード2021-11-25 01:00 分まとめ(44件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita #OpenAI の Codex で JavaScript のプログラムを生成して p5.js Web Editor上で動かす(単純な四角形の描画) https://qiita.com/youtoy/items/dec25c163b0d16ff7d5c おそらく、もとはAIが生成した文章が危険な使われ方をしないように、という方向がメインのものっぽい内容でしたOpenAIのCodex、試した話生成されたコードの内容等を記事にしたり投稿したりできるんだっけという部分を確認したくて、OpenAICodexFAQsを読んでる。 2021-11-25 00:01:41
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) qtを使用したC++でのGUIのモードレスダイアログがメインウィンドウの後ろに表示される https://teratail.com/questions/370868?rss=all qtを使用したCでのGUIのモードレスダイアログがメインウィンドウの後ろに表示される前提・実現したいことqtを使用してCでGUIの作成を行っています。 2021-11-25 00:53:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) クイックソート、再帰関数での戻り値 https://teratail.com/questions/370867?rss=all ここで質問なのですが、このなどmiddleに入った値をどのように最終的にクイックソートしたリストで戻り値として返してくるのかが分からないです。 2021-11-25 00:35:32
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Reactで、JSONファイルの表示の仕方が分からない https://teratail.com/questions/370866?rss=all Reactで、JSONファイルの表示の仕方が分からない前提・実現したいこと上記サイトからpostsを取得して、postsのidをkeyにしたオブジェクトを作成する。 2021-11-25 00:26:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) MHCにおけるhttp serverライブラリ追加時に下層レイヤのインクルードが自動的に行われない問題について https://teratail.com/questions/370865?rss=all MHCにおけるhttpserverライブラリ追加時に下層レイヤのインクルードが自動的に行われない問題について前提・実現したいことMHCMPLABnbspHarmonynbspCoreのProjectnbspGraphにおいてApplicationnbspLayerからHTTPnbspServerを追加した場合、自動的に下層のTCPレイヤ、IPレイヤ、MACレイヤが追加されます。 2021-11-25 00:20:54
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) railsの削除機能を使いたい https://teratail.com/questions/370864?rss=all railsの削除機能を使いたい前提・実現したいことここに質問の内容を詳しく書いてください。 2021-11-25 00:20:28
Linux Ubuntuタグが付けられた新着投稿 - Qiita ファイアウォールがけしからん「無料版 SoftEther」を firewalld と knock とその他諸々を使ってセキュリティを気休め程度に良くする会 https://qiita.com/soprano1125/items/8a209446cce6a3a03476 が、IPvなアドレスはポートを開ける予定がまったくないので試していませんが多分いけそうな気がするのはry組み込みと書きましたが、どのサービスでも同じように↑のserviceファイルをsystemdに読み込ませて各サービスを有効にしてスタートさせたりincronのジョブを読み込ませるだけなので細かいことはGoogle先生に聞いてみましょうぉぃ確認スマホ回線のテザリングやMAPEなどの線からknockしてVPN接続できるか確認します。 2021-11-25 00:05:59
Docker dockerタグが付けられた新着投稿 - Qiita DockerfileにおけるCMDとRUNの挙動 https://qiita.com/subretu/items/31a387510f84daaa4c1c ※Dockerfileの最後は以下のように変更すること。 2021-11-25 00:12:22
海外TECH MakeUseOf 4 Reasons Why You Shouldn't Buy a Smart TV https://www.makeuseof.com/reasons-to-not-buy-smart-tv/ reasons 2021-11-24 15:46:56
海外TECH MakeUseOf 3 Reasons Why Silicon is the Ideal Semiconductor for Chip Manufacturing https://www.makeuseof.com/why-silicon-is-the-ideal-semi-conductor-for-chip-manufacturing/ silicon 2021-11-24 15:46:56
海外TECH MakeUseOf The 5 Best Alternatives to Samsung Notes https://www.makeuseof.com/best-alternatives-to-samsung-notes/ galaxy 2021-11-24 15:30:24
海外TECH MakeUseOf 10 Tricks to Keep Your Outlook Email and Microsoft Accounts Secure https://www.makeuseof.com/tag/tricks-outlook-microsoft-account-secure/ windows 2021-11-24 15:16:04
海外TECH MakeUseOf What Is Nvidia Image Scaling and How Does It Work? https://www.makeuseof.com/what-is-nvidia-image-scaling/ performance 2021-11-24 15:16:03
海外TECH DEV Community Personalised GitHub profile https://dev.to/jurgyte/personalised-github-profile-2bd9 Personalised GitHub profileNot so long ago I attended a personal branding workshop it s quite popular topic these days My mentor inspired me to unify my presence across internet The idea behind it was to make me easily recognisable across the most common platforms such as Twitter Github or LinkedIn I found this task very fun and creative Mostly it was changing my nickname and photo but it also involved some very very simple coding which was a double fun for me I made my GitHub profile look more attractive To customise your GitHub profile looks you need to create a README for it It s very easy to do Create a repository with a name that matches your GitHub username Make sure this repository is public Add a file named README md in its root Any content in this file will display in your profile README section The biggest challenge for me was to find the answer to the question what should I add to this README GitHub has some suggestions such as to add an About me section that describes your work and interests contributions you re proud of guidance on communities where you re involved But there are even more things you can add for example widgets in order to show stats on your GitHub activity or your most used programming languages You can add small badges to show various information such as how many visitors you had how many bugs you fixed any kind of important ratings or number pf social channel followers and etc Adding a badge is very simple you just need to use this code URL OF THE BADGE WITH PARAMS in your README md file I also checked few list with inspirational GitHub profiles and this blog post with few suggestions In the end I decided to keep my profile simple to mark what are the most important activities I do across internet I marked the tools I use daily and added a small widget to see how many people visit my GitHub profile something fun for myself 2021-11-24 15:42:26
海外TECH DEV Community Get started with discord.py! https://dev.to/tejasdev/get-started-with-discordpy-14l0 Get started with discord py Discord py is a very fantastic API It helps us in creating Discord bots easily People have made game bots RPG bots Moderation Bots Economy bots and even more Using this guide you can learn how to use it Install discord pyMake sure you have python installed on your computer You have to install discord py withpip install discord pyvoilà discord py has been installed For making bots you ll need to have a developer account You can check this guide Basics of developing a botWhen starting you have to choose weather to use discord Client or commands Bot discord Client •Is more lightweight than commands Bot•Is best if you re not going to be using commandscommands Bot •Is best if your bot is going to have commands•Supports easy discord object conversionIn this series we will make a bot with commands Bot We have to start by importing discord and discord ext commandsimport discordfrom discord ext import commandsbot commands Bot command prefix bot run YOUR TOKEN HERE We initialized a class as an object We defined this class to the variable bot which can be named whatever you want Most people use bot or client Now when our bot is defined we can start with our first command In discord py we make commands like this bot command name command name description description for help command async def command ctx other arguments here Tell bot what to do hereLet s make a command which will greet the user with a hello We ll use ctx author for doing this bot command name Hello description Greets the sender async def hello ctx await ctx reply f Hello ctx author name f stringNow when we greet the user it will say Hello USER Congrats You ve just written a bot using discord py Run the code When you ll type hello it should respond Source Code 2021-11-24 15:39:12
海外TECH DEV Community Build a mobile audio chat app in an afternoon with React Native https://dev.to/trydaily/build-a-mobile-audio-call-app-in-an-afternoon-with-react-native-3j3g Build a mobile audio chat app in an afternoon with React NativeAt Daily one of our primary focuses has been supporting audio only apps with our APIs Lately we ve been hearing more and more discussions about how to help app users avoid Zoom fatigue ーthe feeling of being burnt out from sitting in video calls all day long Audio only apps are a great solution to this issue as they typically require less cognitive resources to participate in They are also a great option for larger calls or calls on mobile devices as they tend to have lower CPU requirements So you and your devices need to think less To help our customers support their audio only use cases we launched an audio starter kit a k a Party Line earlier this year which includes demo apps in React web iOS Android and React Native In today s tutorial we ll be doing a deeper dive into how the React Native version of Party Line works By the end of this tutorial you ll know how to build a Clubhouse esque Daily audio app using our react native daily js library and Daily s customizable call object Who is this tutorial for To get the most out of this tutorial some basic React Native knowledge is useful If you ve never used React Native before but are familiar with React and React hooks you should be able to follow along Note React and React Native code is fairly similar but does have some differences so we ll do our best to explain those differences as they come up Getting set up locallyTo run the Party Line app locally follow the instructions located in the Github repo s README Instructions for both iOS and Android are included depending which OS you prefer to primarily test React Native apps Feature set and backlogLet s start by describing which audio call features will and won t be included Party Line will include two views A home screen with a form to join or create an audio callAn in call view once a call has been joinedLet s review some of the basic functionality From the home screen the local user can fill out their name in the form and either specify a room code or leave the code blank If they leave the code blank Party Line will automatically create a new room and join it when the form is submitted Each room created in Party Line will expire after minutes The expiry is set when the room is created via the Daily REST API and something we ve included to avoid long living demo rooms This can be adjusted in the room settings to match your use case however Once the room is joined the room code can be shared with anyone Rooms created from one app are compatible with any of our other Party Line apps iOS Android React web or React Native We ll allow for three different types of participants moderator speaker listener Participant types are handled as follows The room creator is the moderatorModerators are indicated in the UI by a star next to their initialsModerators can promote listeners to speakers speakers to listeners and anyone to a moderatorListeners can raise or lower their hands to indicate they would like to speakSpeakers and moderators can mute unmute themselves but only mute othersWhen a moderator leaves the call and there are no other moderators present the call ends for everyoneIn terms of constraints we will not Use any external account management or authenticationHave a database though we recommend handling the participant types with a database for production level apps Have a backend aside from serverless functions which call the Daily REST APIOffer a list of rooms to join the participant will need to know the code for the room they want to join This would be a great feature to add though We ll cover how most of this works below or share links to existing resources for anything we don t have time to go over Component structureBefore we dive into the code let s plan the structure we re going to use for our components Here we have our App component as the top level parent component It will render the Header component with the app title and information It will also conditionally render either the InCall component which handles the Daily audio call or the PreJoinRoom which has a form to join a Daily audio call depending on our app state Our InCall component has the most complexity because it handles our Daily call InCall contains the following components One Counter component which displays how much time is left in the callA CopyLinkBox to copy and share the room codeA Tray to control your local microphone raise your hand or leave the callA Participant component for each participant It renders Participant UI with each participant represented by a box with their initials and a “show more menu button that renders the Menu component in certain conditions More on that below The DailyMenuView component which provides the participant s audio for the call Note In a React project you would just render an lt audio gt element CallProvider jsx The brain of this operation To keep our logic organized and in mostly one place we are using the React Context API which helps us store global app state Our App component wraps its contents in the CallProvider component our context which means all of our app s contents can access the data set in our call context App jsxfunction App return lt CallProvider gt lt AppContent gt lt CallProvider gt Note The Context API can be used by any React app not just React Native In fact we did just that in the web version of this app Now let s spend some time understanding what s happening in CallProvider We can t cover every detail here so let us know if you have questions There are several actions i e methods we define in CallProvider Creating a new Daily room createRoom with the Daily REST API We re using a Netlify serverless function for this but you can use the Daily REST API endpoints however works best for your app Creating a Daily meeting token createToken for meeting moderators with the Daily REST API Same as above regarding using serverless functions Joining a Daily room joinRoom Leaving a room the local participant is currently attending leaveCall Muting unmuting handleMute handleUnmute Raising lowering your hand raiseHand lowerHand Changing getting a participant s account type e g upgrading a listener to a speaker Adding Daily event listeners Initializing app state that will be shared with other componentsStarting with our app state let s look at which values we ll initialize and export to be used throughout our app CallProvider jsxexport const CallProvider children gt const view setView useState PREJOIN pre join in call const callFrame setCallFrame useState null const participants setParticipants useState const room setRoom useState null const error setError useState null const roomExp setRoomExp useState null const activeSpeakerId setActiveSpeakerId useState null const updateParticipants setUpdateParticipants useState null …return lt CallContext Provider value getAccountType changeAccountType handleMute handleUnmute displayName joinRoom leaveCall endCall removeFromCall raiseHand lowerHand activeSpeakerId error participants room roomExp view gt children lt CallContext Provider gt How updating a participant type works using sendAppMessageIn this demo we manage participant types moderator speaker or listener by appending a string to the end of each participant s username which is not shown in the UI e g username MOD for moderators Note For production level apps we recommend building a backend for participant type management This current solution is meant to keep the code client side for demo purposes That said let s look at how participant type management works Whenever a moderator updates another participant s account type that update will be communicated to other participants with the Daily method sendAppMessage All participants will receive that app message via the app message event listener which is added in CallProvider callFrame on app message handleAppMessage This will use the callback method handleAppMessage which will update the appended string on the username to the new account type e g LISTENER to SPEAKER CallProvider jsx const handleAppMessage async evt gt console log APP MESSAGE evt try switch evt data msg case MSG MAKE MODERATOR console log LEAVING await callFrame leave console log REJOINING AS MOD let userName evt data userName Remove the raised hand emoji if userName includes const split userName split userName split length split split joinRoom moderator true userName name room name break case MSG MAKE SPEAKER updateUsername SPEAKER break case MSG MAKE LISTENER updateUsername LISTENER break case FORCE EJECT seeya leaveCall break catch e console error e Making someone a moderator is slightly more complicated because they need to rejoin the call with a Daily token which will give them the owner privileges they need to be able to mute other participants To do this we kick them out of the call quietly callFrame leave and then immediately rejoin them as a moderator with an owner token Note To make a participant a meeting owner with a meeting token the is owner token property must be true See our token configuration docs for more information As we go through specific components below we ll loop back to some of the other specific methods outlined in CallProvider as they re used PreJoinRoom formThe PreJoinRoom component is a form with three inputs first name last name join code and a button to submit the form Only the first name is a required field the last name is optional and if no join code is provided we take that to mean the user wants to create a new room to join Let s focus on what happens when you submit the form PreJoinRoom jsxconst PreJoinRoom handleLinkPress gt const joinRoom error useCallState const firstName setFirstName useState const lastName setLastName useState const roomName setRoomName useState const submitting setSubmitting useState false const required setRequired useState false const submitForm useCallback e gt e preventDefault if firstName trim setRequired true return if submitting return setSubmitting true setRequired false let userName firstName trim lastName trim let name if roomName trim length name roomName We track the account type by appending it to the username This is a quick solution for a demo not a production worthy solution userName userName LISTENER else userName userName MOD joinRoom userName name firstName lastName roomName joinRoom In submitForm we first make sure the first name is filled out If not we update our required state value which blocks the form from being submitted Next we get the local user s username by joining the first and optional last name values let userName firstName trim lastName trim lastName trim If there s a room code roomName provided in the form we assign that to our name variable and update the username to have LISTENER appended to it If there is no room code we don t set a room name and append MOD to the username As mentioned the person creating the room is the moderator by default so we track that in the name if roomName trim length name roomName userName userName LISTENER else userName userName MOD Once we have our userName and optional room name we can then call joinRoom a method from CallProvider const joinRoom async userName name moderator gt if callFrame callFrame leave let roomInfo name The first person to join will need to create the room first if name amp amp moderator roomInfo await createRoom setRoom roomInfo When a moderator makes someone else a moderator they first leave and then rejoin with a token In that case we create a token for the new mod here let newToken if moderator create a token for new moderators newToken await createToken room name const call Daily createCallObject videoSource false const options This can be changed to your Daily domain url roomInfo name userName if roomInfo token options token roomInfo token if newToken token options token newToken token await call join options then gt setError false setCallFrame call call setLocalAudio false setView INCALL catch err gt if err setError err joinRoom has the following steps It leaves the current room if you re somehow already in one This is mostly defensive programming for those terrible horrible no good very bad code bug days It creates a new room with our createRoom method mentioned above if a room name isn t providedIt creates a token if the participant joining is a moderator This can happen if they are the first person to join or if they re rejoining as a moderator after being upgradedNext we create our local Daily call object instance const call Daily createCallObject videoSource false We ll go into more detail about the videoSource property below We also set our call options that we ll need before joining the call room URL being joined username and optional token for moderatorsconst options url roomInfo name userName Finally we join the call and update our local state accordingly including updating our view value to incallawait call join options then gt setError false setCallFrame call Now mute so everyone joining is muted by default call setLocalAudio false setView INCALL Once this is complete we ll be brought to our InCall component because of this condition in App js view INCALL amp amp lt InCall handleLinkPress handleLinkPress gt The in call experience Moderators and the rest of usNow that we know how to get into a call let s focus on how we actually use the react native daily js library to get our audio working The InCall component renders a Participant component for each participant in the call and displays them in the UI based on who can speak Moderators and speakers are shown at the top and listeners are at the bottom Let s look at how we render the Speakers section which includes moderators and speakers i e anyone who can unmute themselves InCall jsx const mods useMemo gt participants filter p gt p owner participants getAccountType const speakers useMemo p gt participants filter p gt return getAccountType p user name SPEAKER participants getAccountType The individual participant UI includes details like their name initials a star emoji if they re a moderator and a “more menu with some actions depending on their participant type The most important aspect of the Participant component is not visible in the UI though the DailyMediaView component Participant jsximport DailyMediaView from daily co react native daily js const Participant participant local modCount zIndex gt audioTrack amp amp lt DailyMediaView id audio participant user id videoTrack null audioTrack audioTrack gt This is a component imported from react native daily js and accepts audio and or video tracks from your participants list also provided by Daily s call object recall callObject participants Since this is an audio only app we set videoTrack to null and audioTrack to each participant s audio track Participant jsxconst audioTrack useMemo gt participant tracks audio state playable participant tracks audio track null participant tracks audio state Once the audio track is set you will be able to hear the participant Sir this is an Arby s Letting moderators mute speakersNow that we have the audio playing let s take a quick look at how we mute participants As mentioned only participants who joined with an owner meeting token are permitted to mute others And by the way we don t recommend ever letting participants unmute other participants It s a bit invasive To do this we can take advantage of Daily s updateParticipant method CallProvider jsxconst handleMute useCallback p gt if callFrame return console log MUTING if p user id local callFrame setLocalAudio false else callFrame updateParticipant p session id setAudio false setUpdateParticipants unmute p user id Date now callFrame Here in CallProvider we have one handleMute method for participants to mute themselves or others If they re muting themselves they call setLocalAudio false If they re muting someone else they call updateParticipant with the to be muted participant s session id and a properties object with setAudio equal to false You you you oughta knowOne important aspect of audio only apps to be aware of is device permissions Since Daily s React Native library is compatible with audio and video apps it will ask for microphone and camera permissions unless we intervene If you don t address this issue your app users will see both of these device permission requests which may be a bit of a red flag for them Why would you need camera permissions for an audio app To help your apps seem less ーwell ーcreepy you can simply set videoSource to false when you create the local call object instance const call Daily createCallObject videoSource false Adding this one detail means your users are only asked for microphone permissions ResourcesWe hope this overview of the Party Line app helps you better understand how it works under the hood We couldn t cover every detail so check out these existing tutorials resources that cover related topics Our overview of the Party Line projectCreating audio only calls with daily jsA tutorial on creating owner meeting tokens in ReactOur Playground app repo in case you re interested in seeing a React Native video call exampleBuilding a video or audio only call embedded in a webpage via a Chrome extensionIn our next React Native tutorial we ll focus on building a video call app so stay tuned for that As always if you have any questions let us know 2021-11-24 15:35:01
海外TECH DEV Community Cookie Cutter Flask - Generate Websites with ease https://dev.to/sm0ke/cookie-cutter-flask-generate-websites-with-ease-4c8a Cookie Cutter Flask Generate Websites with easeHello Coders This article presents an open source tool that we can use to generate simple yet modern presentation websites on top of Flask Framework Cookie Cutter Flask extends the popular CookieCutter command line tool to build simple Flask projects enhanced with database authentication and Docker support using a theme able approach where the user can select the design during the generation process In the end without any coding effort the generator will provide a seed project similar to these LIVE samples Flask Pixel Lite LIVE demo source code Flask Material Kit LIVE demo source code How It worksCookieCutter tool is a popular open source generator written in Python that knows how to build software projects using templates and user input Basically a codebase or a template project can be customized during the generation process based on the user input Types of customizations Project name author and license typeDecide the database type we will use in our projectInject deployment scripts for DockerAdd or remove basic features authentication for instance In order to use our simple Flask generator a short list with tools should be already present in the workstation Python the language that powers CookieCutterGIT versioning command line toolA modern editor like VsCode or AtomWith all the tools properly installed and accessible in the terminal window we can proceed further with our setup Step Install Python modules CookieCutter and GitPython pip install cookiecutter pip install GitPythonStep Generate the project via Flask Cookie Cutter cookiecutter The most important step is when we select the design gt gt gt Select theme material kit pixel liteChoose from lt HERE We select the UIAs mentioned before the generator is theme able and we can choose the design Pixel Lite or Material Kit Pixel Lite The Freelancer pageMaterial Kit Website User Page Once the Cookie Cutter collects the input from the user the selected theme is downloaded from Github and the project is generated by taking into account all user options After the process is completed we can compile and start the project using Docker or simply via a manual classic build for a Flask Python project For the complete build instructions please access the source code published on Github or ask for support via email or Discord Thanks for reading For more resources and support feel free to access AppSeed for support via Email and DiscordFree Dashboards crafted in Django Flask and React 2021-11-24 15:31:54
海外TECH DEV Community Building A Text To Speech Converter For Beginners! https://dev.to/jaikt/building-a-text-to-speech-converter-for-beginners-4gpc Building A Text To Speech Converter For Beginners Hey everyone Today we ll be building something just too awesome in this article you will learn how to create a Text To Speech Converter with HTML CSS and JavaScript I have worked very hard on this project to make it come true all that for not even a single penny Do stargaze and support this project at the official repository for this project on GitHub and a demo is available here How Cloud Speech Works Source Google What Is Text To Speech Converter In The First Place Core Basics Text To Speech TTS is a technology that empowers your text to be converted into speech verbal sounds In this project Text To Speech Converter you can convert your text into speech with different voices and accents powered by native output methods for every type of device A pause and resume button that is embedded into the core of your text is above the minimum requirement of words characters About The Text To Speech Converter Project Understanding Basics In the JavaScript code originally I got the user text and call a function textToSpeech with parsing the user input text as an argument Inside this function leveraging the speech synthesis property of the window object I converted the user input text to speech Speech Synthesis is defined as a web speech API that moderates the speech service using native speech verbal s available on the base device After this I got all the available verbal voices from the user device using the getVoices scheme of Speech Synthesis and insert it into the attributed HTML select tag That s all and I request you to continue reading to get more knowledge depth on what the code is actually performing Source SugarMint Building Text To Speech Converter Project Free Source Code To build this Text To Speech Converter project you need to create three core files namely a html css and a js file After organizing these files just paste the given codes into your file You can further download the source code files of this Text To Speech Project from the proffered download button below at the end of this article Firstly create an HTML file with a filename of index html and paste the following codes into your HTML file Save It you ve to create a file with an html extension at the last lt doctype html gt lt html lang en gt lt head gt lt Built By RoyalityFree s Blog gt lt meta charset utf gt lt title gt Text To Speech RoyalityFree Codes lt title gt lt meta name viewport content width device width initial scale shrink to fit no gt lt link rel stylesheet href integrity sha YWzhKLwhUzgiheMoBFwWCKVqpHQAEuvilgFAnVJUDwKZZxkJNuGMXkWukWCrrwslkyWNGmYEduTA crossorigin anonymous referrerpolicy no referrer gt lt link rel stylesheet href integrity sha MCw SFnGEfJTGXwEOngsVZtNXFoaoApmYmiuXoPkFOJwJERdknLPMO crossorigin anonymous gt lt link rel stylesheet href assets style css gt lt head gt lt body gt lt div class wrapper gt lt div class container fluid gt lt h class h text center gt Text To Speech lt h gt lt form gt lt div class form group row gt lt label class col sm col form label gt Enter Text lt span class badge badge success gt Max Letters lt span gt lt label gt lt div class col gt lt textarea maxlength gt lt textarea gt lt div gt lt div gt lt div class form group row gt lt label gt Select Voice lt label gt lt div class outer gt lt select gt lt select gt lt div gt lt div gt lt div class form group row gt lt div class col gt lt button type submit class btn btn primary gt Convert To Speech lt button gt lt div gt lt div gt lt form gt lt div gt lt div gt lt script src script js gt lt script gt lt body gt lt html gt Secondly create a CSS file with the filename of style css and paste the following code in the file Save It you have to create a file with css extension at the last Built By RoyalityFree s Blog Codes import url wght amp display swap margin padding box sizing border box font family Poppins sans serif Applied Universally body display flex align items center justify content center min height vh background image linear gradient deg daff bff daff selection color fff background AD Change Selection Colour wrapper width px padding px px border radius px background fff box shadow px px px rgba Box Behind wrapper header font size px font weight text align center wrapper form margin px px form row display flex margin bottom px flex direction column form row label font size px margin bottom px form row nth child label font size px form where textarea select button outline none width height border none border radius px form row textarea resize none height px font size px padding px px border px solid form row textarea webkit scrollbar width px form row outer height px display flex padding px align items center border radius px justify content center border px solid form row select font size px background none form row select webkit scrollbar width px form row select webkit scrollbar track background fff form row select webkit scrollbar thumb background border radius px border right px solid ffffff form button height px color fff font size px cursor pointer margin top px background AFE transition s ease form button hover background fe media max width px wrapper max width px width margin left px margin right px For Mobile View Finally create a JavaScript file with a filename of script js and paste the following code in your JavaScript file Save It you have to create a file with js extension at last const textarea document querySelector textarea voiceList document querySelector select SelectionspeechBtn document querySelector button let synth speechSynthesis isSpeaking true voices function voices for let voice of synth getVoices let selected voice name Google US English selected let option lt option value voice name selected gt voice name voice lang lt option gt voiceList insertAdjacentHTML beforeend option Getting Verbal s synth addEventListener voiceschanged voices function textToSpeech text let utterance new SpeechSynthesisUtterance text for let voice of synth getVoices if voice name voiceList value utterance voice voice synth speak utterance speechBtn addEventListener click e gt e preventDefault if textarea value if synth speaking textToSpeech textarea value if textarea value length gt setInterval gt if synth speaking amp amp isSpeaking isSpeaking true speechBtn innerText Convert To Speech Execute else if isSpeaking synth resume isSpeaking false speechBtn innerText Pause Speech Pause else synth pause isSpeaking true speechBtn innerText Resume Speech Resume else speechBtn innerText Convert To Speech Execute Source VoximPlantText To Speech Converter Last Words That s it you ve now successfully built a Text To Speech Converter Project in native HTML CSS and JavaScript If your code does not work or you have faced any problem issue try downloading the source files from the provided download button below It s priceless and a zip file will be downloaded and then just extract it to your filemanager server etc 2021-11-24 15:28:58
海外TECH DEV Community Rust from the beginning, project management with Cargo https://dev.to/azure/rust-from-the-beginning-project-management-with-cargo-3kfk Rust from the beginning project management with CargoTLDR this article covers how to work with Rust projects using Cargo As soon as you are dealing with more than one file it s a good idea to adopt Cargo Series Your first programVariablesFunctionsRust projects with Cargo you are hereControl flowIO read and write from the consoleError handlingWorking with filesAdvancedOwnership amp BorrowingTesting Project managementWhen you develop software you have a few things you want need to consider The following are some of the major things you need to keep track of Many files For reasons of order you quickly grow out of using more than one file to code in Dividing up you code in many files enables you to get a clearer picture of what you re building which creates order but makes it easier to collaborate with others and other benefits rd party libraries You can definitely write all the code yourself but it will take you a while especially if your project is complicated A better approach is to write business related code yourself and rely on standard libraries as well as rd party libraries for the remaining code Building your project As your project grows it becomes more and more complicated to build You might need to build it differently for different operating systems and for development vs production for example Run tasks As part of creating a large project with many files you will find yourself wanting to run various tasks on your project like building testing linting and so on ResourcesCargo bookLearning path on RustCrates io Here you can find crates i e packages you can use for your projects You can also search for packages via the command line Refer to Cargo book for how to search for that Rust path on Learn CargoOk now that we know a little more about projects and what we re expected to manage how does Rust approach project management The answer is Cargo Cargo comes with your Rust install and helps you with a lot of things like Creating a project Cargo helps you create a project and helps you track things like name version your dependencies and other concepts Build and run your code Cargo can help you compile and run your code Feature management You can also divide up your project in features if you say have a client that only paid for a subset of features In such a case you only want to ship part of the code to said client Read more here on feature managementDependency management Your project will likely consist of dependencies libraries or binaries that you use to build your app You don t want to write code if there is code out there that already solves what you re trying to do Package management When you create a project with Cargo it assumes your project will be a package A package is something you can theoretically share with othersRunning tests Cargo can run tests Read more here on running testsThe above is some of Cargo s features but hopefully right now you know that Cargo is your best friend and that it s fantastic that a tool like this comes built in with a Rust install The topic of Cargo is so large there s a whole book dedicated to it Cargo book Exercise Your first projectTo create your first project using Cargo you invoke the cargo executable with keyword new and lastly with the name of the project like so cargo new project nameCreates a project name subdirectory In said directory we get the following files src main rs gitignoreCargo tomlHere s what the files mean main rs The main rs is our projects main file the entry for our app Here s what main rs contains fn main println Hello world Cargo toml this project file that does two things manage meta information on this project and manage any dependencies your app needs to function Here s what the file looks like package name project name version authors email inferred from Git edition See more keys and their definitions at dependencies As you can see you ve got information on your project under the package portion like name version authors and edition There s another section dependencies that s empty for now as you don t have any external dependencies Build and run your codeTo build and run your project call cargo run in your project directory root cargo runYou should see an output resembling this text Compiling project name v lt path gt project name Finished dev unoptimized debuginfo target s in s Running target debug project name Hello world What you see is Cargo building and running your code and it ends up showing the text Hello world Exercise Make a changeWe ve decided to make a nice looking CLI command line application For that we will use an external library termion that gives us a colored output Add termion by opening up Cargo toml and located the dependencies section and make the following alteration dependencies termion Great now we re telling Cargo we want the library termion next let s leverage that library in our code Open up main rs and change the code to the following extern crate termion use termion color fn main println Red color Fg color Red println Blue color Fg color Blue println Hello world Run your project with cargo run cargo runWhat you see now is your project going to crates io where the termion package is located and attempt to download it Updating crates io index Downloaded termion v Downloaded numtoa v Downloaded libc v Downloaded crates KB in s Compiling libc v Compiling numtoa v Compiling termion v Compiling project name v lt path gt project name last in your terminal output you see the colored output I read somewhere that this might not work on Windows please let me know in the comments if you have issues getting this to work SummaryIn this article we looked at a grow up story when we went from using rustc to compile our code and starting using Cargo for that and many other things Project management means you have a lot of things to consider and Cargo handles many of them Cargo is your new best friend and hopefully you can learn more about using Cargo by the links provided in the resources section in this article All future parts in this series will use Cargo 2021-11-24 15:27:13
海外TECH DEV Community 3 Ways to CENTER a div in CSS https://dev.to/codeoz/3-ways-to-center-a-div-in-css-gl1 Ways to CENTER a div in CSS ways to center a div in HTML CSS With Position Using positions parent position relative child left position absolute top transform translate lt div class parent style background blue width px height px gt lt div class child style color white gt I m center lt div gt lt div gt With Flexbox Using flexbox container flexbox align items center display flex flex direction column justify content center lt div class container flexbox style background green width px height px gt lt div style color white gt I m center lt div gt lt div gt With Grid Using Grid container grid display grid place content center lt div class container flexbox style background orange width px height px gt lt div style color white gt I m center lt div gt lt div gt I hope you like this reading You can get my new book Underrated skills in javascript make the difference for FREE if you follow me on Twitter and send message to me and SAVE Or get it HERE For french developper you can check my YoutubeChannelMY NEWSLETTER ️You can SUPPORT MY WORKS ‍ ️You can follow me on Twitter ‍Github And you can mark this article 2021-11-24 15:11:19
海外TECH DEV Community JAVASCRIPT CHEAT SHEET FOR BEGINNERS https://dev.to/keshav44483499/javascript-cheat-sheet-for-beginners-kp3 JAVASCRIPT CHEAT SHEET FOR BEGINNERSThis video covers all topics in JavaScript Cheatsheet for beginners and this javascript cheat sheet contains all the commands which you will require while writing javascript code Hope you will find this javascript cheat sheet helpful 2021-11-24 15:08:27
海外TECH DEV Community Drawing with Mr. Fourier and Typescript https://dev.to/nordicbeaver/drawing-with-mr-fourier-and-typescript-5h70 Drawing with Mr Fourier and TypescriptWhat if we connect a couple of rotating sticks together and trace the shape they make We can get something like this The most interesting part about this is if we get enough sticks we can draw anything we want You can try it yourself here Just draw a closed that s pretty important shape and press Start This is based on a thing caller Fourier Transform Basically every complex function on a set interval can be represented as an infinite sum of exponents f t ∑n inf⁡inf⁡cnenπit ≤t≤f t sum n inf inf c n e n pi i t le t le f t n inf∑inf​cn​enπit ≤t≤Where cn ∫f t e nπitc n int f t e n pi i t cn​ ∫​f t e nπitBut if we look closer we may notice that every element of that sum is actually a rotating vector Cn So if we manage to represent a shape as a complex function we could find these vectors maybe not all since there is infinite number of them but we don t need all and that would mean drawing the shape just by rotating those vectors I made a video where I tried to explain this in more detail and code it in TypeScript Enjoy 2021-11-24 15:06:59
海外TECH DEV Community Caching Anaconda environments on GitHub Actions https://dev.to/epassaro/caching-anaconda-environments-on-github-actions-2d08 Caching Anaconda environments on GitHub Actions My WorkflowOne of the most time consuming tasks on my workflows is the solving download and installation of Anaconda environments In some cases just solving the dependencies can take up to minutes depending on the platform you are building on This workflow aims to save time and computational resources by caching deployed Anaconda environments using the actions cache task and the conda incubator setup miniconda action Shorter build times and better resource management will benefit not just your organization but also the environment Submission Category Maintainer Must Haves Yaml File or Link to Code epassaro cache conda envs Speed up your builds by caching Anaconda environments on GitHub Actions cache conda envs Speed up your builds by caching Anaconda environments on GitHub Actions View on GitHub Additional Resources InfoI m glad to say that the results of my work have been recently added to the conda incubator setup miniconda action s documentation and should reach more developers soon It s worth mentioning that the documentation of actions cache included use cases for many package managers but not for conda On the other hand the setup miniconda documentation described a way to cache the downloaded packages but that method makes the pipelines even slower Finally I published a post describing the workflow step by step Reduce your build times on GitHub Actions by caching Anaconda environments epassaro・Nov ・ min read github actionshackathon devops 2021-11-24 15:03:39
海外TECH DEV Community Client-side rendering vs server-side rendering vs static site generation. https://dev.to/nstubbe/client-side-rendering-vs-server-side-rendering-vs-static-site-generation-41mh Client side rendering vs server side rendering vs static site generation There s more to developing a website than throwing some HTML and back end code together An important consideration that is often overlooked is how a website gets rendered and delivered to users This can make or break the experience users have and even severely influence a website s rankings in search engines In this article we ll be taking a look at different approaches to rendering websites with dynamic content alongside their pros and cons Client side renderingCurrently the most popular approach when it comes to web applications Client site rendering means the client our user s browser is responsible for rendering the dynamic parts of our website by leveraging JavaScript and a separate back end API React Angular Vue JQuery are mostly used for this approach How it worksLet s say we have a website that shows a list of products When a client loads the website the browser fetches all the HTML CSS and JavaScript files needed to initially display the page However our list of products isn t in those files That s because we want our list to be dynamic We want users to be able to sort filter and search our list to find exactly what they are looking for Instead the client will send a request to our back end API to retrieve a list of products that match the selected filters We get that list as a response and then our client generates the necessary HTML elements to show the products on the page The goodExcellent for pages with a lot of dynamic and interactive content Cost We offload processing power and thus costs to our clients Rendering the page is almost entirely done on their machine Easier to scale We can set up load balancers in front of our back end API without having to make changes in our client side rendered application ️The badClient performance Offloading the work to the client can have an impact on clients with lower end machines This could be problematic when trying to provide services in lower income areas of the world Bad for SEO Not a good approach for pages that need to score high in search rankings The dynamically loaded content could be missed by the crawlers that visit our website When to useClient side rendering is best used when dealing with websites that have a lot of dynamic and interactive content where scaling is important and where we don t really care about SEO Usually these types of websites are web applications Server side renderingAnother approach to showing users dynamic and interactive content is rendering the page on the server and then sending the page to the client with all dynamic content already filled in This approach is usually found on pages that don t have too many users and have basic interactivity such as internal applications in companies PHP and NET MVC typically use this approach We can also configure front end frameworks such as Vue React etc to use server side rendering How it worksLooking back at the previous example we can still create a website with a dynamic list of products However instead of retrieving the list of products every time we change one of the filters and letting the client generate and render the HTML we ll send the filter parameters to a back end service This back end service will then generate the entire page and send it back to the client to display The goodFaster setup time Since all logic is in our back end there s a lot less boilerplate code we need to write which can save a lot of time at the start Can be faster than client side rendering depending on the clients machine and the complexity of the page that is being loaded No JavaScript needed to create a functioning interactive website Good for search engines Since all content is already included in the page on first load this approach works much better for pages that need to have high search engine scores such as product description pages ️The badHigher cost A website with a lot of traffic will be much more costly to run when using server side rendering since all that rendering work on the server requires a lot of extra processing power Does not scale as well The required resources are directly proportional to the traffic on our website Not using JavaScript has certain limits It s important to know these limits and to accept them instead of trying to work around them down the line That last situation is something seen a lot in legacy applications resulting in an unmaintainable mess for a code base When to useServer side rendering is best used for sites where we have a good idea of what traffic we can expect An example of this is a corporate portal that s only accessible to employees Here we know exactly how many users we can expect and the amount of users will not be growing x over night A server side rendered website that is open to the public however can see its costs sky rocket if the service suddenly goes viral Static site generationThe final approach to rendering pages is to actually generate them up front Both client side and server side rendering are on demand approaches The client visits our website and then our server or the clients renders the page they requested Static site generation however will already have all the pages and their content stored on the hosting server exactly how they ll be shown in the clients browser This is also why the word rendering is absent here We don t render anything because we generate everything up front removing the burden of rendering content from both the server and the client How it worksA static site it basically the default of how the web worked for a long time We created the pages we wanted our website to have home about contact and then hosted those on a web server However if we have a product catalogue we don t want to create a new HTML page manually for each of the products we offer Instead we can use a static site generator This way we can provide the list of products from an external API and the static site generator will then use that list to create a page for each of our products that has all the information needed such as description pictures etc My personal website www stubbe io is created using a static site generator I use Nuxt js which is based on Vue js but there are plenty of others such as Next js Hugo Jekyll etc The goodScales incredibly well The page generation step only runs when deploying a new version of our website so the bulk of needed processing power is limited to a short moment in time during each new deploy Very cheap Static pages can be hosted on almost any server Combined with a form of caching we can easily have thousands of visitors with almost no costs Fast and lightweight Because the pages already exist clients only need to download and view the page Neither the client nor the server need to waste any time processing logic Excellent for SEO Indexing a static website is a breeze for a crawler The fast load times will also positively impact our ranking in most search engines ️The badNot for interactive pages A fully searchable and filterable product list page is impossible to make static Updates aren t instant If we add a new product to our catalogue we will need to re generate and deploy our website before the product page can be visited When to useStatic site generation is best used when we have content that doesn t change often and where our ranking in search engines is important A blog is an excellent example of this Another example are product description pages More interactive pages such as tables comment sections etc are not suitable to use with static site generation since we expect them to change often due to actions of our users In conclusion which one should we use As with anything programming related there s no one size fits all answer I recommend taking a look at the pros and cons listed in this article and doing some further research before committing to an approach Finally keep in mind it s possible to combine different technologies It would be great for interactive pages to be client site rendered because we want our user to be able to sort or filter our products or edit their own profile Meanwhile we want our product pages to score as high as possible in search engines so why not statically generated those for the best possible performance Thanks for reading I hope you enjoyed this article and now have a better understanding of these three different approaches to generating and rendering dynamic pages Questions remarks feedback Reach out to me by email via niels stubbe io 2021-11-24 15:01:34
Apple AppleInsider - Frontpage News Black Friday 2021: Get Discovery Plus for just $0.99 per month for 3 months https://appleinsider.com/articles/21/11/24/black-friday-2021-get-discovery-plus-for-just-099-per-month-for-3-months?utm_medium=rss Black Friday Get Discovery Plus for just per month for monthsAhead of Black Friday Discovery Plus is offering a deal on its Ad Lite plan with customers able to pay just per month for their first three months with the video streaming service With the holidays on the horizon a few people may be worried about not having something they would like to watch on TV In what could be considered a great answer to the problem Discovery is offering a steep discount on subscriptions for its Ad Lite plan Normally priced at per month customers signing up to the Ad Lite service can get their first three months for just per month After the three months are up the subscription reverts back to its usual price Read more 2021-11-24 15:58:24
Apple AppleInsider - Frontpage News Sonos Amp is back in stock, plus Black Friday deals on smart speakers https://appleinsider.com/articles/21/11/24/sonos-amp-is-back-in-stock-plus-black-friday-deals-on-smart-speakers?utm_medium=rss Sonos Amp is back in stock plus Black Friday deals on smart speakersSelect retailers have limited stock on the popular Sonos Amp a device that adds your favorite passive speaker or stereo to your Sonos and AirPlay network with up to W per channel Get the Sonos Amp for a limited timeThe Sonos website shows a long wait for new orders of the Sonos Amp but other retailers have the device back in stock Act now while supplies last because this product is likely to sell out fast Read more 2021-11-24 15:27:02
海外TECH Engadget Apple explains how it alerts targets of state-sponsored spyware attacks https://www.engadget.com/apple-details-notifications-state-sponsored-spyware-151229317.html?src=rss Apple explains how it alerts targets of state sponsored spyware attacksApple said it would keep notifying victims in its fight against state sponsored spyware and now it s clear just what happens if you re one of those targets MacRumorsnotes that Apple has detailed how it alerts users when it believes they ve been targeted by state sponsored attackers You ll get both email and iMessage notifications to the addresses and phone numbers associated with your Apple ID If you visit appleid apple com you ll also see a prominent quot threat notification quot message indicating what happened and when The company stressed these notifications will never ask you to click links download content or share login details like passwords and verification codes It instead asked users to visit the Apple ID website to verify warnings Apple also pointed users to a Consumer Reports list of emergency resources if you don t get the notification but are still reasonably confident you re under attack whether from state actors or harassers These kinds of notifications aren t new Google for instance has been notifying potential victims for years Apple s explanation is relevant in light of worries about spyware from NSO Group and others however and may be crucial if you re an activist journalist or other critic who could easily face attacks from oppressive governments 2021-11-24 15:12:29
海外TECH Engadget Splice's music creation plans are going on sale for Black Friday https://www.engadget.com/splice-music-creation-plans-sale-black-friday-150034345.html?src=rss Splice x s music creation plans are going on sale for Black FridayMusic creation and collaboration platform Splice is offering new users a discount for Black Friday If you sign up for a year long Sounds Creator or Creator plan between November th and th you ll save During that time a year of Sounds access will cost the annual Creator plan will drop to and a month Creator subscription will be We recommended the Creator plan in our holiday gift guide The entry level Sounds plan might offer enough for hobbyists with credits for royalty free samples each month Creator subscribers get twice as many credits along with access to Splice s Astra soft synth the Beatmaker drum machine and music production lessons and tutorials The Creator plan is almost the same as Creator but with sample credits instead of Those aren t enormous discounts admittedly and you do have to commit to a year long subscription Still if you ve been on the fence about leaping into Splice this might be a good time 2021-11-24 15:00:34
金融 ◇◇ 保険デイリーニュース ◇◇(損保担当者必携!) 保険デイリーニュース(11/25) http://www.yanaharu.com/ins/?p=4780 位置情報 2021-11-24 15:37:40
金融 金融庁ホームページ 金融審議会「市場制度ワーキング・グループ」(第12回)議事録を公表しました。 https://www.fsa.go.jp/singi/singi_kinyu/market-system/gijiroku/20211015.html 金融審議会 2021-11-24 17:00:00
金融 金融庁ホームページ 金融審議会「ディスクロージャーワーキング・グループ」(第4回)を開催します。 https://www.fsa.go.jp/news/r3/singi/20211201.html 金融審議会 2021-11-24 17:00:00
金融 金融庁ホームページ 金融審議会「ディスクロージャーワーキング・グループ」(第3回) の議事録を公表しました。 https://www.fsa.go.jp/singi/singi_kinyu/disclose_wg/gijiroku/20211029.html 金融審議会 2021-11-24 17:00:00
金融 金融庁ホームページ 金融安定理事会による「グローバルなシステム上重要な銀行(G-SIB)の2021年リスト」を掲載しました。 https://www.fsa.go.jp/inter/fsf/20211124/20211124.html 金融安定理事会 2021-11-24 17:00:00
金融 金融庁ホームページ 企業会計審議会第53回監査部会議事録を公表しました。 https://www.fsa.go.jp/singi/singi_kigyou/gijiroku/kansa/20211026.html 企業会計 2021-11-24 17:00:00
ニュース ジェトロ ビジネスニュース(通商弘報) ブラジルがアルゼンチン産遺伝子組み換え小麦の輸入承認、反発の声も https://www.jetro.go.jp/biznews/2021/11/8438d4cfb60a70a9.html 遺伝子組み換え 2021-11-24 15:40:00
ニュース ジェトロ ビジネスニュース(通商弘報) 欧州産業連盟、欧州委の気候変動政策と競争政策への提言発表 https://www.jetro.go.jp/biznews/2021/11/3932863638c39860.html 気候変動 2021-11-24 15:30:00
ニュース ジェトロ ビジネスニュース(通商弘報) ミュンヘンで電子部品製造関連見本市、リアル会場で開催 https://www.jetro.go.jp/biznews/2021/11/848fc90ea87c85f1.html 電子部品 2021-11-24 15:20:00
ニュース ジェトロ ビジネスニュース(通商弘報) ASEAN主要6カ国の第3四半期GDP、半数がマイナス減速基調 https://www.jetro.go.jp/biznews/2021/11/eab44b074672e4dd.html asean 2021-11-24 15:10:00
ニュース BBC News - Home Migrants heading for UK die after boat sinks https://www.bbc.co.uk/news/uk-59406355?at_medium=RSS&at_campaign=KARANGA french 2021-11-24 15:54:58
ニュース BBC News - Home Warning of wine and spirits shortage at Christmas https://www.bbc.co.uk/news/business-59399754?at_medium=RSS&at_campaign=KARANGA chain 2021-11-24 15:47:04
ニュース BBC News - Home Gwent Police 'sorry' for treatment of female officers https://www.bbc.co.uk/news/uk-wales-59266149?at_medium=RSS&at_campaign=KARANGA female 2021-11-24 15:23:03
ニュース BBC News - Home Royal carol concert offered to ITV after BBC documentary dispute https://www.bbc.co.uk/news/entertainment-arts-59180523?at_medium=RSS&at_campaign=KARANGA cambridge 2021-11-24 15:16:49
ニュース BBC News - Home Ashes: Michael Vaughan not part of BBC coverage https://www.bbc.co.uk/sport/cricket/59391682?at_medium=RSS&at_campaign=KARANGA racism 2021-11-24 15:16:07
ニュース BBC News - Home World Rugby changes rules to allow players to switch national teams https://www.bbc.co.uk/sport/rugby-union/59406025?at_medium=RSS&at_campaign=KARANGA World Rugby changes rules to allow players to switch national teamsA revolutionary change to rugby union s international eligibility rules has been approved by World Rugby allowing players to switch national teams 2021-11-24 15:41:22

コメント

このブログの人気の投稿

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