teleren/devto huggingface dataset:
Resep Gratin Sumsum 
Tags: resep, gratin, sumsum
Published: 2021-02-10 04:28:16

Sumsum buatan ayah dimulai sebagai lauk untuk hari libu Minggu, tapi saya mengubahnya menjadi Resep Gratin Sumsum yang lezat.
setiap hari Minggu di masa kanak-kanak saya, orang tua saya, saudara laki-laki dan berbagai macam anak asuh yang tinggal bersama kami pada saat itu, akan duduk di tengah sore untuk menikmati makan malam panggang yang layak. Lebih sering daripada tidak itu adalah ayam, biasanya disertai dengan kentang, sayuran, wortel, dan kuah daging.

Dan kemudian, di suatu tempat di musim gugur, semuanya akan didorong untuk memberi ruang bagi sesendok besar sumsum ayah saya, dilunakkan dengan bawang dalam minyak (Ayah memilih zaitun, saya menantang menggunakan kacang tanah) dan bumbu.
 
Saya telah menikmatinya selama bertahun-tahun sebagai pelengkap, tetapi sekarang saya membuatnya menjadi gratin untuk hidangan yang lebih substansial. Dia kesal dengan saya karena mengutak-atiknya, tetapi saya telah menghiburnya dan menyuruh mencoba masaka saya. Saya pikir dia sangat menyukainya.

Bahan Resep Gratin Sumsum untuk 3 porsi 
- 1 bawang bombay besar, potong dadu
- 400g sumsum, kupas dan potong dadu
- 2 sdm minyak
- 350g tomat cincang
- 150g orzo
- Sedikit daun kemangi segar, cincang halus
- Sedikit tangkai peterseli segar, cincang halus
- 180ml kaldu ayam atau sayuran
- Garam dan merica
- 1 potong roti, haluskan menjadi remah roti
- 70g halloumi, parut halus 

Cara memasaknya
Panaskan oven sampai 200C / 400F / tanda gas enam.
Masukkan bawang bombai ke dalam wajan sedang dengan sumsum. Gerimis di atas minyak dan masak dengan api sedang selama beberapa menit sampai sumsum mulai berwarna coklat di sekitar tepinya. Tuang di atas tomat cincang dan masak setidaknya selama 15 menit.

Tambahkan orzo, sebagian besar bumbu dan kaldu, aduk, dan didihkan.
Tambahkan sedikit garam dan bubuk lada dan masak selama 8-10 menit lagi, sampai orzo al dente (akan selesai dalam oven). Anda mungkin perlu menambahkan lebih banyak air agar tidak mengering.
Campur remah roti dengan halloumi dan sisa herba. Taburkan di atas campuran sumsum.

Masak dalam oven selama 15 menit sampai sedikit terpanggang di atasnya. Biarkan agak dingin sebelum disajikan. 

Source: https://www.thelynxjkt.com
Confirmation pop-up when exiting tab
Tags: webdev, javascript, codenewbie, programming
Published: 2021-02-10 04:17:13

 We're going to see how to implement a confirmation pop-up when a user tries to leave the page which has an unsaved state or something processing in the background.

---

 The `beforeunload` event is fired when the window, the document and its resources are about to be unloaded. The document is still visible and the event is still cancelable at this point. This event enables a web page to trigger a confirmation dialogue asking the user if they want to leave the page. If the user confirms, the browser navigates to the new page, otherwise, it cancels the navigation. 

---

 Let's see how to do it...

 When your webpage is doing something in the background or it has some data which is not sent to the server yet you can set up the event listener and how the user a confirmation pop-up if he tries to close or reload the tab.

```javascript

 function setConfirmation(event) {
  // Cancel the event as stated by the standard
  event.preventDefault(); 
  //Chrome requires returnValue to be set. 
  event.returnValue = ''; 
 }

 window.addEventListener('beforeunload;, setconfirmation); 

 // When everything is done just remove the event listener to allow the user to leave the page without confirmation

 window.removeEventListener('beforeunload;, setConfirmation); 
```

 To combat unwanted pop-ups, some browsers don't display prompts created in *beforeunload* event handlers unless the page has been interacted with. Moreover, some don't display them at all. 

 This was it just a small post ��

---

 ♂️Thanks For Reading | Happy Coding⌛

Get weekly newsletter of amazing articles I posted this week and some offers or announcement. Subscribe from <a href="https://mailchi.mp/9f73b65b9c38/rahulism" target="_blank">Here</a>

<a href="https://www.buymeacoffee.com/rahxuls" target="_blank"> <img src="https://res.cloudinary.com/rahulism1/image/upload/v1608182430/bmc_nbxakd.png"></a>
Breakup Connection With Your Partner

Published: 2021-02-10 04:12:14

Do you feel caught in your marriage? Is your accomplice undermining you? Do you presently don't have any desire to bear the torment of your mate on you? Indeed, on the off chance that you have just had enough and you need to stop all the confusion and issues of your marriage, at that point you should project a spell to separate a marriage. The spell will end your marriage in one go. It will persuade your accomplice to leave you and document for partition with no contention or issue 

If your partner is in an illegal relationship and you want to end it and bring him/her back to you, then <a href="https://sites.google.com/view/breakup-spell/lemon-break-up-spell">Lemon spell for break</a> a relationship will help you in ending that extramarital relationship and bring him/her back to you. The spell to break up a marriage can force a couple to go for breakup. Yes, if your lover has married someone, then you can cast the spell for them and attract them back in your life by making them realize that you are better for them.

On the off chance that somebody near you is enduring in their marriage, at that point lemon spell to separate a relationship will help you in completing their injury. You would prefer not to endure with no shortcoming of yours. The simple spell to separate a marriage will cut off your association in the most brief time-frame and give you your much merited opportunity. It will liberate you from a clamorous and intellectually testing relationship. Thus, without agonizing over anything just cast a simple spell to separate a marriage and deliver yourself from all the disappointment, difficulties and damages of your marriage. 

It is critical to talk about the lemon spell to separate a relationship with an expert spell caster and afterward start the technique. With their recommendation, you will actually want to project the spell in the correct way. Abandoning your accomplice isn't simple, however there is a phase when you in a real sense realize that this marriage will not work any further. In the event that you have arrived at that stage, at that point you should project a spell to separate a marriage and simply escape the understanding. Petition for legal separation after you have given the spell a role as it influences your accomplice's choice as well.
Pixium Digital partners with VeChain to drive innovation using Blockchain Technology.
Tags: blockchain, data, traceability, iot
Published: 2021-02-10 04:07:34

[Pixium Digital](https://pixiumdigital.com/) is thrilled to announce today that it has entered into a partnership with [VeChain](https://vechain.com/) through which Pixium Digital Pte Ltd will work with VeChain to support supply chain initiatives as a "VeChain Global Solutions Provider."

This partnership will combine Pixium Digital extensive expertise developing robust IT solutions, with VeChain ToolChain™ SaaS offering, the two companies will collaborate to achieve common goals. It is through such partnership that among many significant business values, Pixium Digital finds another agile and prestigious Partner in Asia.

VeChain ToolChain™ is a comprehensive blockchain application platform backed by the VeChainThor blockchain. VeChain ToolChain™ enables businesses of all sizes to leverage blockchain technology to enhance brand perception and value, as well as to expand into new business models. Services available to subscribers include product lifecycle management, supply chain process management, data collection, data verification, and process verification.

In addition to blockchain proficiency, Pixium Digital contributes expertise in IoT, edge computing and machine learning to complement the VeChain traceability stack. Plus, as a full-stack IT solution provider with decades of experience, Pixium Digital can help organizations, SMEs and startups build complete solutions atop VeChain ToolChain™ and develop custom smart contracts to enhance client initiatives.
Pixium Digital and VeChain share a common vision with regard to supply chain operations, process and data verification. Together, the two companies expect to boost innovation and industry adoption of blockchain-enabled solutions.

**[About Pixium Digital](https://pixiumdigital.com/)**

Founded in 2015, Pixium Digital Pte Ltd is an agile software development company with their headquarters located in Singapore focusing on shaping client projects from ideas to successful project launch.

**[About VeChain](https://vechain.com/)**

Launched in 2015, VeChain Technology is a global leading enterprise-friendly blockchain company which aims to connect blockchain technology to the real world by providing enterprises with blockchain-enabled solutions suited to their business needs. VeChain has international offices in China, Singapore, Luxembourg, Japan, France, Italy and the United States.
Swapping two numbers using arithmetic operators 
Tags: operations, programming, javascript, algorithms
Published: 2021-02-10 03:49:51

*We* can perform swapping of two numbers without using temp variable and just by using arithmetic operators.

Operators used are `+, -` or `*, /`

**First**, let us perform the swap using `+, -` operators,
```
let a = 5;
let b = 10;

//swap operations
a = a + b; //a = 15
b = a - b; //b = 5
a = a - b; //a = 10

//swap complete

console.log(a); //a is now 10
console.log(b); //b is now 5
```
**Now**, let us perform the swap using `*, /` operators,
```
let a = 7;
let b = 5;

//swap operations
a = a * b; //a = 35
b = a / b; //b = 7
a = a / b; //a = 5

//swap complete

console.log(a); //a is now 5
console.log(b); //b is now 7
```

>Hope this was helpful😊
How To Connect MySQL Database With Expresss Js (Node.js)
Tags: node, mysql, database, express
Published: 2021-02-10 03:46:04

you will learn how to connect to the MySQL database server from a node.js application or how to connect xampp MySQL with node js. Learn how to access a MySQL database using Node.js

We’ll have a look at connecting with the MySQL module in the Node.js client for MySQL. I'll explain how to use the module to connect to a MySQL database node js connect PHPMyAdmin.

**[How To Connect MySQL Database With Express Js (Node.js)](https://www.phpcodingstuff.com/blog/how-to-connect-mysql-database-with-node-js.html)**

```
npm install MySQL
```

Pooling connections in accessing a MySQL database using Node.js
The MySQL driver for the node.js module connect MySQL database provides you with a built-in connection pooling feature in the express js. Suppose, you want to create a connection pool with 10 connections see below Learn how to access a MySQL database using Node.js:
```
const { createPool } = require("mysql");


const pool = createPool({
    host:'localhost',
    user:'root',
    password:'',
    database:'<dbname>',
    connectionLimit:10
});

pool.connect((err) => {
  if(err){
    console.log('Error connecting to Db');
    return;
  }
  console.log('Connection established');
});

module.exports = pool;

```

Original source: *[https://www.phpcodingstuff.com/blog/how-to-connect-mysql-database-with-node-js.html](https://www.phpcodingstuff.com/blog/how-to-connect-mysql-database-with-node-js.html)*
My life ,I don't know what to do next?
Tags: help, developer
Published: 2021-02-10 02:46:21

Hey everyone,

I need a immediate job or internship, my family situation is not so good,I am undergoing in a super depressed condition and in a condition where our economical situation is not so good I applied many jobs in the LinkedIn but no response or cold reply.

So please help me to get a job or internship as I am currently in 3rd year of my computer science I can do work remotely.

Everytime from day to night quarreling happens in my house,I don't find a way to get rid off it,due to this I got depression for which I am undergone medication and I think that I don't know what to do?

Eating a sleep pill every day to sleep.i need some money to survive so if you can help me in some way with a job or whatever I please.

Currently I am in a assignment task with a company but it almost 1 month and I don't get paid so please at least someone I want to move from here my house.

I have experience in deep learning, machineearning and web development to deploying models.

Hopefully you can help me to get a #internship #jobs #webdevelopment #deeplearning #computerscience #connections #connections #jobsearch #linkedin #work #hiring #help #career #careers.

my resume https://drive.google.com/file/d/17IiF9h5ghNefRVy6KbHLckPCoq5saXSd/view?usp=drivesdk
How to get logs from all pods of a service in a cluster?
Tags: kubernetes, pod, service, log
Published: 2021-02-10 02:38:18

## Background

You deployed your app or service to a kubernetes cluster and with multiple instances, and you want to quickly search some logs by keyword. But the service is running on multiple instances in the cluster, so we need a way to gather the relevant logs from all instances instead of pod by pod.

## Fake "Solutions"

By googling you might get some answers like 

```
kubectl logs service/your-service-name | grep "xxx"
```

But this command is not you want, because it just search the log from one pod among the multiple instances. So if you get empty result it doesn't mean there were no relevant logs.

Or someone encourage you execute the following:

```
kubectl logs -l app=your-app-name | grep "xxx"
```

This might or might not work, it depends on how the app name was defined in the `deployment` file, if the app names are different across the instances, because for example, an unique suffix will be appended to the common readable name for each pod. In this case you will never get any logs by the previous command.

## Better way

If your deployment file gives unique names to each instance, then you need to first get which labels are fixed across different instances. For example, you can randomly choose a pod, and execute:

```
kubectl get pod/your-pod -o template --template='{{.metadata.labels}}'
```

This command will give you result similar to 

```
map[branch:develop namespace:jeff-tian pod-template-hash:54ff684c58 role:cool-app run:cool-app update-timestamp:1608695126059]
```

From the result we can see that the role is fixed, so we can get the logs in the following way:

```
kubectl logs --selector role=cool-app | grep "xxx"
```

## Even better way

Send logs to Elasticsearch, and query the logs through Kibana. But this way requires the deployment and integration with ELK, and if you send the logs in real time (for example, using pinojs/pino-elasticsearch), then there is no log latency, only need to change a few application code. If you don't want to change the code, then you can use, filebeats for example, to gather the logs, but in this way you need to solve the log latency challenge. 

Comparing to get the logs by the command line, ELK way is obvious more powerful yet need more work to do, which worth a dedicate post to share it in the future.
Unit testing controllers with User dependency on .Net Core
Tags: dotnet, tdd
Published: 2021-02-10 02:33:47

Trying .Net Core 5.0, I’ve set some playground rules. One of them is “let’s do this with Test Driven Development”, cool right? But I've found a constraint when it comes to the authenticated users / claims dependencies.
[Check the article on Medium!] (https://rudirocha.medium.com/unit-testing-controllers-with-user-dependency-on-dotnet-core-ba7fc5fdd6f7)
Display a GitHub repo in VSCode without cloning it 💪
Tags: github, vscode, productivity, programming
Published: 2021-02-10 02:31:05

# github1s One second to read GitHub code with VS Code

**Github1s** stands for **One second to read GitHub code with VS Code**

Today I discovered a small project on GitHub that allows you to easily read a git repository in VSCode without cloning it.

👉 [**Github1s**](https://github.com/conwnet/github1s) allows you to read a GitHub project with an online version of VSCode.

👉 You just need to add **1s** after GitHub and press Enter in browser address bar for any repository you want to read.

For example, for the repository [https://github.com/matchabot/matcha-bot](https://github.com/matchabot/matcha-bot)

You can add 1s to GitHub and the address becomes [https://github1s.com/matchabot/matcha-bot](https://github1s.com/matchabot/matcha-bot)

![Screen Capture](https://github.com/raphaelmansuy/til/blob/main/github/screen1.png?raw=true)

The project is available at [https://github.com/conwnet/github1s](https://github.com/conwnet/github1s)

Enjoy 🎉 

Credits for the picture 
[Yancy Min](https://unsplash.com/@yancymin)

For github1s
[conwnet](https://github.com/conwnet)
Looping with for...of and While Loops
Tags: javascript, codenewbie, webdev, beginners
Published: 2021-02-10 02:28:51

# Looping with for...of

# **Terminology**

---

- **`for...of`**: A technique we can use to loop through arrays, strings, and other types of iterable objects.

# **Examples**

---

### **Example Using an Array**

```jsx
const array = [0,1,2,3,4,5];
let doubledArray = [];
for (const element of array) {
  doubledArray.push(element * 2);
}
doubledArray;
```

### **Example Using a String**

```jsx
const consonantString = "bdfmxtgl"
let vowelizedString = "";
for (const letter of consonantString) {
  vowelizedString = vowelizedString.concat(letter + "a");
}
vowelizedString;
```

# While Loops

**Terminology**

---

- **`while`**: A type of loop that runs until a condition is met.

# **Examples**

---

### **Example of `while` Loop**

```jsx
let number = 10;
while (number > 0) {
  console.log(number);
  number --;
}
console.log("Blast off!")
```

### **Example of `do...while` Loop**

```jsx
let number = 10;
do {
  console.log(number);
    number --;
} while (number > 0);
console.log("Blast off!");
```
Entendendo como funciona o Set do Javascript.
Tags: javascript, braziliandevs, programming, webdev
Published: 2021-02-10 02:01:29

Exatamente hoje dia 09/02, me deparei com o seguinte problema:

Eu deveria pegar um array com os nomes das categorias do produtos e seta-las dentro do filtro da table, usando os components da ANT Design of React, (O que é ANT Design? É uma biblioteca React UI que contém um conjunto de componentes e demos de alta qualidade para a construção de interfaces de usuário ricas e interativas, https://ant.design/).

Basicamente eu deveria poder fazer um filtro nos produtos pelas categorias, mas como alguns produtos tem a mesma categoria, como por exemplo os itens/produtos "computador" e "celular", que estão na mesma categoria, "eletronicos".
Eu tinha por exemplo esse array
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/89t2a4nceghd6kydznv8.png)

Eu estava fazendo assim pra pegar os dados, setar no filters:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hbj1nf1qwz5t91f52lx8.png)

O que acontecia era que o nome eletrônicos se repetia várias vezes, de acordo a quantidade de itens que fossem da mesma categoria:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r1mvscjrabkk6bktwalj.png)

Ai que entra no "Set", lembra que eu tava passando 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/onhmf4pii54q51xao74d.png)
Aqui ele tava me retornando todos os dados que fossem relacionados a categoria, ou seja, se houvesse categorias repetidas, iria vir os nomes repetidos.
O que eu fiz? usei o "Set", O Set é uma estrutura de dados muito utilizada em várias linguagens de programação que, por padrão, não aceita valores repetidos. Ao contrário do array ou do List.
Como cada valor no Set deve ser único, nesse meu caso ele é muito apropriado, por que o que eu queria era literalmente limpar o array e remover os valores repetidos.
Ficou assim:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d7v9fd4eq8emz7cm0xkv.png)

Além disso utilizei o Spread Operator para criar um novo array com os valores do nosso Set (que não aceita valores repetidos).
Resultado:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rkggkbr3w5e5ouaqh15g.png)

Foi a maneira mais simples e facil que encontrei de resolver meu problema, mas me conta ai, como você faria?
Se gostou comenta ai e comparatilha...

Forte abraço e me siga ai nas redes sociais...
https://www.linkedin.com/in/pablo-r-gomes/
https://twitter.com/PabloGomesDev
https://github.com/pablojr17
https://www.instagram.com/pablo___gomes/

Referências:
https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Set
https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Operators/Spread_operator
https://dicasdejavascript.com.br/javascript-como-remover-valores-repetidos-de-um-array/
componentDidMount() VS useEffect()
Tags: javascript, react
Published: 2021-02-10 01:49:41

# Introduction
These two were the bane of my existence this week, and I think now is as good a time as any to talk about them. 

# React
Starting off in React, hooks are usually far from our first lesson. We deal with Components and Pure Components before we typically find a reason to use Functional Components. It wasn't until after I started learning Hooks that I realized *they only work in Functional Components*. This was huge because the first case I ran into where I needed a convenient way to redirect to another page, which was with the `useHistory` hook from `react-router-dom`. A whole new world opened up for me, but not all was well...

# Conditional rendering
Here I am at a crossroads. This component needed to render based on a boolean. Is there a user signed in? Is their `id` equal to this `object.user_id`? If it's not, then I wanna `history.push("/")`!

But wait... `useEffect`, AND `useLayoutEffect` for that matter, will fire after the conditional rendering. Therefore, the `object.user_id` will never exist. Even with `componentDidMount()`, the conditionals run while the component mounts!


# When both go wrong...
I took a different approach when I realized that neither tool would work for me. I required a conditional with my server response. Checking for an error before rendering to the page.
As it turns out, there are cases when certain code needs to be validated before API calls and hooks in general. 

My workaround though? Put redirects in the API call rather than returning it with a component. Chances are, it's better to redirect before state has a chance to update your pages if a user was never authorized to view that content to begin with!

Here's a small snippet in case it helps anyone out there!
```react
    useEffect(() => {
        let listID = props.match.url.split("/")[3];

        api.list.editUserListByUrl(listID)
        .then(resp => {
            if(!resp.err) {
                setUserID(+resp.listitem.user_id)
                setUrl(resp.listitem.url)
                setDescription(resp.listitem.description)
            } else {
                history.push("/dashboard");
            }
        })
    })
```

Happy Tuesday, everyone!
(repost) I just deved my 1st ever game! Thoughts?
Tags: mobile, gamedev, android
Published: 2021-02-10 01:23:46

After two long years of work, I am proud to announce i finally finished my first ever game!!! IDK why my last post was deleted but I am posting again as I need your professional opinion/feedback! Please be brutally honest, I want to improve! Thanks a lot!

Visit www.shedgame.com for more info!