teleren/devto huggingface dataset:
BitPower Loop is an innovative blockchain technology designed
Published: 2024-07-14 12:29:51

🔹 Circular consensus: Different from PoW and PoS, transactions are verified through nodes in turn, improving processing speed and energy efficiency.
🔹 Smart contract cycle execution: Smart contracts automatically optimize execution, reduce costs, and improve efficiency.
🔹 Developer-friendly: Rich API interfaces and multi-language support, modular design, flexible construction of DApps.

With its unique technology and design concept, BitPower Loop has demonstrated great potential in the blockchain field and promoted the further development and popularization of blockchain technology.

#blockchain #BitPowerLoop #decentralization #smart contract #blockchain technology
Easy Ways to Render a List of Images: HTML vs. JavaScript
Tags: beginners, javascript, html
Published: 2024-07-14 12:31:09

Hi there 👋 

In this guide, I'll show you two approaches to rendering a list of images - one using only HTML and the other using JavaScript. While the HTML-only method works, using JavaScript makes the process much easier!

Let's start with the HTML-only approach. 

Imagine you want to display a few images on your website in a list, one by one. Your HTML structure could look as follows:

```HTML
/* HTML code */
<div class="img-container">
  <img src="link-to-the-image"/>
  <img src="link-to-the-image"/>
  <img src="link-to-the-image"/>
  <img src="link-to-the-image"/>
</div>
```
Every time you want to add a new image to the list, you need to manually insert a new `<img>` element with all the attributes.

How can JS make our life easier? Let's see!
With JavaScript we can create an array with the image links and dynamically generate <img> elements. 
Here's the updated HTML:

```HTML
/* HTML code */
<div class="img-container"></div>
```
And here's the JavaScript code to dynamically render the images:

```JS
// JavaScript code
const picturesLinksArray = [
"https://cdn.pixabay.com/photo/2020/10/29/03/22/dog-5695088_1280.png",
"https://cdn.pixabay.com/photo/2022/02/20/09/43/animal-7024108_1280.png",
"https://cdn.pixabay.com/photo/2022/02/20/09/36/animal-7024080_1280.png",
"https://cdn.pixabay.com/photo/2022/02/20/09/34/animal-7024072_1280.png"
];

// Get the container element from the HTML
const imgContainer = document.querySelector(".img-container");

// Create and append img elements for each image in the array
picturesLinksArray.forEach((link) => {
  const image = document.createElement("img");
  image.src = link;
  imgContainer.appendChild(image);
})
```
With this approach, next time you want to add a new image, you only need to update the array with the new image link. The JavaScript code remains unchanged, making the process much simpler and more efficient.

{% embed https://codepen.io/vivecodes/pen/RwzPObZ %}

## Conclusion

Using HTML alone to manage a list of images can quickly become cumbersome, especially as the list grows. JavaScript offers a more dynamic and scalable solution.
This not only saves time but also keeps your code cleaner and more maintainable.
From Shelf Help to Self Help: Mastering Productivity as Software Engineering
Tags: productivity, softwaredevelopment, webdev, learning
Published: 2024-07-14 12:32:59


**Introduction:**

Consistency and discipline are the cornerstones of success in any field, including software development. My teacher, Sir Omar Khan, taught me a powerful lesson: if you miss one class, you lose 10% of the content; miss two, and you lose 40%; miss three, and you have to start over. This principle applies to all areas of life, particularly in maintaining productivity and achieving personal development.

**The Journey Through Productivity Books:**

I've read many books on productivity, self-development, and business, such as: 

- Atomic Habits
- The 7 Habits of Highly Effective People
- Thinking Fast and Slow 
- How to Make Time
- The Compound Effect
- The 4-Hour Workweek
- $100 Startup 

These books provided a wealth of knowledge, and I also explored various productivity tools like Notion, Capacities, Tick Tick and Toggle Track. Despite this, I often felt frustrated and unproductive.

**The Struggle with Systems:**

I diligently created systems based on these resources, but I frequently found myself demotivated when I failed to meet my goals. During a quarterly review, I noticed a pattern: missing one goal led to self-doubt and inaction, which spiraled into further missed goals. The systems designed to foster growth instead became sources of frustration. It wasn't the strategies or tools that were flawed; it was my approach to using them.

**Simplifying the Approach:**

To make real progress, I realized I needed to simplify my approach. I began asking myself two critical questions before starting any task: "Does this add value to my life?" and "Is it necessary?" If the answer was yes, I took action immediately, often within two minutes. This shift in mindset helped me cut through procrastination and maintain momentum.

**Implementing the Pomodoro Technique:**

One practical method that significantly boosted my productivity is the Pomodoro Technique. Setting a timer for 50 minutes of focused work followed by a 4-5 minute break helped maintain my concentration. After two or three cycles, I found myself in a flow state, where work felt effortless. The timer was just a push to get started; once immersed in my tasks, productivity naturally followed.

**From Shelf Help to Self Help:**

The key lesson I've learned is that reading books and using productivity tools are only beneficial if we apply what we learn. Without action, these resources remain "shelf help" rather than "self help." Consistency, discipline, and immediate application transform knowledge into progress.

**Conclusion:**

For software developers and productivity enthusiasts, the path to mastering productivity lies in simplifying your approach, taking immediate action, and maintaining consistency. Be your own mentor, take full responsibility for your growth, and drive your life with purpose. This approach not only helps you achieve your goals but also brings fulfillment and continuous improvement.
Best Digital Marketing Institute In Sikandrabad: Just Digital Duniya
Tags: webdev
Published: 2024-07-14 12:35:30

Discover the [Best Digital Marketing Institute in Sikandrabad](https://www.justdigitalduniya.com/best-digital-marketing-institute-in-sikandrabad/) for comprehensive training and industry insights. Our expert instructors provide hands-on experience in SEO, SEM, social media, and analytics, equipping you with essential skills for today's digital landscape. Join our supportive community and gain practical knowledge through real-world projects. Whether you're a beginner or aiming to advance your career, our tailored courses ensure you excel in digital marketing. Enroll now and embark on your journey to success with the best in Sikandrabad.
BitPower Loop is an innovative blockchain technology designed to improve efficiency and scalability.
Published: 2024-07-14 12:36:18

🔹 Circular consensus: Different from PoW and PoS, transactions are verified through nodes in turn, improving processing speed and energy efficiency.
🔹 Smart contract cycle execution: Smart contracts automatically optimize execution, reduce costs, and improve efficiency.
🔹 Developer-friendly: Rich API interfaces and multi-language support, modular design, flexible construction of DApps.

With its unique technology and design concept, BitPower Loop has demonstrated great potential in the blockchain field and promoted the further development and popularization of blockchain technology.

#blockchain #BitPowerLoop #decentralization #smart contract #blockchain technology
Day3, 4, 5(OMG)of 100DaysOfJavaScript
Tags: javascript, beginners, 100daysofcode
Published: 2024-07-14 12:42:30

Little by little is better than perfect isn't it?
## What I did
* Continue watching the video
[Learn JavaScript](https://www.youtube.com/watch?v=PkZNo7MFNFg)

## What I learned
### Day3
Double equals and strict equal.
```
console.log(10 == 10); // True
console.log(10 == "10"); // True
console.log(10 === 10); // True
console.log(10 === "10"); // False
```

### Day4
Remembered switch.
```
var hoge;

switch(hoge) {
  case 1:
    console.log("hoge"); // If hoge == 1, output will be "hoge" and "hogehoge"
  case 2:
    console.log("hogehoge"); // If hoge == 2, output will be "hogehoge"
    break;
  case 3:
    console.log("fuga"); // If hoge == 3, output will be "fuga"
    break;
}

```

### Day5
Learned Object.
```
var exampleObject = {
  "hoge": "ほげ",
  "hogehoge": "ほげほげ",
  "fuga": "ふが",
}
/* Dictionary in Python might be similar data structure?
We can add a content with operation like below*/
exampleObject.fugafuga = "ふがふが";
// or...
exampleObject["fugafuga"] = "ふがふが";
// If additional element is same as last element, additional one is ignored.
// (It's just my guess. I've googled but I couldn't find information about it)
```
BitPower Loop is an innovative blockchain technology designed to improve efficiency and scalability.
Published: 2024-07-14 12:42:55

🔹 Circular consensus: Different from PoW and PoS, transactions are verified through nodes in turn, improving processing speed and energy efficiency.
🔹 Smart contract cycle execution: Smart contracts automatically optimize execution, reduce costs, and improve efficiency.
🔹 Developer-friendly: Rich API interfaces and multi-language support, modular design, flexible construction of DApps.

With its unique technology and design concept, BitPower Loop has demonstrated great potential in the blockchain field and promoted the further development and popularization of blockchain technology.

#blockchain #BitPowerLoop #decentralization #smart contract #blockchain technology
Best Digital Marketing Institute In Sikandrabad: Just Digital Duniya
Published: 2024-07-14 12:46:35

Discover url)the Best Digital Marketing Institute in Sikandrabad
 for comprehensive training and industry insights. Our expert instructors provide hands-on experience in SEO, SEM, social media, and analytics, equipping you with essential skills for today's digital landscape. Join our supportive community and gain practical knowledge through real-world projects. Whether you're a beginner or aiming to advance your career, our tailored courses ensure you excel in digital marketing. Enroll now and embark on your journey to success with the best in Sikandrabad.

https://www.justdigitalduniya.com/best-digital-marketing-institute-in-sikandrabad/
Setting up ollama 3
Tags: llm, ai, chatgpt, docker
Published: 2024-07-14 13:10:16

Here's a quick guide on how to set-up Ollama 3 upon your local Machine.

> But before moving forward, please make sure, you atleast have 8 to 12 GB of RAM.

##TL;DR
Get summary within seconds :: [Spin ChatGPT like LLM, ollama, setup on laptop within 5 mins.](https://youtu.be/W1zrOLfgPaA)

## Important links:

| Official Homepage | https://ollama.com/ |
|--------------|--------------|
| Ollama Github page   | [https://github.com/ollama/](https://github.com/ollama/ollama?tab=readme-ov-file) |
| Ollama Docker Hub  | https://hub.docker.com/r/ollama/ollama   | 
| Ollama Model Library | https://ollama.com/library    |
| Ollama C++ Inference | https://github.com/ggerganov/llama.cpp |
| Ollama Python Lib | https://github.com/ollama/ollama-python |
| Ollama JS Lib | https://github.com/ollama/ollama-js |


## Let's begin.
Go to the official docker hub repository of ollama
official docker hub :: https://hub.docker.com/r/ollama/ollama

Pull this image with
```
docker pull ollama/ollama
```

and if you wanted to run CPU only mode then try running
```
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
```
post this you are done!

It will start your prompt with CPU only mode.

## Leverage GPU?
But if you wanted to leverage your GPU as well, then stick further.

```
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \
    | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \
    | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \
    | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
```

### Install Nvidia related stuff
Install container toolkit
```
sudo apt-get install -y nvidia-container-toolkit
```

Setup docker to use Nvidia Drivers
```
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
```

### Done, start the container
```
docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
```


Also do not forget to try more model's upon [Ollama library](https://ollama.com/library)
SÜMBÜL EFENDİ SATILIK DAİRE
Tags: sumbulefendisatilikdaire, sumbulefendi, satilikdaire, satilik
Published: 2024-07-14 13:19:01

## SÜMBÜL EFENDİ SATILIK DAİRE

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nw0xua38ucuihuksebqy.jpg)
**[Sümbül Efendi Satılık Daire](https://www.emlakfatih.com/fatih-sumbul-efendi-satilik-daire/emlak-ilanlari/semt/34642)** https://www.emlakfatih.com/fatih-sumbul-efendi-satilik-daire/emlak-ilanlari/semt/34642
**[Fatih Emlak](https://www.emlakfatih.com/)** https://www.emlakfatih.com/
Sümbül Efendi Satılık Daireler. Kocamustafapaşa Sümbül Efendi Mahallesi Satılık Daire. sahibinden sümbül efendi satılık daire. fatih sümbül efendi satılık daire
React Interview Assignment-user-detail-app
Tags: javascript, react
Published: 2024-07-14 13:21:05

# user-detail-app
### Stage 1

You're going to build a web app using create-react-app and react-router.

Using the user data from the randomUser API, you will render a list of 10 users.

1. Each user's name will be displayed on the list.
2. Clicking on a user's name routes you to the corresponding user detail page, which consists of the user's photo, name, email address, state, and country.

**Data to display on the User Detail Page:**
- Photo
- Name
- Email
- Location (state & country)

**API URL:** `https://randomuser.me/api/`
**Query Param:** `results=10`

**Additional:** 
Consider how you can optimize the code.


### Stage 2

- Implement state management.
- Fetch the set of users only once. No network call when we move between pages.
- Add a button on the details page to mark a user as a favorite.
- On the home page, highlight favorite users with special CSS.
REPL in Nestjs
Tags: nestjs, nodej, repl, typescript
Published: 2024-07-14 15:39:27

---
title: REPL in Nestjs
published: true
description: 
tags: nestjs,nodej,repl,typescript
cover_image: https://docs.nestjs.com/assets/repl.gif
# Use a ratio of 100:42 for best results.
# published_at: 2024-07-14 13:20 +0000
---

One of the features of Nestjs is Tte REPL (Read-Eval-Print Loop) mode, a powerful tool that allows you to interactively test and execute code within the context of your NestJS application. This is particularly useful for quick experimentation, testing services, or debugging from the terminal. Here’s a step-by-step guide on how to use the REPL mode in NestJS:

create a new file `repl.ts`
```ts
import { existsSync, mkdirSync } from "node:fs";
import { join } from "node:path";

import { Logger } from "@nestjs/common";
import { repl } from "@nestjs/core";

import { AppModule } from "./app.module";

const logger = new Logger("Repl");

async function bootstrap() {
  const replServer = await repl(AppModule);

  // OPTIONAL: sets up persistant history file for repl, 
  const cacheDirectory = join("node_modules", ".cache");

  if (!existsSync(cacheDirectory))
    mkdirSync(cacheDirectory);

  replServer.setupHistory(
    join(cacheDirectory, ".nestjs_repl_history"),
    (error) => {
      if (error)
        logger.error(error);
    },
  );
}
bootstrap();

```

Then you can run the app in repl mode with :

``` sh
npm run start -- --entryFile repl
```
Even better, add a script on your `package.json`

```json
"start:repl":"npm run start -- --entryFile repl"
```

It will initiate an interactive server, from which you can easily access your nest app methods by getting them either as 
```sh
get(AppService).getAllPosts()
```

or

```sh
$(AppService).getAllPosts()
```
You can also navigate with the command history with ↕️ arrow keys

Read more at the [official documentation](https://docs.nestjs.com/recipes/repl)
React Interview Question
Tags: javascript, react
Published: 2024-07-14 13:36:14


---

### React Topics

1. **React Context**
2. **Hooks:**
   - `useState`
   - `useEffect`
   - `useReducer`
3. **Basics of React Router:**
   - Understanding React Router v6
   - How does React handle routing and what are some popular 
     routing libraries for React?
4. **Memoization Hooks:**
   - `useMemo`
   - `useCallback`
5. **Redux:**
   - Setting up Redux
   - Implementing Redux Dev Toolkit
6. **API Integration**
7. **Peer Dependencies:**
   - What are they?

### Advanced Questions

1. **What is a pure function?**
2. **What is a Higher-Order Component (HOC)?**
   - Examples of HOCs you have used.
   - Can you explain the concept of Higher Order Components 
     (HOC) in React?

3. **What is render props?**
4. **Custom Hooks:**
   - Difference between custom hooks, functions, and components.
5. **How does the Virtual DOM work in React?**
6. **What is reconciliation in React?**
7. **Controlled vs. Uncontrolled Components:**
   - Which one is better and why?
8. **What is memoization and how can it be achieved in React?**
9. **How do you handle asynchronous data loading in React?**
   - What is a async in React?
10. **Code Splitting in React:**
   - How to achieve it?
11. **What is package manager**?
    - What is NPM?
    - Can we add multiple version of NPM on system?
    - Can we implement React without NPM?
12. **React Props:**
    - What is the children prop?
13. **React Portals:**
    - What are they and why are they useful?
14. **Performance Optimization in React:**
    - Common techniques.
15. **Refs in React:**
    - How to create refs.
16. **Spread Operator (`...`) in React:**
    - What do these three dots do?
17. **Client Side Vs Server Side**
    - What is the difference between server-side rendering and 
      client-side rendering in React?
18. **React Routers**
    - How does React handle routing and what are some popular 
      routing libraries for React?

---
Seeking Feedback on My Portfolio Site
Tags: webdev, frontend, portfolio, feedback
Published: 2024-07-14 13:38:32

Hey Dev.to community!

I’m a frontend developer currently working on my portfolio site and could really use some feedback. My goal is to create a portfolio that will help me land a job as a frontend developer.

Right now, 3 out of the 4 projects listed are placeholders, but I plan to update them once the site is fully designed and functional. I’d appreciate any thoughts on the design, layout, and usability.

Here’s the link to my portfolio:[My Portfolio](https://jubeportfolio.netlify.app/)

Thanks in advance for your help!
I made a Infinite Tic Tac Toe , and its amazin....
Tags: webdev, javascript, programming, devlog
Published: 2024-07-14 13:41:42

https://infinitytictactoe.netlify.app 

So yeah , you know how to play tic tac toe 

And I hate it 

You see, now everyone knows tricks to win the game 

So both plays perfectly and its a draw ...

And i hate draw (i play for win and beat them hard)

So yeah I made this , after every move , the move played 7 moves before will be erased , so it will never fill and no draws , the only way to end it is to win or loose 


Try it leave your thoughts is comments 

Suggest next shit to build and post here ...

For now thanks for reading , see u later alligator
Kubernetes common errors
Tags: ibbus, kubernetes, commonerror, k8sfull
Published: 2024-07-14 13:47:10

1. **CrashLoopBackOff**:
 - **Description**: A pod repeatedly crashes and restarts.
 - **Troubleshooting**:
 - Check pod logs: `kubectl logs <pod-name>`.
 - Describe the pod for more details: `kubectl describe pod <pod-name>`.
 - Investigate the application's start-up and initialization code.

2. **ImagePullBackOff**:
 - **Description**: Kubernetes cannot pull the container image from the registry.
 - **Troubleshooting**:
 - Verify the image name and tag.
 - Check the image registry credentials.
 - Ensure the image exists in the specified registry.

3. **Pending Pods**:
 - **Description**: Pods remain "Pending" and are not scheduled.
 - Troubleshooting:
 - Check node resources (CPU, memory) to ensure there is enough capacity.
 - Ensure the nodes are labeled correctly if using node selectors or affinities.
 - Verify there are no taints on nodes that would prevent scheduling.

4. Node Not Ready:
 - Description: One or more nodes are in a "NotReady" state.
 - Troubleshooting:
 - Check node status: `kubectl describe node <node-name>`.
 - Review kubelet logs on the affected node.
 - Ensure the node has network connectivity.

5. Service Not Working
 - Description: Services are not accessible or routing traffic correctly.
 - Troubleshooting:
 - Check the service and endpoints: `kubectl get svc` and `kubectl get endpoints`.
 - Verify network policies and firewall rules.
 - Ensure the pods backing the service are healthy and running.

6. **Insufficient Resources**:
 - **Description**: Pods cannot be scheduled due to insufficient resources.
 - **Troubleshooting**:
 - Review resource requests and limits in pod specifications.
 - Scale the cluster by adding more nodes.

8. **PersistentVolume Claims Pending**:
 - **Description**: PVCs remain in a "Pending" state.
 - **Troubleshooting**:
 - Check if there are available PVs that match the PVC specifications.
 - Ensure the storage class exists and is configured correctly.
 - Verify that the underlying storage backend is healthy.

9. **Pod Stuck Terminating**:
 - **Description**: Pods get stuck in a "Terminating" state.
 - **Troubleshooting**:
 - Check for finalizers that might be preventing pod deletion.
 - Review the logs for shutdown hooks or long-running processes.
 - Force delete the pod if necessary: `kubectl delete pod <pod-name> --force --grace-period=0`.

10. **DNS Resolution Issues**:
 - **Description**: DNS lookups within the cluster fail.
 - **Troubleshooting**:
 - Check the DNS pod logs (e.g., CoreDNS): `kubectl logs <coredns-pod>`.
 - Ensure the DNS service is running: `kubectl get svc -n kube-system`.
 - Verify network policies and firewall rules do not block DNS traffic.