teleren/devto huggingface dataset:
REST APIs for Django models with less efforts
Tags: django, python, djangorestframework, rest
Published: 2022-10-26 16:37:15

Written a small utility that helps to create REST APIs for Django models with less efforts. This is for developers using `Django REST Framework` to write REST APIs. One just need to use a decorator with a model to expose REST APIs for that model. There are customisation options available to tweak the default behaviour. Have a look if interested. Looking for collaboration.
- Documentation: [https://anp-scp.github.io/django-to-rest](https://anp-scp.github.io/django-to-rest)
- Source Code: [https://github.com/anp-scp/django-to-rest](https://github.com/anp-scp/django-to-rest)
Jinjja - Best products no bs
Tags: showdev
Published: 2022-10-26 16:31:19

**After spending years** trying to find the best products, best for the price and best in quality - doing it over and over, I finally decided to make something.

A lot of people, maybe even everyone - just wants to find the best possible product for a reasonable price. Be it a phone or a watch. Maybe even a cat!

Decision fatigue is a real problem, especially when you try and find out the best possible use for your money when buying something and hoping you don't get any buyer's remorse right after the purchase.

I made a website which would list the best products for the price, period. So you don't have to go through the hassle of avoiding all the marketing crap. Of-course these are all my opinions which you are free to disagree with, and maybe even open a PR suggesting if something better is available in the market.

Currently the list is small, since I am starting out but I plan to keep expanding it as I come across something worth buying. Consumerism.

> Here's the site: https://jinjja.pages.dev/

For people who are curious how I made this, I am using following tech.

1. [GitHub](https://github.com/sakshatshinde/jinjja) - Repo
2. [Cloudflare Pages](https://pages.cloudflare.com/) - Hosting
3. [Hugo](https://gohugo.io/) - An open-source static site generator
4. [Diary](https://github.com/amazingrise/hugo-theme-diary) - Theme
JS Polyfills - Part 3 (Map, Filter, Reduce)
Tags: javascript, webdev, jsitor, polyfill
Published: 2022-10-26 16:02:22


<link rel="canonical" href="https://dev.to/uttarasriya/js-polyfills-part-3-map-filter-reduce-418d" />
**Github Code:** [JS Polyfills](https://github.com/uttara-sriya/JS-Polyfills)
**8. Map()**

- <u>Function</u>: `map(callback, thisArg)`
- <u>Usage</u>: `arr/obj.map(function(element, index, array) { /* … */ }, thisArg)`
- <u>Description</u>: creates a new array populated with the results of callback function on every element in the calling array.
- <u>Polyfill & test cases</u>: [Map](https://jsitor.com/Jbh5ncXYrv)

```javascript
//function returns Array, Map will have callbackfunction
Array.prototype.customMap = function (callbackFunction) {
  const arr = [];

  for (let i = 1; i <= this.length; i++) {
    arr.push(callbackFunction.call(this[i], i, this));
  }
  return arr;
};

```
**9. Filter()**

- <u>Function</u>: `filter(callbackFn, thisArg)`
- <u>Usage</u>: `arr.filter(function(element, index, array) { /* … */ }, thisArg)`
- <u>Description</u>: creates a shallow copy of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.
- <u>Polyfill & test cases</u>:[Filter](https://jsitor.com/lS7Q0wnPu)
```javascript
//function returns Array, filter will have callbackfunction
Array.prototype.customFilter = function (callbackFunction) {
  const arr = [];

  for (let i = 0; i <= this.length; i++) {

    (callbackFunction(this[i], i, this)) ? arr.push(this[i])  : null;
  }
  return arr;
};
```
**10. Reduce()**

- <u>Function</u>: `reduce(callbackFn, initialValue)`
- <u>Usage</u>: `arr/obj.reduce(function(previousValue, currentValue, currentIndex, array) { /* … */ }, initialValue)`
- <u>Description</u>: executes a "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.
- <u>Polyfill & test cases</u>:[Reduce](https://jsitor.com/kuasLJeMju)
```javascript
// expects callback function called reducer and initial value
//Parameters - (function(previousValue, currentValue, currentIndex, array) { /* … */ }, initialValue)
// reducer call back is executed on every element of the array and reduces it to a single value.
Array.prototype.customReduce = function (reducerCallback, initial) {
  //previous value also called as accumulator will be either provided initial value or undefined if no previous value exists
  let previousValue = initial || undefined;
  for (let i = 0; i < this.length; i++) {
    //if accumulator exists and is not undefined then reducer callback is called otherwise previous value is set as current value
    (previousValue) ? reducerCallback.call(previousValue, this[i], i, this) : (previousValue = this[i]);
  }
  return previousValue;
}
```

Stay Tuned for Part 4 - Debouncer & Throttle
Keep Learning!
What second brains say about how developers work
Tags: programming, developers, opensource, luos
Published: 2022-10-26 15:55:33

It is fascinating to see our ability to quickly find information on a specific topic, technical or not. 

⏩ https://stackoverflow.blog/2022/10/03/two-heads-are-better-than-one-what-second-brains-say-about-how-developers-work/

We try to do the same thing at Luos with our technical documentation so you can quickly understand how it works and always know where you can find the required [information](https://www.luos.io/docs/luos-technology)
Landing page inside your app?
Tags: javascript, webdev, productivity, codenewbie
Published: 2022-10-26 15:50:40

{% embed https://www.youtube.com/watch?v=ODT9DL0xTuc %}

Hello devs,

I know this can be a subject you already know.

However I find so many teams that still includes their Landing page inside their App.

In this video, I try, in a short time, to treat about this subject:

Do you include your Landing inside your app?

Best regards,

Guillaume
Day32 of #100DaysOfCode
Tags: 100daysofcode, tailwindcss, css, webdev
Published: 2022-10-26 15:14:09

I’m back! I’ve been missing a few days because I got sick during my trip to Laos. So I came back and rested for a few days.

Now that I’m feeling better (still need to take it easy), I jumped right back in!  

Since I have finished fixing most of the bugs and the website is working, I’m now working on the frontend for the company section.

I’m now a lot more proficient with Tailwind but I do feel I can get better. I guess I need more practice to be able to quickly whip out the frontend.

I think it will take me a week to finish the frontend since I need to design and code it from the wireframe. I got 80% of the design done for the Company List page and only 10% done on the Company Detail page.

I will try to draft it out and refine it in the coming days.

Wish me luck! 🥳
Reactive templates “automagically”
Published: 2022-10-26 15:11:08

![Bemtv logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uplkub45gzzn7lm9ei5.png)

One of the most talked about topics lately in the JavaScript universe is Reactive Programming,
something we see somehow in major UI libraries and frameworks like React, Vue, Svelte, Solid, Angular and others.

This article is not intended to explain [reactive programming](https://dev.to/this-is-learning/what-the-hell-is-reactive-programming-anyway-31p5), however, keep in mind that basically(in world of UI libraries/frameworks) whenever the state changes, the template is checked, updated, and the changes are applied to the DOM.

> Obviously, each framework deals with this in its own way, some more reactive, others declarative, with VDOM, without VDOM...

What if we tried to do the opposite of what these frameworks normally do? Instead of changing the state causing the template to be updated, the template itself checks to see if the state has changed and updates itself.

At first it may seem strange, but this is the proposal of the Bemtv library.

## A brief look

**Counter** component:

```javascript
import { _ } from "bemtv";

const { click$, $, css, template, render } = _`Counter`({ count: 0 });

click$(() => $.count++);

css`
  padding: 20px;
  color: blue;
`;

template`button[Cliked: $count ]`;

render();
```
It uses a [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame) loop to execute just the component template, thus getting the updated template to compare with the previous template to detect if there have been any changes and apply them to the DOM.

We might think that this will overload the browser, however, there are best practices we should follow to avoid this:

- Everything inside the template must be strings, numbers or light calculations.

- The function that generates the template should only be used for this.

Bemtv also uses a sophisticated system to determine if there have been any changes to the template, continues using the browser's repaint as a basis, but reduces the number of checks as the user interacts with the page and the time the component takes to generate the template, this makes Bemtv more efficient.

Bemtv does its work at runtime, it has a markup language very similar to HTML basically reducing its redundancy and a CSS-In-JS library all integrated into the template, and a `Router` full of syntactic sugars.

Bemtv is currently **not available for production** and its main goal is to be a tool for **small web applications** that can be learned in minutes instead of hours.

## And that’s it

That's it for today, but you can find out more details on [project repository](https://github.com/diogoneves07/bemtvjs) and if you like the idea, don't forget to leave your star, it encourages the development of the project, see you soon!
HTML Entities - A Forgotten But Useful Spec
Tags: html, webdev, spec
Published: 2022-10-26 14:57:22

**Let me paint you a picture**:    
You've built your site/application, it looks real good in development. You decide it's ready to be deployed. You choose a simple solution - Netlify/Vercel - where you only need to link your repository.

You click deploy and wait...

Lo and behold the deploy failed. You're confused as to why, you did everything correct.

So you check the deploy logs and are greeted with this:

```bash
Error: `'` can be escaped with `&apos;`, `&lsquo;`, `&#39;`, `&rsquo;`. react/no-unescaped-entities
```

---

## What Does This Mean?
Well, simply put somewhere in your pages or components you used the apostrophe and Vercel/Netlify is telling you that it isn't advisable to use those characters on a production site.

## The Security Risk
By using apostrophes, quotation marks or any other symbols on your keyboard , it opens up your site to external injection attacks. Those characters, easy as they are make it easy as well for hacker to add code to your site or app.

---

## The Solution - HTML Entities
Long ago, in the before time there were code, character codes that aided us in displaying characters on websites - **HTML Entities**

With the advancement of technology, our keyboards became more versatile and those entities got relegated to the back benches. They didn't away, they just got forgotten.

But in rare occasions, you will come across them whether by accident or because you need a specific character.

I am sure you have seen these combinations of characters. In most cases they follow the pattern of ampersand, the specific code (a word or number) and a semicolon. A common one is `&copy;` which would display the copyright symbol.

### Some Useful Entities
I've complied a table below of HTML Entities that you may find useful.

| Character | Entity    |
| --------- | --------- |
| &apos;    | `&apos;`  |
| &quot;    | `&quot;`  |
| &#8208;   |  `&dash;` or `&#8208;`|
| &copy;    | `&copy;`  |
| &reg;     | `&reg;`   |
| &larr;    | `&larr;`  |
| &rarr;    | `&rarr`   |
| &uarr;    | `&uarr;`  |
| &darr;    | `&darr;`  |
| &#36;  | `&dollar` or `&#36;`|
| &pound;   | `&pound;` |
| &euro;    | `&euro;`  |


So next time when you need a common icon, before you rush to 
an icon pack, consider if this forgotten spec can be of use. An added bonus; you're not adding someone else's library into your project.

--- 

## Conclusion 
Did you know about HTML Entities? Have you used any of them? Are there any you think I should know about? Please, let me know...

---

###  Thank you for reading, let's connect!
Thank you for visiting this little corner of mine. Let's connect on [**Twitter**](https://twitter.com/Psypher1), [**Polywork**](https://www.polywork.com/psypher1) and [**LinkedIn**](https://www.linkedin.com/in/jamesmidzi/)
Templates reativos “automagicamente”
Tags: javascript, webdev
Published: 2022-10-26 14:56:51


![Bemtv logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uplkub45gzzn7lm9ei5.png)


Um dos tópicos mais comentados ultimamente no universo JavaScript é a Programação Reativa,
algo que vemos de alguma forma nas principais bibliotecas e frameworks de UI como React, Vue, Svelte, Solid, Angular e outros.

Este artigo não pretende explicar [programação reativa](https://dev.to/this-is-learning/what-the-hell-is-reactive-programming-anyway-31p5), entretanto, tenha em mente que basicamente(no mundo das bibliotecas/frameworks de interface do usuário) sempre que o estado muda, o template é verificado, atualizado e as alterações são aplicadas ao DOM.

> Obviamente, cada framework lida com isso à sua maneira, uns mais reativos, outros declarativos, com VDOM, sem VDOM...

E se tentássemos fazer o oposto do que esses frameworks normalmente fazem? Em vez de alterar o estado fazendo com que o template seja atualizado, o próprio template verifica se o estado mudou e se atualiza.

A princípio pode parecer estranho, mas essa é a proposta da biblioteca Bemtv.

## Um breve olhar

Componente **Counter**:

```javascript
import { _ } from "bemtv";

const { click$, $, css, template, render } = _`Counter`({ count: 0 });

click$(() => $.count++);

css`
  padding: 20px;
  color: blue;
`;

template`button[Cliked: $count ]`;

render();
```

Ela usa um [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame) loop para executar apenas o template do componente, obtendo assim o template atualizado para comparar com o template anterior para detectar se houve alguma alteração e aplicá-las ao DOM.

Podemos pensar que isso sobrecarregará o navegador, no entanto, existem boas práticas que devemos seguir para evitar isso:

- Tudo dentro do template deve ser strings, números ou cálculos leves.

- A função que gera o template só deve ser usada para isso.

A Bemtv também utiliza um sistema sofisticado para determinar se houve alguma alteração no template, continua usando como base a repaint(repintura) do navegador, mas reduz o número de verificações à medida que o usuário interage com a página e o tempo que o componente leva para gerar o template, isso torna a Bemtv mais eficiente.

A Bemtv faz seu trabalho em tempo de execução, ela possui uma linguagem de marcação muito parecida com HTML basicamente reduzindo sua redundância e uma biblioteca CSS-In-JS tudo integrado ao template, e um `Router` cheio de açúcares sintáticos.

Atualmente, Bemtv **não está disponível para produção** e seu principal objetivo é ser uma ferramenta para **pequenas aplicações Web**, que pode ser aprendida em poucos minutos ao invés de horas.

## Fechamento 

Por hoje é só, mas você pode saber mais detalhes no [repositório do projeto](https://github.com/diogoneves07/bemtvjs) e se gostar da ideia, não esqueça de deixar sua estrela, ela incentiva o desenvolvimento do projeto, até breve!
Migrating Users to a New Server
Tags: linux
Published: 2022-10-26 14:52:17

We can use awk to filter the user files, we are splitting on ':' and checking the 3rd field, the user id. We don't want to bring over the system users which are usually at the top. I chose 200 based on my experience at work.

```
awk -F: '($3>=200) && ($3!=65534)' /etc/passwd > passwd.bk
awk -F: '($3>=200) && ($3!=65534)' /etc/group > group.bk
awk -F: '($3>=200) && ($3!=65534) {print $1}' /etc/passwd | tee – |egrep -f – /etc/shadow > shadow.bk
/bin/cp /etc/gshadow gshadow.bk
```

The below commands will be run on the new machine once the backup files have been moved over.

```
cat passwd.bk >> /etc/passwd
cat group.bk >> /etc/group
cat shadow.bk >> /etc/shadow
/bin/cp gshadow.bk /etc/gshadow
```

Now we should be able to login with an existing user to make sure everything is working.
Do you think you've got what it takes to play Snow Rider 3D?
Tags: 3d, snow, rider, webdev
Published: 2022-10-26 14:29:48

In this 3D driving game, you'll be given a beautiful sled at the start of the game and must navigate the slopes while avoiding obstacles. It's not as easy as it sounds to avoid rows of hulking snowballs or massive snowmen... You'll need quick reflexes and driving skills to [snow rider 3d](https://snowrider3d.com) get around or over all the dangerous obstacles in your path. Collecting presents along your journey allows you to purchase cool new sleds to use!

How to Play: Use the left and right arrow keys to steer your sled. By pressing the up key, you can also jump over obstacles. Choose wisely whether to swerve to collect presents, as this can be a risky strategy. The further down the slopes you go, the higher your score. Learn how to overcome all of the difficult obstacles and see how far you can get!


Do you want to take a sleigh ride? then there is no need to travel. Because Snow Ride 3D now allows you to experience pulling a sleigh for free whenever you choose. Due to the 3D nature of the game, even if you are not truly riding a sleigh, you will feel as though you are. 

To gain a high score, try to get as far as you can. Additionally, you can amass gifts to buy a sleigh. You can use gifts to unlock more than 10 wonderful sleighs that are currently available in the game. Be sure to leap over any obstacles and keep your distance from them.

You can compete with your loved ones and friends to see who can get the highest score. This game will undoubtedly put your reaction time, accuracy, and hand-eye coordination to the test. So why are you still waiting? Check out this tough and engaging game for tons of enjoyment. Play now!
A spinner (aka loading animation) for terminal in Go
Tags: go, terminal, cli
Published: 2022-10-26 14:24:00

{% github adhocore/chin %}

## Usage

Install `chin`:
```sh
go get -u github.com/adhocore/chin
```

Use in Go code with `WaitGroup`:

```go
var wg sync.WaitGroup

s := chin.New().WithWait(&wg)
go s.Start()

// invoke some long running task
// (you can also call s.Stop() from that task)
longTask(&wg)

s.Stop()
wg.Wait()
```

> Refer [example](https://github.com/adhocore/chin/tree/main/examples) for more (there is also one without waitgroup).

## Screen

![CHIN](https://raw.githubusercontent.com/adhocore/chin/main/assets/chin.gif)

## Feedback?

Just drop a comment here, or open issues/PR in the repo. Thanks. 😎
تحميل ياسين تيفي برو
Tags: news
Published: 2022-10-26 14:17:12

تنزيل برنامج ياسين تيفي برو yacine tv pro mod apk premium app مهكر و مدفوع بدون اعلانات من ميديا فاير بدون مشغل خارجي للاندرويد.
تحميل تطبيق ياسين تيفي برو Yacine Tv Pro بدون اعلانات مهكر
[تحميل](https://www.genuis-info.com/2022/08/yacine-tv-pro.html?m=1
 )
Technical designs tool
Tags: programming, architecture, tooling
Published: 2022-10-26 14:23:48


You can find it here: https://tddoc.io/

If you need any features this service doesn't have yet, LMK and I will try to add them.


![Diagrams editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbntzdn0h4adjaxkz8ug.png)

![Endpoints editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgttp94z0413qlp3hwbf.png)

![Data model editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wydpwm58cm1u8i4w73c2.png)
ThirdKudos: Appreciate other's work by giving then Kudos in the form of NFTs
Published: 2022-10-26 14:20:59

Thirdweb was holding the [Solanathon](https://thirdweb.com/hackathon/solanathon) and I decided to participate in it. I did not know what to build but I now have a project - [ThirdKudos](https://thirdkudos.vercel.app/). ThirdKudos enables you to send kudos to anyone with a Solana Wallet. The kudo is in the form of a NFT. I used [Thirdweb](https://thirdweb.com/) (specifically the new Solana SDK) to make this. I also used [Thirdweb Auth](https://thirdweb.com/auth) to authenticate users on my application. 

## Challenges faced
Everything was working well until I deployed my app to production and realised that there was a 10 second timeout on serverless function (the transaction takes a little more time than that to finalize). I had to abstract all the code onto a separate backend (deployed on [Fly](https://fly.io) right now). 

## If I had more time, then what can I have done?
- A better UI (looks really prototype-y right now)
- More functionality (a page to view kudos you have sent and received, more default kudo template, custom image for kudos, etc)
- Better backend (it works but is half-done)
- A logo, og images and stuff
- A better writeup (I just typed whatever I had in my brain within 10 mins lol)


## Thirdweb's role
- Easy to use SDK for minting NFTs
I did not have to write any smart contracts or even much of client side code (Metaplex stuff). I just initialized the SDK and called `mintTo` :)
- Auth
Provides a simple way to authenticate users. I was looking forward to use it to protect my backend API route as well (got it working locally) but then had some CORS issues and some issues with the cookies not being passed on (this contains the auth token)

## Conclusion
Had a great time building, I feel like Thirdweb Auth has a lot of potential and seeing how established the Thirdweb EVM ecosystem is (and how it evolved from the first time I used it back in January for a hackathon, and won it :) ), the Solana ecosystem is destined to get bigger and make it easier for new developers to use the technology.
How to Migrate from on-prem data environment SSIS to ADF in Just 12 Weeks
Tags: adf, ssis, azure, datafactory
Published: 2022-10-26 14:02:01

As the data in your company grows rapidly, there could be bottlenecks in processing and delivering business reports within the service level agreements on the current on-premises systems since they are not easily scalable. Additionally, there could be issues with increasing costs and the ability to adapt to modern data architectures involving data lake/lake house, etc., that could help drive business insights from big data.

**Know more about the service:** [Migrate from SSIS/SSRS/SQL Server on premise to Azure](https://azuremarketplace.microsoft.com/en-us/marketplace/consulting-services/anblicks1641886530817.anb_013)
Can you help with this build?
Published: 2022-10-26 13:55:00

Hi We are an agency looking for a dev to help us with a project for a client.

The core function of this build is a WooCommerce based subscription service, this we can handle ourselves.

W need help with the delivery of the following:

The customer also has a physical store, where members can receive discounts. We need some means of verifying their membership on the POS. We would like this to be a card that is stored in their Apple / Google Wallet.

At the moment we intend to set up the club using WooCommerce subscriptions, with a WooCommerce log-in to validate membership.

If anyone can help with this please get in touch.