teleren/devto huggingface dataset:
Day 680 : How I Feel
Tags: hiphop, code, coding, lifelongdev
Published: 2023-01-24 22:49:53

_liner notes_:
- Professional : Woke up feeling pretty bad today. Had a meeting with my manager and he said to take it easy today. I just rested up and took a look at some code I wrote yesterday. Actually fell asleep during my lunch break.

- Personal : Last night, I submitted an application to a program. Let's see how it goes this time. I applied like 2 years ago and got rejected, but I've done a bunch more stuff last year. There's a lot of steps to go through for something I don't even get paid for. haha.

![The Lofoten Islands in Norway with a bunch of small land masses in the ocean with a larger on with a mountain and a snow covered mountain range in the distance ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a06j4eiq4vmp9lshct0c.jpg)

Since it took me a while to submit the application last night, all I did was watch some anime and went to sleep. Tonight, I want to get a starter project deployed and then watch some more anime. Maybe I'll go through some tracks for the radio show as well. I'll see how I feel.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube E28cY0FQMPQ %}
I don't know where the logic is to handle how Svelte can know about changes at compile time.
Tags: svelte
Published: 2023-01-29 11:16:12

Hello..
After reading this article, I understood how Svelte recognizes changes with the actual DOM.

Link: https://svelte.dev/blog/virtual-dom-is-pure-overhead

However, in the actual svelte source code, I can't find out what logic does the processing.

Can you tell me which file in the svelte source code handles that logic?
Ultrasonic sensor and Adruno Uno
Tags: electronic, adruino, cpp, programming
Published: 2023-01-29 11:13:42

## Introduction

Ultrasonic sensor is one of the coolest sensors out there, it is used for proximity or measuring distance. Ultrasonic sensor sends sound waves at a frequency that is too high for an human to hear, the waves are now reflected back at the sensor which helps to calculate distance of an object in front of the sensor based on the time. It has an eye-like design and of course is eye of robots as well! We can create a lot of things with Ultrasonic sensor once we learn how to program it using an Adruino board. So here we are going to create a device that measures distance between an object and the device itself. 

## Circuit diagram

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r345tok7phktfhv3w1gf.png)

Follow the circuit diagram given above

## Code

Now comes the most important part which is to program the circuit

```
const int pingPin = 7; // Trigger Pin of Ultrasonic Sensor
const int echoPin = 6; // Echo Pin of Ultrasonic Sensor

void setup() {
   Serial.begin(9600); // Serial terminal
}

void loop() {
   long duration, inches, cm;
   pinMode(pingPin, OUTPUT);
   digitalWrite(pingPin, LOW);
   delayMicroseconds(2);
   digitalWrite(pingPin, HIGH);
   delayMicroseconds(10);
   digitalWrite(pingPin, LOW);
   pinMode(echoPin, INPUT);
   duration = pulseIn(echoPin, HIGH);
   inches = microsecondsToInches(duration);
   cm = microsecondsToCentimeters(duration);
   Serial.print(inches);
   Serial.print("in, ");
   Serial.print(cm);
   Serial.print("cm");
   Serial.println();
   delay(100);
}

long microsecondsToInches(long microseconds) {
   return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds) {
   return microseconds / 29 / 2;
}
```

That is how we can program an Ultrasonic sensor with Adruino Uno.
Configurar DaisyUI con Vue3
Tags: tailwindcss, daisyui, vue, vite
Published: 2023-01-29 11:04:20

Con estos sencillos pasos tenemos configurado [DeisyUI](https://daisyui.com) en nuestro proyecto VueJS con Vite

## Crear proyecto

```
yarn create vite
```

> √ Project name: ... config-daisy-ui
> √ Select a framework: » Vue
> √ Select a variant: » JavaScript

## Dependencias de desarrollo

```
yarn add -D \
@vue/compiler-sfc \
autoprefixer \
daisyui \
postcss \
tailwindcss
```

## Archivos de configuración

> postcss.config.cjs

```
module.exports = {
  plugins: [require('tailwindcss'), require('autoprefixer')],
};
```

> tailwind.config.cjs

```
module.exports = {
  content: ['./src/**/*.{vue,js,ts}'],
  plugins: [require('daisyui')],
};
```

> src/tailwind.css

```
@tailwind base;
@tailwind components;
@tailwind utilities;
```

> src/style.css

```
@import './tailwind.css';
...
```


# Repositorio GIT

[vue 3 + vite + DaisyUI](https://github.com/jplantes/vue3-vite-daisyui)
The ultimate template for publishing ES modules
Tags: typescript, javascript, github, programming
Published: 2023-01-29 10:42:01

A template to create and deploy universally reusable modules within seconds! Build with Typescript, then use in any Typescript or Javascript project.

Start by [using the Github template](https://github.com/semicognitive/es-package/generate).

## Why
- Fast iterating thanks to [Deno](https://deno.land/), for built in Typescript debugging and bundling
- Easily import into [Replit](https://replit.com/), for an instant dev environment
- Immediately works for Deno, Bun, Node, Cloudflare Workers, etc.
- Publish to NPM in **_seconds_**

## It works
Example: I need to deploy a package, so I used this template to build [thefuz](https://github.com/semicognitive/thefuz).

In just a couple minutes, I used this template to:
- Open a Replit from the GitHub repo
- Create a [NPM Package](https://www.npmjs.com/package/thefuz)
- Create a [Svelte Repl](https://svelte.dev/repl/ba9befe7c7854b5a8b98e00a1bcbfd53?version=3.55.1)


NPM Package             | Svelte Repl
:-------------------------:|:-------------------------:
![NPM Package screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6blo3s4vbficrhhmrjc.png)  |  ![Svelte Repl screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b28faf4lps0xykvznx7d.png)

## End

Happy to answer any questions below, or on [Twitter](https://twitter.com/semicognitive). Happy programming!
Libraries in Solidity.
Tags: blockchain, web3, beginners, programming
Published: 2023-01-29 10:30:14

When you need to share code between Solidity Contracts, it's time to utilize Libraries.

Libraries are a great place to store functions that are common to many Smart Contracts. These functions can range from re-usable math functions to contract patterns and permissions.

Using libraries can:

Reduce new code, limiting the opportunity for bugs.
 
Save development time by not re-inventing the wheel. 

Secure your contracts with audited code and best practices.

*Save gas on deployments by making use of already deployed code.
 
 *Saving gas depends on how you use the library. Libraries can be deployed on their own, like contracts, and they can also be compiled into the contract bytecode directly.
key detection in javascript
Published: 2023-01-29 10:17:10

**intro**
when I've been coding games in javascript i was always looking for a way to detect key presses without it being depreciated.

**step 1**
the first step is to create the detector.
you can do this by:

```js
document.onkeydown = function (e) {
    console.log("key down");
};
```
now if you press any key it will log "key down"

**step 2**
to detect a certain key (such as q) we need to listen for the e.key value. This will change every time a different key is pressed.
you can do this by typing:

```js
document.onkeydown = function (e) {
    console.log(e.key);
};
```
now, say if you pressed w, it would log w or if you press b it would log b.

**step 3**
if you want to do something when a certain key is pressed you can use if statements:

```js
document.onkeydown = function (e) {
    if (e.key == "w") {
        console.log("up"); //logs up when w key pressed
    } else if (e.key == "s") {
        console.log("down"); //logs down when s key pressed
    }
};
```
now when i press W it will log "up" (like many 2d games w is up) and when i press S it will log "down"

**step 4**
enjoy and code until your heart's content.
Implement Caching in Angular with HttpInterceptor
Tags: angular, caching, httpinterceptor, rxjs
Published: 2023-01-29 09:55:04


![Caching with HttpInterceptor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48my5k0el0yonpeiq3id.jpg)

Learn how to implement **caching with HttpInterceptor** in Angular for improved performance and speed. Angular offers the HttpInterceptor class to intercept HTTP requests and cache responses. Follow these simple steps to implement caching with Angular HttpInterceptor:

**Take a quick look:** [Edit on StackBlitz ⚡️](https://stackblitz.com/edit/caching-with-http-interceptor?file=src%2Fapp%2Fapp.component.html)

**1)** Create a new Angular interceptor.

` ng generate interceptor cache`


**2)** Check if the request is cacheable by verifying it’s a GET request.

```typescript
private cache = new Map<string, any>();

intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
  if (req.method !== 'GET') {
    return next.handle(req);
  }
  // your code here
}
```

**3)** Response should be already in cache using the **Map object**.

```typescript
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
  if (req.method !== 'GET') {
    return next.handle(req);
  }
 
  const cachedResponse = this.cache.get(req.url);
  if (cachedResponse) {
    return of(cachedResponse);
  }
  // your code here
}
```

**4)** If the response is not in cache, send the request to the server and store the response in cache using the **tap operator**.

```typescript
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    if (req.method !== 'GET') {
      return next.handle(req);
    }
 
    const cachedResponse = this.cache.get(req.url);
    if (cachedResponse) {
      return of(cachedResponse);
    }
 
    return next.handle(req).pipe(
      tap(event => {
        if (event instanceof HttpResponse) {
          this.cache.set(req.url, event);
        }
      })
    );
}
```

By using caching with HttpInterceptor in Angular, you can reduce server calls and enhance the performance of your application. Optimize your Angular app now with this helpful caching technique.

---

**[Check out my website for more...](https://cagkanmert.com)**
Build These 5 Projects To Get Hired As A Junior React Developer 🤯🔥
Tags: react, javascript, webdev, beginners
Published: 2023-01-29 09:45:36

Are you looking to get hired as a junior React developer? Building projects is a great way to demonstrate your skills to potential employers 🚀

Here are 5 project ideas that will help you get hired as a junior React developer 🔥 

> Remember that you don't need to build all of them, even if you have 2-3 of these projects in your portfolio then that's good enough for you to get hired 

---


###1) Build a complex Todo/Task Manager Web App 📒

A complex to-do list or task manager app is a great project to build because it allows you to practice working with state and handling user interactions. 

You can also add features like real-time collaboration or offline support to make it more interesting.

![Todo Web App Using React](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xdqjk6ia7vllovsb3zr8.png)

---

###2) Build the UI of an E-Commerce Web App 🛒

Building an e-commerce website is a great project to build to showcase your ability to work with complex data and handle user interactions. 

You can use a library like React Router to handle routing and Redux to manage state.


![Ecommerce Web App Using React](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0by523hxu14ey4k8b58m.png)

---

###3) Build UI for a Admin Dashboard 👨‍💻 

Creating a dashboard to display data is a great way to demonstrate your ability to work with data visualization and handle complex state.

![Admin Dashboard Using React](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6i32zgwt6t4r3wikkx6t.png)

---

###4) Build UI for a Chat Web App 💬

Building a chat application is a great project to demonstrate your ability to work with real-time data and handle user interactions.

You can use a service like Firebase or Pusher to handle the real-time communication, and React for the frontend.


![Chat app using React](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8848x41gp1gqyyskehh3.png)

---

###5) Build a beautiful Weather Web App 🌤️

Building a weather app will help you practice working with APIs and displaying data in a user-friendly way. 

You can use an API like OpenWeatherMap to get weather data and display it in your app.


![Weather app using react](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99odiekb9esi0yaphwoi.png)

---

These projects will help you to demonstrate your knowledge and skills in React, and you can use them as a portfolio to showcase your ability to potential employers 🥳 

Remember, it is not only about the final product, but also about the process of building and learning, so don't hesitate to experiment and try new things 🦄

---

Hope this is helpful ✨

Do Like ❤️ & Save 🔖

---

Do 𝗙𝗼𝗹𝗹𝗼𝘄 me on **[Linkedin](https://Linkedin.com/in/rammcodes)** for more:
Tips💡+ Guides📜 + Resources ⚡ related to Programming and Web Development 👨‍💻

[![Ram Maheshwari (@rammcodes) Linkedin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlsfmflqibz3yam59jkk.png)](https://linkedin.com/in/rammcodes)

---

Do **Follow** me here on dev.to ✅
From Hobby to Hit: The Story of How a Passion for Memes Became the Meme Creator App
Tags: android, mobile, tools, startup
Published: 2023-01-29 09:45:32

I was always fascinated by the internet and all its quirks. I loved spending time browsing through funny memes and videos online and would often spend hours creating my own memes using basic editing tools. However, I was never satisfied with the quality of the memes I created and felt that there had to be a better way.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kcphi6eghrisyll5arum.jpg)

One day, I decided to take matters into my own hands and start learning how to program. I enrolled in a programming course and quickly became fascinated by the possibilities of creating my own software. During my free time, I started working on my first side project, which was to create a meme generator that was fast, simple, and easy to use.

As I progressed in my programming skills, my meme generator started to take shape. I added more and more features, including a large base of templates, adjustable text options, and the ability to add stickers. Before long, the meme generator was ready, and I was ecstatic to share my creation with the world.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o53bd5hn5is84z0ldys.png)

The launch of the Meme Creator app was kinda success. People loved the app's simplicity and ease of use, and it quickly became one of the most popular meme generators on the market. I was overjoyed to see the impact my app was having on people's lives and was proud to have created something that brought joy and laughter to so many.

And that's the story of how the Meme Creator app came to be - starting out as a fun hobby project, it evolved into a popular app that still brings smiles to folks everywhere.
waec and neco 2023
Published: 2023-01-29 09:43:02

[https://multischolar.com/neco-timetable/](https://multischolar.com/neco-timetable/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)
https://plaza.rakuten.co.jp/chenlee/diary/202301290001/
https://www.provenexpert.com/waec-and-neco-2023/
https://www.producthunt.com/@necoexams1
https://www.divephotoguide.com/user/necoexams/
https://wakelet.com/@necoexams
https://vocal.media/authors/necoexams
https://www.lifeofpix.com/photographers/necoexams/
https://seedandspark.com/user/necoexams
https://rosalind.info/users/necoexams/
http://phillipsservices.net/UserProfile/tabid/43/userId/196303/Default.aspx
https://app.roll20.net/users/11567237/necoexams
https://speakerdeck.com/necoexams
https://social.msdn.microsoft.com/Profile/necoexams
https://camp-fire.jp/profile/necoexams
https://plazapublica.cdmx.gob.mx/profiles/necoexams/activity
https://www.metal-archives.com/users/necoexams
https://storium.com/user/necoexams
https://trabajo.merca20.com/author/necoexams/
https://www.intensedebate.com/people/necoexams
https://www.mifare.net/support/forum/users/necoexams/
https://pinshape.com/users/2563343-necoexams
http://foxsheets.com/UserProfile/tabid/57/userId/119220/Default.aspx
https://www.kompasiana.com/necoexams
https://www.credly.com/users/waec-and-neco-2023/badges
https://www.myminifactory.com/users/necoexams
https://www.sqlservercentral.com/forums/user/necoexams
https://www.longisland.com/profile/necoexams
https://guides.co/a/neco-exams/
https://myanimelist.net/profile/necoexams
https://www.iheart.com/podcast/269-waec-and-neco-2023-107992974/
ChatGPT: The Future of AI-Powered Communication 🚀🔥
Tags: chatgpt, career, productivity, programming
Published: 2023-01-29 09:38:58

OpenAI has created a highly advanced language model known as ChatGPT. This model belongs to the GPT (Generative Pretrained Transformer) family and is based on deep learning and natural language processing (NLP) technologies. ChatGPT has been created to generate text responses to text-based input that is close to the way humans converse. This has been made possible by training it on a massive collection of text data which enables it to comprehend the context and purpose of a user's query and generate replies accordingly. 

One of the remarkable capabilities of ChatGPT is its capacity to generate text that is context-dependent. This means that it can generate appropriate and pertinent replies to a wide array of questions and requests, from simple factual queries to complex conversations on an extensive range of topics. 

Another remarkable attribute of ChatGPT is its potential to carry out various NLP tasks such as text summarization, translation, and text generation. This flexibility makes it an invaluable tool for a variety of uses, including conversational AI systems.
Predicting Boston Housing Prices using Regression Models
Tags: 100daysofdatascience, machinelearning, scikitlearn, regression
Published: 2023-01-29 09:27:26

I recently worked on a project where I used various regression models to predict the prices of houses in the Boston Housing dataset. The goal was to identify which model would perform the best in terms of accuracy.

The dataset consists of 506 samples and 14 attributes, including the median value of owner-occupied homes in $1000's. I performed data preprocessing and feature selection to prepare the data for model training.

I trained and tested six different regression models: Linear Regression, Ridge Regression, Lasso Regression, ElasticNet Regression, Decision Tree Regression, and Random Forest Regression. I used scikit-learn library and visualized the results using Matplotlib.

The best-performing model was Random Forest Regression, with an accuracy of 89%.

You can find the details of the project and the code in the notebook link attached below:

[Notebook Link](https://www.kaggle.com/code/anurag629/boston-house-prices-regression-model) 

## Sharing love and knowledge...
What advantages does React bring to web development when compared to using JavaScript alone?
Tags: javascript, react, typescript, beginners
Published: 2023-01-29 08:42:26

While it is possible to build web interfaces using plain JavaScript, React offers a number of advantages that can make the development process more efficient and maintainable. Some of the key benefits of using React include:

- **<u>Reusable Components:</u>** React allows you to create reusable UI components that can be easily composed to build more complex user interfaces. This allows you to write less code and make your application more modular and easier to maintain.

- **<u>Virtual DOM:</u>** React uses a virtual DOM, which improves performance by minimizing the number of changes that need to be made to the actual DOM. This can make your application faster and more responsive.

- **<u>State Management:</u>** React provides a centralized way to manage the state of your application, which can make it easier to understand and predict how your application will behave.

- **<u>Large Community: </u>**React is widely used in the industry and has a large community of developers that contribute to it. This means that there are many resources available to help you learn and use React, as well as many third-party libraries that can be easily integrated into your application.

So while it is possible to build web interfaces using plain JavaScript, React provides a number of features and tools that can make the development process more efficient and maintainable, especially when working on large and complex web applications.
Why do you need a data collector from RS485 to LoRaWAN?
Tags: lorawan
Published: 2023-01-29 08:34:31



In daily enterprise production, traditional serial devices such as RS485, RS232, RS422 and other interfaces have been widely used, but in actual automated production, it is often necessary to realize data communication of hundreds of meters or even thousands of meters. To realize remote monitoring, it is necessary to Will face these problems:

(1) The communication distance is too far

(2) Scattered data points

(3) The wiring in the networking is too complicated

(4) Wiring is highly restrictive

(5) The problem of line damage often occurs

(6) Difficult to find and repair

When the Internet of Things technology came out, this problem was solved by the [RS485 to LoRaWAN](https://www.cdebyte.com/Modem-RemoteIOmodule-RS485RS232IO) data collector. Using LoRa wireless technology and LoRaWAN gateway, the complicated wiring was successfully canceled, and wireless communication replaced wired communication.
What is @State in SwiftUI
Tags: swift, swiftui, ios, apple
Published: 2023-01-29 08:00:16

SwiftUI uses the @State property wrapper to allow us to modify values inside a struct, which would normally not be allowed because structs are value types.

```
struct PlayButton: View {
    @State private var isPlaying: Bool = false

    var body: some View {
        Button(isPlaying ? "Pause" : "Play") {
            isPlaying.toggle()
        }
    }
}
```
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2023-01-29 08:00:11

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259a186412.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q___: Why do developers use mechanical keyboards?

___A___: To strongly type their code.
 -->
Check 0r Find Armstrong Number in Java
Tags: java, beginners, programming, interview
Published: 2023-01-29 06:38:51

```
public class Arm {
    public static void main(String[] args){

      int num = 370;
      int temp = num;
      int sum=0;
      String power = Integer.toString(num);
      if(num == 0 ){
          System.out.println("Armstrong Number");
      }
      while(temp!=0){
          int digit = temp%10;
         sum = sum+(int)(Math.pow(digit,power.length()));
         temp = temp/10;
      }
      if (num == sum){
          System.out.println("Its a Armstrong Number");
      }else {
          System.out.println("Its not a Armstrong Number");
      }
    }
}

```
Output 
  Its a Armstrong Number