投稿時間:2021-07-17 08:37:27 RSSフィード2021-07-17 08:00 分まとめ(43件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese 不要な変換候補におさらば!予測変換を削除する方法:iPhone Tips https://japanese.engadget.com/predictive-text-reset-221048806.html iphonetipsiphone 2021-07-16 22:10:48
TECH Techable(テッカブル) 登山アプリYAMAPが「DOMO」を実装! 他者への貢献を価値化 、山を育むエネルギーに https://techable.jp/archives/158259 yamap 2021-07-16 22:00:32
AWS AWS Startups Blog Qbiq: Using AWS Lambda Container Images & Distributed ML to Optimize Construction https://aws.amazon.com/blogs/startups/qbiq-using-aws-lambda-container-images-distributed-ml-to-optimize-construction/ Qbiq Using AWS Lambda Container Images amp Distributed ML to Optimize ConstructionReal estate software startup Qbiq system delivers an artificial intelligence AI driven space planning design engine that generates large volumes of customized floor plans compares alternatives and optimizes the results They relied heavily on AWS Lambda image containers to achieve scale Here s how they did it 2021-07-16 22:46:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) SwiftUIにて、キーボードに【完了】ボタンの実装方法 https://teratail.com/questions/349912?rss=all swiftui 2021-07-17 07:57:20
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Replace関数でメール文の文字を置換したいです。 https://teratail.com/questions/349911?rss=all シートquotMailTemplatequot上にメールのテンプレートを記載しており、メール内容にはTeilnehmerlisteeng上の参加者名等をReplace関数にて挿入します。 2021-07-17 07:48:44
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Djangoのキーワード検索|動的に複数ワードを分割してAND検索する方法 https://teratail.com/questions/349910?rss=all Djangoのキーワード検索動的に複数ワードを分割してAND検索する方法貴重な時間を割いて質問を閲覧していただき、ありがとうございます。 2021-07-17 07:26:26
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ランダムの使い方について https://teratail.com/questions/349909?rss=all ランダムの使い方についてimportrandomdefrandRangeParamxyreturnrandRangeParamrandictxyこのプログラムの最終目標はパラメーターXとパラメーターYが整数でxltyの時にランダムにXからYの中の整数を一つランダムに取り出すことです。 2021-07-17 07:11:00
海外TECH DEV Community 🎬Awesome Loading Animation HTML & CSS✨ https://dev.to/robsonmuniz16/awesome-loading-animation-html-css-11pa Awesome Loading Animation HTML amp CSSHey DEVs in today s video we will create a loading spinner animation for your website using html and css 2021-07-16 22:49:18
海外TECH DEV Community Django and Ajax: Building a recording application https://dev.to/sirneij/django-and-ajax-building-a-recording-application-4j0a Django and Ajax Building a recording application MotivationRecently I was working on the Q and A section of a web application And the requirements mandated that users should be provided the option of recording questions live in English or any other suppported languages Not only that customer support center should have same privilege of responding with live recorded answers While scurring the web for some solutions I came across Recording audio in Django model but the response is somehow outdated I decided to re implement a working example using the technologies he suggested TechnologiesDjangoVideojs recordAjaxHTMLBulma CSS Assumptions PrerequisitesFirst off it is assummed you pretty much familiar with Django Since we ll be using a lot of Ajax and JavaScript you should have a working knowledge of JavaScript Bulma CSS will be used for the presentation though not required familiarity with the framework is great Source codeThe complete code for this article is on github and can be accessed via Sirneij django ajax record A simple live recording application written in Django and using the Ajax technology Django Ajax recordingThis is the follow up repository for the live recording tutorial on dev to View on GitHub Step Setup the projectLaunch your terminal create a directory to hoose the project activate virtual environment and install django ┌ー sirneij sirneij Documents Projects Django └ー sirneij sirneij Django mkdir django record amp amp cd django record┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record virtualenv p python env┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record source env bin activate env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record pip install django Step ーStarting a Django ProjectHaving installed django start a new project and then an application env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record django admin startproject record env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record django startapp core Step Add application to your projectOpen up the created project in the text editor or IDE of choice I stick with Visual Studio Code and navigate to your project s settings py file In the file locate INSTALLED APPS and append the created application to it like so record gt settings py INSTALLED APPS django contrib admin django contrib auth django contrib contenttypes django contrib sessions django contrib messages django contrib staticfiles Add the created app core apps CoreConfig Create a urls py in the core app folder and paste the following in core gt urls pyfrom django urls import pathapp name core urlpatterns Navigate to your project s urls py file and make it look like this record gt urls pyfrom django conf import settingsfrom django conf urls static import staticfrom django contrib import adminfrom django urls import pathfrom django urls conf import includeurlpatterns path admin admin site urls path include core urls namespace core this adds a namespace to our core app using its urls py file if settings DEBUG urlpatterns static settings STATIC URL document root settings STATIC ROOT urlpatterns static settings MEDIA URL document root settings MEDIA ROOT These lines if settings DEBUG urlpatterns static settings STATIC URL document root settings STATIC ROOT urlpatterns static settings MEDIA URL document root settings MEDIA ROOT instruct django to serve these files static and media when DEBUG True i e during development Step Configure templates static and media directoriesSince we ll be using a lot of templates static and media files configure the directories django should look at for them Don t forget to create these folders at the root of your project TEMPLATES BACKEND django template backends django DjangoTemplates DIRS BASE DIR templates Add template directory her APP DIRS True OPTIONS context processors django template context processors debug django template context processors request django contrib auth context processors auth django contrib messages context processors messages STATIC URL static STATICFILES DIRS BASE DIR static STATIC ROOT BASE DIR staticfiles STATICFILES FINDERS django contrib staticfiles finders FileSystemFinder django contrib staticfiles finders AppDirectoriesFinder MEDIA URL media MEDIA ROOT BASE DIR media Create the templates static and media directories env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record mkdir p templates static media Step ーAdd the index viewTo test our setup so far navigate to your app s views py and append the following core gt views py def index request context page title Voice records return render request core index html context It is a simple Function Based View FBV that renders a simple yet to be created template index html which is found in the core directory of the templates directory Before creating this directory and html file let s link it up to the urls py file core gt urls pyfrom django urls import pathfrom import viewsapp name core urlpatterns path views index name index Now create the core subdirectory in the templates folder and append index html to it But before then let s work on the layout file for the entire application I name it base html env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record touch templates base html env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record mkdir templates core amp amp touch templates core index htmlOpen up this files and make them appear like the following lt templates gt base html gt load static lt DOCTYPE html gt lt html gt lt head gt lt meta charset utf gt lt meta name viewport content width device width initial scale gt lt title gt Django Ajax block title endblock title lt title gt lt link rel stylesheet href static assets css bulma min css gt lt head gt lt body gt block content endblock content lt body gt lt html gt This base html was copied from Bulma CSS Starter template and some modifications were made Notice that I am not using Bulma CSS CDN I prefer serving my static files locally to reduce network calls Now to index html lt templates gt core gt index html gt lt inherits the layout gt extends base html lt passes the page title gt block title page title endblock title lt content starts gt block content lt section class section gt lt div class container gt lt h class title gt Hello World lt h gt lt p class subtitle gt My first website with lt strong gt Bulma lt strong gt lt p gt lt div gt lt section gt endblock content The comments say it all It s time to test it out Open your terminal and runserver env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record python manage py runserverWatching for file changes with StatReloaderPerforming system checks System check identified no issues silenced You have unapplied migration s Your project may not work properly until you apply the migrations for app s admin auth contenttypes sessions Run python manage py migrate to apply them July Django version using settings record settings Starting development server at Quit the server with CONTROL C Neglect the warnings for now Open up your browser and visit From now on I won t talk much about HTML and CSS Step ーCreate a model and view logicNow to the first half of the real deal Let s create a simple model to hold the recorded audios and add a view logic for exposing a POST API for recording so that Ajax can consume it later on core gt models pyimport uuidfrom django db import modelsfrom django urls base import reverseclass Record models Model id models UUIDField primary key True default uuid uuid editable False voice record models FileField upload to records language models CharField max length null True blank True class Meta verbose name Record verbose name plural Records def str self return str self id def get absolute url self return reverse record detail kwargs id str self id The model is just a normal one I am always fund of overriding the default BigAutoField django gives id I prefer a UUID field Aside that the table has only two fields voice records and language which is optional Our recordings will be stored in the records subdirectory of the media directory Make your views py file appear as follows core gt views pyfrom django contrib import messagesfrom django http response import JsonResponsefrom django shortcuts import get object or renderfrom models import Recorddef record request if request method POST audio file request FILES get recorded audio language request POST get language record Record objects create language language voice record audio file record save messages success request Audio recording successfully added return JsonResponse success True context page title Record audio return render request core record html context def record detail request id record get object or Record id id context page title Recorded audio detail record record return render request core record detail html context def index request records Record objects all context page title Voice records records records return render request core index html context The record function exposes the creation of the recording and stores it thereafter For the detail view record detail handles getting only a single recording and our index lists all available recordings in the database Let s reflect all these changes in our app s urls py file core gt urls pyfrom django urls import pathfrom import viewsapp name core urlpatterns path views index name index path record views record name record path record detail lt uuid id gt views record detail name record detail It is time to really create the database so that the table can exist To do this simply run migrations in your terminal env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record python manage py makemigrations env ┌ー sirneij sirneij Documents Projects Django django record └ー sirneij sirneij django record python manage py migrateYou should be greeted with something that looks like Operations to perform Apply all migrations admin auth contenttypes core sessionsRunning migrations Applying contenttypes initial OK Applying auth initial OK Applying admin initial OK Applying admin logentry remove auto add OK Applying admin logentry add action flag choices OK Applying contenttypes remove content type name OK Applying auth alter permission name max length OK Applying auth alter user email max length OK Applying auth alter user username opts OK Applying auth alter user last login null OK Applying auth require contenttypes OK Applying auth alter validators add error messages OK Applying auth alter user username max length OK Applying auth alter user last name max length OK Applying auth alter group name max length OK Applying auth update proxy permissions OK Applying auth alter user first name max length OK Applying core initial OK Applying sessions initial OK Step Introducing videojs record and ajaxIt s time to really record something To do this we need a bunch of js files and a couple of css jQuery will be needed too for ajax In the complete version of the project all these files are included but below is some exerpt lt templates gt base html gt load static lt DOCTYPE html gt lt html gt lt head gt lt meta charset utf gt lt meta name viewport content width device width initial scale gt lt title gt Django Ajax block title endblock title lt title gt lt link rel stylesheet href static assets css bulma min css gt block css endblock css lt head gt lt body gt lt header gt include includes header html lt content gt block content endblock content lt js gt lt script src static assets js jquery min js gt lt script gt lt script gt const triggerModal document getElementById triggerModal triggerModal style display none const csrftoken name csrfmiddlewaretoken val if csrftoken function csrfSafeMethod method these HTTP methods do not require CSRF protection return GET HEAD OPTIONS TRACE test method ajaxSetup beforeSend function xhr settings if csrfSafeMethod settings type amp amp this crossDomain xhr setRequestHeader X CSRFToken csrftoken lt script gt block js endblock js lt body gt lt html gt This portion const csrftoken name csrfmiddlewaretoken val if csrftoken function csrfSafeMethod method these HTTP methods do not require CSRF protection return GET HEAD OPTIONS TRACE test method ajaxSetup beforeSend function xhr settings if csrfSafeMethod settings type amp amp this crossDomain xhr setRequestHeader X CSRFToken csrftoken helps get the csrf tokens from the form we ll be processing later without explicitly including its value in all ajax POST calls This is pretty handy in applications with many forms which will be processed with ajax Now to templates core record html lt templates gt core gt record html gt lt inherits the layout gt extends base html lt static gt load static lt title gt block title page title endblock title lt additional css gt block css lt link href static assets css video js css rel stylesheet gt lt link href static assets css all min css rel stylesheet gt lt link href static assets css videojs wavesurfer min css rel stylesheet gt lt link href static assets css videojs record css rel stylesheet gt lt style gt change player background color createQuestion background color lt style gt endblock css lt content gt block content lt section class section gt lt div class container gt lt div class columns gt lt div class column is offset is gt lt h class title gt Record audio lt h gt lt article class message is success id alert gt lt div class message header gt lt p gt Recorded successfully lt p gt lt button class delete aria label delete gt lt button gt lt div gt lt div class message body gt You have successfully recorded your message You can now click on the Submit button to post it lt div gt lt article gt lt form method POST enctype multipart form data gt csrf token lt div class field gt lt div class control has icons left has icons right gt lt input class input type text placeholder Language gt lt span class icon is left gt lt i class fas fa language gt lt i gt lt span gt lt span class icon is right gt lt i class fas fa check gt lt i gt lt span gt lt div gt lt div class control has icons left has icons right gt lt audio id recordAudio class video js vjs default skin gt lt audio gt lt div gt lt div gt lt form gt lt div gt lt div gt lt div gt lt section gt endblock content lt additional js gt block js lt script src static assets js video min js gt lt script gt lt script src static assets js RecordRTC js gt lt script gt lt script src static assets js adapter latest js gt lt script gt lt script src static assets js wavesurfer js gt lt script gt lt script src static assets js wavesurfer microphone min js gt lt script gt lt script src static assets js videojs wavesurfer min js gt lt script gt lt script src static assets js videojs record min js gt lt script gt lt script src static assets js browser workaround js gt lt script gt endblock js All these additional files were included in the official audio only example of videojs record library Visiting http localhost record should look like Step Adding recording and ajax callsTo have the real fealing of recording let s do the real thing recording Create a new js file in the js subdirectory of your static files directory I call it real recording js Populate it with the following First lets hide the messagedocument getElementById alert style display none Next declare the options that will passed into the recording constructorconst options controls true bigPlayButton false width height fluid true this ensures that it s responsive plugins wavesurfer backend WebAudio waveColor ffff change the wave color here Background color was set in the css above progressColor ffed displayMilliseconds true debug true cursorWidth hideScrollbar true plugins enable microphone plugin WaveSurfer microphone create bufferSize numberOfInputChannels numberOfOutputChannels constraints video false audio true record audio true only audio is turned on video false you can turn this on as well if you prefer video recording maxLength how long do you want the recording displayMilliseconds true debug true apply audio workarounds for certain browsersapplyAudioWorkaround create player and pass the the audio id we created thenvar player videojs recordAudio options function print version information at startup var msg Using video js videojs VERSION with videojs record videojs getPluginVersion record videojs wavesurfer videojs getPluginVersion wavesurfer wavesurfer js WaveSurfer VERSION and recordrtc RecordRTC version videojs log msg error handlingplayer on deviceError function console log device error player deviceErrorCode player on error function element error console error error user clicked the record button and started recordingplayer on startRecord function console log started recording user completed recording and stream is availableplayer on finishRecord function const audioFile player recordedData console log finished recording audioFile submit prop disabled false document getElementById alert style display block Your templates core record html should now look like lt inherits the layout gt extends base html lt static gt load static lt title gt block title page title endblock title lt additional css gt block css lt link href static assets css video js css rel stylesheet gt lt link href static assets css all min css rel stylesheet gt lt link href static assets css videojs wavesurfer min css rel stylesheet gt lt link href static assets css videojs record css rel stylesheet gt lt style gt change player background color recordAudio background color eed lt style gt endblock css lt content gt block content lt section class section gt lt div class container gt lt div class columns gt lt div class column is offset is gt lt h class title gt Record audio lt h gt lt article class message is success id alert gt lt div class message header gt lt p gt Recorded successfully lt p gt lt button class delete aria label delete gt lt button gt lt div gt lt div class message body gt You have successfully recorded your message You can now click on the Submit button to post it lt div gt lt article gt lt form method POST enctype multipart form data gt csrf token lt div class field gt lt div class control has icons left has icons right gt lt input class input type text placeholder Language gt lt span class icon is left gt lt i class fas fa language gt lt i gt lt span gt lt span class icon is right gt lt i class fas fa check gt lt i gt lt span gt lt div gt lt div class control has icons left has icons right style margin top rem gt lt audio id recordAudio class video js vjs default skin gt lt audio gt lt div gt lt div class control style margin top rem gt lt button class button is info id submit gt Submit lt button gt lt div gt lt div gt lt form gt lt div gt lt div gt lt div gt lt section gt endblock content lt additional js gt block js lt script src static assets js video min js gt lt script gt lt script src static assets js RecordRTC js gt lt script gt lt script src static assets js adapter latest js gt lt script gt lt script src static assets js wavesurfer js gt lt script gt lt script src static assets js wavesurfer microphone min js gt lt script gt lt script src static assets js videojs wavesurfer min js gt lt script gt lt script src static assets js videojs record min js gt lt script gt lt script src static assets js browser workaround js gt lt script gt lt script src static assets js real recording js gt lt script gt endblock js Ajax proper Give event listener to the submit button submit on click function let btn this change the button text and disable it btn html Submitting prop disabled true addClass disable btn create a new File with the recordedData and its name const recordedFile new File player recordedData audiorecord webm grabs the value of the language field const language document getElementById language value initializes an empty FormData let data new FormData appends the recorded file and language value data append recorded audio recordedFile data append language language post url endpoint const url ajax url url method POST data data dataType json success function response if response success document getElementById alert style display block window location href else btn html Error prop disabled false error function error console error error cache false processData false contentType false That s it Such a long piece Do you have some suggestions Kindly drop them in the comment section 2021-07-16 22:46:19
海外TECH DEV Community Finding the Story in the EU Fisheries Data https://dev.to/benjamesdavis/finding-the-story-in-the-eu-fisheries-data-1gpc Finding the Story in the EU Fisheries DataAs Brexit trade negotiations were dragging on at the start of the year a lot of the discourse was focused on perceived inequities in fishing rights I felt there was a story in the data that needed to be told Despite having the largest Exclusive Economic Zone EEZ of all EU countries and some of the richest fishing grounds UK fleets are restricted to quite modest catches Initially I had grand plans to create a sort of flow map that would trace the translocation of fish from fishing grounds to the country of landing The Common Fisheries Policy provides EU states with mutual access to each other s fishing grounds but sets quotas that are largely based on catch figures from years ago which today seem arbitrary Earlier this year the UK government was pushing to reverse this by proposing a “zonal attachment model where quotas would be carved up relative to the abundance of fish in each country s waters I was interested to see what a switch to this model would mean How significant a change would this make Which countries would be the winners and losers The DataEach EU state reports its annual landings across a grid of spatial cells called ICES rectangles each about nautical miles by nautical miles in size By clipping this grid against a map of EEZ polygons ICES rectangles could be assigned to the country whose waters they are contained within providing a state of origin for reported catches Where cells straddled jurisdictions catches were split relative to the proportion of the cell that falls within each country Aggregating catches within each EEZ gave an approximation of what quotas would look like under a zonal attachment model while aggregating catches by fleet shows how much the existing quotas diverge from this model Visualization InspirationInitially I had grand plans to create a sort of flow map that would trace the translocation of fish from fishing grounds to the country of landing One idea was to represent EEZ biomasses on a dot density map with dots transitioning into geographically arranged catch bars Another was to illustrate catch flows through arrows of varying thickness on a map that would ve likely resembled the opening sequence of “Dad s Army Both options were technically challenging and promised to produce a snazzy output but since the geographic component was kind of superfluous for the analysis it threatened to distract from the crux of the piece I didn t really care whether fish were flowing between adjacent or more distant countries just the extent to which they were flowing between countries and the resulting net imports exports Therefore I opted to de couple the flow component from the map component to favour a more functional chart in the form of a Sankey Although Sankey has become a bit hackneyed in recent years there have been some compelling D based variants that have breathed new life into the chart form My main inspiration was from an NYT article on social mobility bias that conveyed flows of black and white boys from different backgrounds into different socio economic classes Instead of encoding flows through ribbon thickness like a traditional Sankey particles flow between the Sankey dimension in varying density and frequency The animation mesmerizes and keeps the reader engaged as the result emerges gradually through the course of the animation By complementing the particle Sankey with marginal bar charts of fish biomass the net flows out of and into each country could still be easily compared For example it s clear Denmark gets a good deal catching in excess of the biomass that their fishing grounds produce while the UK is justified in feeling hard done by with the majority of UK fish ending up in other country s nets I was pleased with how the marginal bar charts melded in with the animation sequence At the top the bars representing fish caught in each country s waters are pushed downwards and seemingly shred into tiny particles akin to Banksys self shredding artwork and then as they work their way down shuffle satisfyingly into their destined lanes representing the fleet of capture Why Observable For me Observable is a gallery a self contained development environment a sandbox a collaboration platform and crucially as a relative newcomer to D a library for learning It s simple and quick to browse through other people s work dig into their code and decipher the mechanics of their visuals For this particular piece a search for “animated Sankey yielded a raft of examples from an Amelia Wattenberger tutorial which would form the basis of my Sankey template Further by porting Elijah Meeks particle Sankey from Blocks to Observable I learned of some neat javascript functions e g getPointAtLength that helped better control the paths of the particles 2021-07-16 22:37:07
海外TECH DEV Community 🎬Awesome Loading Animation HTML & CSS✨ https://dev.to/robsonmuniz16/awesome-loading-animation-html-css-1gpe Awesome Loading Animation HTML amp CSSHey DEVs in today s video we will create a loading spinner animation for your website using html and css 2021-07-16 22:08:47
海外TECH DEV Community Hoisting in JavaScript. https://dev.to/belidenikhil/hoisting-in-javascript-1g7h Hoisting in JavaScript Interviewer Can you explain me the concept of Hoisting Dev Sure Hoisting is a phenomenon in which JavaScript magicallymoves the code to the top Interviewer Can you dive a little bit more deep Dev Sure Gives an example where we can call a function on a line which is before the function initialization Interviewer Hmm In the end you wont get the Job I too have seen many tutorials blogs and sites where they mentioned the same But programming is not magic There lies a logic So lets actually see how actually HOISTING works We know that when we run a script a Global Execution Context GEC is created which consists of two phases Memory creation phase and Execution phases i e run phase During this memory creation phase all the magic happens As soon as we run a script all the all the variables and functions are allocated space in the memory This happens even before the first line of code is executed This is the reason we are able to call access functions or variables on a line which is before their initialization and not face any errors Don t believe me Let s see with anexample Lets run the following code Nothing weird right Now lets make some changes Noticed the change We called the function before its initialization To see what exactly happened lets put a debugger on line So we are at line and we haven t executed anything yet But as we discussed memory is allocated to functions and variables before the execution phase In the above image notice the Global heading That is memory So if what I said is true then the memory should show the function and variable now right Correct Observe the above two images under Global which is on bottom right and you ll see a undefined and one f one and remember we are still at line So if they are in the memory we should be able to log them as well right Yes Making a few changes and the code now looks like this Now lets log them See that By default variables are given undefined and functions are stored along with their code in memory before script execution phase That s the reason we see undefined and inner function data in console and that is the reason we are able to access them at lines on code which are before variable initialization or function initialization For now lets concentrate on functions and it s hoisting So if a function is saved in memory along with the whole code before the run we will also be able to use them on a line in code before their initialization or anywhere right Correct Lets make the code cleaner and see an example and the HTML code as well Notice the above data very carefully Notice the console the DOM the storage and where the debugger is placed and until what line the code has been executed So we have run till line and the storage holds var a and we have it on the console as well A debugger is before the function one and the DOM page one the browser has only the initial data Now lets call the function one and see the changes Noticed The DOM Console and the fact that we are yet to run line We have successfully called accessed function one before its initialization This is what Hoisting is This is how powerfulhoisting is and how things run behind the scenes So next time when an Interviewer asks what hoisting is you should not be like magic happens and code moves to the top I hope that what I have written is understandable and I will be writing even more about hoisting and why we see not defined and undefined in this and why arrow functions don t work with hoisting Also I would like to thank Akshay Saini akshaymarch for the way he explained this topic and many more in such an accurate manner Any feedback would be highly appreciated 2021-07-16 22:04:01
海外TECH DEV Community Creating Your First Chrome Extension. https://dev.to/giwajossy/creating-your-first-chrome-extension-26l Creating Your First Chrome Extension Every four seconds this chrome extension replaces images on any webpage I visit with random pictures of some of my friends and family Totally enjoyed the building process Here s what it looks like when activated on YouTube Getting startedA fairly solid understanding of the DOM Document Object Model goes a long way when building browser extensions as you would have to do lots of DOM manipulation The project folder contains two files manifest json and content jsProject Folder manifest jsoncontent js manifest jsonThis is the entry point of every chrome extension It handles permissions routes and holds necessary information like the extension name version description icons etc manifest version name FriendsFX version description Converts every image on a webpage to random pictures of some of my friends content scripts matches lt all urls gt js content js Most of the keys in the snippet above are self explanatory but let s talk about the content scripts key It holds an array of one object containing two key elements matches and js with values of lt all urls gt and content js respectively lt all urls gt basically matches any URL that starts with a permitted scheme http https file ftp or chrome extension These permissions are required if your code wants to interact with the code running on webpages content jsHere goes the code that replaces every image on a webpage with the selected pictures Step I had uploaded the pictures to cloudinary a tool that automatically optimizes and delivers media files NOTE You do not have to use cloudinary Your friends pictures must be somewhere on the internet so you can just grab the links whenever you need themBelow I created an array imagesLinks containing links to those pictures An array of pictures to randomly select from You can have as many links pictures as you wantconst imagesLinks Step fetches all lt img gt tags on the webpageconst imageTags document getElementsByTagName img Final Step Loops through each of the lt img gt tags on the webpage Replaces the src attribute with a random link from the imageLinks array Do this every secondssetInterval gt for let i i lt imageTags length i let randomArrayIndex Math floor Math random imagesLinks length imageTags i src imagesLinks randomArrayIndex Let s test out the extension Upload the extension to your browser extension library Type this chrome extensions in your browser Activate Developer mode at the top right corner Click Load unpacked and select the project folder The extension gets added and is immediately activated Now go to any webpage hold on for about seconds and watch the selected pictures appear Let me know if you found this helpful You can also get the code on GitHub 2021-07-16 22:00:33
Apple AppleInsider - Frontpage News Apple donates to flood relief efforts in Western Europe https://appleinsider.com/articles/21/07/16/apple-donates-to-flood-relief-efforts-in-western-europe?utm_medium=rss Apple donates to flood relief efforts in Western EuropeApple will donate to flood relief efforts taking place in Western Europe where torrential rainfall ravaged Germany Belgium and surrounding areas Announced by Apple CEO Tim Cook in a tweet Friday the company is contributing an undisclosed sum to relief efforts after severe flooding left at least people dead and more than missing Our hearts are with all those affected by the devastating flooding across Germany Belgium and Western Europe Apple will be donating to support relief efforts Cook said Read more 2021-07-16 22:53:42
海外TECH WIRED Hackers Got Past Windows Hello by Tricking a Webcam https://www.wired.com/story/windows-hello-facial-recognition-bypass facial 2021-07-16 22:00:55
金融 金融総合:経済レポート一覧 当面の金融政策運営について(2021年7月16日) http://www3.keizaireport.com/report.php/RID/462281/?rss 日本銀行 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 経済・物価情勢の展望(2021年7月、基本的見解) http://www3.keizaireport.com/report.php/RID/462282/?rss 日本銀行 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 気候変動に関する日本銀行の取り組み方針について http://www3.keizaireport.com/report.php/RID/462283/?rss 取り組み 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 デフレはコロナの後にやってくる~日銀金融政策決定会合:Market Flash http://www3.keizaireport.com/report.php/RID/462289/?rss marketflash 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 インフレ警戒を強めるBOE~複数の政策メンバーが早期の緩和縮小の検討を示唆:Europe Trends http://www3.keizaireport.com/report.php/RID/462292/?rss europetrends 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 パウエル議長による議会証言のポイント:井上哲也のReview on Central Banking http://www3.keizaireport.com/report.php/RID/462294/?rss reviewoncentralbanking 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 気候変動対応への関与は日本銀行の使命に照らして妥当か:新型オペの骨子素案:木内登英のGlobal Economy & Policy Insight http://www3.keizaireport.com/report.php/RID/462295/?rss lobaleconomypolicyinsight 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 FX Daily(7月15日)~ドル円、109円台後半で上値重い http://www3.keizaireport.com/report.php/RID/462296/?rss fxdaily 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 投信マーケット MABアナリスト・アイ 2021年7月号 http://www3.keizaireport.com/report.php/RID/462298/?rss 発表 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 NISA・ジュニアNISA口座の利用状況調査(2021年3月末時点)~NISA口座数(一般・つみたて)1,586万132口座 http://www3.keizaireport.com/report.php/RID/462301/?rss 金融庁 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 NGFSの気候シナリオが示す「2050年脱炭素」の世界~民間企業で行うリスク分析に向けて求められること:リサーチ・フォーカス No.2021-020 http://www3.keizaireport.com/report.php/RID/462308/?rss 日本総合研究所 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 Weekly金融市場 2021年7月16日号~来週の注目材料、経済指標... http://www3.keizaireport.com/report.php/RID/462313/?rss weekly 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 FX Weekly(2021年7月16日号)~来週の相場見通し(1)ドル円:様子見のFRBと持ち直し続く円 http://www3.keizaireport.com/report.php/RID/462318/?rss fxweekly 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 LIBOR移行対応アップデート~ハイライト(2021年6月1日~15日) http://www3.keizaireport.com/report.php/RID/462336/?rss libor 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 ツクイスタッフ(東証JASDAQ)~介護・医療業界に特化して全国展開する人材サービス企業。コロナ感染症の影響の軽減や新たな施策の効果により、中期的な業績回復を予想:アナリストレポート http://www3.keizaireport.com/report.php/RID/462339/?rss jasdaq 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 ヒューマン・アソシエイツ・ホールディングス(東証マザーズ)~エグゼクティブ層に特化した人材紹介事業やメンタルヘルスケア事業などを展開。22年3月期は、企業の人材需要の回復による人材紹介事業の拡大を見込む:アナリストレポート http://www3.keizaireport.com/report.php/RID/462340/?rss 東証マザーズ 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 バルテス(東証マザーズ)~品質向上のトータルサポートを標榜するソフトウェアテストサービス大手。22年3月期は増収増益ペースの加速を見込む会社計画:アナリストレポート http://www3.keizaireport.com/report.php/RID/462341/?rss 品質向上 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 為替ヘッジコストについて(2021年7月)~各通貨の為替ヘッジコストは足元おおむね横ばいで推移:マーケットレター http://www3.keizaireport.com/report.php/RID/462345/?rss 投資信託 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 週刊!投資環境(2021年7月16日号)~来週の注目点を皆さまにいち早くお届け... http://www3.keizaireport.com/report.php/RID/462346/?rss 投資信託 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 マーケットフォーカス(REIT市場)2021年7月号 http://www3.keizaireport.com/report.php/RID/462349/?rss 三井住友トラスト 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 【注目検索キーワード】エネルギー基本計画 http://search.keizaireport.com/search.php/-/keyword=エネルギー基本計画/?rss 検索キーワード 2021-07-17 00:00:00
金融 金融総合:経済レポート一覧 【お薦め書籍】小さなメーカーが生き残る経営術 独自市場のつくり方 https://www.amazon.co.jp/exec/obidos/ASIN/486367662X/keizaireport-22/ 経営 2021-07-17 00:00:00
ニュース BBC News - Home The Papers: 'French holiday chaos', and 'world watching' PM https://www.bbc.co.uk/news/blogs-the-papers-57870838 advice 2021-07-16 22:47:32
LifeHuck ライフハッカー[日本版] 第4世代 iPad Airが特選セールで7700円オフに【Amazonタイムセール祭り】 https://www.lifehacker.jp/2021/07/238867amazon-timesale-ipad-air.html amazon 2021-07-17 07:30:00
北海道 北海道新聞 知っている?子どもの権利 学べる絵本、全国に届け https://www.hokkaido-np.co.jp/article/568123/ 感染拡大 2021-07-17 07:14:00
北海道 北海道新聞 仏当局、法相を本格捜査 争い解決に地位利用疑い https://www.hokkaido-np.co.jp/article/568118/ 司法当局 2021-07-17 07:03:00
ビジネス プレジデントオンライン 心理カウンセラーが解明「すぐキレる人」の体内で起きている"ある変化" - "頭が真っ白"になる本当の理由 https://president.jp/articles/-/47941 quotquot 2021-07-17 08:00:00
ビジネス プレジデントオンライン 心理カウンセラーが解明「すぐキレる人」の体内で起きている"ある変化" - "頭が真っ白"になる本当の理由 https://president.jp/articles/-/47775 quotquot 2021-07-17 08:00: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件)