Web_programming
1.14K subscribers
354 photos
14 videos
125 files
1.22K links
Sharif web programming
If you have any questions, please feel free to ask(@yumcoder)
Download Telegram
با نام ایزد منان

سال نو را به تمامی اعضای این جامعه ی حرفه ای و دانشگاهی تبریک عرض میکنیم.

امیدواریم سالی سرشار از پیروزی، شادابی و تن درستی در انتظار همه عزیزان باشد.
🌹🌹
🎉39👎3😱1
👍18
👍6
The DataLoader pattern is a common design pattern used primarily in backend development to optimize data fetching, especially in the context of GraphQL APIs. It helps reduce the number of database or API calls by batching and caching requests efficiently.
👍6
const promise1 = new Promise((resolve, reject) => {
setTimeout(resolve, 500, "one");
});

const promise2 = new Promise((resolve, reject) => {
setTimeout(resolve, 100, "two");
});

Promise.race([promise1, promise2]).then((value) => {
console.log(value);
// Both resolve, but promise2 is faster
});
// Expected output: "two"


https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race
👍4
👎5👍4😢2
vsCode and Gemini code Assistant
😁3👍1
When you apply:


scrollbar-width: thin;


It tells the browser to render the scrollbars in a narrower/thinner style than the default. This improves aesthetics in layouts with tight or minimal designs.