teleren/devto huggingface dataset:
Data locations in solidity
Tags: blockchain, solidty, javascript
Published: 2023-12-29 10:51:45

In Solidity, variables can be stored in different places based on their scope and the duration of storage. The main storage locations in Solidity are:

1. **Memory:**
   - **Scope:** Temporary data storage during the execution of a function.
   - **Duration:** Limited to the duration of the function call.
   - **Example:**
     ```solidity
     function add(uint256 a, uint256 b) external pure returns (uint256) {
         // Using memory for temporary variables
         uint256 result = a + b;
         return result;
     }
     ```

2. **Storage:**
   - **Scope:** Persistent data storage on the Ethereum blockchain.
   - **Duration:** Persists across function calls and transactions.
   - **Example:**
     ```solidity
     contract StorageExample {
         uint256 public storedData;  // Stored in storage

         function set(uint256 newValue) external {
             // Setting value in storage
             storedData = newValue;
         }

         function get() external view returns (uint256) {
             // Reading value from storage
             return storedData;
         }
     }
     ```

3. **Stack:**
   - **Scope:** Temporary storage for small, local variables within a function.
   - **Duration:** Limited to the function's execution.
   - **Example:**
     ```solidity
     function calculateSum(uint256 a, uint256 b) external pure returns (uint256) {
         // Using stack for temporary variables
         uint256 sum = a + b;
         return sum;
     }
     ```

Understanding the distinction between these storage locations is crucial for writing efficient and gas-optimized Solidity code. Memory is typically used for temporary variables within functions, storage is used for persistent data on the blockchain, and the stack is reserved for small, short-lived variables within a function's execution.
Seamless GPG Key Migration: Moving Your Keys Across Machines
Published: 2023-12-29 10:38:43

I am using gpg key for a while to encrypt my files as well as sign my git commit, recently I migrated to a new virtual machine, but I come accross this challenge, how can I migrate my gpg keys to my new beast machine ?

In the following article , I will share with you how I migrated my gpg keys.


![GPG Key Migration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eilmo0sskrpfuvf8xbzy.png)

There is a number of ways to backup or migrate your gpg keys :

## Easiest way - Migrate all
The first and the easiest way is to zip and copy all the gpg folder from one machine to an other, this will move all your configuration/keys, it is a good idea when the target machine is a newly fresh machine with no gpg keys yet.

Usually the gpg configuration files are located in the directory ~/.gnupg

## Migrate only specific keys
The second way is to move only a specific key.
1- Start by finding the key(s) id you want to migrate by using this command:

```
gpg --list-secret-keys --keyid-format LONG
```
It should returns something like:
```
sec   rsa4096/[**YOUR KEY ID**] 2024-03-30 [SC]
      ABCDEFGHIJKLMNOPQRSTUVWXYZ
uid                 [ unknown] username (KEY NAME) <user@domain>
ssb   rsa4096/ABCDEFGHIJKL 2024-03-30 [E]
```
After the key size rsa4096/ is your key ID.

2- Export the key in preparation to move it
```
gpg --export -a [your key id] > gpg-pub.asc
```
3- Prepare the secret key for migration (if password protected, you’ll be prompted to enter it)
```
gpg --export-secret-keys -a [your key] > gpg-sc.asc
```
4- Drag the key pair from the current directory to your USB stick or however else you move them (you can copy/past the first as they are just a text files).

5- Once on the new machine, import them
```
$ gpg --import gpg-pub.asc
$ gpg --import gpg-sc.asc
```

If password protected, you’ll be prompted to enter it

⭐⭐⭐ Enjoy your learning….!!! ⭐⭐⭐

**Support My Blog ☕️**
If you enjoy my technical blog posts and find them valuable, please consider [buying me a coffee at here](https://www.buymeacoffee.com/ridaeh). Your support goes a long way in helping me produce more quality articles and content. If you have any feedback or suggestions for improving my code, please leave a comment on this post or send me a message on my [LinkedIn](https://www.linkedin.com/in/ridaehamdani/).
New Preview of Azure DevOps Best Practice analyzer released
Tags: devops, opensource, cloud, security
Published: 2023-12-29 10:32:42

The new Public Preview of [PSRule.Rules.AzureDevOps](https://github.com/cloudyspells/PSRule.Rules.AzureDevOps) has just been released and its packed with new features. The scope of inspected branches and service connections has been expanded to include all. Build- and artifact retention settings are also included in this new 0.4.0 release of the best-practice analyzer for Azure DevOps.

Additional features include group export, rules to cover sensible use of some the default groups and full in-memory processing without writing any configuration data to disk with the new PassThru feature.

Check out the full [release notes](https://github.com/cloudyspells/PSRule.Rules.AzureDevOps/releases/tag/v0.4.0-preview1) on GitHub
Today i build annoying popup form from Scrimba
Tags: webdev, javascript, programming, beginners
Published: 2023-12-29 10:24:45


![Annoying popup form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1i454wi4famp31x90z0q.png)
This is how the popup form look like. 

```js
setTimeout(function(){
    modal.style.display = 'inline'
}, 1500)
```
Firstly, I set the `display: none` and then use `setTimeout` 1.5 second and the form will popup

```js
consentForm.addEventListener('submit', function(e){
    e.preventDefault()
    
    const consentFormData = new FormData(consentForm)
    const fullName = consentFormData.get('fullName')
    
    modalText.innerHTML = `
    <div class="modal-inner-loading">
        <img src="images/loading.svg" class="loading">
        <p id="upload-text">Uploading your data to the dark web...</p>
    </div>` 
    
    setTimeout(function(){
        document.getElementById('upload-text').innerText = `
        Making the sale...`
    }, 1500)
    
    
    setTimeout(function(){
        document.getElementById('modal-inner').innerHTML = `
        <h2>Thanks <span class="modal-display-name">${fullName}</span>, you sucker! </h2>
        <p>We just sold the rights to your eternal soul.</p>
        <div class="idiot-gif">
            <img src="images/pirate.gif">
        </div>
    `
    modalCloseBtn.disabled = false
    }, 3000)
  
}) 
```
Then the user MUST write down their name and email as i set the closed button `disable` status. The `disable` status will turn into false after user submit the form. 

![Accept and decline button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2rzwe5in5omc2znr805.png)

```js
declineBtn.addEventListener('mouseenter', function(){
    modalChoiceBtns.classList.toggle('modal-btns-reverse')
}) 
```

The 'Decline' button also can't work as i `addEventListener` mouse over action on the 'Decline' button. The 'modal-btns-reverse' class which is `flex-direction: row-reverse` will shift the 'Accept' and 'Decline' button position with the use of `classList.toggle('className')`. So user have no choice but have to click 'Accept' button to submit the form.

<u>Status 1 after submit</u>
![submit form status 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2wnx0trc1vaoaeqsxw0.png)

<u>Status 2 after submit</u>
![submit form status 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssjjh2qgsyfz15vs3thi.png)

<u>Status 3 after submit</u>
![submit form status 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvw0gvp3wxfudpoi44h2.png)

The use of `setTimeout` method change the status of the form by modify the `innerText` and `innerHTML`. Then the last status also took the form data of 'fullName' with the use of `FormData.Get()` method and then the closed button work again.

Eat, sleep, code, repeat!
Andrew Tan
StudyBud AI- Your Personal AI-Powered Study Assistant for Efficient Learning
Tags: ai
Published: 2023-12-29 10:09:50

Discover StudyBud AI, your personal AI study companion. Harness advanced AI to summarize textbooks, craft study guides, and offer solutions across all subjects. Experience having a 24/7 personal tutor ready to clarify any subject material. Dive into a smarter way of learning with StudyBud AI.

**Unleash the Power of AI on Your Academic Files**

Empower your study sessions with StudyBud AI. Upload any .pdf file containing text ask AI questions about your materials - be it textbooks, notes, case studies, or research papers. Let StudyBud AI assist with homework, creating chapter study guides, crafting examples, and providing solutions. Turn studying into an interactive experience with our AI-powered study assistant. Let’s make studying easy.

Affordable Subscriptions for Every Student: StudyBud AI Pricing
Prices tailored for the college budget, stepping up your academic game has never been so accessible.

**Diverse Solutions for Every Student's Needs**

•	Textbook Summaries
•	Examples to elaborate on topics
•	Math help
•	Study guide creation
•	Case Study Insights
•	Research Paper Assistance
•	Presentation Preparation

For more info: https://docusightai.com/product/studybud/
Beginners to Pro Engineering: Load-balancing for cyber security
Tags: webdev, beginners, architecture, security
Published: 2023-12-29 10:07:14

{% embed https://x.com/learnwithparam/status/1740673860281028845?s=20 %}

Let's stay connected on [twitter](https://twitter.com/learnwithparam) for daily knowledge sharing 🚀
Maximizing Business Efficiency with Anton P.’s Dynamics 365 Expertise
Tags: powerbi
Published: 2023-12-29 10:12:33

---
title: Maximizing Business Efficiency with Anton P.’s Dynamics 365 Expertise
published: true
date: 2023-12-29 09:56:51 UTC
tags: powerbi
canonical_url: 
---

Anton P.’s extensive experience in Dynamics 365 CE, along with his proficiency in Power Apps and Power Automate, allows him to create bespoke solutions for unique organizational challenges. Specializing in forex and crypto technologies, his solutions integrate crucial functions like Google analytics and KPI for enhanced performance and insights. Elevate your business strategy with Anton P.’s comprehensive Dynamics 365 expertise.

[Anton P. - MS Dynamics 365 CE Functional Solution Architect / MS Power Platform/Power BI expert | Hire Dynamics Developers](https://www.hiredynamicsdevelopers.com/consultants/anton-p-ms-dynamics-365-ce-functional-solution-architect-ms-power-platform-power-bi-expert/)

![](https://cdn-images-1.medium.com/max/1024/1*dpo8IXkUHg1hm8kTA5qhTw.jpeg)
Steel Frame Homes
Published: 2023-12-29 09:56:29

[Steel frame homes](https://prefabex.com/our-products/light-gauge-steel), also known as [steel home kits](https://prefabex.com/our-products/steel-frame-homes), are modern homes that use cold formed galvanized steel profiles as the main bearing building structure. The steel profiles are specially shaped through roll form machines to give different building elements such as wall panels, roof structure, joists, flooring chassis and ceiling panels. 

 In recent years, steel frame homes have seen a boom in popularity especially with the construction materials costs getting higher.

Steel framed houses are easy to install and construct compared to traditional home types. The construction time frame for this type of house is shorter than conventional building types, and these homes can be constructed in weeks rather than months.

Steel frame can be applied to form the 'skeleton' frame of a house or residential construction, combination consisting of vertical columns and horizontal beams which are riveted, bolted or welded together in a rectilinear grid.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yl6khcmaui138xbunak.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uqy92vr5sbr21sfd38jy.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ualbcr0zyf4x46265xsy.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tcf995c8gqvag8jrmc0.jpg)
Optimize Your Dynamics NAV with Expert BC/NAV Development
Tags: dynamics365
Published: 2023-12-29 10:14:15

---
title: Optimize Your Dynamics NAV with Expert BC/NAV Development
published: true
date: 2023-12-29 09:54:49 UTC
tags: dynamics365
canonical_url: 
---

Leveraging years of experience, a professional BC/NAV Developer offers consultancy in customizing Dynamics NAV and Business Central modules. This expertise in finance, supply chain, and sales modules ensures tailored solutions for your business needs, driving efficiency and growth. Enhance your Dynamics NAV system with top-tier development skills for impactful business results.

[BC/NAV Developer for Hire | Customize Dynamics NAV Modules](https://www.hiredynamicsdevelopers.com/consultants/anna-g-bc-nav-developer/)

![](https://cdn-images-1.medium.com/max/1024/1*GW6vPekdbbhH0FyYTY3WGw.jpeg)
Elevating CRM Strategies with Alexey P.’s Dynamics Expertise
Tags: dynamicscrm
Published: 2023-12-29 10:14:51

---
title: Elevating CRM Strategies with Alexey P.’s Dynamics Expertise
published: true
date: 2023-12-29 09:53:20 UTC
tags: dynamicscrm
canonical_url: 
---

Alexey’s experience in customizing Dynamics 365 CRM modules, including sales and customer service, positions him as a dynamic expert in the field. His approach focuses on technical and business aspects, ensuring tailored CRM solutions that align with your specific goals. Enhance your customer relationship management with Alexey’s expertise, driving innovation and efficiency in your CRM processes.

[Alexey P. - Dynamics CRM Developer | Hire Dynamics Developers](https://www.hiredynamicsdevelopers.com/consultants/alexei-p-dynamics-crm-developer/)

![](https://cdn-images-1.medium.com/max/1024/1*rFgjSCIyjzAlLV3v2r6b2Q.jpeg)
Punjab’s New Online Driving License System
Tags: webdev, javascript, programming, tutorial
Published: 2023-12-29 09:53:02

The Punjab’s [New Online Driving License](https://newslase.com/punjabs-new-online-driving-license-system/) System ,Punjab government recently unveiled its plans for a new driver licensing system that will take effect throughout the province starting January 1, 2024.

This new system aims to make the process of obtaining a driver’s license easier and more cost-effective, and licenses may now be obtained under a revised fee schedule.
[HttpServer series] Will it support the Performance, and Scale ?
Tags: java, frameworks, learnings
Published: 2024-01-02 11:44:18

---
title: [HttpServer series] Will it support the Performance, and Scale ?
published: true
date: 2023-12-29 09:51:43 UTC
tags: java, frameworks, learnings
canonical_url: https://blog.mandraketech.in/will-it-support-the-performance-and-scale
series: Project No-Web-Framework-No-Annotations using Java
---

What about "scale" and "performance" ?

SpringBoot, and all other frameworks publicise the fact that they can handle tens of thousands of requests every second.

The applications I have worked with, and I am assuming this is true for most applications sitting on the internet, and the internal applications used companies, none have ever needed that kind of scale.

Even 100 requests per minute is a lot of load. Don't manage to hit that many. Plus, if you really look at it, the whole "keep the cache warm" or "preload all the configuration" is good for large load applications. For the small ones, a few milli seconds do not matter.

So, I am willing to take the bet that holding data, and hence memory, may not be required. The JVM is really good at garbage collecting memory. So, lets use it to our benefit.

Also, if we do not maintain too much state, we can bank on functional programming, and scale out architecture, if we really start hitting performance. And, as is required by internal applications in the enterprises, the scale out gives us the high availability check mark.

I also rely on using `docker compose` . So, deploying more of light weight services in a `docker swarm` is easy. As is expanding the swarm dynamically.

The core assumption, at this time, since I do not know the end result, and am building this out as you, the reader, are reading it, is that my application is not internet scale. A few thousand transactions a day is as far as I will plan for.

But, maintenance of the application should be cheap, because, in all probability, we will revisit this application only a few times a year, in an optimistic situation. And every time will be a different set of eyes.

So, let's get started, and explore the Http Server API next time, and see where we need to begin.
Enhance Your CRM with Alexandre C.’s Expertise in Dynamics 365
Tags: dynamics365
Published: 2023-12-29 10:15:15

---
title: Enhance Your CRM with Alexandre C.’s Expertise in Dynamics 365
published: true
date: 2023-12-29 09:45:36 UTC
tags: dynamics365
canonical_url: 
---

Alexandre brings a wealth of experience in Dynamics CRM, agile methodologies, and various technologies. His customer-focused approach and proficiency in solution architecture, along with his ability to lead development teams, make him an asset for any Dynamics 365 project. Elevate your CRM system with his bespoke solutions, driving efficiency and achieving your business goals.

[Alexandre C. - CRM Associate Manager | Dynamics 365/PowerApps Consultant | Business Analyst | Hire Dynamics Developers](https://www.hiredynamicsdevelopers.com/consultants/alexandre-c-crm-associate-manager-dynamics-365-powerapps-consultant-business-analyst/)

![](https://cdn-images-1.medium.com/max/1024/1*jwkaHUMJzJ0Af_Qa7B460g.jpeg)
Elevate Your CRM with Dynamics 365 Expertise
Tags: dynamics365
Published: 2023-12-29 10:15:52

---
title: Elevate Your CRM with Dynamics 365 Expertise
published: true
date: 2023-12-29 09:44:13 UTC
tags: dynamics365
canonical_url: 
---

Alejandro’s expertise spans across Dynamics 365’s CRM, sales, marketing, and customer service modules. His skills in customization, integration, and problem-solving ensure that your unique business needs are met effectively. With his guidance, elevate your CRM system to drive real business value and stay ahead in your industry.

![](https://cdn-images-1.medium.com/max/1024/1*R0H1djy5pT7FQqSQ3egaQQ.jpeg)

[https://www.hiredynamicsdevelopers.com/consultants/alejandro-g-t-solution-architect-dynamics-365/](https://www.hiredynamicsdevelopers.com/consultants/alejandro-g-t-solution-architect-dynamics-365/)
Unleashing Business Potential with Microsoft Power Platform
Tags: microsoftpowerplatfo
Published: 2023-12-29 10:16:15

---
title: Unleashing Business Potential with Microsoft Power Platform
published: true
date: 2023-12-29 09:40:48 UTC
tags: microsoftpowerplatfo
canonical_url: 
---

In an era of digital transformation, our Microsoft Power Platform services offer innovative solutions for businesses of all sizes. From workflow automation to data-driven insights, our team of experts is dedicated to empowering your business.  
More — [https://www.hiredynamicsdevelopers.com/consultant-category/dynamics-power-platform-consultants/](https://www.hiredynamicsdevelopers.com/consultant-category/dynamics-power-platform-consultants/)
Object Creation in C# with the Factory Pattern
Tags: csharp
Published: 2023-12-29 09:40:28

C# Object Creation with the Factory Pattern

In C#, the Factory Pattern is a commonly used design pattern for object creation. It provides a way to abstract the process of creating objects, allowing flexibility and extensibility in the codebase. 

The Factory Pattern consists of a Factory class that encapsulates the creation logic. This class is responsible for instantiating objects and returning them to the caller. The idea is to separate the object creation code from the rest of the application, promoting loose coupling and easy maintenance.

To implement the Factory Pattern in C#, you start by defining an abstract base class or interface that represents the common behavior of the objects you want to create. This base class or interface should declare a method for creating instances of these objects.

Next, you create concrete classes that derive from the base class or implement the interface. Each concrete class represents a specific type of object that the factory can create. These classes implement the creation method declared in the base class or interface, instantiating the appropriate object.

Finally, you implement the Factory class. This class contains a method that takes some input parameters and decides which concrete class to instantiate based on those parameters. The Factory class then calls the creation method on the chosen concrete class and returns the created object to the caller.

Using the Factory Pattern in C# has several benefits. Firstly, it allows for flexible object creation, as the caller doesn't need to know the specific class of the object it wants to create. The Factory class takes care of determining the appropriate class based on the input parameters.

Additionally, the Factory Pattern promotes code reuse and maintainability. If you need to add a new type of object to your codebase, you simply create a new concrete class and modify the Factory class to handle the creation of this new object. This way, the existing code that uses the Factory class remains unchanged.

In conclusion, C# Object Creation with the Factory Pattern provides a structured and flexible way of creating objects in your applications. It separates the object creation logic from the rest of the code, promoting loose coupling and easy maintenance. By using the Factory Pattern, you can create reusable and extensible code that adapts to changing requirements.
FinalSheets: JSON API from Google Sheets to Cloudflare Workers
Tags: backend, cloudflare, json, sheets
Published: 2023-12-29 09:38:00

Google Sheets API Fetcher using Cloudflare Workers

This Cloudflare Workers script retrieves data from a Google Sheets spreadsheet using the Google Sheets API. The script accepts parameters such as spreadsheetId and sheetName through URL query parameters and fetches the corresponding data. The retrieved data is then transformed into a standard JSON format and returned as the HTTP response.

Usage: Deploy the Cloudflare Workers script using Wrangler or the Cloudflare dashboard. Access the endpoint with the necessary parameters in the URL query:

```
https://your-workers-subdomain.youraccount.workers.dev/?spreadsheetId=YOUR_SPREADSHEET_ID&sheetName=YOUR_SHEET_NAME&filterColumn1=ColumnName1&filterValue1=ValueToFilter1&filterColumn2=ColumnName2&filterValue2=ValueToFilter2
```
Replace your-workers-subdomain.youraccount.workers.dev with your actual Cloudflare Workers subdomain.

Example
```
https://api.ronnieaban.workers.dev/?spreadsheetId=1AhRiyMazpSLJBoJ7l32jyLQwZVdCkAJC6_UbL-mTxE8&sheetName=Kalimantan&filterColumn1=Home%20State&filterValue1=NY&filterColumn2=Major&filterValue2=Art
```

**Features:**
- Utilizes the Google Sheets API to fetch data based on provided parameters.
- Transforms the retrieved data into a standard JSON format.
- Allows easy integration into web applications or services requiring dynamic data from Google Sheets.
- Filter output JSON

How to Get API Key and Share Google Sheets:
1. Make Google API Key Youtube
2. Share your google sheets Youtube File, Share, Share with Others and at General Access change Restricted to Anyone with the link

How to Deploy: Put this code in the Cloudflare Worker, save and deploy

Important:
- Ensure that the Google Sheets API key is correctly set in the script.
- Customize the script as needed, adjusting the API key, URL parameters, and response formatting according to your specific requirements.

[Source Code](https://github.com/ronnieaban/FinalSheets)