teleren/devto huggingface dataset:
🚀 **Unlocking the Power of DOM Manipulation with JavaScript** 🚀
Published: 2024-05-21 13:31:20

Today, let's dive into the fascinating world of DOM (Document Object Model) Manipulation using JavaScript. Whether you're a seasoned developer or just starting out, mastering DOM manipulation is a game-changer for creating dynamic and interactive web experiences.





### What is DOM Manipulation? 🧐



The DOM is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. 





### Why DOM Manipulation Matters 🌟



1. Dynamic Content: Change text, images, and other elements on the fly.



2. Interactive Elements: Create interactive forms, animations, and user-driven experiences.



3. Real-time Updates: Update content without reloading the page, enhancing user experience.





#Common DOM Manipulation Techniques 🛠️



1. Selecting Elements:



  - `document.getElementById('id')`: Selects an element by its ID.

  - `document.querySelector('.class')`: Selects the first element that matches a 



CSS selector.

  - `document.querySelectorAll('div')`: Selects all elements that match a CSS selector.





2. Modifying Content:



  - `element.textContent = 'Hello, World!'`: Changes the text content of an element.

  - `element.innerHTML = '<p>New HTML content</p>'`: Changes the HTML content of an element.



3. Changing Styles:

  - `element.style.color = 'blue'`: Changes the style of an element.



4. Creating Elements:

  - `let newElement = document.createElement('div')`: Creates a new element.

  - `parentElement.appendChild(newElement)`: Adds the new element to the DOM.





5. Event Handling:

  - `element.addEventListener('click', () => { alert('Clicked!'); })`: Adds an event listener to an element.





#Practical Example: Toggle Dark Mode 🌑



```javascript

const toggleButton = document.getElementById('toggle-dark-mode');

const body = document.body;



toggleButton.addEventListener('click', () => {

 body.classList.toggle('dark-mode');

});

```



In this example, clicking the button toggles the `dark-mode` class on the body element, changing the website's theme.





### Conclusion



Mastering DOM manipulation with JavaScript opens up a world of possibilities for creating responsive, interactive web applications. It's a foundational skill that every web developer should have in their toolkit.



Have you experimented with DOM manipulation? Share your experiences and tips in the comments! Let's learn and grow together. 💡



#JavaScript #WebDevelopment #DOMManipulation #CodWith #KOToka

 #KEEPmoving
"Top Residential Plumbing Services in Gainesville, VA"
Published: 2024-05-21 13:30:29

Liberty Plumbing is a top Residential **[Plumbing Company Gainesville VA](https://www.libertyplumbinginc.com/services/plumbing/)**, known for its exceptional service and commitment to customer satisfaction. With a focus on reliability and quality, our skilled team delivers comprehensive plumbing solutions tailored to meet the needs of homeowners. Trust Liberty Plumbing for professional service and peace of mind in every residential plumbing project.
Python Progress.
Tags: newbie, learning, learningpython, beginners
Published: 2024-05-21 13:20:26

I want share my progress with fellow newbies here. I been learning python for past 3 months. So far I have done the following.

1. Create GUI system monitor, using ttkbootstrap.
2. Simple Kanban app, GUI.
3. A quiz game. Not GUI
4. A Number Guessing Game. Not GUI.

I watching a tutorial of Tech with Tim, he has this 9 hours videos from basic to advace, total 21 project, But I have already tired with basic 3.
HOW A BLOCKCHAIN NETWORK WORKS
Published: 2024-05-21 13:14:10

We now know what a blockchain is and where it can be used, so the next thing is how does this Blockchain even work. This is the question I’ll be answering in this writeup.

Let’s start with an example, imagine a School where the punctuality of teachers are written down in a diary. Every teacher’s name and the time they came to school that day is penned down. Every teacher can see the names of their colleagues and time they came to school. When a name and time is written down it cannot be changed or altered. Also this diary is not controlled by a central authority in the school but it’s distributed across every office and desk of the school. So with this, no teacher can claim they came to school a particular day earlier. This is a clear example of how a blockchain works.
In the world of Blockchain Technology, this school can be a group of people sharing data across various computers or a group of people carrying out financial transactions like Bitcoin or any other crypto currency. The names can be assets or items of value like contract, money, votes records of sales etc.
So in essence a blockchain network is one that ensures that our data or information in the network are
1.Decentralized - that is, not So in essence a blockchain network is one that ensures that our data or information in the network are controlled by a central authority.
2.Transparent - Everyone on the network can see what’s going on.
3.Immutability/ Security - When data is entered into any Blockchain, it cannot be changed. We all like our values to be well secured right? Yes! this is certainly achieved in Blockchain as these our assets are encrypted through cryptography.

In Conclusion, Blockchain network creates a more secured, easy and comfortable way of storing information and carrying out transactions. This is certainly the future of the Monetary systems in our world.
Sincere appreciation to you for reading this, please do leave a clap.
God bless you.
AI Chat-Bot with pinecone vector DB
Tags: vectordatabase, ai, genai, python
Published: 2024-05-21 13:02:20

Vector Databases like pinecode is a good candidate to store your custom data, that you want to use in your next AI application.

In the blog post i will be using pinecone vector database which is easy to use and its a cloud native.

Also i will be using openAI apis as my LLM model.

First get your pinecone API Key - https://app.pinecone.io/organizations/-/projects

You will need openAI API key as well to call openAI models

Install below python libs

```
!pip install langchain
!pip install pinecone-client
!pip install openai
!pip install pypdf
!pip install tiktoken
!pip install langchain-community
%pip install --upgrade --quiet  langchain-pinecone langchain-openai langchain
from langchain.document_loaders import PyPDFDirectoryLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.embeddings import OpenAIEmbeddings
from langchain.llms import OpenAI
from langchain.vectorstores import Pinecone
from langchain.chains import RetrievalQA
from langchain.prompts import PromptTemplate
from langchain_community.document_loaders import TextLoader
from langchain_openai import OpenAIEmbeddings
from langchain_text_splitters import CharacterTextSplitter
import os
```

We can upload a folder in current workspace and we can upload a any pdf file with your data into that folder. This will be your custom data to train your chat agent

```
!mkdir pdfs
loader = PyPDFDirectoryLoader("pdfs")
data = loader.load()
```

Split the loaded data into smaller chunks before inserting into the vector database

```
text_chunks = text_splitter.split_documents(data)
```

Set your keys

```
os.environ["OPENAI_API_KEY"] = "<Key>"

os.environ["PINECONE_API_KEY"] = "<Key>"
```

Use openAIEmbedding to embedded your texts

```
embeddings = OpenAIEmbeddings()
```

Use langchain pineconevectorstore module to store data into the pinecone.
Before that make sure that you have created a new index in pinecone database with a namespace, in my case "roshan"

```
from langchain_pinecone import PineconeVectorStore
index = "vectorone"
docsearch = PineconeVectorStore.from_documents(text_chunks, embeddings, index_name=index,namespace='roshan')
```

Now you check your pinecone database you should be able to see data


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

You can run your query to ask questions around your uploaded pdf data

```
docsearch.as_retriever()
query = "what is Scaled Dot-Product Attention?"
docs = docsearch.similarity_search(query)
llm = OpenAI(temperature=0)
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.as_retriever())
qa.run(query)
```

You can simply build small commandline chatbot to see how its working.


```
import sys
while True:
  user_input = input(f"Input Prompt:" )
  if user_input == "exit":
    sys.exit()
  if user_input == '':
    continue
  result = qa.run({'query': user_input})
  print(result)
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hes5yh8b76r3ih6kqiig.png)
Get Coin Master Free Spins and Coins [Spin Generator]
Tags: beginners, productivity, gamedev, discuss
Published: 2024-05-21 13:01:37

Coin Master is a well-known mobile video game. It is a strategy and casual-based game and is available for Android and iOS. Gamers need to collect spins and coins to play the game like professionals. So, here you can get the ways to find and collect spins.

This page is for those Coin Master players who finding or struggling for spins. Because without spin, you can't use the Slot Machine in the game. Also, coins are very important to build the base or village and upgrade all items on them. You can find daily free spin links rewards and also it is easy to claim. Also, make sure all those rewards can expire within three days. So, collect the reward as soon as possible.

## Features

There are lots of features and benefits available on those spin link rewards. Here we listed a few of them below.

- All those reward spin and coin links are completely free to collect.
- We already tested and each of them works pretty well. So, you get the granted spin and coin on the game.
- Easy to collect by simply tapping on the link. It will automatically open the game and save the bonuses on the inventory.
- You can get a notification when we add a new link and it only works on your subscription to our news later.
- Get all the rewards quickly for the users.
How to create VM with PowerShell
Tags: beginners, devops, github, cloud
Published: 2024-05-21 12:48:21

## PowerShell
PowerShell is a cross-platform task automation framework developed by Microsoft, consisting of a command-line shell and an associated scripting language. It is designed to automate the management of computer systems and build, test, and deploy solutions, often in DevOps and IT environments.
## Virtual Machine
A Virtual Machine (VM) is a software-based emulation of a physical computer. It runs an operating system and applications just like a physical machine, but it is executed on a host system using virtualization technology. VMs allow multiple operating systems to run concurrently on a single physical computer.

Steps to create a Virtual Machine from PowerShell
Step 1
On Azure portal click on Cloud Shell
![Cloud shell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8mp98k2f02wtoxuoahj.png)

Step 2
click on PowerShell, if not click on the dropdown at the top of the shell to change to PowerShell
![PowerShell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjfss1hw5stzln37z3z4.png)

Step 3
click on Mount a storage, choose your subscription and click Apply
![Apply](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qifrjpo2j1q9s0ce4sxd.png)

Step 4
If you dont have any storage account, click i want to create storage account and click next
![storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wua658vp7sq7v4cjfz4a.png)

Step 5
Input Resource group, Region, Storage Account name and File share name
![resource group name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yesunjmwkg51bh9rwitv.png)

NOTE: wait for it to deploy
Step 6
Enter the following code to create a Resource Group New-AzResourceGroup -Name 'inputresource group name' -Location 'enter location'
![resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srzlcn00r20i168ocj5s.png)

Step 7 (Final)
Enter this code: "New-AzVm", and entercredentials
![vm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8hjqy7j80zsjmk2q5t9.png)

Check your your resource group to see the VM created
"Unlock Your Dream Home: Discover the Ultimate Real Estate Destination with Homes247"
Tags: react, python, productivity, news
Published: 2024-05-21 12:43:00

Welcome to [Homes247](https://www.homes247.in/), your one-stop destination for all things real estate! Discover your dream home, connect with top professionals, and stay informed with our expert insights. Whether you're buying, selling, or investing, we've got you covered. Start your journey with Homes247 today!
Boost your career with Reltio Training
Tags: webdev
Published: 2024-05-21 12:41:47

We Are Providing Online Reltio Training
You Can Attend FREE DEMO Classes!

We Have a Pool of Expert Trainers worldwide on all the Technologies to Train the Students.

We offering Training services to Major IT giants and to Individual Students Worldwide.

**About Our faculty:
**
We have Excellent Reltio instructor who have real time experience plus expert Orientation in Online Training.

**About Reltio Training :
**
Reltio training offered by techsolidity helps you gain complete knowledge of this powerful cloud-native master data management solution. Our certified Relto expert makes you professional in using Reltio to connect different data sources, clean messy data, and turn complex data into useful information. This Reltio course helps you learn major concepts such as Reltio fundamentals, Architecture, Entity types, Sources, Crosswalks, Attributes, Matching, Reference Data Management, Survivorship, Data Profiling Cleansing, and a lot more. Learn from Cloud MDM expert practitioners by registering in our Reltio certification course.

Reltio is an advanced cloud MDM solution and comes with next-generation features to support the growing requirements of master data management for organizations. It offers various MDM services such as Identity Resolution, Dynamic Survivorship, Data Quality, Universal IDs, Enterprise Data Management, Hierarchies, Connected graphs, Progressive Stitching, Data Governance, and more

Schedule and Attend Free Demo here! TechSolidity [Reltio Training](https://techsolidity.com/reltio-training)

**Along with Training, We offer you:
**
Interactive Learning at Learners convenience
Industry Savvy Trainers
Real Time Methodologies
Topic wise Hands-on / Topic wise Study Material
24/7 system access
Best Practices /Example Case Studies
Support after Training a. Resume Preparation b. Certification Guidance c. Interview assistance
Recorded versions of sessions
About Techsolidity :

Techsolidity is an emerging e-learning platform that offers a wide range of upskilling programs worldwide. We design and develop learning modules for corporates and individuals that enable them to achieve considerable growth in their careers.

For any further assistance please contact below phone numbers and mail-id's @ 24/7

**Contact us :
**
Techsolidity

+91 8341166233

 info@techsolidity.com
What is Remote Code Execution (RCE)?
Published: 2024-05-21 12:36:17


![What is Remote Code Execution (RCE)?](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euza2hs4vvbag9qigdmp.jpg)

Remote Code Execution (RCE) attacks are a major threat in today's digital environment, enabling attackers to execute malicious code on systems remotely. This article provides an in-depth look at RCE attacks, their mechanics, potential impacts, and crucial prevention strategies.

###What is Remote Code Execution (RCE)?

RCE is a serious security vulnerability that allows attackers to run unauthorized code on a target system without needing physical access. By exploiting software vulnerabilities, attackers can execute their own code and gain significant control over compromised systems.

###How RCE Attacks Work

RCE attacks follow a typical sequence: attackers identify a vulnerable system, craft a malicious payload, and trick victims into executing it. Once the payload is executed, attackers gain unauthorized access, leading to potential data breaches, malware installation, system takeover, denial-of-service attacks, and lateral movement within networks.

###Impacts of RCE Attacks

The effects of RCE attacks are severe, including data breaches, malware deployment, system takeovers, and denial-of-service attacks. Such attacks can cause substantial financial losses, damage reputations, and disrupt operations for both individuals and organizations.

###Types of RCE Attacks

RCE attacks come in various forms, such as injection attacks, deserialization vulnerabilities, buffer overflow exploits, file inclusion vulnerabilities, and unvalidated requests. Each type leverages different software weaknesses to execute unauthorized code.

###Notable RCE Vulnerabilities

Significant RCE vulnerabilities include Log4Shell, Microsoft Word RTF Vulnerability, SolarWinds Supply Chain Attack, WannaCry Ransomware Attack, and Heartbleed Bug. These high-profile cases highlight the widespread risk posed by RCE threats.

###Mitigation and Prevention Strategies

Mitigating RCE threats requires proactive measures. Developers should follow secure coding practices, apply regular patches, and perform thorough code reviews. Users and organizations should prioritize software updates, provide user awareness training, deploy Web Application Firewalls (WAFs) and Intrusion Detection/Prevention Systems (IDS/IPS), enforce the principle of least privilege, and conduct regular security assessments.

###Final Thoughts

Although RCE attacks present significant challenges, proactive defense strategies can greatly reduce the risk of exploitation. By maintaining vigilance, adopting secure practices, and using advanced security solutions, individuals and organizations can protect critical data and systems from RCE threats.

In conclusion, understanding RCE attacks is essential for building strong cybersecurity defenses in an increasingly digital world. By staying informed and implementing effective mitigation strategies, individuals and organizations can enhance their resilience against the persistent threat of remote code execution vulnerabilities.
What is the TCAKE Token? Understanding Crypto's Utility Token Trend
Published: 2024-05-21 12:22:42

The rise of cryptocurrency has brought with it a new wave of innovation: utility tokens. These tokens serve a specific purpose within a project's ecosystem, offering benefits and functionalities to users. The [TCAKE token](https://www.coincarp.com/currencies/pancaketools/) is a prime example, but before diving into its specifics, let's explore the growing trend of crypto tokens.

## Why Create Crypto Tokens?

Crypto tokens offer several advantages for projects and users alike:

**Fundraising:** Tokens can be used to raise capital for development projects.
**Community Building:** Tokens incentivize user participation and foster a strong community.
**Access to Features:** Tokens can unlock exclusive features or services within a platform.

## What is the TCAKE Token?

TCake is the utility token of PancakeTools, a platform built on the Binance Smart Chain. PancakeTools empowers traders with advanced features to manage their activities on PancakeSwap, a popular decentralized exchange.

## Benefits of Holding TCAKE

Discounted Trading Fees: Enjoy lower trading fees on PancakeSwap.
Governance Rights: Participate in voting on the future of PancakeTools.
Passive Income: Earn rewards through staking or holding TCAKE tokens.

## Considering a Crypto Token for Your Project?

Developing a secure and effective crypto token requires expertise. **[Hiring experienced crypto token developers](https://www.coinsclone.com/hire-crypto-token-developers/?utm_source=TCAKE&utm_medium=d%2Cto&utm_campaign=Udhay)** ensures a smooth launch and a well-functioning token within your project's ecosystem.

## In Conclusion

The TCAKE token exemplifies the growing [utility token](https://coinmarketcap.com/alexandria/glossary/utility-token) trend. By understanding the benefits and complexities of crypto tokens, you can determine if one is the right fit for your project. If you decide to move forward, partnering with skilled crypto token developers is crucial for success.
Deal with large file in Unity Project
Published: 2024-05-21 12:21:46

# Introduction
I have been using Github since I became an engineer, but I had a problem with Github when I used Unity at first time. That is a large file in Unity project.
This post will show what is problem and how deal with it.

## Problem

### Restriction
There is the default restriction of github that player cannot upload move than 100.00MB file. However, Unity projects sometimes have move than 100.00MB like .dylib file. The result is to fail to push file.

## Solution

### Solution1 ~~ .gitignore ~~

By utilizing the .gitignore file, you can manage unnecessary files without uploading them to GitHub. This can also help you avoid uploading large files.

### Solution2 ~~ LFS ~~

If there are still large files, you will need to use Git Large File Storage that offered by Github. It can make users to upload move than 100.00MB.

## How to use LFS

1.Install LFS

In case Mac 
```
brew install git-lfs
```

2.Intall local repository 

```
git lfs install
```


3.Track Large File

```
git lfs track "*.dylib"
```

You will be able to upload the tracked file, even it is a large.
SHB
Published: 2024-05-21 12:11:14

Smash House is the place to be for all burger enthusiasts. Their menu boasts a variety of mouthwatering options, from classic cheeseburgers to innovative creations that push the boundaries of burger craftsmanship. But the highlight is undoubtedly the [smash house burger](https://www.smashhouseburgers.com/). With fresh ingredients, a perfectly smashed patty, and a secret sauce that ties all the flavors together, it's a must-try! Pair it with their crispy fries and a refreshing drink for the ultimate meal.
Digital Marketing Services in Hyderabad
Published: 2024-05-21 12:05:41

We are the Digital Marketing Agency
firm that provides a range of online marketing services designed to help businesses increase their online presence, reach their target audience, and achieve their marketing goals. We leverage various digital channels and tools to create, manage, and execute marketing strategies that drive traffic, generate leads, and boost sales. Here’s a detailed description of the services typically offered by a us
https://revsocdigital.com
Top European Countries for Internships in 2024
Published: 2024-05-21 11:57:47

Europe offers a wealth of opportunities for internships, each country with its unique advantages. Here are some of the top destinations for internships in 2024:

Spain: Known for its rich culture and booming industries, Spain offers a variety of internships in fields like tourism, business, and technology. Cities like Madrid and Seville provide dynamic environments for professional growth. Explore internships in Spain for more details.

Austria: With its stunning landscapes and historical significance, Austria is ideal for internships in sectors such as engineering, hospitality, and environmental sciences. Vienna and Salzburg are key cities for enriching career experiences. Check out internships in Austria to find the perfect fit.

The United Kingdom: Offering a diverse range of industries, the UK is perfect for internships in finance, media, and education. Cities like London, Manchester, and Edinburgh are hotspots for professional development. Discover internships in the UK to kickstart your career.