teleren/devto huggingface dataset:
آشنایی با پروتکل tus (بارگذاری Resumable فایل‌ها)
Tags: tus, programming
Published: 2023-12-03 09:40:54

<p style="
    direction: rtl;
    text-align: right;
">سلام :)، tus یک پروتکل انتقال فایل است که برای انتقال فایل‌ها بین سمت کاربر و سرور استفاده می‌شود. این پروتکل به شما امکان می‌دهد فایل‌ها را به صورت پیوسته و با قطعه‌بندی شده انتقال دهید. از این پروتکل می‌توانید برای ارسال فایل‌های بزرگ که نیاز به انتقال متوالی دارند، استفاده کنید.
مهمترین ویژگی Tus این است که می‌تواند انتقال فایل را به صورت پیوسته و ادامه‌پذیر انجام دهد. این بدین معناست که اگر انتقال متوقف شود، می‌توانید از جایی که توقف شده بودید، انتقال را ادامه دهید، به جای از ابتدا شروع کردن مجدد.
پروتکل Tus از مدل Request-Response HTTP استفاده می‌کند و برای انتقال فایل، از درخواست‌های HTTP مانند POST و PATCH استفاده می‌کند. در اینجا چند مرحله کلیدی Tus را توضیح می‌دهم:
ایجاد فایل: در این مرحله، کاربر یک درخواست POST به سرور ارسال می‌کند تا یک فایل جدید ایجاد شود. سرور یک URL موقت برای انتقال فایل به کاربر ارسال می‌کند.
انتقال فایل: کاربر فایل را به قطعات کوچکتر تقسیم کرده و هر1) قطعه را به صورت جداگانه با استفاده از درخواست PATCH به سرور ارسال می‌کند. کاربر باید اطلاعات مانند طول قطعه و مکان فعلی (Offset) را در هدرهای درخواست ارسال کند.
تأیید انتقال: سرور هر بار که یک قطعه از فایل را دریافت می‌کند،2) اطلاعاتی مانند Offset را بررسی می‌کند و درخواست را تأیید می‌کند. سپس به کاربر اطلاعاتی را ارسال می‌کند تا بتواند انتقال را ادامه دهد.
3)اتمام انتقال: کاربر با ارسال یک درخواست PATCH نهایی به سرور، اعلام می‌کند که فایل کامل است و انتقال به پایان رسیده است. سرور پس از دریافت این درخواست، فایل را پردازش می‌کند و به کاربر پاسخ مناسبی می‌دهد.
توضیحات بالا یک نمای کلی از Tus را ارائه می‌دهد. البته، در پیاده‌سازی و استفاده از Tus، نیاز به توجه به جزئیات بیشتری مانند مدیریت همزمان چندین انتقال و نگهداری اطلاعات در سمت سرور وجود دارد.</p>
Flutter vs React Native vs Native development (Kotlin/Swift)
Tags: flutter, reactnative, kotlin, swift
Published: 2023-12-03 09:03:16

Flutter: Google's creation, known for its unified codebase for iOS and Android. It boasts hot reload for real-time changes and offers a wide range of widgets, top performance, and visually appealing UIs.

React Native: From Facebook, uses JavaScript and React for cross-platform mobile app development. It offers a single codebase, native-like performance, a strong community, and rapid development potential.

Native Development (Kotlin/Swift): Building separate apps for Android (Kotlin) and iOS (Swift) allows for native performance, full access to platform-specific features, and the best user experience. Ideal for high-performance apps and leveraging specific platform capabilities.


|  Factors   |  Flutter |React Native|Kotlin/Swift|
|------------|----------|-----------|-----------|
| Performance       | Good; efficient rendering with a dedicated graphic engine called Skia    |Good; might have slight overhead     | Excellent due to direct device feature access     |
| Development Time    | Reduced due to code reuse   | Reduced due to code sharing    | Longer due to separate codebases    |
|UI/UX     | Focuses on consistent UI/UX  |Aims for native look and feel    | Complete control over platform-specific designs    |
| Community and Ecosystem    | Growing community and ecosystem | Larger community; established ecosystem   | Well-established, platform-specific ecosystems    |
| Platform-Specific Features      | Relies on plugins for some functionalities	| Integrates platform-specific features	| Direct access to platform-specific functionalities       |
| Learning Curve |	Uses Dart, accessible to web developers	| Uses JavaScript and React, familiar to web developers	| Requires learning platform-specific languages    |
| Development Cost	| Potentially lower due to code reuse |	Lower due to code sharing |	May be costlier due to separate codebases     |
Weekly reading digest #16
Tags: php, backend, symfony, softwareengineering
Published: 2023-12-03 09:00:00

[Benchmarking serialization](https://peakd.com/hive-168588/@crell/benchmarking-serialization)

[Array, classes and anonymous classes memory usage](https://www.exakat.io/en/array-classes-and-anonymous-memory-usage/)

[Working with decimals in PHP apps](https://www.dereuromark.de/2023/11/27/working-with-decimals-in-php-apps/comment-page-1/#comments)

[To docblock or not to docblock](https://www.oliverdavies.uk/archive/2023/11/26/to-docblock-or-not-to-docblock)

[Introducing JoliMarkdown, for a more robust and rigorous markdown content](https://jolicode.com/blog/introducing-jolimarkdown-for-a-more-robust-and-rigorous-markdown-content)

[Better Code Design in PHP](https://speakerdeck.com/afilina/better-code-design-in-php)

[Partial Mocking](https://symfonycasts.com/screencast/phpunit-integration/partial-mocking)

[Uploading files directly from client to S3 without files ever touching your Laravel application](https://crnkovic.me/uploading-files-directly-from-client-to-s3)

[Remote Code Execution in Drupal via cache injection, drush, entitycache, and create_function](https://www.mcdruid.co.uk/article/remote-code-execution-drupal-cache-injection-drush-entitycache-and-createfunction)

[Examples of Great URL Design](https://blog.jim-nielsen.com/2023/examples-of-great-urls/)

[Tools for Text-based Content Creation](https://newsletter.bphogan.com/archive/issue-23-tools-for-text-based-content-creation/)
BMW X5 Rental in Dubai
Published: 2023-11-25 15:23:22

While visiting Dubai, are you looking for luxury and style? With our first-rate SUV rental services, you may experience the height of automotive perfection. We provide the outstanding [**BMW X5 rental in Dubai**](https://www.nckcarrental.com/car/bmw-x5-hire-in-dubai/), allowing you the chance to tour this energetic metropolis in the utmost luxury and comfort. The BMW X5 is a representation of power and grace that was created to improve your driving experience. Its strong engine, cutting-edge technology, and superb craftsmanship make it the ideal option for discerning travelers who want nothing less than the best. Whether you're visiting Dubai for business or for pleasure, our BMW X5 rental service guarantees that you'll reach your destination in elegance. Drive around the breathtaking coastline, explore the city's famous sites, and make a statement wherever you go. Now, reserve your [**BMW X5 hire in Dubai**](https://www.nckcarrental.com/car/bmw-x5-hire-in-dubai/) and drive in comfort.
🌟 A Small Step for Developers: Introducing Yum Gen Code
Tags: typescript, angular, dotnet, node
Published: 2023-12-03 08:55:59

🌱 Hello everyone,
I'm excited (and a bit nervous) to share a project I've been working on - Yum Gen Code. It's a modest attempt to make the daily life of a software developer a little easier.

🔗 Discover Yum Gen Code: https://gen.tomyum.dev/

🔍 The Idea: This journey started with a simple goal - to reduce the time we spend on repetitive coding tasks. The aim is to free up more time for creativity and critical thinking in software development.

🏢 For Businesses: I believe even small tools can make a big difference. Yum Gen Code is designed to help teams be more efficient and to deliver features faster, yet still maintain a high standard in their coding practices.

🤔 Why Not Just Low/No Code?: While low/no-code platforms are great, they sometimes limit how much you can tweak your code. Yum Gen Code tries to strike a balance, offering a bit more control for those who need it.

✨ Features We’re Starting With:

- It's a free, easy-to-use code generation tool.
- Users can input JSON and select from various front-end and back-end templates.

Our initial focus is on C# and CQRS, Angular, React, Nodejs - Express, but we're hoping to expand this soon.

🌟 Looking Ahead: This is just the beginning, and I’m hopeful about where it can go. More templates, maybe some AI integration... there's a lot to explore. Your feedback and support would mean the world to us!

🤝 Let's Chat: If you think this tool could be useful for you or your team, or if you have any thoughts or suggestions, I’d love to hear from you. Every bit of feedback helps!
task 23
Published: 2023-12-03 08:17:10

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
import time

# Set up the webdriver (make sure to provide the path to your webdriver executable)
driver_path = '/path/to/chromedriver'
driver = webdriver.Chrome(executable_path=driver_path)

# Open the URL
url = 'https://jqueryui.com/droppable/'
driver.get(url)
time.sleep(2)  # Wait for the page to load

# Switch to the iframe containing the draggable elements
driver.switch_to.frame(driver.find_element(By.CLASS_NAME, 'demo-frame'))

# Find the draggable element (White Box)
draggable_element = driver.find_element(By.ID, 'draggable')

# Find the droppable element (Yellow Rectangular Box)
droppable_element = driver.find_element(By.ID, 'droppable')

# Use Action Chains to perform the Drag and Drop operation
actions = ActionChains(driver)
actions.drag_and_drop(draggable_element, droppable_element).perform()

# Switch back to the default content
driver.switch_to.default_content()

# Wait for a moment to see the result
time.sleep(2)

# Close the browser
driver.quit()
task 22
Published: 2023-12-03 08:12:45

2) To achieve this task, you can use the Selenium library in Python to automate the web browser and extract the required information from the Instagram page. First, make sure you have Selenium installed:

pip install selenium
Then, you need to download the appropriate WebDriver for your browser. In this example, I'll use the Chrome WebDriver. You can download it from here: https://sites.google.com/chromium.org/driver/

Here's a sample script to extract the total number of followers and following from the specified Instagram profile:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

# Set up the webdriver (make sure to provide the path to your webdriver executable)
driver_path = '/path/to/chromedriver'
driver = webdriver.Chrome(executable_path=driver_path)

# Instagram profile URL
profile_url = 'https://www.instagram.com/guviofficial/'

# Open the Instagram profile page
driver.get(profile_url)
time.sleep(2)  # Wait for the page to load

# Find and click the 'Followers' link to open the followers list
followers_link = driver.find_element(By.XPATH, '//a[@href="/guviofficial/followers/"]')
followers_link.click()
time.sleep(2)  # Wait for the followers list to load

# Extract the total number of followers
followers_count = driver.find_element(By.XPATH, '//span[@class="g47SY"]').text
print(f'Total Followers: {followers_count}')

# Close the followers list
driver.find_element(By.XPATH, '//button[text()="Close"]').click()
time.sleep(1)  # Wait for the modal to close

# Find and click the 'Following' link to open the following list
following_link = driver.find_element(By.XPATH, '//a[@href="/guviofficial/following/"]')
following_link.click()
time.sleep(2)  # Wait for the following list to load

# Extract the total number of following
following_count = driver.find_element(By.XPATH, '//span[@class="g47SY"]').text
print(f'Total Following: {following_count}')

# Close the following list
driver.find_element(By.XPATH, '//button[text()="Close"]').click()

# Close the browser
driver.quit()
task 21
Published: 2023-12-03 08:06:45

Certainly! Below is a Python script using Selenium to perform the specified tasks: displaying cookies before and after login on https://www.saucedemo.com/, logging in, and then logging out.

from selenium import webdriver

# Function to display cookies
def display_cookies(driver):
    cookies = driver.get_cookies()
    print("Cookies:")
    for cookie in cookies:
        print(f"{cookie['name']}: {cookie['value']}")
    print()

# Initialize the Chrome WebDriver
driver = webdriver.Chrome()

try:
    # Open the Saucedemo website
    driver.get("https://www.saucedemo.com/")

    # Display cookies before login
    print("Before Login:")
    display_cookies(driver)

    # Login
    username = "standard_user"
    password = "secret_sauce"

    driver.find_element_by_id("user-name").send_keys(username)
    driver.find_element_by_id("password").send_keys(password)
    driver.find_element_by_id("login-button").click()

    # Display cookies after login
    print("After Login:")
    display_cookies(driver)

    # Logout
    driver.find_element_by_id("react-burger-menu-btn").click()
    driver.find_element_by_id("logout_sidebar_link").click()

    # Display cookies after logout
    print("After Logout:")
    display_cookies(driver)

finally:
    # Close the browser window
    driver.quit()
This script uses the Chrome WebDriver, so make sure you have the ChromeDriver executable in your system's PATH or specify its location. You can download ChromeDriver from https://sites.google.com/chromium.org/driver/.

Replace the username and password variables with your valid credentials for the Saucedemo website.

This script does the following:

Opens the Saucedemo website.
Displays cookies before login.
Logs in with the provided credentials.
Displays cookies after login.
Logs out.
Displays cookies after logout.
selenium
Published: 2023-12-03 07:54:54

Selenium is a powerful open-source framework primarily used for automating web applications for testing purposes, but it can also be utilized for various other tasks related to web browser interaction. It provides a convenient way to control a web browser through the browser's native support for automation.

Here are some key aspects of Selenium:

Web Browser Automation: Selenium allows developers and testers to automate the interaction with web browsers. It supports multiple browsers, including Chrome, Firefox, Safari, Edge, and others.

Cross-Browser Testing: One of the main advantages of Selenium is its ability to perform cross-browser testing. This means you can write scripts that work consistently across different browsers, ensuring the compatibility of web applications.

Language Support: Selenium supports multiple programming languages such as Java, Python, C#, Ruby, and JavaScript. This makes it versatile, allowing users to choose the language they are most comfortable with.

Testing Framework Integration: Selenium can be integrated with various testing frameworks, such as JUnit, TestNG, and NUnit. This facilitates the organization and execution of test cases and makes it easy to incorporate Selenium into the existing testing infrastructure.

Dynamic Page Interaction: Selenium allows users to interact with dynamic web pages by waiting for elements to load and providing mechanisms to handle asynchronous operations. This is crucial for testing modern web applications that heavily rely on JavaScript and AJAX.

Headless Browser Support: Selenium supports headless browser testing, which means that the browser runs without a graphical user interface. This is useful for running automated tests in environments without a graphical interface, such as servers or continuous integration (CI) systems.

Browser Compatibility Testing: Selenium is widely used for testing the compatibility of web applications across different browsers and browser versions. This helps ensure a consistent user experience for users with various browser preferences.

In summary, Selenium is a valuable tool for automating web browser interactions, making it an essential part of the testing and development process
How to Maintain Your Backup Generator for Optimal Performance
Published: 2023-12-03 07:06:34

[![backup generator](https://cdn.shopify.com/s/files/1/0596/3507/3193/files/VTOMANOUTDOORSET.png)](https://vtoman.com/products/vtoman-homeback-set?utm_source=dev_to&utm_medium=rankking)Backup Generator: How to Keep Your Power Running As a backup generator expert, I know that keeping your generator in optimal condition is crucial for ensuring uninterrupted power supply during emergencies. In this article, I will guide you through the steps to maintain your backup generator for optimal performance. 1\. Understanding the Importance of Maintenance To keep your backup generator running smoothly, you need to understand the importance of regular maintenance. Neglecting maintenance can lead to breakdowns, reduced efficiency, and even safety hazards. Therefore, it is essential to follow a maintenance schedule to keep your generator in top condition. 2\. Checking the Fuel System The fuel system is a critical component of your backup generator. Regularly checking the fuel tank, fuel lines, and filters is essential to ensure that your generator has a steady supply of fuel. Dirty fuel filters can cause your generator to malfunction, so it is crucial to replace them regularly. 3\. Inspecting the Electrical System The electrical system of your backup generator is another crucial component that requires regular inspection. Checking the battery, wiring, and connections is essential to ensure that your generator can start when needed. You should also test the voltage output to ensure that your generator is producing the correct amount of power. 4\. Maintaining the Engine The engine is the heart of your backup generator, and it requires regular maintenance to keep it running smoothly. Changing the oil, air filter, and spark plugs are essential to ensure that your generator is operating at peak performance. You should also check the coolant level and replace it if necessary. Conclusion In conclusion, maintaining your backup generator is crucial for ensuring that you have a reliable source of power during emergencies. By following a regular maintenance schedule and checking the fuel system, electrical system, and engine, you can keep your generator in optimal condition. Remember, a well-maintained backup generator can be a lifesaver during power outages. Related Websites: 1\. National Fire Protection Association: https://www.nfpa.org/Public-Education/Fire-causes-and-risks/Generators 2\. Electrical Safety Foundation International: https://www.esfi.org/resource/generator-safety-tips-479 3\. American Red Cross: https://www.redcross.org/get-help/how-to-prepare-for-emergencies/types-of-emergencies/power-outage.html

## References

  * [backup generator](https://www.anibox.org/go?https://vtoman.com/products/vtoman-homeback-set "backup generator")
HOW TO PREPARE FOR A DATA ENGINEERING INTERVIEW
Published: 2023-12-03 07:32:14


Understand the job requirements. Before you start preparing, make sure you understand the job requirements.

 This will help you tailor your preparation to the specific role you are applying for.

Brush up on your data engineering skills.
 Data engineering requires a strong foundation in computer science and data management.

 You should be familiar with data modeling, ETL, data warehousing, and data pipeline development. You can practice these skills by working on personal projects or contributing to open-source projects.

Familiarize yourself with data engineering platforms and software. 

Data engineering platforms such as Hadoop, Spark, and AWS are commonly used in the industry. You should be familiar with these platforms and have hands-on experience working with them.

Practice your coding skills. 
Data engineering interviews often involve coding challenges. 

You should practice your coding skills by working on coding challenges or contributing to open-source projects.

Prepare for common data engineering interview questions. 
Common data engineering interview questions include questions about your experience with ETL, distributed systems, SQL, and NoSQL databases. You can find more data engineering interview questions and sample answers at indeed.com.

Be prepared to talk about your past projects.
 Data engineering interviews often involve discussing your past projects. 

You should be prepared to talk about the challenges you faced, the solutions you implemented, and the results you achieved.

Stay up-to-date with the latest trends and technologies. 
Data engineering is a rapidly evolving field, and it’s important to stay up-to-date with the latest trends and technologies.

 You can do this by reading industry blogs, attending conferences, and participating in online communities.
The Unrivaled Benefits of iDTRONIC Professional RFID Technology
Published: 2023-12-03 07:28:59

iDTRONIC, a leading player in the RFID industry, continues to redefine the landscape of technology with its professional RFID products, offering unparalleled advantages for businesses across diverse sectors. As industries strive for increased efficiency, enhanced security, and seamless automation, iDTRONIC's RFID technology stands out as a beacon of innovation, providing cutting-edge solutions through its extensive range of RFID products and scanners.

Revolutionizing Operations with Cutting-Edge [RFID Technology](https://idtronic-rfid.com/): iDTRONIC's commitment to excellence is reflected in its comprehensive suite of RFID products, ranging from industrial RFID readers to handheld RFID scanners. These products are designed to meet the unique demands of various industries, providing solutions that optimize processes and drive productivity. By incorporating iDTRONIC's RFID technology, businesses can experience streamlined operations, reduced errors, and improved overall efficiency.

For a closer look at iDTRONIC's RFID products and scanners, interested parties can explore the offerings on the company's official website: https://idtronic-rfid.com/en/home/. The website showcases the breadth and depth of iDTRONIC's RFID technology, with detailed information on each product and its applications across different industries.

Enhanced Inventory Management with [RFID Scanners](https://idtronic-rfid.com/): One standout feature of iDTRONIC's RFID technology is its contribution to inventory management. The RFID scanners offered by iDTRONIC provide businesses with real-time visibility into their inventory, enabling accurate tracking and monitoring of stock levels. This not only reduces the likelihood of stockouts or overstock situations but also streamlines the entire supply chain process. The result is a more agile and responsive approach to inventory management, allowing businesses to stay ahead of the competition.

Security Solutions Tailored to Your Needs: iDTRONIC's RFID technology extends beyond inventory management to address security concerns. The company's RFID products include solutions for access control, ensuring that businesses can implement robust security measures tailored to their specific requirements. From secure entry points in offices to controlled access in sensitive areas, iDTRONIC's RFID technology provides a seamless and reliable solution for businesses prioritizing security.

In conclusion, iDTRONIC's professional RFID technology is at the forefront of driving innovation and efficiency across industries. With a commitment to quality and a diverse range of RFID products and scanners, iDTRONIC continues to empower businesses to embrace the future of technology. For businesses seeking to stay ahead in an increasingly competitive landscape, iDTRONIC's RFID technology is a game-changer.

For media inquiries, please contact:

iDTRONIC Professional RFID

info@idtronic-rfid.com

+49 621 6690094-0