IT |
ITmedia 総合記事一覧 |
[ITmedia News] AppleのAR/VRヘッドセットは「Apple Reality」? 「realityOS」をAppleのソースから発見 |
https://www.itmedia.co.jp/news/articles/2202/09/news177.html
|
apple |
2022-02-09 22:35:00 |
AWS |
AWS - Webinar Channel |
Serverless Kafka on AWS (Hebrew) |
https://www.youtube.com/watch?v=rXylPp-D_kY
|
Serverless Kafka on AWS Hebrew Amazon MSK is a fully managed Kafka service that makes it easy for developers to build and run highly available secure and scalable applications based on Apache Kafka and Kafka Connect Join this session to learn about recent MSK innovations Amazon MSK serverless a new cluster type that lets you run Apache Kafka without having to manage compute storage capacity and Amazon MSK Connect that lets you run fully managed serverless Apache Kafka Connect workloads on AWS |
2022-02-09 13:40:22 |
AWS |
AWS - Webinar Channel |
No-Code ML - AutoML for non data scientists |
https://www.youtube.com/watch?v=qrRlM9eR2k0
|
No Code ML AutoML for non data scientistsCanvas is a new visual no code capability that allows business analysts to build ML models and generate accurate predictions without writing code or requiring ML expertise Its intuitive user interface lets you browse and access disparate data sources in the cloud or on premises combine datasets with the click of a button train accurate models and then generate new predictions once new data is available |
2022-02-09 13:20:06 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【Ruby】dynamic constant assignmentというエラー |
https://qiita.com/miya114/items/922e8d89a0bbe564745a
|
実行した結果、syntaxerrorとして以下のエラーが表示されたdynamicconstantassignmentBASETITLEtitle対処法メソッドの外で定数を定義する。 |
2022-02-09 22:59:22 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
VirtualBox上のUbuntu20.04、画面が見切れてしまう問題の解決方法 |
https://qiita.com/T-mats/items/4f0727d0029bf9f234c3
|
VirtualBox上のUbuntu、画面が見切れてしまう問題の解決方法VirtualBox上でUbuntuを導入した際、画面が見切れてしまう問題で相当苦戦したので忘備録として投稿。 |
2022-02-09 22:48:34 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
ポートフォリオとして、If-Thenプランニングを活用した習慣化アプリを作成しました [Laravel / AWS] |
https://qiita.com/rickeysan95/items/edc79d913c6cf8298393
|
カレンダーの記録を振り返って、後からIfThenプランニングを自分なりにアップグレードしてもらうことを狙っています例えば、自分は朝早起きに失敗したときにやる気を失ってその日のノルマを達成できていないという傾向がわかったら、「朝早起きに失敗したら、代わりにを行う」と新しいプランニングを行います習慣の検索・お気に入り登録機能自分だけで考えてもなかなか答えが見つからないことも多いと思います。 |
2022-02-09 22:48:46 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
S3で指定バケット配下のファイル一覧を取得する |
https://qiita.com/Suguru-Terouchi/items/694e56353ed67e164e6e
|
このrecursiveというオプションを追加することで指定バケット配下のフォルダ含めて全てのファイル一覧を出力することが出来ます。 |
2022-02-09 22:03:33 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Raspberry Pi OSをDocker上で動かす |
https://qiita.com/moritalous/items/e37719362346c06a453c
|
ホストの環境RaspberrPiGBUbuntubit手順roottarxzを入手Dockerイメージとしてインポートdockerpullしかやったことなかったですが、イメージをインポートすることができるんですね。 |
2022-02-09 22:40:38 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
【git】コミットした後に「あ、確認してなかった」ってなった時のコマンド |
https://qiita.com/miya114/items/11b37d9d6a62015215a4
|
【git】コミットした後に「あ、確認してなかった」ってなった時のコマンドたまに「あ、」ってなるエラーが発生→解決策を調べる→自分の状況と比較→「お、これじゃん」→コードをコピペ→解決した気になる→コミットしてしまう→「あ、そういやローカルで動くか確認してなかったな」→ローカル動作確認→動いてないというようなことをたまにやってしまうので、そうなった時によく使う呪文を貼っときます。 |
2022-02-09 22:16:03 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
GitでAddしたファイルをまとめて削除する |
https://qiita.com/season3/items/4c8e81bbff2ba41013db
|
GitでAddしたファイルをまとめて削除するやりたかったことgitcheckoutなどしても、Untrackedfileは消えないのでまとめて消すコマンドを調べた。 |
2022-02-09 22:03:51 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【Ruby】dynamic constant assignmentというエラー |
https://qiita.com/miya114/items/922e8d89a0bbe564745a
|
実行した結果、syntaxerrorとして以下のエラーが表示されたdynamicconstantassignmentBASETITLEtitle対処法メソッドの外で定数を定義する。 |
2022-02-09 22:59:22 |
js |
JSer.info |
2022-02-09のJS: Babel 7.17.0、Chrome 99 beta、Fetch API in Node.js |
https://jser.info/2022/02/09/babel-7.17.0-chrome-99-beta-fetch-api-in-node.js/
|
また、StageのPipeOperatorにtopicTokenとしてとを選択できるオプションの追加、babelregisterに実験的なworkerの実装を追加などが含まれています。 |
2022-02-09 22:04:18 |
技術ブログ |
Developers.IO |
HammerDB で RDBMS のベンチマークを取ってみる(PostgreSQL編) |
https://dev.classmethod.jp/articles/hammerdb-%e3%81%a7-rdbms-%e3%81%ae%e3%83%99%e3%83%b3%e3%83%81%e3%83%9e%e3%83%bc%e3%82%af%e3%82%92%e5%8f%96%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%ef%bc%88postgresql%e7%b7%a8%ef%bc%89/
|
hammerdb |
2022-02-09 13:50:33 |
海外TECH |
MakeUseOf |
The New Pixel 6 Update Hammers the Final Nail in the Pixel 3's Coffin |
https://www.makeuseof.com/pixel-6-update-signals-pixel-3-demise/
|
The New Pixel Update Hammers the Final Nail in the Pixel x s CoffinAs the Pixel receives an update on time for once Google leaves Pixel users wondering amp quot Well what about me amp quot |
2022-02-09 13:30:42 |
海外TECH |
MakeUseOf |
The 8 Best Creative Hacks to Get Recruiters' Attention |
https://www.makeuseof.com/creative-hacks-to-get-recruiters-attention/
|
The Best Creative Hacks to Get Recruiters x AttentionCreativity is the key to getting the recruiter s attention Here are some creative hacks you can use to grab the recruiter s attention |
2022-02-09 13:30:12 |
海外TECH |
DEV Community |
Blockchain made simple |
https://dev.to/getintoweb3/blockchain-made-simple-5f5n
|
Blockchain made simpleIn simple terms a blockchain is just a database They are databases in which information can only be added which means you can t delete or edit it once it s been added This property is referred to as append only Each new entry also known as a block is cryptographically connected to the previous one We can also say that a new block must have the previous one s fingerprint hash in order to keep the historic transactions connected and keep the chain growing Because each new entry is linked to the preceding one a chain of blocks is formed which we refer to as a Blockchain The fundamentals of BlockchainThe three main ideas in blockchain are Blocks nodes and miners BlocksEvery chain is made up of several blocks When the initial block of a chain is created the cryptographic hash is generated by a number nonce Unless it is mined the data in the block is regarded as signed and irrevocably linked to that number and hash MinersMiners add new blocks to the chain by the process of mining Every block in a blockchain has its own unique nonce and hash but it also references the previous block s hash making block mining challenging especially on large chains When a miner mines a block successfully all the other nodes get changed and network gets notified about it and the miner is rewarded financially Making a change to any block earlier in the chain necessitates re mining not only the affected block but all subsequent blocks as well This process is quite complex for large blockchains and that s why these blockchains are considered to be really secure NodesOne of the most important concepts in blockchain technology is decentralisation Nodes are the entities that connect the chain and store the blockchain s data A node is any form of technological device that saves copies of the blockchain and keeps the network running Every node has its own copy of the blockchain and any freshly mined block must be approved algorithmically by the network in order for the chain to be updated trusted and confirmed In a nutshell blockchains are a technology that enables TRUST to SCALE How did blockchain come to be Blockchain technology was created as a result of Bitcoin and other cryptocurrencies By registering each blockchain based money transfer onto a publicly available digital ledger it enabled currency exchange It was first introduced in as a way to exchange Bitcoin However it has since garnered worldwide prominence as a means of sharing items other than money such as recordings and contracts Some public blockchains that are widely used are Ethereum Ripple and of course Bitcoin What is the mechanism behind blockchain Blockchain employs a distributed ledger and hash function to transmit data It s practically impossible to pinpoint the algorithm that generates the hash A hash has various qualities that make it difficult to fabricate despite the fact that it is completely random If one hash is changed all hashes in the chain must be changed as well These hashes are then assembled and delivered to nodes which are computers located all over the world that monitor and authorise each transaction Once the majority of nodes agree that the transaction is valid and that the new data matches the prior entries it is written into a block That s it for this quick intro to Blockchains If you are excited to know more about the technologies associated with Web don t forget to follow and be a part of the Get Into Web GIW community for the latest updates Also don t forget to follow us on Twitter and join the Discord community to learn more Which blockchain is your favourite Let me know in the comments |
2022-02-09 13:48:38 |
海外TECH |
DEV Community |
🎬Login & Registration Form Using HTML & CSS & JS✨ |
https://dev.to/robsonmuniz16/login-registration-form-using-html-css-js-5331
|
Login amp Registration Form Using HTML amp CSS amp JSHey Devs today we re going to make an awesome login and registration form with sliding animation just by using HTML and CSS and little bit of JavaScript Resources ️Souce Code gt ️Icons ️Pic used on this project Recommended Projects Neumorphism Login Form HTML amp CSS ➤Animated Sidebar Menu with HTML amp CSS ➤Watch Amazing Social Media Buttons Hover Effects HTML amp CSS ➤ Animated Login Form HTML CSS amp JavaScript ➤Watch Slider Sign In Sign Up Form HTML CSS Vanilla JS ➤Watch Follow me on |
2022-02-09 13:45:19 |
海外TECH |
DEV Community |
Lessons learned from my first project |
https://dev.to/scottgarsson382/lessons-learned-from-my-first-project-4ggg
|
Lessons learned from my first projectHi I ve been coding for about one month now I ve been learning primarily on the educational platform Codecademy and as part of my education I was sent off platform to design a terminal game I created a choose your own adventure game called BoneTown that takes place in a western frontier town in a post apocalyptic future It relies off a lot of dialogue boolean statements and functions It was a lot of fun to create in truth at a certain point I felt I was dumping too much time into it and the value I received coding wise was decreasing as I went on So large portions of my original story is unfinished but it s all functional Here is a link to my git repository containing the game Check it out |
2022-02-09 13:42:30 |
海外TECH |
DEV Community |
Top Ways to Get Success in eCommerce website |
https://dev.to/websitechnologies/top-ways-to-get-success-in-ecommerce-website-2hm0
|
Top Ways to Get Success in eCommerce websiteeCommerce website is indeed a profit belching proposition for you The only thing is that you should know how to play this game like a pro International big bulls are ruling the evolving e commerce space by keeping a sharp focus on some quintessential success secrets Allow us to share a portion of that secret sauce here The insight will let your sales revenue surge Let us know what could those success secrets be for you Minimalist designs Research says that a minimalistic and modest look can boost sales figures in e commerce Minimalist designs encompass the pristine techniques of working with bare minimum essentials in terms of design properties yet you can invent a completely uncluttered and simple web infrastructure With proper typography as well as color contrasts you can help your e commerce brand easily resonate with your target market share in an inspiring as well as fun filled fashion Search bars are necessaryIf you go about making the web interface for your e commerce venture under the overseeing gaze of an eCommerce development company kolkata you will be advised to have your attention on search bars From functional point of view these bars have a lot of significance in an e commerce portal With these bars properly placed in your business interface you can rest assured that your target visitors will have a worthy shopping experience Simplistic design of menus To make things easy for your visitors you will need to bring some simplistic design of menus into play Be specific while designing the menus You must not complicate things Use broad terms while you are trying to orchestrate product categories Besides you should make it a point to avert clusters in design Once you achieve that objective you can rest assured that the design will be stunning and perfect for your target audience Be particularly careful about the launch of the web interface Just like the design part of the e commerce website you should be cautious with relation to the launch of the web interface The success of your commercial interface will rely heavily on this crucial factor You should do well if you prefer to take advantage of an eCommerce development company kolkata to ease up the complexities involved in the ordeal of the launch of the web interface At the same time you should ensure that you Purchase a standard and reputable web hosting solution We hope that the discussion which we furnished here will prove to be beneficial in many ways If you follow the advice you will do best in the shape of an e commerce business You will be able to avoid disruptions and embrace significant sales opportunities |
2022-02-09 13:36:19 |
海外TECH |
DEV Community |
Python get input from user |
https://dev.to/baransel/python-get-input-from-user-k3g
|
Python get input from userSign up to my newsletter input Let s show the use of the input function simply by taking the name from the user name input Enter your name print name Output Enter your name BaranselBaranselAs seen above we received a name information from the user We printed the information we received with the print function which we processed in our previous lesson For example let s take two numbers from the user and add themnumber input Enter the first number number input Enter the second number sum number numberprint Total sum Output Enter the first number Enter the second number Total As you can see we got the result of it actually gave the numbers and written side by side not the sum of these two numbers With the input function we can only get String text data types from the user In other words it took numbers in String type so how do we import data of Integer integer type number input Enter the first number number input Enter the second number sum int number int number print Total sum format method Continue this post on my blog Python get input from user Sign up to my newsletter |
2022-02-09 13:36:08 |
海外TECH |
DEV Community |
My favorite Vim Settings in Vscode so far! |
https://dev.to/publicsalad/my-favorite-vscodevim-settings-so-far-3fjo
|
My favorite Vim Settings in Vscode so far Sublime Text Days At my first job I was a Sublime text enjoyer with the Six plugin extension to use vim keybindings I thought Sublime Text is more superior with Visual studio code because of its performance and at the time I don t like using Chromium based applications because chrome already eats up all of my ram After a while I started to learn ReactJS development with ST but could not find a good article tutorial on how to setup ST for ReactJS Development I saw my coworkers using Visual studio code with their fancy Intellisense amp Formatting of code on save So i thought you only live once so why not try it I tried it And I can say I am now a Visual Studio Code With VscodeVim enjoyer I ll show you my favorite Visual Studio Code amp Vim Settings to boost productivity Hopefully On to the Settings Space as my leader key vim leader lt space gt Save Close current file Search Remove Searched Highlights nohl vim normalModeKeyBindingsNonRecursive before leader w commands workbench action files save before leader q commands q before lt leader gt f after before lt leader gt n commands nohl Enable Default Ctrl keys vim handleKeys lt C v gt false lt C s gt false lt C y gt false lt C z gt false lt C p gt false lt C q gt false lt C n gt false lt C x gt false lt C b gt false lt C a gt false lt C f gt false Quickly go to Top Bottom vim normalModeKeyBindingsNonRecursive before lt leader gt j after G before lt leader gt k after g g Extras I rarely use this because muscle memory of default vim combos vim normalModeKeyBindings quick deletes a highlighted block before lt leader gt d after d d Go to next file tab before lt tab gt commands workbench action nextEditor Go to previous file tab before lt S tab gt commands workbench action previousEditor vim normalModeKeyBindingsNonRecursive before lt leader gt j after G before lt leader gt k after g g That s all the shortcuts i usually use when I m coding Of course a couple of this shortcuts I discovered stackoverflow amp reddit I also made a video showing more shortcuts amp vscode settings that you can watch Here if you prefer watching a youtube video That s about it Hope you enjoyed the quick read |
2022-02-09 13:35:05 |
海外TECH |
DEV Community |
Use Streams to Build High-Performing Node.js Applications |
https://dev.to/appsignal/use-streams-to-build-high-performing-nodejs-applications-1lba
|
Use Streams to Build High Performing Node js ApplicationsThe moment you type something on a keyboard read a file from a disk or download a file over the internet a stream of information bits flows through different devices and applications If you learn to work with these streams of bits you ll be able to build performant and valuable applications For example think of when you watch a video on YouTube You don t have to wait until the full video downloads Once a small amount buffers it starts to play and the rest keeps on downloading as you watch Node js includes a built in module called stream which lets us work with streaming data In this article we will explain how you can use the stream module with some simple examples We ll also describe how you can build pipelines gluing different streams together to build performant applications for complex use cases Before we dive into building applications it s important to understand the features provided by the Node js stream module Let s get going Types of Node js StreamsNode js streams provides four types of streams Readable StreamsWritable StreamsDuplex StreamsTransform StreamsSee the official Node js docs for more detail on the types of streams Let s look at each stream type at a high level Readable StreamsA readable stream can read data from a particular data source most commonly from a file system Other common uses of readable streams in Node js applications are process stdin To read user input via stdin in a terminal application http IncomingMessage To read an incoming request s content in an HTTP server or to read the server HTTP response in an HTTP client Writable StreamsYou use writable streams to write data from an application to a specific destination for example a file process stdout can be used to write data to standard output and is used internally by console log Next up are duplex and transform streams which you can define as hybrid stream types built on readable and writable streams Duplex StreamsA duplex stream is a combination of both readable and writable streams It provides the capability to write data to a particular destination and read data from a source The most common example of a duplex stream is net Socket used to read and write data to and from a socket It s important to know that readable and writable sides operate independently from one another in a duplex stream The data does not flow from one side to the other Transform StreamsA transform stream is slightly similar to a duplex stream but the readable side is connected to the writable side in a transform stream A good example would be the crypto Cipher class which implements an encryption stream Using a crypto Cipher stream an application can write plain text data into the writable side of a stream and read encrypted ciphertext out of the readable side of the stream The transformative nature of this type of stream is why they are called transform streams Side note Another transform stream is stream PassThrough which passes data from the writable side to the readable side without any transformation Though this might sound trivial Passthrough streams are very useful for building custom stream implementations and pipelines e g creating multiple copies of one stream s data Read Data From Readable Node js StreamsOnce a readable stream is connected to a source that generates data e g a file there are a few ways to read data through the stream First let s create a sample text file named myfile with bytes of lorem ipsum text Lorem ipsum dolor sit amet consectetur adipiscing elit Curabitur nec mauris turpis Now let s look at two different methods of reading data from a readable stream Listen to data EventsThe most common way to read data from a readable stream is by listening to data events emitted by the stream The following program demonstrates this approach const fs require fs const readable fs createReadStream myfile highWaterMark readable on data chunk gt console log Read chunk length bytes n chunk toString n The highWaterMark property passed as an option to fs createReadStream determines how much data buffers inside the stream The data is then flushed to the reading mechanism in this case our data handler By default readable fs streams have their highWaterMark set to kB We deliberately override this to bytes to trigger multiple data events If you run the above program it will read bytes from myfile in five iterations You will see the following output in the console Read bytes Lorem ipsum dolor si Read bytes t amet consectetur Read bytes adipiscing elit Cur Read bytes abitur nec mauris tu Read bytes rpis Use Async IteratorsAn alternative way of reading data from a readable stream is by using async iterators const fs require fs const readable fs createReadStream myfile highWaterMark async gt for await const chunk of readable console log Read chunk length bytes n chunk toString n If you run this program you will get the same output as the previous example State of a Readable Node js StreamWhen a listener is attached to a readable stream s data events the stream switches to a flowing state unless it is explicitly paused You can inspect the stream s flowing state using the stream object s readableFlowing property We can demonstrate this using a slightly modified version of our previous example with the data handler const fs require fs const readable fs createReadStream myfile highWaterMark let bytesRead console log before attaching data handler is flowing readable readableFlowing readable on data chunk gt console log Read chunk length bytes bytesRead chunk length Pause the readable stream after reading bytes from it if bytesRead readable pause console log after pause call is flowing readable readableFlowing resume the stream after waiting for s setTimeout gt readable resume console log after resume call is flowing readable readableFlowing console log after attaching data handler is flowing readable readableFlowing In this example we read from myfile via a readable stream but we temporarily pause the data flow for s after reading bytes from the file We also log the value of the readableFlowing property at different times to understand how it changes If you run the above program you will get the following output before attaching data handler is flowing nullafter attaching data handler is flowing trueRead bytesRead bytesRead bytesafter pause call is flowing falseafter resume call is flowing trueRead bytesRead bytesWe can explain the output as follows When our program starts readableFlowing has the value null because we don t provide any mechanism of consuming from the stream After the data handler is attached the readable stream changes to flowing mode and readableFlowing changes to true Once bytes are read the stream is paused by calling pause which in turn changes readableFlowing to false After waiting for s the stream switches to flowing mode again by calling resume changing readableFlowing to true The rest of the file content then flows through the stream Processing Large Amounts of Data with Node js StreamsThanks to streams applications do not have to keep large blobs of information in memory small chunks of data can be processed as they are received In this section let s combine different streams to build a real life application that can handle large amounts of data We ll use a small utility program that generates an SHA of a given file But first let s create a large GB dummy file for testing You can do this using a small shell command as follows On macOS mkfile n g gb fileOn Linux xfs mkfile m gb fileAfter creating our dummy gb file let s generate the SHA hash of the file without using the stream module const fs require fs const crypto require crypto fs readFile gb file readErr data gt if readErr return console log readErr const hash crypto createHash sha update data digest base fs writeFile checksum txt hash writeErr gt writeErr amp amp console error err If you run the above code you may get the following error RangeError ERR FS FILE TOO LARGE File size is greater than GBat FSReqCallback readFileAfterStat as oncomplete fs js code ERR FS FILE TOO LARGE The above error occurs because the JavaScript runtime cannot handle arbitrarily large buffers The max size of a buffer that the runtime can handle depends on your operating system architecture You can check this by using the buffer constants MAX LENGTH variable in the built in buffer module Even if we didn t see the above error keeping large files in memory is problematic The physical memory we have available will restrict the amount of memory our application can use High memory usage can also cause poor application performance in terms of CPU usage as garbage collection becomes expensive Reduce Your App s Memory Footprint Using pipeline Now let s look at how we can modify our application to use streams and avoid encountering this error const fs require fs const crypto require crypto const pipeline require stream const hashStream crypto createHash sha hashStream setEncoding base const inputStream fs createReadStream gb file const outputStream fs createWriteStream checksum txt pipeline inputStream hashStream outputStream err gt err amp amp console error err In this example we use the streaming approach provided by the crypto createHash function It returns a transform stream object hashStream generating hashes for arbitrarily large files To feed the file content into this transform stream we have created a readable stream ーinputStream ーto gb file using fs createReadStream We pipe the output from the hashStream transform stream to the writable outputStream and the checksum txt created using fs createWriteStream If you run the above application you will see that the checksum txt file populates with the SHA hash of our GB file Using pipeline vs pipe for StreamsIn our previous example we used the pipeline function to connect multiple streams An alternative common approach is to use the pipe function as shown below inputStream pipe hashStream pipe outputStream However using pipe in production applications is not recommended for several reasons If one of the piped streams is closed or throws an error pipe will not automatically destroy the connected streams This can cause memory leaks in applications Also pipe does not automatically forward errors across streams to be handled in one place pipeline was introduced to cater for these problems so it s recommended you use pipeline instead of pipe to connect multiple streams We can rewrite the above pipe example to use the pipeline function as follows pipeline inputStream hashStream outputStream err gt err amp amp console error err pipeline accepts a callback function as the last parameter Any forwarded errors from any of the piped streams will call the callback so it s easier to handle errors for all streams in one place Wrap Up Reduce Memory and Improve Performance Using Node js StreamsUsing streams in Node js helps us build performant applications that can handle large amounts of data In this article we covered The four types of Node js streams readable writable duplex and transform streams How you can read data from readable Node js streams by either listening to data events or using async iterators Reducing the memory footprint of your applications by using pipeline to connect multiple streams A quick small word of warning You likely won t encounter many situations where streams are a necessity and a stream based approach can increase the complexity of your application Make sure you confirm that the benefits of using streams outweigh the complexity they ll bring I d encourage you to read the official Node js stream documentation to learn more and to explore more advanced use cases of streams out there Happy coding P S If you liked this post subscribe to our JavaScript Sorcery list for a monthly deep dive into more magical JavaScript tips and tricks P P S If you need an APM for your Node js app go and check out the AppSignal APM for Node js |
2022-02-09 13:33:20 |
海外TECH |
DEV Community |
React.useCallback() |
https://dev.to/mhsadique/reactusecallback-134g
|
React useCallback Before diving into useCallback usage let s distinguish the problem useCallback solves ーthe functions equality check Functions in JavaScript are first class citizens meaning that a function is a regular object The function object can be returned by other functions be compared etc anything you can do with an object Let s write a function factory that returns functions that sum numbers function factory return a b gt a b const sum factory const sum factory sum gt sum gt sum sum gt falsesum sum gt true sum and sum are functions that sum two numbers They ve been created by the factory function The functions sum and sum share the same code source but they are different function objects Comparing them sum sumevaluates to false The purpose of useCallback Different function objects sharing the same code are often created inside React components function MyComponent handleClick is re created on each render const handleClick gt console log Clicked handleClick is a different function object on every rendering of MyComponent Because inline functions are cheap the re creation of functions on each rendering is not a problem A few inline functions per component are acceptable But in some cases you need to maintain a single function instance between renderings A functional component wrapped inside React memo accepts a function object propWhen the function object is a dependency to other hooks e g useEffect callback When the function has some internal state e g when the function is debounced or throttled That s when useCallback callbackFun deps is helpful given the same dependency values deps the hook returns the same function instance between renderings aka memoization import useCallback from react function MyComponent handleClick is the same function object const handleClick useCallback gt console log Clicked handleClick variable has always the same callback function object between renderings of MyComponent |
2022-02-09 13:32:41 |
海外TECH |
DEV Community |
react-router-dom-v6 |
https://dev.to/adidoshi/react-router-dom-v6-51j2
|
react router dom vHey folks I know most of us were using react router dom v before amp the v must be a little bit confusing But trust me they have made it more simpler in the latest version for routing of different pages Breaking down all the concepts one by one for better understanding Let s start What is react router dom It is a fully featured client and server side routing library for react Helps create and navigate between different URLs that make up your web application Provides unique URLs for different components in the app and makes the UI easily shareable with other users What we ll be covering from the new version Configuring routes Navigating programmaticallyDyanamic routesNested routes Route parametersLazy loading Installation npm install react router dom Configuring routes Let s begin with the most common usage for routes Taking a scenario suppose a user is on the home page amp want s to visit the about page vice versa To configure routes we need to connect url in the browser with our react app for that react router provides a component called BrowserRouter with which we need to wrap our entire app We can simply do that in the index js file index js fileimport BrowserRouter from react router dom lt BrowserRouter gt lt App gt lt BrowserRouter gt Create two components home about and navbar for the UI Home js fileconst Home gt return lt div className element gt This is Home page lt div gt export default Home About js fileconst About gt return lt div className element gt This is about page lt div gt export default About In App js we wrap home amp about within Routes component amp Route individually from the react router dom The route has two parameters path which reflects the path in the url amp element which includes our components Note Here we don t need to add before path expect for the root home url i e itself App jsimport Route Routes from react router dom import About from components About import Home from components Home import Navbar from components Navbar import styles css export default function App return lt div className App gt lt Navbar gt lt Routes gt lt Route path element lt Home gt gt lt Route path about element lt About gt gt lt Routes gt lt div gt To match the url we wrap the home and about elements in a Link component from rrd in the navbar For more ease now you can use NavLink component provided by rrd which helps in denoting active page by making that respective element bold on the Navbar Navbar jsimport React from react import Link from react router dom import NavLink from react router dom const Navbar gt const navLinkStyles isActive gt return fontWeight isActive bold normal textDecoration isActive none underline return lt nav className primary nav gt lt Link to gt Home lt Link gt lt Link to about gt About lt Link gt lt NavLink style navLinkStyles to gt Home lt NavLink gt lt NavLink style navLinkStyles to about gt About lt NavLink gt lt nav gt export default Navbar Navigating programmatically Remember history push from v Let s suppose you are placing an order on an e commerce store and when the order is placed you want to navigate the user to another page which says order placed successfully In that case you want to achieve that with an action button which is possible by useNavigate provided by rrd For example in home page you have a button Place order you can include an onClick prop Similarly if you want the user to navigate back to home page from order s page then you can simply use navigate import useNavigate from react router dom const Home gt const navigate useNavigate return lt div gt Home page lt button onClick gt navigate order summary gt Place order lt button gt lt div gt export default Home What if user tries to visit a route which is not defined you can easily handle page not found with rrd Create a page not found component NoMatch fileconst NoMatch gt return lt div gt Page not found lt div gt export default NoMatch Simply add a route to App js has a special meaning in rrd which means it matches routes which are not defined in your app lt Route path element lt NoMatch gt gt Nested routes React router dom also helps to switch between a portion of the view inside a page Take a scenario we have a navigation link Products when user clicks it renders the products page amp within that we have a search bar then two more links featured new When we click on featured it renders products featured amp changes only the portion of the page beside links same when clicked on new To achieve this we use nested routes Add products link to the Navbar I ve attached a codesandbox example for every topic for better understanding Create a products page and include the two links featured and new and make sure you don t add before the path for nested routes Create two new components FeaturedProduct amp NewProduct Now here rrd provied an lt Outlet gt component which helps to work this invoke it below the two links Products fileimport Link Outlet from react router dom const Products gt return lt div gt lt input placeholder Search Products type search gt lt nav gt lt Link to featured gt Featured lt Link gt lt Link to new gt new lt Link gt lt nav gt lt Outlet gt lt div gt export default Products Now to make this work we need to enclose the two nested components in route component by changing it to closing tag from a self closing tag Now what is special about nested routes is that rrd automatically forms the full path to the children routes so featured path is actually products featured amp new is products new Wohoo Now we are able to change only the portion of UI in the same page App js file lt Route path products element lt Products gt gt lt Route path featured element lt FeaturedProduct gt gt lt Route path new element lt NewProduct gt gt lt Route gt Index Route In the previous section we saw how nested routes work however you must have noticed that the child routes render only when the url is products featured or products new Sometimes you may want the child route to render at the parent route level i e if we click on products link we still want to render the featured products when url reaches products that can be achieved by the index route It s also a nested routed so simply specify in the route component amp what s special here is we don t need to add path prop instead we just need to add index this will share the path of the parent route that is products Now your App js file will look like lt Route path products element lt Products gt gt lt Route index element lt FeaturedProduct gt gt lt Route path featured element lt FeaturedProduct gt gt lt Route path new element lt NewProduct gt gt lt Route gt Dynamic RoutesLet s suppose we are building an Admin dashboard and we require users list and user details page for particular user followed by the id of that user For example if navigate to users then it should show details of first user amp same for all We achieve this by dynamic routes in rrd Let s create a Users page and include user list Users js fileimport React from react import Link Outlet from react router dom function Users const users id name User details id name User details id name User details return lt div gt users map item gt lt Link to users item id key item id gt lt h gt item name lt h gt lt Link gt lt Outlet gt lt div gt export default Users To match this url rrd provides us url params which helps in navigating to the individual user details page Creating the user details page It s important to note here that userId on the params object corresponds to the dynamic segments specified in the route config userId import useParams from react router dom const UserDetails gt const userId useParams const userId params userId destructuring userId return lt div gt User details page userId lt div gt export default UserDetails In App js we create a Route in which we include path in this manner gt lt Route path users element lt Users gt gt lt Route path userId element lt UserDetails gt gt lt Route gt Search ParamsSo url params is not the only way to add parameters to the route we can also add an optional query string For example if we want to filter active users from the user s list based on some condition then we can add in the url gt users filter active This is called as search params in rrd useSearchParams behaves similar to the useState hook instead of storing it in memory though it s stored in url So in the users file you can just add when user clicks on active user useSearchParams is initiated amp on reset filters removed import React from react import useSearchParams from react router dom function Users const searchParams setSearchParams useSearchParams const showActiveUsers searchParams get filter active return lt div gt lt div gt lt button onClick gt setSearchParams filter active gt Active users lt button gt lt button onClick gt setSearchParams gt Reset filters lt button gt lt div gt showActiveUsers lt h gt Show active users lt h gt lt h gt Showing all users lt h gt lt div gt export default Users Lazy loading Lazy loading is a technique wherein components not required on the home page can be split into separate code bundles and downloaded only when user navigates to that page Maybe you can think like incrementally downloading the application It helps reduce initial load time thereby improving performance Let s understand with an simple example we will lazy load the about page by adding lot paragraphs meaning trying to make it bulky on purpose About js fileconst About gt return lt div gt s of lines lt div gt export default About If we observe the bundle size when the entire app is loaded on initial load Well to check that open your dev tools right click on refresh button of your browser and click on Empty Cache and Hard Reload Taking my example the main chunk js is of kb amp it takes ms to load In App js we need to add dynamic import syntax and make use of React suspense Make sure in your about page you have a default export as we need that in App js file A promise is returned by this dynamic import which is then converted into a module that contains a default exported react component in our case About import React from react const LazyAbout React lazy gt import components About lt Route path about element lt React Suspense fallback Loading gt lt LazyAbout gt lt React Suspense gt gt Now when we lazy load the about page we see the difference The main chunk js file size is reduced to kb amp time also has reduced to ms Hence we imporve our initial load time Maybe you will not able to see the fallback loading text as the file size in not that large if you do want to ensure it s working throttle your network speed to slow g amp you will able to see the fallback element While you haven t reduced overall code of your app you have reduced the amount of code needed during the initial load amp if you think about it as the application increase in size mote third party packages are installed the bundle size loads up causing the initial time to be very long That is it folks hope you have gained value from the post where I ve tried to introduce you to almost all topics from the react router dom v Further if you want to deep dive more into rrd usage you can refer React Router Dom There are more hooks like useLocation which would be useful Thankyou for visiting |
2022-02-09 13:19:28 |
海外TECH |
DEV Community |
Tired of 3D Printing plastic?. Support this 3D Metal Printer project here |
https://dev.to/chucrut/tired-of-3d-printing-plastic-support-this-3d-metal-printer-project-here-4jmp
|
Tired of D Printing plastic Support this D Metal Printer project hereThis is a software and hardware project Written in different platforms and languages You can see the project here |
2022-02-09 13:09:19 |
海外TECH |
DEV Community |
Cross Browser Testing With LambdaTest Jenkins Plugin | Jenkins Tutorial | Part IX |
https://dev.to/lambdatest/cross-browser-testing-with-lambdatest-jenkins-plugin-jenkins-tutorial-part-ix-1of9
|
Cross Browser Testing With LambdaTest Jenkins Plugin Jenkins Tutorial Part IXIn this video we will talk about performing cross browser testing with LambdaTest Jenkins Plugin Explore http This video is Part IX of the Jenkins LambdaTest Tutorial series wherein Moss tech with moss a DevOps engineer will show you how to do cross browser testing with the LambdaTest Jenkins Plugin The prerequisites are creating a LambdaTest account installing Python on the Jenkins server and installing the Python Selenium Webdriver module By the end of this video you will learn How to launch the browser in Jenkins Create Jenkins freestyle job to run the test scripts on the LambdaTest platformPerform parallel cross browser testing with LambdaTest Jenkins Plugins |
2022-02-09 13:08:31 |
海外TECH |
DEV Community |
The only React and React Native Template you’ll ever need |
https://dev.to/nativebase/the-only-react-and-react-native-template-youll-ever-need-4pk2
|
The only React and React Native Template you ll ever needBuilding a Web or a Mobile app is highly tricky and building it from scratch is overwhelming Product owners create low fidelity wireframes which designers convert into beautiful designs Developers then convert those designs into code Although many screens in web and mobile apps are generic development agencies charge big money for the most simple apps The ProblemEvery time we build apps we waste weeks rebuilding the same screens repeatedly Auth screens Newsfeed Search screen Sidebar Drawer Profile screens Shopping cart Product pages etc We also noticed that around screens make up of all digital software We are trying to solve the problem of rebuilding the generic screens and components for every project so that you don t have to SolutionThe NativeBase Startup bundle has over react and react native themes for native mobile apps and web apps We have spent months building it right so that you don t have to reinvent the wheel There are no limits on what you can make The combination of ways to put screens together is nearly infinite You can create your version of Airbnb or Facebook or do something that s never been dreamed of before A curated list of premium react and react native templates to help you get started building your app Who will use this react theme Whether you are a business owner a service provider or an indie developer this bundle will save weeks of effort and help you build your web and mobile apps faster The same code will work everywhere so you don t have to code it for different platforms What will you get with this react amp react native template A bundle of production ready screens with source code to help you build your idea faster All the screens are fully responsive and look great on all the device sizes Mobiles Tablets and Web This React and the React Native kit is updated and tested for keyboard operability and screen reader support All the themes have dark mode support Typescript support provides a rich environment for spotting common errors as you type the code Most importantly the bundle also includes an expertly crafted complete Adobe XD kit with assets for all the screens Category of screensOur React and React native template has screens from various categoriesE CommerceOn demand food deliveryFintechPaymentsHealth and FitnessEntertainmentSocialTravelEd techYou can browse all the screens here Free ScreensNativeBase Startup also lets you download a free starter kit with five screens for react and react native which you can download and run on your machine before you decide to purchase the premium kit If you re reading this tadaa you are already eligible for a additional discount Use the code NBSGRV while making your payment Try on BrowserDownload NowConclusionWe are bullish on Startup to be the most popular React and React Native template of Pick the screens that suit your requirements the best save more than of the energy and work needed to build your UI screens The app development costs can drastically decrease if you re leveraging this react and react native theme You might also not need to hire designers or developers so that you can reroute part of your budget into different areas such as marketing and growth Focus on what makes your product unique instead of reinventing the wheel |
2022-02-09 13:07:01 |
Apple |
AppleInsider - Frontpage News |
Most US Cabinet Departments have bought Cellebrite iPhone hacking tool |
https://appleinsider.com/articles/22/02/09/most-us-cabinet-departments-have-bought-cellebrite-iphone-hacking-tool?utm_medium=rss
|
Most US Cabinet Departments have bought Cellebrite iPhone hacking toolA new report claims that out of US Cabinet Departments bought Cellebrite the iOS unlocking technology with the company saying of its customers work in the government Cellebrite has famously been unlocking iPhones for many years and the data extraction app itself has had security vulnerabilities Nonetheless it has been widely used around the world and even in US public schools According to The Intercept that reach has extended to all but one of the USA s Cabinet Departments The publication has not identified the sole department not using Cellebrite Read more |
2022-02-09 13:02:54 |
海外TECH |
Engadget |
Apple source code references 'realityOS' for potential VR/AR headsets |
https://www.engadget.com/apple-source-code-references-reality-os-for-potential-vrar-applications-131058267.html?src=rss
|
Apple source code references x realityOS x for potential VR AR headsetsThe operating system powering Apple s rumored virtual or augmented reality headset may be called realityOS MacRumors has reported The term was spotted by multiple sources in recent GitHub open source code and App Store upload logs quot What is Apple s realityOS doing in the App Store upload logs quot tweeted iOS developer Rens Verhoeven quot This at least confirms realityOS has its own OS amp binaries and has a realityOS simulator quot noted another well known developer Steve Troughton Smith nbsp “ if TARGET FEATURE REALITYOS Well then This at least confirms it has its own OS amp binaries and has a realityOS Simulator pic twitter com RyFOgFjgーSteve Troughton Smith stroughtonsmith February The existence of such an OS was first reported by Bloomberg s Mark Gurman as rOS in and is reportedly known internally as quot Oak quot at Apple The quot OS quot nomenclature would be logical given the names of Apple s iOS macOS iPadOS tvOS and watchOS operating systems nbsp Apple s development of AR VR headsets has been rumored for years Apple purchased VR company VRvana in suggesting it was pursuing the technology The Informationreported in that a mixed AR VR headset would come in with AR glasses arriving by nbsp However the most recent rumor from Bloomberg suggests that the headset will be delayed until due to development issues like overheating They ll reportedly offer computing power on par with an M Mac and could be standalone without the need to tether according to analyst Ming chi Kuo If the references are real they could suggest that developers are getting or will be getting access to the OS As Troughton Smith warned however they quot could just be a remnant of somebody s pull request from a fake account quot too ーso take the leak with an appropriate dose of skepticism nbsp |
2022-02-09 13:10:58 |
海外TECH |
Network World |
The Nvidia-Arm deal is off |
https://www.networkworld.com/article/3649212/the-nvidia-arm-deal-is-off.html#tk.rss_all
|
The Nvidia Arm deal is off Now it is official Nvidia has announced that its proposed acquisition of ARM Holdings from SoftBank Group Corp has been terminated The parties agreed to terminate the agreement because of “significant regulatory challenges preventing the consummation of the transaction despite considerable efforts by the parties to assuage concerns over the deal Get regularly scheduled insights by signing up for Network World newsletters Arm will now start preparations for an initial public offering IPO possibly during the fiscal year ending March To read this article in full please click here |
2022-02-09 13:33:00 |
海外TECH |
CodeProject Latest Articles |
Cinchoo ETL - Xml Reader |
https://www.codeproject.com/Articles/1171289/Cinchoo-ETL-Xml-Reader
|
cinchoo |
2022-02-09 13:23:00 |
海外TECH |
CodeProject Latest Articles |
Azure AD Managed Identities: Using Managed Identities to Obtain Key Store Credentials |
https://www.codeproject.com/Articles/5323761/Azure-AD-Managed-Identities-Using-Managed-Identiti
|
Azure AD Managed Identities Using Managed Identities to Obtain Key Store CredentialsHow Managed Identities enable a Spring web app to obtain credentials from Azure Key Store and use them to access both Azure APIs and external APIs |
2022-02-09 13:09:00 |
海外ニュース |
Japan Times latest articles |
Calls for Japan to relax COVID-19 entry restrictions intensify |
https://www.japantimes.co.jp/news/2022/02/09/national/students-business-entry-restrictions/
|
country |
2022-02-09 22:13:03 |
ニュース |
BBC News - Home |
Covid: Self-isolation law could be scrapped in England this month |
https://www.bbc.co.uk/news/uk-60319947?at_medium=RSS&at_campaign=KARANGA
|
encouraging |
2022-02-09 13:32:55 |
ニュース |
BBC News - Home |
Nottinghamshire grandfather bags £2,700 win from 3p bet |
https://www.bbc.co.uk/news/uk-england-nottinghamshire-60320434?at_medium=RSS&at_campaign=KARANGA
|
george |
2022-02-09 13:34:59 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
イチケン(1847)、「増配」を発表し、配当利回りが 5.2%にアップ! 年間配当額は1年間で11.1%増加、 2022年3月期は前期比10円増の「1株あたり100円」に - 配当【増配・減配】最新ニュース! |
https://diamond.jp/articles/-/295921
|
イチケン、「増配」を発表し、配当利回りがにアップ年間配当額は年間で増加、年月期は前期比円増の「株あたり円」に配当【増配・減配】最新ニュースイチケンが、年月期の配当予想の修正増配を発表し、配当利回りがにイチケンは、年月期の年間配当を前回予想比で「円」の増配、前期比でも「円」の増配となる「株あたり円」に修正すると発表した。 |
2022-02-09 22:25:00 |
北海道 |
北海道新聞 |
市民向けワークショップ 札幌市 五輪招致 |
https://www.hokkaido-np.co.jp/article/643956/
|
五輪招致 |
2022-02-09 22:17:00 |
北海道 |
北海道新聞 |
苫小牧市 一般会計798億円 新年度予算案 骨格ながら前年上回る |
https://www.hokkaido-np.co.jp/article/643952/
|
一般会計 |
2022-02-09 22:15:13 |
北海道 |
北海道新聞 |
バスケ、川崎と千葉Jが決勝へ 天皇杯全日本選手権 |
https://www.hokkaido-np.co.jp/article/643954/
|
日本バスケットボール協会 |
2022-02-09 22:15:00 |
北海道 |
北海道新聞 |
コロナ、重症や死者数の増加継続 病床逼迫懸念、専門家分析 |
https://www.hokkaido-np.co.jp/article/643953/
|
厚生労働省 |
2022-02-09 22:14:00 |
北海道 |
北海道新聞 |
災害時も通信の確保を 総務省が道や札幌市と連携訓練 |
https://www.hokkaido-np.co.jp/article/643951/
|
携帯電話 |
2022-02-09 22:12:00 |
北海道 |
北海道新聞 |
百年記念塔 解体理解求める 道が説明会 反対意見も |
https://www.hokkaido-np.co.jp/article/643937/
|
森林公園 |
2022-02-09 22:10:35 |
北海道 |
北海道新聞 |
胆振215人感染 日高15人 新型コロナ |
https://www.hokkaido-np.co.jp/article/643949/
|
胆振管内 |
2022-02-09 22:09:00 |
北海道 |
北海道新聞 |
「勝」の焼き印入り大判焼きで応援 高木姉妹ゆかり 帯広のまんじゅう店販売 |
https://www.hokkaido-np.co.jp/article/643948/
|
北京五輪 |
2022-02-09 22:09:00 |
北海道 |
北海道新聞 |
巨大地震のきっかけ、否定 日向灘M6・6で調査委 |
https://www.hokkaido-np.co.jp/article/643947/
|
名誉教授 |
2022-02-09 22:09:00 |
北海道 |
北海道新聞 |
小樽の保育関係者 「園児にマスク」に戸惑い 感染予防理解の声も |
https://www.hokkaido-np.co.jp/article/643944/
|
厚生労働省 |
2022-02-09 22:01:00 |
北海道 |
北海道新聞 |
任天堂スイッチのカーリングゲーム、10日発売 北見特産品当たる企画も |
https://www.hokkaido-np.co.jp/article/643943/
|
開発会社 |
2022-02-09 22:01:00 |
仮想通貨 |
BITPRESS(ビットプレス) |
[日経] 暗号資産ファンド、資金流入増加 投資家心理が改善 |
https://bitpress.jp/count2/3_9_13052
|
資金 |
2022-02-09 22:55:47 |
海外TECH |
reddit |
NTTがドコモ社員に「(グループの主要7社で賃金水準統一するんで)月収10万円賃下げ」提案 |
https://www.reddit.com/r/newsokunomoral/comments/sodi8u/nttがドコモ社員にグループの主要7社で賃金水準統一するんで月収10万円賃下げ提案/
|
ewsokunomorallinkcomments |
2022-02-09 13:23:32 |
コメント
コメントを投稿