teleren/devto huggingface dataset:
problem
Published: 2024-01-21 19:08:22

```js

const express = require('express');
const app = express();
const http = require('http');
const path = require('path');
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const validator = require('express-validator');
const session = require('express-session');
const MongoStore = require('connect-mongo');
const mongoose = require('mongoose');
const flash = require('connect-flash');
const passport = require('passport');


module.exports = class Application {
    constructor() {
        this.setupExpress();
        this.setMongoConnection();
        this.setConfig();
    }

    setupExpress() {
        const server = http.createServer(app);
        server.listen(3000, () => console.log('Hello from 3000 bitch!'));
    }

    setMongoConnection() {
        mongoose.Promise = global.Promise;
        mongoose.connect('mongodb://localhost/nodejscms');
    }

    setConfig() {
        app.use(express.static('public'));
        app.set('view engine', 'ejs');
        app.set('views', path.resolve('./resource/views'));

        app.use(bodyParser.json());
        app.use(bodyParser.urlencoded({ extended : true}));

        app.use(session({
            secret : 'mysecretkey',
            resave : true, 
            saveUninitialized : true, 
            store : MongoStore.create({ mongooseConnection : mongoose.connection })
        }))

        app.use(cookieParser('mysecretkey'));
        app.use(flash());


        app.get('/', (req, res) => {
            res.json('Hello BITCH!');
        })
    }
}

```
"'value' is Unavailable: Introduced in iOS 12.0" Xcode Error in React Native
Published: 2024-01-21 19:01:51

When working with React Native on iOS, you might encounter an error message like "'value' is unavailable: introduced in iOS 12.0." This issue arises when the deployment target specified in your project conflicts with the version of iOS you are trying to run your application on. In this quick guide, we'll explain the cause of this problem and provide a solution to fix it. You can just scroll down to the end if you are here for the solution though.

## The Error

The error usually occurs when your React Native project's minimum deployment target is set to a version lower than the iOS version you are using for development. This discrepancy can lead to compatibility issues with certain APIs or features introduced in later iOS versions.

## The Fix

To address this error, you can adjust the deployment target in your project's Podfile. The Podfile is a configuration file used by CocoaPods, a dependency manager for Swift and Objective-C projects.

Here's a step-by-step breakdown of the fix:

1. **Set the iOS Version:**
   Open your Podfile and add the following lines to set the iOS version:

   ```ruby
   IOS_VERSION = '12.4'
   ```

2. **Adjust Build Configurations:**
   Inside the `post_install` block, iterate through the build configurations and set the deployment target:

   ```ruby
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = IOS_VERSION
       config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
       config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
     end

     # Special case for 'RCT-Folly'
     case target.name
     when 'RCT-Folly'
       target.build_configurations.each do |config|
         config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
       end
     end
   end
   ```

   These adjustments ensure that the deployment target is set to iOS 12.4, excluding unnecessary architectures, and using only the active architecture.

3. **Run CocoaPods Install:**
   After modifying your Podfile, run the following command in your project's root directory:

   ```bash
   pod install
   ```

   This command installs the specified CocoaPods dependencies and updates your project configuration.

## Conclusion

By adjusting the iOS deployment target in your Podfile, you resolve the compatibility issue causing the "'value' is unavailable: introduced in iOS 12.0" error. This quick fix ensures your React Native project aligns with the iOS version you are developing for, allowing you to leverage the latest features and APIs seamlessly.

Happy coding! 🚀
Smooth Horizontal Scrolling with JavaScript: Enhance User Experience
Tags: javascript, webdev, scrolling, interactivity
Published: 2024-01-21 18:51:57

Introduction:
Creating an engaging and interactive user experience is a key aspect of web development. In this post, we'll explore a JavaScript solution for achieving smooth horizontal scrolling on a webpage. Utilizing the provided HTML structure and CSS styling, we'll implement a code snippet that responds to mouse wheel events, allowing users to effortlessly scroll through content horizontally.

HTML Structure:
```html
<div class="section">
  <!-- Repeat the following structure for desired content -->
  <div><h1>Scroll</h1></div>
  <div><h1>-</h1></div>
  <div><h1>with</h1></div>
  <div><h1>-</h1></div>
  <div><h1>mouse!</h1></div>
  <div><h1>-</h1></div>
  <!-- Repeat the structure as needed -->
</div>
```

CSS Styling:
```css
h1 {
  color: gray;
}

.section {
  overflow-x: scroll;
  display: flex;
}

.section div {
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section > div:nth-child(even) {
  background-color: #ccc;
}
```

JavaScript Code:
```javascript
let myScroll = document.querySelector(".section");
myScroll.addEventListener("wheel", (e) => {
    e.preventDefault();
    myScroll.scrollLeft += e.deltaY;
});
```

Explanation:
The provided code enables horizontal scrolling through the content within the `.section` container using the mouse wheel. Let's break down the key components:

- **HTML Structure**: The content is organized in a flex container with child div elements, each containing an `<h1>` element.

- **CSS Styling**: The styling ensures a visually appealing layout, with alternating background colors for even-numbered divs.

- **JavaScript Code**: The script listens for mouse wheel events and adjusts the horizontal scroll position accordingly, creating a smooth scrolling effect.

Benefits and Use Cases:
- **Enhanced User Experience**: Users can seamlessly scroll horizontally through content, providing a modern and engaging browsing experience.

- **Versatile Implementation**: The code can be easily adapted to different layouts and content structures.

- **Interactivity**: Incorporates user interaction through the mouse wheel, making navigation more intuitive.

Conclusion:
By incorporating this JavaScript solution into your web development projects, you can elevate the user experience by introducing smooth horizontal scrolling. Experiment with different content structures and adapt the code to suit your specific design requirements.
بهترین هاست وردپرس
Published: 2024-01-21 18:26:13

عموما تمامی شرکت هایی که اقدام به ارائه هاست های وردپرسی می کنند ادعا می کنند که بهترین شرکت ارائه کننده هاست وردپرسی هستند و بهترین خدمات را ارائه می کنند، به همین دلیل است که وب آیدین برای تضمین این ادعا تمامی هاست های خود را با تضمین بازگشت وجه ۱۵ ارائه می کند تا کاربران بتوانند پس از بررسی دقیق هاست برای مهاجرت دائمی به وب آیدین تصمیم گیری کنند.

برای شناسایی بهترین هاست‌های وردپرسی، ده ویژگی کلیدی وجود دارد که ضروری هستند و می‌توانند تفاوت‌های اساسی در عملکرد و کارایی یک وب‌سایت ایجاد کنند:

تنظیمات مخصوص وردپرس: بهترین هاست‌ها امکانات و تنظیماتی دارند که مخصوصاً برای بهینه‌سازی عملکرد وردپرس طراحی شده‌اند.

پشتیبانی فنی مجرب: مهم است که هاست انتخابی پشتیبانی فنی قوی و تخصصی در زمینه وردپرس داشته باشد، تا در صورت بروز مشکلات فنی به‌سرعت پاسخ‌گو باشد.

امنیت بالا: با توجه به تهدیدات امنیتی مداوم، لازم است که هاست دارای سیستم‌های دفاعی قوی مثل فایروال، اسکن ویروس، و شناسایی نفوذ باشد.

پشتیبان‌گیری خودکار: هاست باید قابلیت‌هایی برای پشتیبان‌گیری دوره‌ای و خودکار ارائه دهد، تا در صورت هرگونه اطلاعات حیاتی شما حفظ شوند.

SSL رایگان: در عصر دیجیتال کنونی، داشتن یک گواهی SSL برای ایمن‌سازی ارتباط بین کاربر و سرور ضروری است و به بهبود SEO نیز کمک می‌کند.

عملکرد بالا و زمان بارگذاری کم: داشتن سرورهای قدرتمند با زمان پاسخ‌گویی کم و ذخیره سازی SSD می‌تواند بر سرعت وب‌سایت تأثیر مثبت بگذارد.

پهنای باند و فضای دیسک مناسب: حجم ترافیک و فضای مورد نیاز برای وب‌سایت باید با قیمتی منصفانه ارائه شود و گزینه‌های ارتقاء مطابق با رشد وب‌سایت فراهم باشد.

قابلیت‌های افزایشی و Scale-Up: توانایی افزایش منابع بدون پایین آوردن سایت و یا تغییر هاست برای تطبیق با رشد کسب‌وکار باید وجود داشته باشد.

کش‌سازی پیشرفته: به لطف وب سرور لایت اسپید که در تمامی سرور های وب آیدین تنظیم شده است کاربران می توانند از افزونه رایگان لایت اسپید کش استفاده کنند.

سهولت در استفاده: داشبورد مدیریت هاستینگ باید کاربرپسند بوده و دسترسی آسان به ابزارهای مدیریتی مانند نصب یک‌کلیکی وردپرس، ایجاد ایمیل و مدیریت دامنه را فراهم آورد.

این ویژگی‌ها به صاحبان وب‌سایت‌ها این امکان را می‌دهند که تمرکز خود را بر توسعه محتوای وب‌سایت‌ و گسترش کسب‌وکارشان قرار دهند، به جای نگرانی در مورد مسائل فنی و مدیریتی هاست. انتخاب هاست مناسب وردپرسی می‌تواند بر تمام جنبه‌های حضور آنلاین شما، از جمله SEO، نرخ تبدیل کاربران به مشتریان و حتی رضایت کلی کاربر، تأثیر بگذارد.
📚 Understanding Lean Software Development!
Tags: softwareengineering, lean, webdev, productivity
Published: 2024-01-21 18:19:39

In the world of software engineering,  Lean Software Development emerges as a methodology emphasizing efficiency through focusing on the essentials. It's about doing just what's needed and not making things too complicated. 🌱💻


🔍 **What is Lean:**

Lean in software is a different way of doing things. It's about being effective by focusing on important stuff and avoiding unnecessary complications.


**💡 The Goal:**

 Lean wants to make the process of building software better. It does this by reducing waste and making the way we work smoother, aiming for better-quality software.


**🌟 Key Ideas:**

• Focus on What Matters: Do the things in software that users really need.
• Keep Getting Better: Always try to make the way we work better over time.
• Teams Make Decisions: Let the people working on the software have a say in how things are done.
The Significance of Dubai Civil Defense Approval in Construction
Tags: dubai, defense
Published: 2024-01-21 17:56:44

In the dynamic landscape of Dubai's construction sector, ensuring the safety and well-being of residents and occupants is paramount. One crucial aspect that plays a pivotal role in this regard is obtaining the "[Dubai Civil Defense Approved](https://ansora.ae)" certification. This endorsement, granted by the Dubai Civil Defense (DCD), holds immense significance for construction projects, underscoring adherence to rigorous safety standards and emergency response protocols.

Why Dubai Civil Defense Approval Matters:

Stringent Safety Standards:
The DCD Approval is a testament to a project's alignment with [Dubai Civil Defense's](https://ansora.ae) stringent safety standards. This includes fire safety measures, emergency evacuation plans, and the incorporation of cutting-edge technologies to mitigate risks.

Emergency Preparedness:
Projects with [Dubai Civil Defense Approval](https://ansora.ae) are equipped with comprehensive emergency preparedness measures. This encompasses the installation of state-of-the-art firefighting systems, smoke detection, and alarm systems, ensuring swift and effective responses in case of emergencies.

Protecting Lives and Assets:
The primary objective of the DCD Approval is to safeguard lives and assets. Approved projects undergo thorough assessments to guarantee that they are well-prepared to handle potential fire incidents, natural disasters, or any unforeseen emergencies, reducing the risk of harm to occupants and damage to property.

Compliance with Regulations:
Obtaining DCD Approval demonstrates a commitment to compliance with local regulations. The Dubai Civil Defense authority plays a crucial role in overseeing and regulating safety standards in the emirate. Projects securing this approval showcase their dedication to meeting and exceeding these regulations.

Enhancing Project Credibility:
For contractors and developers, having [Dubai Civil Defense Approval](https://ansora.ae) enhances the credibility of their projects. It assures stakeholders, investors, and residents that the construction meets the highest safety benchmarks, contributing to the overall reliability and trustworthiness of the development.

Conclusion:
In the dynamic and rapidly growing landscape of Dubai's construction industry, the ["Dubai Civil Defense Approved"](https://ansora.ae) certification stands as a beacon of safety and excellence. Projects that prioritize and achieve this approval not only meet the regulatory requirements but also contribute to creating a secure environment for all. As Dubai continues to thrive, the commitment to safety through DCD Approval remains integral, shaping the skyline with structures that prioritize the well-being of the community.
Payload in Cybersecurity
Tags: payload, ransomware, spyware, botnet
Published: 2024-01-21 17:36:36

💡 **What is a payload?**

The payload is the action that a piece of malware performs on an infected device or system. Here are some common types of payload:

✅ **Ransomware** is a payload that locks systems or data until the victim has paid a ransom. Suppose there's an unidentified vulnerability in a network of connected devices. A cybercriminal can exploit this to access and then encrypt all files across this network. The attacker then demands a ransom in return for decrypting the files. They might threaten to remove all of the files if the ransom hasn't been paid by a set deadline.

✅ **Spyware** is a type of payload that spies on a device or system. For example, the malware may install keyboard scanning software on a user's device, collect password details, and transmit them back to the attacker, all without the user's knowledge.

✅ **Backdoor** is a payload that enables a cybercriminal to exploit a vulnerability in a system or device to bypass existing security measures and cause harm. Imagine that a cybercriminal infiltrates a software developing company and leaves some code that allows them to carry out attacks. This becomes a backdoor that the cybercriminal could use to hack into the application, the device it's running on, and even the organization's and customers' networks and systems.

✅ **Botnet** is a type of payload that joins a computer, server, or another device to a network of similarly infected devices that can be controlled remotely to carry out some nefarious action. A common application of botnet malware is crypto-mining (often referred to as crypto-mining malware). In this case, the malware connects a device to a botnet that consumes the device's computing power to mine or generate cryptocurrencies. A user might notice their computer is running slower than normal and getting worse by the day.

✅ **Protecting against payloads:**

⚔ **Antivirus and anti-malware software:** Can detect and block known malware payloads.

⚔ **Software updates:** Patching vulnerabilities closes doors for attackers to deliver payloads.

⚔ **Security awareness training:** Educating users about phishing, social engineering, and other techniques used to deliver payloads.

⚔ **Data encryption:** Encrypts sensitive data to protect it even if accessed by attackers.

⚔ **Network security measures:** Firewalls and intrusion detection systems can help identify and block suspicious traffic carrying payloads.
01.21
Published: 2024-01-21 17:31:23

```
session_date = "2024-01-21"
session_start_time = "19:00"
session_end_time = 

session_goals = [
    "sqlite simple user crud",
    "login logic",
    "frontend alpha"
]

task_pool = [
    "Write function for password validation",
    "Test API endpoints using Postman",
    "Create database models for players and games"
]

learned_concepts = [

]


session_progress = [

]

challenges_faced = [
    
]

new_ideas_questions = [
]

session_reflection = [
]

next_session_plan = [
]

```
5 PHP Projects to Boost Your Job Hunt in 2024! 🔥🚀
Tags: programming, php, opensource, ai
Published: 2024-01-21 17:27:19

<img width="100%" style="width:100%" src="https://media.giphy.com/media/bGgsc5mWoryfgKBx1u/giphy.gif">


> Getting your dream job needs more than a great resume. Recruiters want devs who can think creatively and showcase skills with real projects. Enter PHP, the language behind 80% of the web.


## Why PHP?

<img width="100%" style="width:100%" src="https://media.giphy.com/media/cBnS6UPTaAvuPWsEze/giphy.gif">

**PHP** is easy to _learn_, _powerful_, and has a big _community_. It's great for web apps, APIs, and more:

- **Fast and efficient:** It runs super fast!
- **Flexible:** Handles everything from simple pages to complex platforms.
- **Cost-effective:** Learning and using it is free.
- **In-demand:** Millions of websites use PHP, and it's not going away.

## Let's talk projects:

<img width="100%" style="width:100%" src="https://media.giphy.com/media/rIoPnp0o8gEr0aOBuR/giphy.gif">

<u>**1. Personalized AI Assistant:**</u>

<img width="100%" style="width:100%" src="https://go.indiegogo.com/wp-content/uploads/2017/02/alphabot-assistant-robots.gif">

Build an AI assistant that learns preferences using PHP and cool tech like Natural Language Processing.

<u>**2. Collaborative Project Management Tool:**</u>

<img width="100%" style="width:100%" src="https://techcommunity.microsoft.com/t5/image/serverpage/image-id/210303iCF4930D8C072C61A/image-size/large?v=v2&px=999">

Create a tool for teams to work together. Real-time tasks, file sharing, and more. Bonus for connecting with tools like Asana or Trello. 

<u>**3. Interactive Data Visualization Platform:**</u>

<img width="100%" style="width:100%" src="https://i.pinimg.com/originals/82/9e/c6/829ec6eb465ac4eee37d8f999658c5c8.gif">

Turn data into captivating stories. Build a platform for users to upload and visualize data using PHP and libraries like Chart.js.

<u>**4. RESTful API for a Popular Service:**</u>

<img width="100%" style="width:100%" src="https://media.giphy.com/media/VFYJXIuuFl6pO/giphy.gif">

Show your backend skills by building a RESTful API for weather, currency, or news.

<u>**5. Open-Source Contribution to a PHP Framework:**</u>

<img width="100%" style="width:100%" src="https://media.giphy.com/media/5V2IjdXqhTMfPzQWHJ/giphy.gif">

Contribute to [Laravel](https://laravel.io/) or [Symfony](https://symfony.com/community), showing your passion for the community and coding skills. 

<img width="100%" style="width:100%" src="https://media.giphy.com/media/2uA1EH7nwJT65sJJPl/giphy.gif">

> **Remember, pick projects you love. Try these out, have fun, and stand out! Happy coding! 🎉🤎
What is Attack Vector?
Tags: attackvector, cybersecurity, cyberattack
Published: 2024-01-21 17:13:36

**An attack** vector is an entry point or route for an attacker to gain access to a system, network or device.

Monitoring social media accounts, or even accessing devices that are left unsecured, are commonly used routes for cyberattacks. However, you should know that attackers don’t need to rely on any of these. They can use a variety of less obvious attack vectors. Here are some examples:

☑ **Email:** Email is perhaps the most common attack vector. Cybercriminals will send seemingly legitimate emails that result in users taking action. This might include downloading a file, or selecting a link that will compromise their device.

☑ **Wireless Network:** Bad actors will often tap into unsecured wireless networks at airports or coffee shops, looking for vulnerabilities in the devices of users who access the wireless network.

☑ **Removable media:** An attacker can use media such as USB drives, smart cables, storage cards, and more to compromise a device. For example, attackers might load malicious code into USB devices that are subsequently provided to users as a free gift, or left in public spaces to be found. When they're plugged in, the damage is done.

☑ **Browser:** Attackers can use malicious websites or browser extensions to get users to download malicious software on their devices, or change a user's browser settings. The device can then become compromised, providing an entry point to the wider system or network.

☑ **Cloud services:** Organizations rely more and more on cloud services for day-to-day business and processes. Attackers can compromise poorly secured resources or services in the cloud. For example, an attacker could compromise an account in a cloud service, and gain control of any resources or services accessible to that account. They could also gain access to another account with even more permissions.

☑ **Insiders:** The employees of an organization can serve as an attack vector in a cyberattack, whether intentionally or not. An employee might become the victim of a cybercriminal who impersonates them as a person of authority to gain unauthorized access to a system. This is a form of social engineering attack. In this scenario, the employee serves as an unintentional attack vector. In some cases, however, an employee with authorized access may use it to intentionally steal or cause harm.
How To Upload Images with Astro and Xata
Tags: webdev, beginners, javascript, tutorial
Published: 2024-01-21 17:24:19

Hey all,

This is my first attempt at recording (and not writing!) a full-fledged tutorial 👇🏻

This tutorial is about how to handle client side image uploads with Xata and Astro. Would love any feedback, criticism or suggestions!

{% youtube e7UciRSdwYs %}