https://dmitripavlutin.com/react-useeffect-explanation/
https://daveceddia.com/useeffect-hook-examples/
I made a program which track your face movements and converts them into keyboard actions using the Pigo face detection library. from r/programming
https://doc.rust-lang.org/book/ch00-00-introduction.html
There is another book called "Rust By Example"
(both these books can be accessed by typing "rustup doc")
an explorable systems programming course that uses #rustlang and #webassembly for interactive playgrounds and visualisation. It starts with network programming, but it will be expanded to more topics!
https://stackoverflow.com/a/5188364
git branch --sort=-committerdate # DESC
git branch --sort=committerdate # ASC
Url to get sample json data - https://jsonplaceholder.typicode.com/posts
https://twitter.com/stevegraham/status/1264304523826216960?s=21
"The iOS part is a simple swift app that loads a webview with some simple code to pass messages between native and web lands. The webview is Phoenix LiveView, i.e. server side rendered HTML with events and DOM diffs going back and forth over the Phoenix websocket."
Look for a way to outline components created by developers of a team
i.e. differentiate between components given by a Framework (like Antd) and components added by a team's developers.
https://stackoverflow.com/questions/15939896/css-inline-block-vs-table-cell
Excerpt 1:
You'll also find the gap between block when you apply
display: inline-block;
Re-size your window by pressing Ctrl key and scrolling with mouse scroll button to see differences.
Notice the
vertical-align: middle;
is not working asdisplay: table-cell;
indisplay: inline-block;
.
Exceprt 2:
Set line-height equal to element height and vertical-align will work for inline-block.
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
https://css-tricks.com/snippets/css/complete-guide-grid/
Excerpt:
Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the Grid layout is intended for larger scale layouts.
Using event.persist() and computed property names
Here are some common suggestions that sound reasonable, but set different thresholds:
- Refactor when the cost of refactoring is less than the cost of not refactoring. (Sounds good, but how can you make that calculation?)
- Refactor before adding new features if it will make it easier to add those features.
- Ignore ugly code once. But refactor if you stumble over the same pain point twice.
- Refactor opportunistically. Clean things up whenever and wherever you get the chance.
- Refactor if you can make the change quickly (say, within a day).
- Only refactor when the pain of leaving it exceeds the pain of fixing it.
- Refactor immediately after shipping. (A great idea with very little likelihood of actually being followed.)
Error: uninitialized constant URI::Generic,
NameError: uninitialized class variable @@schemes in URI
https://stackoverflow.com/questions/59495309/uri-issue-after-attempting-to-run-rails-server-with-completely-new-appAdditional considerations when using hooks
There are some architectural trade offs to take into consideration when deciding whether to use hooks or not. Mark Erikson summarizes these nicely in his two blog posts Thoughts on React Hooks, Redux, and Separation of Concerns and Hooks, HOCs, and Tradeoffs.
// Computed property names (ES2015)
let i = 0
let a = {
['foo' + ++i]: i,
['foo' + ++i]: i,
['foo' + ++i]: i
}
console.log(a.foo1) // 1
console.log(a.foo2) // 2
console.log(a.foo3) // 3
Take a nested Javascript object and flatten it, or unflatten an object with delimited keys.
var flatten = require('flat')flatten({key1: {keyA: 'valueI'},key2: {keyB: 'valueII'},key3: { a: { b: { c: 2 } } }})// {// 'key1.keyA': 'valueI',// 'key2.keyB': 'valueII',// 'key3.a.b.c': 2// }
Grid.js is a Free and open-source HTML table plugin written in TypeScript. It works with most JavaScript frameworks, including React, Angular.js, Vue and VanillaJs.
Here's an outline of the video. Vue 3 - harder, better, faster, stronger. Trends - Simpler and more explicit. List of things that Chris Fritz is excited about: 1. Reactivity caveats are gone. You can do this now - arr[index] = newVal; 2. Multiple root nodes
4. No more automatic attribute inheritance. Explicitly pass arguments using v-bind="$attrs" You don't have to use inheritAttrs: false (since it will never be true).
5. v-on will compile to attributes. E.g @keyup compiles to on-keyup. Just v-bind = "$attrs" ($attrs will incl. all non-emitted listeners) No more $listeners. No more .native modifier for v-on.
6. v-model will compile to attributes. Again, just v-bind = "$attrs". No more overriding the native input event. No more model option.
7. Smarter v-model on components If you want to move 'select' to a component. {{ choice }}
8. Simpler render functions render(h) { return h(BaseInput, { modelValue: this.searchText, onModelUpdate: newValue => { this.searchText=newValue; }, class: this.$style.searchInput, placeholder: 'Search' }) } Vue3 migration will be easier through automatic migrations (where the intent is clear).