TECH |
Engadget Japanese |
ポケモンGO 6月イベント発表。大発見でリモートレイドパス、送ってアメ2倍は6月15日 |
https://japanese.engadget.com/pokemon-go-june-schedule-113426209.html
|
開催 |
2021-05-31 11:34:26 |
TECH |
Engadget Japanese |
Xiaomi、200W充電を可能にするHyper Charge技術を披露。4000mAhを8分で満充電に |
https://japanese.engadget.com/xiaomi-hyper-charge-200w-110029513.html
|
hypercharge |
2021-05-31 11:00:29 |
ROBOT |
ロボスタ |
【速報】「量子技術による新産業創出協議会」民間企業11社が今夏に設立へ 東芝/日立/富士通/NEC/NTT/トヨタなど参画 |
https://robotstart.info/2021/05/31/quantum-council.html
|
民間企業 |
2021-05-31 11:08:20 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 「量子技術」産業応用 東芝、NTT、NEC、日立、富士通などが協議会設立 「技術で勝って産業で負ける」イメージ払拭へ |
https://www.itmedia.co.jp/news/articles/2105/31/news157.html
|
itmedia |
2021-05-31 20:19:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] LINEの出澤社長ら、役員報酬の3割を8月まで自主返上 総務省からの行政指導受け |
https://www.itmedia.co.jp/news/articles/2105/31/news155.html
|
itmedianewsline |
2021-05-31 20:09:00 |
IT |
MOONGIFT |
proofreading-tool - 開発者以外でも使える文書校正ツール |
http://feedproxy.google.com/~r/moongift/~3/i8fXe_6vors/
|
そこで使われているのがLintツールになります。 |
2021-05-31 21:00:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
ニコ生ダウンローダーを書く |
https://qiita.com/kairi003/items/62a487a2ab786cb0f502
|
なんでWebSocketを別スレッドで実行するのなんでかというと、ニコニコ動画もニコ生も、定期的にこちらがページを見ていることを伝えないと通信が切断されちゃうからなんですね。 |
2021-05-31 20:15:46 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
LoadSoundMemがエラー戻り値-1を返す原因が分からない |
https://teratail.com/questions/341433?rss=all
|
LoadSoundMemがエラー戻り値を返す原因が分からない前提・実現したいことVisualnbspStudio上でDXライブラリを使用してゲームを作っています。 |
2021-05-31 20:52:50 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
atom 文字化け どうすれば・・・ |
https://teratail.com/questions/341432?rss=all
|
atom文字化けどうすれば・・・前提・実現したいことatomの文字化けを直したいです発生している問題・エラーメッセージ非常に初歩的な質問ですいません。 |
2021-05-31 20:47:20 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【Android Studio】【Kotlin】公開されたGoogle play製品版のSoundPoolで音が出ない |
https://teratail.com/questions/341431?rss=all
|
製品版として公開しましたが、インストールしてみるとクイズ部分での音が出ませんでした。 |
2021-05-31 20:42:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
DockerによるRails構築エラー |
https://teratail.com/questions/341430?rss=all
|
|
2021-05-31 20:29:56 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
サーチコンソールで検出 - インデックス未登録と表示される。 |
https://teratail.com/questions/341429?rss=all
|
サーチコンソールで検出インデックス未登録と表示される。 |
2021-05-31 20:25:14 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
SpringBootでResponseが待機してしまう |
https://teratail.com/questions/341428?rss=all
|
SpringBootでResponseが待機してしまう現在、SpringBootでThreadを実行したアプリケーションを作っています。 |
2021-05-31 20:18:08 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Railsで複数のレコードの登録がしたい |
https://teratail.com/questions/341427?rss=all
|
Railsで複数のレコードの登録がしたいしたいこと分間隔で指定した時間を持つレコードを複数登録できるようにしたのですが、詰まっています。 |
2021-05-31 20:17:41 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
キューに変更するプログラム |
https://teratail.com/questions/341426?rss=all
|
|
2021-05-31 20:11:29 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
deleted_atカラムを含む複合unique indexの作成方法(ruby, PostgreSQL) |
https://qiita.com/nobuo_hirai/items/d0936c266cc16fbaf3dc
|
uniqueindexを作成したいカラムはmailaddressでレコードの削除はgemparanoiaを使って論理削除していることとします。 |
2021-05-31 20:14:08 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
UbuntuStudioにMicrosoft Teamsをインストールする。 |
https://qiita.com/AmusITS/items/4af3ba1f1785513e2359
|
UbuntuStudio に MicrosoftTeams を インストール する 。 |
2021-05-31 20:17:45 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
deleted_atカラムを含む複合unique indexの作成方法(ruby, PostgreSQL) |
https://qiita.com/nobuo_hirai/items/d0936c266cc16fbaf3dc
|
uniqueindexを作成したいカラムはmailaddressでレコードの削除はgemparanoiaを使って論理削除していることとします。 |
2021-05-31 20:14:08 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ActiveRecordのwith_lockをいつ使うか |
https://qiita.com/taku0084/items/d6ba699e0f4fa4610ed5
|
ActiveRecordのwithlockをいつ使うか気軽に使うのはおすすめできませんwithlockの挙動RDBのSELECTFORUPDATEを使って実現されています危険な使い方currentuserのようなスコープが広いレコードをlockしてしまうclassHogeControllerdefactionhogecurrentuserwithlockdohogelogicendendendclassFugaControllerdefactionfugacurrentuserwithlockdofugalogicendendendこの場合actionhogeとactionfugaを同時に処理できなくなってしまい、スループット低下のリスクがあります回避方法lockするレコードを変えてスコープを小さくするclassHogeControllerdefactionhogehogeHogefindparamsidhogewithlockdohogelogicendendendwithlockの使い所口座残高のようなDB設計のとき、安全に残高を更新する残高を減らすのようなとき、withlockの後で残高を確認する必要があることに注意してくださいwithlockすると内部的にはreloadが行われ、最新のDBの状態に更新されます。 |
2021-05-31 20:04:31 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Railsポートフォリオ作成 #16 ポートフォリオの概要 |
https://qiita.com/yanoo/items/b2da9ef7e23445b3248b
|
緊急ではなくても無線を使ってキッチンに来るように呼び出されるということがあり、この問題防ぐことができると考えました。 |
2021-05-31 20:03:31 |
技術ブログ |
Developers.IO |
AWS PrivateLink・VPCエンドポイントを利用するメリットやユースケースを整理してみた |
https://dev.classmethod.jp/articles/usecases-about-privatelink-vpc-endpoint/
|
awsprivatelink |
2021-05-31 11:20:21 |
技術ブログ |
Developers.IO |
Redashのメール送信設定にAmazon SESを使ってみた |
https://dev.classmethod.jp/articles/setting-redash-maiier-with-amazon-ses/
|
amazonses |
2021-05-31 11:07:26 |
海外TECH |
DEV Community |
Solution: Search Suggestions System |
https://dev.to/seanpgallivan/solution-search-suggestions-system-90e
|
Solution Search Suggestions SystemThis is part of a series of Leetcode solution explanations index If you liked this solution or found it useful please like this post and or upvote my solution post on Leetcode s forums Leetcode Problem Medium Search Suggestions System Description Jump to Solution Idea Code JavaScript Python Java C Given an array of strings products and a string searchWord We want to design a system that suggests at most three product names from products after each character of searchWord is typed Suggested products should have common prefix with the searchWord If there are more than three products with a common prefix return the three lexicographically minimums products Return list of lists of the suggested products after each character of searchWord is typed Examples Example Input products mobile mouse moneypot monitor mousepad searchWord mouse Output mobile moneypot monitor mobile moneypot monitor mouse mousepad mouse mousepad mouse mousepad Explanation products sorted lexicographically mobile moneypot monitor mouse mousepad After typing m and mo all products match and we show user mobile moneypot monitor After typing mou mous and mouse the system suggests mouse mousepad Example Input products havana searchWord havana Output havana havana havana havana havana havana Example Input products bags baggage banner box cloths searchWord bags Output baggage bags banner baggage bags banner baggage bags bags Example Input products havana searchWord tatiana Output Constraints lt products length lt There are no repeated elements in products lt Σproducts i length lt All characters of products i are lower case English letters lt searchWord length lt All characters of searchWord are lower case English letters Idea Jump to Problem Description Code JavaScript Python Java C Despite the fact that the clues suggest a binary search and a trie the optimal solution to this problem needs neither The substrings formed by adding one letter at a time from the search word S are naturally already in lexicographical order as are the results that we re instructed to push into our answer array ans So if we sort the products array P we should only ever need to iterate through P once during the entire remaining process of the solution with a time complexity of O N A single binary search would only require log N time but we d have to perform M S length binary searches so in total they would take O M log N time compared to the O N time of a simple iteration With constraints of on both M and N the binary search route would max out at a worse time complexity than iteration Regardless the sort itself which is required for both requires O N log N time already so neither option can decrease the overall time complexity required So in order to only require a single pass through P we should keep track of the current bounds for the range of matches left right then we ll iterate through the characters c of S At each iteration we ll first want to move left forward and right back to narrow the range of matches based on the new value of c Then we can add the next three elements of P to our result array res as long as they fall inside the range left right Once that s done we can add res to ans and move to the next iteration Once we ve finished iterating through S we can return ans Time Complexity O N log N where N is the length of PSpace Complexity O excluding output space required for ans Javascript Code Jump to Problem Description Solution Idea var suggestedProducts function P S P sort let ans left right P length for let i i lt S length i let c S charAt i res while P left charAt i lt c left while P right charAt i gt c right for let j j lt amp amp left j lt right j res push P left j ans push res return ans Python Code Jump to Problem Description Solution Idea class Solution def suggestedProducts self P List str S str gt List List str P sort ans left right len P for i in range len S c res S i while left lt right and len P left i or P left i lt c left while left lt right and len P right i or P right i gt c right for j in range if left j gt right break else res append P left j ans append res return ans Java Code Jump to Problem Description Solution Idea class Solution public List lt List lt String gt gt suggestedProducts String P String S Arrays sort P List lt List lt String gt gt ans new ArrayList lt gt int left right P length for int i i lt S length i List lt String gt res new ArrayList lt gt char c S charAt i while left lt right amp amp P left length i P left charAt i lt c left while left lt right amp amp P right length i P right charAt i gt c right for int j j lt amp amp left j lt right j res add P left j ans add res return ans C Code Jump to Problem Description Solution Idea class Solution public vector lt vector lt string gt gt suggestedProducts vector lt string gt amp P string S sort P begin P end vector lt vector lt string gt gt ans int left right P size for int i i lt S length i vector lt string gt res char c S i while left lt right amp amp P left length i P left i lt c left while left lt right amp amp P right length i P right i gt c right for int j j lt amp amp left j lt right j res push back P left j ans push back res return ans |
2021-05-31 11:49:34 |
海外TECH |
DEV Community |
Simple and maintainable error-handling in TypeScript |
https://dev.to/supermetrics/simple-and-maintainable-error-handling-in-typescript-56lm
|
Simple and maintainable error handling in TypeScriptSometimes things fail ーthat s a fact of life and programming So as a programmer you re going to have to write error handling code Thankfully TypeScript has some handy features which can help us to create simple and maintainable error handling code At Supermetrics one error handling approach we take is to encode error states into the TypeScript type system What does this mean Simply I m referring to code where the semantic property of being an error is indicated by a variable s type For a simplified example No information in the type that this is an error you would have to inspect the value to checklet firstError string Something terrible occurred interface TerribleError code TERRIBLE ERROR message string It is clearly indicated in the type that this is an error the exact value of the variable is less importantlet secondError TerribleError code TERRIBLE ERROR message Something terrible occurred So why is using the type system in this way so great Potential errors are indicated in function signaturesfunction doSomethingRisky TerribleError number As a consumer of this function it s clear that it may produce an error instead of the expected number Some developers like to add documentation on potential errors to the function While documentation is great it isn t tied closely to the code and it s easy for docs and code to diverge over time in this case either indicating errors that can never occur or missing new errors added later The compiler will not allow you to forget to check errorsUsing the example function from point const riskyNumber doSomethingRisky Compiler error because you can t add a TerribleError and a numberconst badComputedValue riskyNumber if typeof riskyNumber number This is ok as we ve guarded against the error case const computedValue riskyNumber This means you can t forget to check the errors although it doesn t force you to handle them in any particular way Simple static analysis like this is a great safety net for developers It can be used to standardize error handlingWhen you have a generic type like Error lt E gt where E is some wrapped data about the error you now have a generic way of handling errors throughout your codebase You may even want to go a step further and wrap the good path in some kind of Success type ーwe often use the pattern of a Result type that is defined as something like type Result lt T E gt Success lt T gt Error lt E gt This is incredibly useful for writing generic code like this snippet which implements a function to call a potentially failing function with retries and could be used with any function returning your Result type function retry lt T E gt func gt Result lt T E gt numberOfAttempts number Result lt T E gt let value for const i i lt numberOfAttempts i value func isError is a simple custom type guard implemented elsewhere using type predicates if isError value return value return value Similar patterns can also be useful for many other cases like chaining operations that could fail memoization of flaky functions or handling errors from plugins or other rd party code Not all errors are the sameYou ll likely have operations that can fail in many exciting ways which can also be encoded in these types For example by a discriminated union interface NetworkError code NETWORK ERROR httpCode number Note that error types can have different properties to include only the necessary informationinterface EndOfUniverseError code END OF UNIVERSE function doVeryRiskyThing NetworkError EndOfUniverseError null const maybeError doVeryRiskyThing These type guards cause the type of maybeError to be narrowed within the different scopesif maybeError code NETWORK ERROR console log Network request failed with code maybeError httpCode else if maybeError code END OF UNIVERSE panic Function polymorphism can be used to indicate when errors might occurBy having functions that are polymorphic in arguments and return types you can write very general functions that provide rich information on when errors can occur For a contrived example let s say you have an in memory cache as part of your application and a more full featured and longer term cache as part of another service You might use a simple flag on your cache function to indicate this like Stores a value to local or remote cache with a given keyfunction cache lt T gt key string value T useRemoteCache boolean Accessing the remote cache introduces many new failure modes such as network errors By writing polymorphic function definitions with your error types you can indicate this If using local cache then nothing interesting returnedfunction cache lt T gt key string value T useRemoteCache false null If using remote cache we may return a NetworkErrorfunction cache lt T gt key string value T useRemoteCache true NetworkError null Implementation signaturefunction cache lt T gt key string value T useRemoteCache boolean NetworkError null Implementation here Final wordsThe above patterns are by no means unique to TypeScript For example similar types are commonly used in functional style programming in other languages such as Result in Rust or Either in Haskell You may also spot resemblance in some of these patterns to checked exceptions in Java or the mandatory error handling of error in Go It s very easy to build your own versions of the above error handling yourself and in fact I d recommend it as a learning exercise if you want to become more familiar with TypeScript But of course there are many packages out there to help you Some examples ーin no particular order ーinclude purify ts fp ts and neverthrow You ll notice that a couple of those examples are functional programming libraries this is because errors can be well modelled with monads |
2021-05-31 11:31:31 |
海外TECH |
DEV Community |
How to use custom fonts in React-Native. |
https://dev.to/reenydavidson/how-to-use-custom-fonts-in-react-native-2dlc
|
How to use custom fonts in React Native Have you tried using font family in react native and it didn t seem to work It s fine you have nothing to worry about The pattern used to render a font in CSS for the web is quite different from the way you will render it in a react native app LET S DIVE IN To render a custom font in a react native app two main libraries are needed These libraries are expo fontexpo app loading expo fontexpo font is a library that allows one to load fonts from the web and use it in a react native component It does this with the help of a method called loadAsync To use expo font we will need to install it with expo expo install expo font expo app loadingWhile the font from expo font is still loading expo app loading makes sure that a loading screen component or splash screen is running or being displayed Once the font is loaded it automatically allows the component with the font in it to display and allows the loading screen or splash screen to unmount It does this with the help of a component called Apploading We can use it by installing expo app loading with expoexpo install expo app loadingThe next thing to do is to download the fonts which you would want to use in your app and store them in the assets folder of your react native app workspace You can download google fonts at they have wonderful fonts over there Let s BuildFirstly we import our libraries import React useState from react import StyleSheet Text View from react native import as Font from expo font import Apploading from expo app loading We import Apploading from expo app loading which makes sure that the splash screen component or loading screen component is visible while it is mounted and we also import everything in expo font as Font so as to load fonts const getFonts gt Font loadAsync limelight require assets fonts Limelight Limelight Regular ttf indie require assets fonts Indie Flower IndieFlower Regular ttf We use loadAsync method to asynchronously load static or remote resources that can be used in the react native application In this case we are using it to asynchronously load the required font needed in the react native app It registers the font in a name which will be used while referring to it with fontFamily export default function App const fontsloaded setFontsLoaded useState false if fontsloaded return you can return any component of your choice here lt View style styles container gt lt Text style styles Texts gt Open up App js to start working on your app lt Text gt lt StatusBar style auto gt lt View gt else return lt Apploading startAsync getFonts onFinish gt setFontsLoaded true onError console warn gt We use useState to monitor if the fonts is loaded or not and then we use the conditional statement to render a particular component depending depending on if the fonts is loaded or not In the snippet above if fonts is loaded fontsloaded then we return the component where the font is specified or else we return a component called Apploading Apploading takes in three props which includes startAsynconFinishonErrorstartAsyncstartAsync returns a promise This promise is what is being loaded or resolved while the a loading screen or splash screen is mounted or running In the case above the getFont function is what is being called in startAsync onFinishThis guy takes in a function setFontLoaded and sets it to true In the case above the onFinish prop waits for startAsync to load the fonts from getFont function and then it updates the state of the react native app thereby rendering the font being loaded onErroronError catches every possible error that might be thrown from startAsync and handles it properly Now we can use our font in any component we wish to use it in const styles StyleSheet create container flex backgroundColor fff alignItems center justifyContent center Texts fontFamily indie As we can see above the name of the font family is the specified name given to the font when loading it from loadAsync We can now use the loaded font and also specify weight and other attributes to the font loaded Full code import StatusBar from expo status bar import React useState from react import StyleSheet Text View from react native import as Font from expo font import Apploading from expo app loading const getFonts gt Font loadAsync limelight require assets fonts Limelight Limelight Regular ttf indie require assets fonts Indie Flower IndieFlower Regular ttf export default function App const fontsloaded setFontsLoaded useState false if fontsloaded return you can return any component of your choice here lt View style styles container gt lt Text style styles Texts gt Open up App js to start working on your app lt Text gt lt StatusBar style auto gt lt View gt else return lt Apploading startAsync getFonts onFinish gt setFontsLoaded true onError console warn gt const styles StyleSheet create container flex backgroundColor fff alignItems center justifyContent center Texts fontFamily indie With this little tutorial I hope you are able to load a font properly in your react native app Go forth and be great |
2021-05-31 11:29:58 |
海外TECH |
DEV Community |
How to filter an array in javascript? |
https://dev.to/hrishikesh1990/how-to-filter-an-array-in-javascript-non
|
How to filter an array in javascript In this short tutorial we look at why the JavaScript filter array method is used we also look at the syntax and code to facilitate a better understanding of the concept This tutorial is a part of our initiative at Flexiple to write short curated tutorials around often used or interesting concepts However in case you are here only for the solution use this link Table of ContentWhat does the JavaScript filter function do Practical uses of JavaScript filter functionCode amp ExplanationLimitation amp Caveats while using JavaScript filter What does the JavaScript filter function do The JavaScript filter array function filters an array based on criteria and creates a new array with the values that pass The JavaScript filter function iterates over the values in the array and returns the values that pass i e returns true The search criteria in the JavaScript filter function are passed using a callbackfn that takes in various parameters we discuss them in detail below Arrow functions can also be used to make JavaScript filter array code more readable Syntax of JavaScript filter array filter function value index arr thisValue Here array refers to the original array that you are looking to filter Parameters function Required A function or search criteria that would be used to filter each value in the arrayvalue Required the value if current element in the iterationindex Optional in case you would like to start the iteration from a specific indexarr The array object being called uponthisValue Optional and as the name suggests the value present would be passed in case the parameter is empty Practical uses of JavaScript filter functionWe have all come across filters on websites and they help us find things easily the JavaScript filter array function is what allows this to happen For example we re looking for a freelancer with a skill JavaScript skillset We use the JavaScript filter array function to return freelancers containing the particular skillset This is made possible as the JavaScript filter does not mutate the string but rather creates a new one hence the original string is not affected Similarly websites with filters all make use of the JavaScript filter array function Code amp Explaination Let us start with a simple array and later move on to an array containing objects So first let us take an array containing numerical values and remove negative values using the JavaScript filter array function let numbers let positive array numbers filter function value return value gt console log positive array Output As you could see we have defined a function that returns values that are greater than or equal to In case you are comfortable with arrow functions you can use them to make your code more readable let numbers let positive array numbers filter value gt value gt console log positive array Output Now let us look at a code where we use the JavaScript filter array function on an array of objects Let s continue with the earlier example of filtering freelancers with JavaScript as a skillset let freelancers name Harry skill JavaScript name Mark skill Python name David skill JavaScript let javascript freelancers freelancers filter function freelancer return freelancer skill JavaScript console log javascript freelancers Output name Harry skill JavaScript name David skill JavaScript As you can see the JavaScript filter array code for objects is also quite straightforward once you have understood the concept Feel free to use the arrow function to increase readability Limitation amp Caveats while using Javascript filterThe JavaScript filter array does not mutate the array and hence remember to save the filtered array in case you plan on using it later The JavaScript filter will not execute the function in case the array is empty |
2021-05-31 11:12:17 |
海外TECH |
DEV Community |
25 YouTube Channels to Learn Web Development for Free |
https://dev.to/theinsightfulcoder/25-youtube-channels-to-learn-web-development-for-free-45np
|
YouTube Channels to Learn Web Development for FreeWeb Development is one of the highest paying careers today According to the U S Bureau of Labor Statistics web development provided employment to developers in the US alone Going forward the industry is expected to grow from to faster than most other occupations With such increasing demand peers are always in the search for valuable resources which don t burn a hole in their pocket Keeping that in mind I ve compiled a list of Awesome YouTube Channels to Learn Web Development for free Clever ProgrammerOne of my favorite channels Clever Programmer founded by Rafeh Qazi offers one of the best courses on Web Development From actionable insights to website clones and earning a figure salary as a developer this channel covers it all Clever Programmer currently has over k subscribers with over million views already I definitely suggest you visit this channel once if you haven t already Sonny SanghaSonny Sangha aka Papa React is one of the best mentors you could ask for From being in the team of Clever Programmer and building a personal brand Sonny has come a long time Sonny builds amazing clones of websites such as Amazon LinkedIn Netlfix live step by step Sonny has recently started his own Youtube channel which has gained over million views and k subscribers already Akshay SainiAkshay Saini s course Namaste Javascript is one of the best in depth conceptual simple and effective tutorials you d ever find I ve personally seen students thanking Akshay for his amazing explanation which has improved their skills by bounds Akshay currently has k subscribers with million views on his Youtube channel The New BostonThe New Boston is one of the biggest channels providing tons of free content on a plethora of topics It has playlists for React Angular Node js ES Redux Django and more The New Boston currently has million subscribers and a whopping million views Traversy MediaTraversy Media needs no introduction As the about section reads Traversy Media features the best online web development and programming tutorials for all of the latest web technologies including Node js Angular React js PHP Rails HTML CSS and much more Traversy Media currently has million subscribers and million views Code with HarryThe saviour of Indian students Haris Khan at his channel Code with Harry teaches coding techniques to people in a short time which took him ages to learn Harry has a Web Development Playlist consisting of over videos that teach you web development from the basics to making an end to end responsive website Code with Harry has million subscribers and over million views Web Dev SimplifiedI ll let the description of Web Dev Simplified do the talking Web Dev Simplified is all about teaching web development skills and techniques in an efficient and practical manner If you are just getting started in web development Web Dev Simplified has all the tools you need to learn the newest and most popular technologies to convert you from a no stack to a full stack developer Web Dev Simplified also deep dives into advanced topics using the latest best practices for you seasoned web developers This channel has k subscribers and million views at the moment The Net NinjaThe Net Ninja has over k tutorials on topics such as Modern JavaScript beginner to advanced Node js React Vue js Firebase MongoDB HTML amp CSS PHP amp MySQL Laravel React Native and Flutter It is one of the channels that gain viewers by word of mouth communication The Net Ninja has k subscribers and million views overall Coder CoderJessica at Coder Coder provides incredible practical tips on Web Development She has a limited number of videos on her channel but has garnered k subscribers and million views on her channel Surely one to look for Corey SchaferCorey Schafer is another guy who needs no introduction You ll gain a ton of knowledge on Python Git Development Environments Terminal Commands SQL Programming Terms JavaScript Computer Science Fundamentals among others Corey has k subscribers and million views on his channel right now Wes BosWes Bos famously known for his Javascript challenge is one of the YouTubers you should definitely look out for At the Javascript challenge you learn to build Javascript projects using vanilla Javascript Wes Bos has an amazing k subscribers and million views on his channel Tanay PratapTanay Pratap a Microsoft engineer shares his knowledge on Web Development on his YouTube channel He has amazing long tutorials on HTML CSS JS Git Hosting and more Tanay has over k subscribers and half a million views on his channel Derek BanasDerek Banas has tutorials on a wide range of topics including HTML CSS PHP JS AJAX Git Web Services Django and more Derek Banas is currently making videos on Data Science and Machine Learning His channel holds subscribers and million views in total Jonas SchmedtmannJonas Schmedtmann might not have many videos but does provide a mini course and an overview of what you ll learn in Web Development If you just want to spend a day getting started with Web Dev try Jonas Jonas currently holds k subscribers and lakh views on his channel AcademindMax amp Manuel at Academind creates courses and tutorials that teach you everything related to web development No matter if it s programming languages like JavaScript runtimes like NodeJS or popular frameworks like ReactJS Angular or VueJS They got you covered Academind currently has k subscribers and million plays already Hitesh ChoudharyHitesh Choudhary is a guy who creates content every single week He covers a wide range of subjects like programming new frameworks open source products and more He personally has a keen interest in topics like Javascript Python PHP and Machine Learning He also offers a MERN full stack development course for under ₹ Hitesh has over k subscribers and million views on his channel Adam KhouryAdam Khoury at his channel helps to master technologies like JavaScript PHP SQL HTML CSS ActionScript and more His videos are concise conceptual and effective Adam currently has k subscribers to his channel and more than million views overall Code CourseIf you re someone who s a fan of PHP and Lavarel Code Course is the channel for you Code Course covers numerous concepts related to PHP Lavarel APIs and more It currently has k subscribers and more than million views in total LevelUpTutsScott Tolinski at his channel formerly along with Ben Schaaf LevelUpTuts provide high quality content on Web Development Their tutorials are aimed to be accessible and easy to follow while maintaining high production values LevelUpTuts has k subscribers and million views on its channel to date CSCS is Harvard University s introduction to the intellectual enterprises of computer science and the art of programming It offers a free course on Web Programming with Python and Javascript where it covers where they cover concepts like Git Flash SQL ORM API Javascript Django Scalability and Security of websites I highly recommend taking this course if you re a beginner and want to start the journey of web development with an excellent foundation CS has k subscribers to its channel with million views Quentin Watt TutorialsQuentin Watt teaches technologies like JavaScript PHP using popular frameworks like Vue js and Laravel With over a decade of experience to share he makes short video tutorials aimed at equipping an individual skill needed to develop their career Quentin currently holds k subscribers and million views on his channel DevTipsDevTips has weekly discussions and tutorials on various technologies such as CSS Bootstrap React Docker etc The tutorials are fun and easy to follow two factors I definitely look for in a great resource DevTips has k subscribers and million views on the channel LearnWebCodeBrad at LearnWebCode has insightful tutorials on HTML CSS MongoDB API JSON Bootstrap and more With k subscribers and million views LearnWebCode is a channel that gives a quick overview of and helps understand concepts quickly LearnWebCode currently has k subscribers and million views on the channel Google Chrome DevelopersGoogle Chrome Developers is a channel by Google developers featuring some amazing content on the web and more There are playlists on PWA Design Learning event recordings and more This is a channel you should visit to have a greater understanding of the web and upskill Google Chrome Developers has k subscribers and million views at the moment Apna CollegeLast but not the least Apna College with Aman Dhattarwal with his team as the face of the channel has an amazing animated course on Web Development on Apna College The course is taught by a guy who has cleared Googler Summer of Code being from a non cs background Apna College has k subscribers and million views on the channel That was it for today folks Though I have another set of great channels these are more than enough to build your skills as a web developer Honorable mentions to the evergreen and most famous channels such as FreeCodeCamp Edureka Programming with Mosh Simplilearn and Intellipaat who provide hr long videos on the topic covering a ton of concepts in a limited amount of time Which YouTube channel is your favorite Let me know in the comment section below Bonus Insights by The Insightful Coder Interested in Building Creative Beginner Level Python Projects Check out the Python Projects for Beginners Series Interested in Building Your Own Artificial Intelligence Projects using Python Check out the Python AI SeriesI m also dropping useful dev resources interactive quizzes and Interview preparation on my Instagram Page Make sure to follow me up Find and Download All My Project Source Codes at My Github Repository |
2021-05-31 11:10:49 |
海外TECH |
DEV Community |
Debugging Lua inside Openresty inside Docker with IntelliJ IDEA |
https://dev.to/omervk/debugging-lua-inside-openresty-inside-docker-with-intellij-idea-2h95
|
Debugging Lua inside Openresty inside Docker with IntelliJ IDEABut why How do other people do it Last thing s firstThe processStarting outBootstrapping the debuggerThe Local Dynamic LibraryListening on localhostLet s step Matching sourcesWorks on my machineSumming it all upA word of warningWhat changed Next stepsBonus Hot reloading the Lua codeParting words But why I was challenged to find a way to step through some code Usually I d just fire up my IDE and start debugging but this case was a bit more complicated than that You see this code is Lua code running inside a custom version of NGINX called Openresty running inside a Docker container as part of a Docker Compose app Oh and I needed to step through it using IntelliJ IDEA Can t be too hard right How do other people do it I sat down and read a lot of material online and most of it boiled down to one of two things Use ZeroBrane Studio an entirely different IDE with a debugger named mobdebug Print debugging to the logs Neither one of those things were what I wanted to do which got me thinking that in order of likeliest to least Someone got it working but never documented it It s a terrible idea that I shouldn t even consider trying or It s never been done After a few days of work I found the way to do it and the following is an explanation of how you could do it yourself Last thing s firstIf you don t really care about the journey and why these things actually work you can jump over to Summing it all up and see the end result there The process Starting outI m assuming that You have IntelliJ IDEA You have a working Docker Compose app with an Ubuntu based Docker container named nginx running Openresty with your custom Lua code that you want to debug Fire up IntelliJ IDEA and install the EmmyLua plugin for IntellIJ Note that this is not the Lua plugin which I couldn t get to work in the latest version of the IDE Bootstrapping the debuggerTo start debugging you ll have to create a new Debug configuration Go to Run →Edit Configurations and add a new Emmy Debugger config Set Connection to Tcp IDE connect debugger and Keep Host and Port as localhost and The dialog is kind enough to generate a snippet of code you can copy and paste to your Lua code to bootstrap the debugger in its context What IDE connect debugger means is that the code will start listening on port for incoming connections then block until the IDE attaches to it when we run this Debug configuration Here s the code I copied from that textbox verbatim We ll have to add this code to the file we re debugging so that it can wait for the IDE to attach after which we ll theoretically be able to step through it right There are a few red flags here Let s break them down one by one The first line references a local file that is also a Mac only dylib Dynamic Library and we ll be running a Linux based container which means we need an so file a Shared Object We won t be able to load that file The debugger is listening on localhost but we ll be inside a container If we have multiple code paths that run this code one after the other we ll have errors since the port is a shared resource While the port contention can be solved with either closing the port quickly using dbg stop or using a random port the first two merit some more detail The Local Dynamic LibraryWe ll need a local binary inside the container to load and it has to be the right one While Emmy releases Linux SO files for Emmy Core as part of their builds they re not necessarily compatible with whatever flavor of Linux your container will have We ll have to build it from source as part of building the image The above gets the latest released version of the source code is the latest at the time this is written and builds it according to the script in the repo s travis yml file lines It then copies the SO file to the easily reachable usr local emmy lines before removing the downloads line Like me you might not be able to build it because you have an older version of CMake than is required In that case add the correct one before compiling the Emmy Debugger SO Here we download the latest version of CMake which is required to build Emmy Core line then build it from source lines remove the downloads line and update Ubuntu to use it instead of the default CMake line Back to the code we used to bootstrap the debugger Let s change line to match the new Container local Emmy Core Listening on localhostWe told our code to bind to localhost on port but that doesn t help us since we re inside a Docker container Let s expose that port to the host computer so that it s reachable In your docker compose yaml add the following lines This exposes as a port local to the host machine When the IDE opens a connection to it that connection is proxied into the container Let s step After doing all of that let s give it a try Let s place a breakpoint after the dbg waitIDE line start our Docker Compose app then call the endpoint that includes the code to debug and as it waits for us to connect run the Debug Configuration That doesn t work though The code waits for the debugger the debugger successfully connects and then disconnects Our breakpoint isn t even hit Matching sourcesThe issue here is that when we place a breakpoint in the IDE in the file Users omer van kloeten my project src lua something lua the debugger will never stop there because that path doesn t exist in the container Instead this file will be somewhere like etc nginx lua something lua How can we make that translation I scoured the documentation but found no API that could do that Begrudgingly I started trudging through the debugger s source code and eventually found a public API hook with only a single line example Was this the right API I read through the sources and tried it and it just worked Here it is this code should be placed before loading the debugger The fixPath function gets a file s path and fixes it to look like the paths the IDE expects Looks like this will solve it Let s try again to place a breakpoint after the dbg waitIDE line start our Docker Compose app then call the endpoint that includes the code to debug and as it waits for us to connect run the Debug Configuration It works Works on my machineThis was exciting but committing this kind of code would get me tarred and feathered Let s make sure this works on everyone s machine But how can we know from inside a running container where the host machine s source code is located Let s use an environment variable Let s make a couple changes to the code above First off we added line which fetches the environment variable We ve also changed line to use the value from that environment variable This means we ll need to get the value Users omer van kloeten my project src into the variable It s not that trivial to get that environment variable into the code because Nginx strips away almost all environment variables We ll have to whitelist it in nginx conf Now we ll want to send it into the container at runtime Inside docker compose yaml let s make sure our local environment variable is pushed to the container as a local environment variable We ve added the environment variable in line but didn t give it a value That means it will pick up the value from the host environment when it s started Before we docker compose up our app we ll need to first export the environment variable Stepping through the code will now work on all of our colleagues computers Summing it all up A word of warningThis guide covers only the first steps towards making robust debuggable code You do not want to ship your code with debugger binaries listening on a port for connections This guide is far from comprehensive and doesn t allude to being one size fits all I d love to hear how you fixed issues with it in the comments Come share your personal progress What changed Here s all of the changes we made to our code in easily copy paste able gist form Next stepsThis way of debugging means that the code waits for the debugger to connect to it when it uses tcpListen However this is not that great because it waits for user interaction starting the Debug Configuration If we used tcpConnect we would be able to start the debugger and have the process connect directly to it when it needs to without user interaction Unfortunately I was unable to make that work within a reasonable timeframe when listening on and attempting to connect to host docker internal from inside the Docker container Perhaps you will Bonus Hot reloading the Lua codeA lot of the above included frequently changing Lua code and rebuilding the container causing the feedback loop to be frustratingly long If we can edit the files inside the container that would make things much easier right To do that let s attach our sources as a volume to the container in docker compose yaml In line we re effectively replacing the files that exist inside the container with a live link to our local ones However Openresty has a Lua code cache which will cache the code once it s been run Thankfully we can turn that off in our nginx conf Unfortunately this neat trick breaks the reproducibility of Docker images so these patches to docker compose yaml and nginx conf should never reach your CI server Note that you may also break your code if you turn off the Lua cache due to its side effects Parting wordsPlease remember that this guide only outlines bootstrapping the ability to step inside the code and therefore should probably not be used as is It was a fun challenge to take up and I sincerely hope that this guide is some day useful to someone other than myself omervk |
2021-05-31 11:01:25 |
Apple |
AppleInsider - Frontpage News |
Intel-based MacBook Pro is latest anti-Apple Intel campaign target |
https://appleinsider.com/articles/21/05/31/intel-based-macbook-pro-is-latest-anti-apple-intel-campaign-target?utm_medium=rss
|
Intel based MacBook Pro is latest anti Apple Intel campaign targetIntel continues to throw shade at Apple oddly aiming at the Intel based MacBook Pro but this time using gaming as a cudgel to try and prove Windows based products are better than Apple s offerings Intel s presentation offered some bold claims against AppleApple is on a two year transition away from Intel in favor of using its own Apple Silicon chips in Macs and its initial M releases easily demonstrates Apple is doing things right However Intel is still quite unhappy about the break up as a presentation to members of the media revealed Read more |
2021-05-31 11:36:56 |
海外TECH |
Engadget |
The Morning After: A surprising cloudy day on Mars |
https://www.engadget.com/the-morning-after-a-surprisingly-cloudy-day-on-mars-112600849.html?src=rss_b2c
|
The Morning After A surprising cloudy day on MarsToday s headlines The first look at a cloudy day on Mars Apple delays paid podcast subscription launch to June and Tesla may have to ship Texas made EVs out of state to sell them to Texans |
2021-05-31 11:26:00 |
ニュース |
BBC News - Home |
Warning UK could be entering early stages of third wave |
https://www.bbc.co.uk/news/uk-57304515
|
cases |
2021-05-31 11:42:40 |
ニュース |
BBC News - Home |
France police 'neutralise' armed ex-soldier after Dordogne manhunt |
https://www.bbc.co.uk/news/world-europe-57304907
|
manhunt |
2021-05-31 11:19:25 |
ニュース |
BBC News - Home |
Pin Mill boat rescue: Diners rescued as floating restaurant gets stuck |
https://www.bbc.co.uk/news/uk-england-suffolk-57305589
|
onboard |
2021-05-31 11:34:56 |
ニュース |
BBC News - Home |
Lockyer added to Wales squad as Lawrence ruled out 24 hours after being included |
https://www.bbc.co.uk/sport/football/57306951
|
james |
2021-05-31 11:00:57 |
北海道 |
北海道新聞 |
福島町産マコンブ リップやせっけんに 地元2団体、知名度向上へ商品開発 |
https://www.hokkaido-np.co.jp/article/550010/
|
一般社団法人 |
2021-05-31 20:03:23 |
仮想通貨 |
BITPRESS(ビットプレス) |
FXcoin、7/1-7/30で「BTC出庫手数料引き下げキャンペーン」実施 |
https://bitpress.jp/count2/3_14_12531
|
fxcoin |
2021-05-31 20:58:43 |
IT |
週刊アスキー |
今から始める『ビビッドアーミー』!ゲームの基本をチェックする!! |
https://weekly.ascii.jp/elem/000/004/056/4056988/
|
運営 |
2021-05-31 20:20:00 |
IT |
週刊アスキー |
SFシミュレーションRPG『Relayer(リレイヤー)』のキャスト第1弾が発表! |
https://weekly.ascii.jp/elem/000/004/057/4057178/
|
発売予定 |
2021-05-31 20:05:00 |
コメント
コメントを投稿