python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonで対話式CLIツールを作る |
https://qiita.com/skokado/items/50861b95b236068fd7b9
|
デフォルトをFalseにするimportquestionaryisengineerquestionaryconfirmAreyouengineerdefaultFalseaskprintisengineerその他オートコンプリートなSelectローマ字表記の都道府県を入力するケースを考える。 |
2022-01-20 01:53:49 |
golang |
Goタグが付けられた新着投稿 - Qiita |
GO言語 - unzip処理の脆弱性対策(ついでにwindows, macで作られるzipファイルのサポート) |
https://qiita.com/kakiyuta/items/71016e5f96dd0cde81f5
|
脆弱性である悪意あるzipファイルですが、基本的にがファイル名に設定できないため作成することはできませんがzipの内部構造を理解している人がバイナリを直接編集して作成することは可能なので本記事をきっかけに皆さんの実装しているコードでも問題ないかチェックするきっかけになってくれると嬉しいです。 |
2022-01-20 01:44:29 |
海外TECH |
MakeUseOf |
Automation Through APIs: How to Get Started and Examples |
https://www.makeuseof.com/automation-apis-get-started/
|
mobile |
2022-01-19 16:54:55 |
海外TECH |
MakeUseOf |
What Is Google TasksBoard? How to Use It |
https://www.makeuseof.com/what-is-tasksboard/
|
management |
2022-01-19 16:45:22 |
海外TECH |
MakeUseOf |
How to Get Good Pictures With a Budget DSLR: 8 Tips |
https://www.makeuseof.com/get-good-pictures-with-budget-dslr/
|
How to Get Good Pictures With a Budget DSLR TipsYou don t always need a high end camera to take stellar photos Here we ll discuss some ways to get the most out of your budget camera as a beginner |
2022-01-19 16:30:12 |
海外TECH |
DEV Community |
Basic data preparation for Machine Learning |
https://dev.to/aiflowltd/basic-data-preparation-for-machine-learning-1f7c
|
Basic data preparation for Machine LearningThe very core of every learning algorithm is data The more the better Experiments show that for a learning algorithm to reach its full potential the data that we feed to it must be as qualitative as it is quantitative To achieve state of the art results in data science projects the main material namely data has to be ready to be shaped and moulded as our particular situation demands Algorithms that accept data as raw and unprocessed as it is are scarce and often fail to leverage the full potential of machine learning and of the dataset itself The road between raw data and the actual training of one model is far from straight and often requires various techniques of data processing to reveal insights and to emphasize certain distributions of the features Take for example this dataset from the real estate business It is by far an easy job to be able to accurately predict the final acquisition price of a house considering only the raw data There is no way a generic algorithm could make a difference between Story and Story from the HouseStyle column or differentiate between two different value scales like the year in the YearBuilt column and the mark in the OverallQual column Data preparation has the duty of building an adequate value distribution for each column so that a generic algorithm could learn features from it Some examples are rescaling the values turning text information into categorical or extracting tokens from continuous string values like product descriptions This post will give some insights into how to transform raw data into formats that make the most out of it Handling missing dataAs the data producing sources are rarely perfect raw datasets have missing values Since generic algorithms cannot handle such cases and replacing them with a random value opens the possibility of obtaining any random output methods have been implemented to replace them while keeping the data distribution in place unmodified The basic solution is dropping the rows or columns that contain an excessive amount of missing fields since replacing all the empty fields with the same default value might bias the model rather than create valuable insights You might imagine that this approach is not optimal since we don t want to delete data that might prove itself valuable Instead setting missing values to the median of the column has experimentally provided good results since it keeps a similar data distribution Handling outliersOutliers are data points that lie far away from the majority of data samples in the geometrical space of the distribution Since these observations are far from the mean they can influence the learning algorithm in an unwanted way biasing it towards the tails of the distribution A common way to handle outliers is Outlier Capping which limits the range casting a value X in the range m std delta m std delta where m is the median value of the distribution std the standard deviation and delta an arbitrarily chosen scale factor This is how we would write this more formally Creating polynomial featuresThere is often the case in machine learning when a feature is not linearly separable Although more complex algorithms cope with the problem of non linearly separable search spaces they might sacrifice accuracy over covering all the nonlinearities Thus creating polynomial features can help learning algorithms separate the search space with more ease yielding better results in the end Generating the second degree polynomial of feature and adding it to the dataset yields a better representation of the geometrical data space thus making it easier to be split Although this is a shallow example it clearly illustrates the importance of polynomial features in machine learning On a large scale polynomials of multi feature combinations are taken into consideration for generating even more insights from the data Those were just a few data processing steps to consider At aiflow ltd we automatically process the data with many more steps to make sure the prediction quality of our automated algorithms is the best we can achieve If you re curios to find out more subscribe to our newsletter on aiflow ltd |
2022-01-19 16:37:29 |
海外TECH |
DEV Community |
The breakpoints we tested in 2021, and the ones to test in 2022 |
https://dev.to/polypane/the-breakpoints-we-tested-in-2021-and-the-ones-to-test-in-2022-2mll
|
The breakpoints we tested in and the ones to test in Which screen sizes to design build and test on is a perennial topic in web development While well built responsive websites will work at any size during development it s easier to use a small number of sizes to check with even in Polypane But what sizes to use There s a number of different approaches we ll go over in this article all updated to be relevant in Base it off device groups mobile tablet laptop and desktop Use the breakpoints from popular CSS frameworks Using the dimensions your visitors use Using the most used breakpoints of Based on device sizesThere s mobile phones tablets laptops and desktops so if you use size for each of that category you cover them NameWidthMobilepxTabletpxLaptoppxDesktoppxThis gives a good overview but you run the risk of missing the in between sizes smaller than px and between and px wide Both of those are often forgotten but still see quite a bit of real life usage The first one in older mobile phones and the second one on tablets laptops and desktops in unmaximized browser windows Based on popular CSS frameworksWe ve written about the breakpoints that popular CSS frameworks use before These are excellent when you re also using the rest of the framework or as a starting off point For example here s the breakpoints in Tailwind CSS NameWidthsmpxmdpxlgpxxlpxxlpxThis gives a nice spread though with a relatively high starting point you run the risk of having to do extra work after implementing the design to make sure everything fit on mobile devices Based on your visitor dataIf you use Google Analytics your visitors browser dimensions are stored as well This means you can retrieve them from the Google Analytics dashboard and use those to test on For example here s the most used dimension on this site NameWidthHeight pxpx pxpx pxpx pxpx pxpxWhile you can use the above it s important to realize that our audience probably isn t your audience Polypane is a tool for web developers so the vast majority of our visitors are viewing our site on a desktop device and fairly large ones at that Notice too that none of the most popular sizes here map to the traditional device widths mentioned above Every audience is different and it s best to cater to yours Create a Polypane workspace based on Google AnalyticsYou can also use our GA workspace creator to automate the process select how many panes you want and how to sort them and then opening them in Polypane with a single click The breakpoints we tested in That leaves us with the last method using the breakpoints that have been used the most in For that we can use two sources the Web Almanac and Polypane From the Web AlmanacThe Web Almanac analysed million websites old and new to make an overview of the most used web features including breakpoints That also includes all the sites in the web almanacs testing data that existed well before this year It has a chapter on CSS that includes a list of common breakpoints It s worth reading the analysis they make a split between min width and max width media queries because you can see a clear difference in sizes used min width is more often used for px while max width for px for example We re splitting those out in the overview below as well as they give a nice contrast Min widthNameWidth px px px px px px px px px px Max widthNameWidth px px px px px px px px px pxWhen it comes to the difference between min width and max width apart from the px differences here and there isthat the spread for max width is much more diverse For min width the top goes from usage to while max width starts lower at and ends higher at Min widths means you re adding styling as you get wider while max widths usually disable styling as they get smaller Because of this you frequently need less min widths and your styling works for a longer time before you need a new breakpoint The most used breakpoints in Polypane in We can also look at the most used pane sizes in Polypane in The sizes that real developers have used the most in the past year to develop websites with This gives the most accurate look at what sizes modern sites are optimized for Here is the top for NameWidth px px px px px px px px px pxIf we look at these sizes we see a nice spread between device sizes breakpoints from CSS Frameworks and the many presets that Polypane ships with The breakpoints to develop on in As you can see from the relatively low percentages there are thousands of other sizes being used in Polypane There is no single right set of dimensions So the best answer Pick a set you like and adapt it Any of the ones on this page are a good choice If you notice you often make errors at a size you re not currently developing for make sure to add it And if you find yourself fixing the same issue at multiple sizes maybe you can hide one of them during development Regardless of which default sizes you choose to develop on it s best to see all of them in one overview That s what Polypane lets you do All the other parts of your browser are synced as well your interactions happen in all panes our elements panel lets you edit and inspect elements in allpanes at the same time and our console intelligently combines messages from each pane Polypane has a free trial available Check it out |
2022-01-19 16:23:26 |
海外TECH |
DEV Community |
320+ free resources for learning fullstack, frontend and backend |
https://dev.to/devwriteups/320-free-resources-for-learning-fullstack-frontend-and-backend-50cd
|
free resources for learning fullstack frontend and backendYou only need this post to become a Developer because this post has nearly unlimited amount of every type of resources covering everything you will need Blog your Journey Hashnode Hashnode is the easiest way to start a developer blog on your personal domain for free and connect with the readers through our global dev community Dev to DEV is a community of software developers getting together to help one another out Hackernoon An Independent Tech Media Site Must have Chrome extensions DailyDev Get the latest new about the Dev community in your chrome default tab WhatFont Get to know which font is the website using ColorPick Eyedropper Get to know which color is the website using by just dropping the pen Wappalyzer Get to know the tech stack of any website Web Developer Amazing amount of tools this extensions has React developer tools React Developer Tools is a Chrome DevTools extension for the open source React JavaScript library It allows you to inspect the React component hierarchies in the Chrome Developer Tools VS Code Must have extensions NPM This extension helps you to manage your Package json and will provide warnings if dependencies are not installed also will help with the version control Prettier Prettier is an opinionated code formatter It enforces a consistent style by parsing your code and re printing it with its own rules that take the maximum line length into account wrapping code when necessary Rainbow Brackets Find that missing tag with ease by color coding every bracket set in your environment VS Code Great Icons Organize your environment by applying an appropriate icon set to visually identify files by type Placeholder Images Services like unsplash it and placehold it are extremely useful Now you can save time by adding placeholder images right from within VS CodeVetur The official VueJS extension ESLint The extension uses the ESLint library installed in the opened workspace folder Live Server Launch a development local Server with live reload feature for static amp dynamic pages Visual Studio IntelliCode This extension will move the most relevant completion suggestions to the top Debugger For Chrome This extension allows you to debug your JavaScript code running in the Chrome browser from inside of VS Code Debugger for Microsoft Edge Debug your JavaScript code in the Microsoft Edge browser Debugger for Firefox Debug your web application or browser extension in Firefox Bracket Pair Colorizer A customizable extension for colorizing matching brackets VS Code themes One Dark Pro Atom s iconic One Dark theme for Visual Studio Code Material Theme The most epic theme now for Visual Studio Code Horizon Theme A beautifully warm dual theme for Visual Studio Code General ResourcesFirst of all you will need a check list for marking what all you have learned You can see the below image for how the checklist will look like Link gt The Front End Checklist Frontend Development Roadmap Learning Resources DOCS and Cheat sheets MDN Web Docs The MDN Web Docs site provides information about Open Web technologies including HTML CSS and APIs for both Web sites and progressive web apps DevDocs Fast offline and free documentation browser for developers Search docs in one web app DEVHINTS A modest collection of cheatsheets FLEX Malven A visual cheatsheet for CSS flex layout GRID Malven A visual cheatsheet for CSS grid layout HOW DOES IT WORKS How the Internet Works Video How does the Internet Works How the Internet Works Brief Videos A brief explanations on how does the Internet works DNS How DNS works HTTPS How HTTPS works For HTML and CSS freeCodeCamp Free course to learn Web Development Flexbox Froggy A game that helps you to learn CSS Flex CSS TRICKS Flexbox A Complete Guide to Flexbox Grid Garden A game for learning CSS Grid CSS TRICKS A Complete Guide to Grid A comprehensive guide to CSS grid focusing on all the settings both for the grid parent container and the grid child elements Learn CSS Grid A comprehensive guide to help you understand and learn CSS Grid Layout by Jonathan Suh Can I Use Up to date browser support tables for support of front end web technologies on desktop and mobile web browsers HTML Dog Simple and to the point explanations Marksheet Unlimited amount of tutorials The ODIN Project Amazing way of learning CSS Effects CSS Animations Keyframes Create basic or complex CSS keyframe animations with a visual timeline editor Animista Play with a collection of ready to use CSS animations Interneting Is Hard Friendly web development tutorials for complete beginners BEM BEM naming cheat sheet Autoprefixer Autoprefixer is a PostCSS plugin which parses your CSS and adds vendor prefixes CSS Formatter Online CSS Formatter CSS Beautifier Placeholder How To Use Our Placeholders Just specify the image size after our URL and you ll get a placeholder image ONLINE IDE EDITOR goormIDE CodeSandbox CodePen Repl it JSFiddle IMAGE RESOURCESSlazzer Image Background Remover Automatically and FreeUnsplash Free images and photos Pexels Free stock photos Remove Photo Data Remove personal data from photos before sharing them on the internet LottieFiles LottieFiles is a collection of animations designed for Lottie gone are the days of bugging your developer Pixabay Free image or video ACCESSIBILITYAccessibility Blog Medium Seven easy to implement guidelines to design a more accessible web Accessibility Cheatsheet Practical approaches to Universal Design for making your website webapp accessible to everyone TERMINALS FOR WINDOWS Windows Terminal FluentTerminal Hyper YOUTUBE CHANNELSTraversy MediafreeCodeCamp orgCodevolutionFireshipThe Net NinjaWes Bos FONTS AND TYPOGRAPHYGoogle Fonts The resource for free and easy to use webfonts FontPair Font Pair helps designers pair Google Fonts together Beautiful Google Font combinations and pairs Fontjoy Fontjoy helps designers choose the best font combinations Mix and match different fonts for the perfect pairing Fonts Arena Free fonts free alternatives to premium fonts done for you research articles ILLUSTRATIONSunDraw Browse to find the illustrations that fit your needs and click to download freepik Free graphic resources DrawKit Hand drawn vector illustration and icon resources perfect for your next project ICONSFont Awesome Vector icons and social logos Ionicons Open Sourced and MIT licensed icon pack icons Download free icons in PNG and SVG flaticon Free vector icons in SVG PSD PNG EPS format or as ICON FONT Simple Icons Free SVG icons for popular brands Front end Framework Learning Resources JAVASCRIPTfreeCodeCamp Best free resource to learn JavaScript interactively JavaScript info Modern JavaScript Tutorial JavaScript Design PatternsJavaScript Reference By MDNEloquent JavaScript This is a book about JavaScript programming and the wonders of the digital You can read it online here JavaScript days vanilla JS coding challenge Build things in days with tutorials DOM Manipulation ReferenceHow JavaScript worksJavaScript Event ReferenceMostly Adequate Guide to Functional Programming Excellent primer to functional programming using JavaScript Functional Light JavaScript This book explores the core principles of functional programming FP as they are applied to JavaScript Code School From Basics to Best Practices Different courses related to JavaScript Functional programming Learn basic principles of functional programming in an interactive way by using map filter concatAll reduce and zip Learn JavaScript Online Interactive JavaScript course with spaced repetiton flashcards app Exercism JavaScript Track Exercism provides individual practice and mentor based learning for free REACT Why React JS Apps at FacebookReact Rethinking best practicesReactReact Docs Quick Start section basicThe Road to learn React basic ES Learn ES ECMAScript basicExploring ES advancedExploring ES and ES advanced RoutingReact Router Docs basic State Management ReduxGetting Started with Redux basicBuilding React Applications with Idiomatic Redux advanced Bundlers WebpackGet Started with Webpack Build StuffSeveral project ideasReact TodoMVCBootstrapping a React projectBuild a Weather appThe SoundCloud Client in React ReduxA Primer on the React Ecosystem and Building a React Redux App with JSON Web Token JWT AuthenticationWant to goo deep in React Visit React Learning APIsQuotes REST API They Said So has more than million quotes in the database the largest such database in the world And Quotes API gives easy way to access the data OpenWeather Simple and fast and free weather API from OpenWeatherMap you have access to current weather data hourly and day forecasts Public APIs A collective list of more than Free Public and Open REST APIs for developers SWAPI The Star Wars API JSONPlaceholder Free to use fake Online REST API for testing and prototyping NODEJSNode js Tutorial Node js Crash Course Tutorial by Net Ninja You Don t Know Node jsThe Art of Node Introductory tutorial covering the basics NodeSchool Interactive self guided workshops you can also do on your own Node Patterns Short books about code and networking patterns related to Node js Learn Node A premium training course to learn to build apps with Node js Express MongoDB The Node Way An entire philosophy of Node js best practices and guiding principles exists for writing maintainable modules scalable applications and code that is actually pleasant to read Express js Security Tips How You Can Save and Secure Your App Awesome Nodejs Delightful Node js packages and resources nodebestpractices Huge list of best practices for building node apps Important for big projects Learn GIT Git Handbook Git GitHub DVCS oh my Learn all the lingo and the basics of Git Cheat Sheets Keep these handy Reference sheets covering Git commands features SVN migrations and bash Available in a multiple languages Learn Git branching Try Git commands right from your web browser Featuring some of your soon to be favorites branch add commit merge revert cherry pick rebase Visualizing Git Look under the hood Explore how Git commands affect the structure of a repository within your web browser with a free explore mode and some constructed scenarios Git It You ve downloaded Git now what Download Git It to your machine and you ll get a hands on tutorial that teaches you to use Git right from your local environment using commands on real repositories Prepare for Interview Questions Front end Developer Interview Questions A list of helpful front end related questions you can use to interview potential candidates test yourself or completely ignore Front End Interview Handbook Go from zero to front end interview hero with this handbook No prior interview experience needed Front end Developer Interview Questions A list of helpful front end related questions you can use to interview potential candidates test yourself or completely ignore I have gathered all the resources that you will require to become a MERN or MEAN stack developer All these resources will include Articles Videos Course Websites Tutorials Books etc And everything is FREEMERN MongoDB Express React NodeJSMEAN MongoDB Express Angular NodeJS You should know the basics of HTML CSS AND JS Learn MongoDB CoursesMongoDB University gt This website has many course for free that will definitely take you from Zero to HeroUnderstanding the basics of MongoDB gt Udemy free course for learning the basicsServer side Development with NodeJS express and MongoDB Coursera course starting from th Feb Blogs Tutorials Docs eBooksGuru MongoDB in days TutorialMongoDB DocsThe little MongoDB bookIntro to MongoDB VideosMongoDB tutorial Intellipat HrsMongoDB noSql database Playlist MongoDB Crash Course by Traversy Media mins Apprx MongoDB Tutorial for beginners Playlist Contains small videos and informativeMongoDB Tutorial for beginners Playlist Learn Express VideosExpressJS Crash Course by Traversy MediaIntroduction to Node with Express Tutorials eBooks BlogsTutorials Point ExpressJS tutorialsMongoDB Guide eBookHacksparrow BlogRoseHostingCode with Hugo ExpressExpress Handbook by Flavio Learn React Blogs eBooks Tutorials DocsWhat the React Blog SeriesReact DOCSJSX in DeptsReact Patterns JavaScript Concepts Every DEV Should knowHigh Order ComponentsRefs and DOMEggheadIO Redux Course by Dan AbarmovReact Compositon Flavio CopesReact Handbook by Flavio CourseEggheadIO React for BeginnersFree React BootcampLearn React for free ScrimaReact basics in hr React JS Frontend Web Development for Beginners React and Redux MASTERCLASSFreeCodeCamp React Course React cheatsheetsUltimate React cheatsheet React Interview Questions Essential React Interview QuestionsList of React interview Questions and Answers React Stylingstyled components Visual primitives for the component ageemotion Library designed for writing CSS styles with JavaScriptradium Tool for React component styling React and TypeScriptTypeScript React and WebpackJSX in TypeScriptCheatsheets for experienced React developers getting started with TypeScriptReact by Example Learn Angular Course VideosAngular for beginners Course Free eBookAngularJS fundamentals in minsAnngular crash course by Traversy Media part course AngularAngularJS on YouTube Tutorials Docs Blogs eBooksWSchools Angular TutorialsA better way to learn AngularJSMinko Gechev BlogAngular SuccinctlyAngular from theory to courses CheatsheetsAngular CheatSheets Learn NODEJSNode js FUNdamentals A Concise Overview of The Main ConceptsWhy Node jsWhy The Hell Would I Use Node js A Case by Case IntroductionWhy I use Node js PHP vs Node jsDismantling the MonolithsNode js at PayPalOfficial DocumentationNode js Modules Official DocumentationManaging module dependenciesUsing Node s Event ModuleUnderstanding exports vs module exportsNode js Tutorial Node js Crash Course Tutorial by Net Ninja You Don t Know Node jsThe Art of Node Introductory tutorial covering the basics NodeSchool Interactive self guided workshops you can also do on your own Node Patterns Short books about code and networking patterns related to Node js Learn Node A premium training course to learn to build apps with Node js Express MongoDB The Node Way An entire philosophy of Node js best practices and guiding principles exists for writing maintainable modules scalable applications and code that is actually pleasant to read Express js Security Tips How You Can Save and Secure Your App Awesome Nodejs Delightful Node js packages and resources nodebestpractices Huge list of best practices for building node apps Important for big projects MISC RESOURCES THIS HAS ALL THE RESOURCES OTHER THEN THE ABOVE ONES Some fundamentals and important JavaScript A bit advanced Days VanillaJS project challengeAdvanced JavaScript TutorialsBecome a JavaScript Console Power User Introduction to the browsers JavaScript console Debugging The Web Learn state of the art in debugging using Chrome dev tools Udacity JavaScript Basics They also offer more advanced courses Code School From Basics to Best Practices Different courses related to JavaScript Functional programming Learn basic principles of functional programming in an interactive way by using map filter concatAll reduce and zip Monetize Your WorkYou can join the amazing website Buy Me A Coffee and get support and also start a membership if you re a content writer Link gt BUYMEACOFFEEThanks For Seeing this post If you didn t liked this post let me know in the comments |
2022-01-19 16:20:37 |
海外TECH |
DEV Community |
Building a GIF search Engine in just 10 mins |
https://dev.to/kumarkalyan/building-a-gif-search-engine-in-just-10-mins-lbd
|
Building a GIF search Engine in just minsHi everyone in this article I will explain about how you can build your own gif search engine using Html CSS and JavaScript in just mins and don t worry this is a beginner friendly tutorial PrerequisiteHTML CSS JavaScript GIF API key little knowledge of html events and Ajax will be preferred Your time and patience The most important The HtmlHtml or Hyper Text Markup Language which defines the structure of webpage like headings paragraphs line breaks etc just like a skeleton in Human body So in our gif search engine we also need a structure like a placeholder which will let us know about which type of GIF s user wants to see and a button for submitting the input First we need to create a file named index html let me tell you that we will be using internal CSS and JavaScript i e we will have our CSS and JavaScript code within our index html file using lt style gt lt style gt and lt script gt lt script gt tags Now let s add the boiler plate lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale gt lt title gt GIF Search Engine lt title gt lt style gt this will contain our styles lt style gt lt head gt lt body gt lt script gt this will contain our JavaScript code lt script gt lt body gt lt html gt here we have lt style gt amp lt script gt where we will define CSS and JavaScript Now let s add some HTML tags to structure our web page lt div class container gt lt h gt GIF Search engine lt h gt lt div class inputfiled gt lt input type text class input userinput placeholder enter something gt lt button class go gt GO lt button gt lt div gt lt div class output gt lt div gt lt div gt add these in the body tag As you can see that our structure is ready now let s add some styles to it the CSSCSS will bring styles to our webpage just like adding taste to food container text align center font family sans serif input width padding px margin px font size px color blueviolet font weight border px solid rgb button width padding px margin px color white background color purple border px solid purple cursor pointer img margin px inputfiled padding px add these within the style tag the JavaScriptJavaScript brings dynamicity to a web page like you may set some instructions on clicking a button or every time when the user requests for a new category of GIF we need to return a new output or as we are using the GIF API JavaScript will help us to get data form the GIF server todosGrab the input form the user Get data using the GIF API Display the data to the user now let s add JavaScript this will contain our JavaScript code Grab the input from teh user var input document querySelector input document querySelector input addEventListener keyup e gt only works when Enter key is clicked clearOutput if e which getData input value document querySelector button addEventListener click e gt clearOutput getData input value Get data from the API function getData input var API KEY Your api key var url API KEY amp q input amp limit amp offset amp rating g amp lang en this will only return maximum gifs at a time fetch url then response gt response json then data gt showData data data catch e gt console log e Display the output function showData data data forEach element gt var src element images fixed height url var output document querySelector output output innerHTML lt img src src gt clearing the ouptut function clearOutput var output document querySelector output output innerHTML Here you can see that I have added two event listeners to grab the input form the user and then I am passing the input to the getData so that using the input we can fetch or bring required data from the GIF server the fetch APIO returns a promise and we are resolving it via then and catch Now as we got the data form the API now I am passing it to showData where I am looping through an array named data and then extracting the image url from an element and storing it to an variable named srcand at the end we are just dynamically adding an image tag to the output div Now you must be thinking about the clearOutput let me tell you if you enter dog in the input then you will get maximum dog GIF images so basically we are adding img tags now when you again enter another input like cat we need to clear everything from our output div or else the cat GIF s will be concatenated with the dog GIF s put it together lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale gt lt title gt GIF Search Engine lt title gt lt style gt this will contain our styles container text align center font family sans serif input width padding px margin px font size px color blueviolet font weight border px solid rgb button width padding px margin px color white background color purple border px solid purple cursor pointer img margin px inputfiled padding px lt style gt lt head gt lt body gt lt div class container gt lt h gt GIF Search engine lt h gt lt div class inputfiled gt lt input type text class input userinput placeholder enter something gt lt button class go gt GO lt button gt lt div gt lt div class output gt lt div gt lt div gt lt script gt this will contain our JavaScript code Grab the input from teh user var input document querySelector input document querySelector input addEventListener keyup e gt only works when Enter key is clicked clearOutput if e which getData input value document querySelector button addEventListener click e gt clearOutput getData input value Get data from the API function getData input var API KEY your API key var url API KEY amp q input amp limit amp offset amp rating g amp lang en this will only return maximum gifs at a time fetch url then response gt response json then data gt showData data data catch e gt console log e Display the output function showData data data forEach element gt let src element images fixed height url var output document querySelector output output innerHTML lt img src src gt clearing the ouptut function clearOutput var output document querySelector output output innerHTML lt script gt lt body gt lt html gt conclusionCongrads yo just learned to create a GIF search engine Feel free to ask me if you have any queries Stay happy Stay safe Connect |
2022-01-19 16:10:15 |
海外TECH |
DEV Community |
My github readme page |
https://dev.to/nermineslimane/my-github-readme-page-3amd
|
My github readme pageHi there i just finished writing my github readme page Readme mdHere s a sneak peek Take a look and give me back your feedback and I can share how I managed to makke it that way feel free to get inspired and make your github better |
2022-01-19 16:04:17 |
Apple |
AppleInsider - Frontpage News |
Valentine's Day Gift Guide 2022: Top tech treats for Apple lovers |
https://appleinsider.com/articles/22/01/19/valentines-day-gift-guide-2022-top-tech-treats-for-apple-lovers?utm_medium=rss
|
Valentine x s Day Gift Guide Top tech treats for Apple loversAppleInsider s Valentine s Day gift guide is here and is filled to the brim with tech treats sure to put a smile on your sweetheart s face Valentine s day is rapidly approaching and AppleInsider is here to help you pick out a perfect present for the tech fan in your life Whether you re looking for something stylish or something useful we ve picked out some great gifts for that someone special Solo NY s Re new Briefcase Read more |
2022-01-19 16:32:10 |
海外TECH |
Engadget |
Apple's WeWork drama 'WeCrashed' premieres March 18th |
https://www.engadget.com/apple-wework-series-wecrashed-release-date-164250999.html?src=rss
|
Apple x s WeWork drama x WeCrashed x premieres March thApple is nearly ready to release its tale of WeWork s tragic fall The company has announced that its Apple TV limited series WeCrashed will premiere March th The eight episode drama stars Jared Leto as former WeWork CEO Adam Neumann who wielded hype to earn a billion valuation only to lose most of it and his job when the IPO process revealed ugly financials and leadership Anne Hathaway plays Adam s wife Rebekah who served as an executive including the head of WeGrow and whose relationship with Adam was quot at the center of it all quot according to Apple The trailer sets expectations quickly The Neumanns portrayed by Leto and Hathaway are full of overly grand visions portraying WeWork as nothing less than the future a quot movement quot aiming to quot elevate the world s consciousness quot The clip also highlights the cult like devotion to the company and its notoriously summer camp like retreats It s not certain how well the performances will hold up across a whole series but Apple at least seems to understand how WeWork s reality was never going to match the buzz This isn t the first streaming take on WeWork s rise and sudden decline Hulu s documentary was an imperfect but prominent take on the Neumann couple Apple s effort clearly has star power however and the behind the camera talent has experience with well received titles like Little America and This is Us If nothing else it s clear Apple hasn t given up its TV strategy of counting on big names to draw in viewers even if the projects are slightly unusual |
2022-01-19 16:42:50 |
Cisco |
Cisco Blog |
A bridge to uniform networks |
https://blogs.cisco.com/ciscoit/a-bridge-to-uniform-networks
|
A bridge to uniform networksCisco IT s C Bridge product provides a quicker more secure network transition for acquired companies It allows Cisco s internal IT and InfoSec teams to improve time to access for new employees maintain a stringent security posture and reduce the cost of integration for acquisitions |
2022-01-19 16:49:30 |
Cisco |
Cisco Blog |
Cisco UCS Becomes NVIDIA-Certified, Accelerating Customer Hybrid Cloud Journeys |
https://blogs.cisco.com/partner/cisco-ucs-becomes-nvidia-certified-accelerating-customer-hybrid-cloud-journeys
|
Cisco UCS Becomes NVIDIA Certified Accelerating Customer Hybrid Cloud JourneysCisco is now providing NVIDIA Certified servers that are compatible with NVIDIA AI Enterprise a complete software suite for developing and deploying AI workloads |
2022-01-19 16:00:46 |
海外科学 |
NYT > Science |
New Research Shows How Health Risks to Children Mount as Temperatures Rise |
https://www.nytimes.com/2022/01/19/climate/heat-health-risks-children.html
|
New Research Shows How Health Risks to Children Mount as Temperatures RiseThe first nationwide study on rising temperatures and younger Americans found that hotter days were associated with more visits to emergency rooms |
2022-01-19 16:28:11 |
金融 |
金融庁ホームページ |
関東財務局が高病原性鳥インフルエンザ疑似患畜の確認を踏まえ、金融上の対応について要請しました。 |
https://www.fsa.go.jp/news/r3/ginkou/20220119.html
|
疑似患畜 |
2022-01-19 18:00:00 |
金融 |
金融庁ホームページ |
金融庁職員の新型コロナウイルス感染について公表しました。 |
https://www.fsa.go.jp/news/r3/sonota/20220119.html
|
新型コロナウイルス |
2022-01-19 18:00:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
黒字見込み企業は過去5年で最高、2021年度海外進出日系企業実態調査(中東編) |
https://www.jetro.go.jp/biznews/2022/01/d4af4a5466a5db41.html
|
実態調査 |
2022-01-19 16:30:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
バイデン米政権、インフラ投資雇用法に基づく橋の改修計画発表 |
https://www.jetro.go.jp/biznews/2022/01/63b28b5011a2ebd7.html
|
雇用法 |
2022-01-19 16:20:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
広東省、eスポーツ産業で圧倒的なシェア、政府も産業支援強化 |
https://www.jetro.go.jp/biznews/2022/01/ba94c85d88abba6d.html
|
産業 |
2022-01-19 16:10:00 |
ニュース |
BBC News - Home |
In the name of God go, David Davis tells UK PM |
https://www.bbc.co.uk/news/uk-politics-60056482?at_medium=RSS&at_campaign=KARANGA
|
labour |
2022-01-19 16:47:02 |
ニュース |
BBC News - Home |
Covid: Face mask rules and Covid passes to end in England |
https://www.bbc.co.uk/news/uk-60047438?at_medium=RSS&at_campaign=KARANGA
|
boris |
2022-01-19 16:51:48 |
ニュース |
BBC News - Home |
Ben John: Extremist ordered to read books is jailed |
https://www.bbc.co.uk/news/uk-england-leicestershire-60051861?at_medium=RSS&at_campaign=KARANGA
|
shakespeare |
2022-01-19 16:53:11 |
ニュース |
BBC News - Home |
Gaspard Ulliel: Moon Knight actor dies aged 37 after ski accident |
https://www.bbc.co.uk/news/entertainment-arts-60054237?at_medium=RSS&at_campaign=KARANGA
|
accidentgaspard |
2022-01-19 16:14:54 |
ニュース |
BBC News - Home |
Hana Horka: Czech singer dies after catching Covid intentionally |
https://www.bbc.co.uk/news/world-europe-60050996?at_medium=RSS&at_campaign=KARANGA
|
covid |
2022-01-19 16:49:58 |
ニュース |
BBC News - Home |
Covid: 'Plan B was a catastrophe for our coffee shop' |
https://www.bbc.co.uk/news/business-60057276?at_medium=RSS&at_campaign=KARANGA
|
coffee |
2022-01-19 16:22:31 |
コメント
コメントを投稿