teleren/devto huggingface dataset:
Perl Weekly Challenge #234 - Sharing is Caring
Tags: perl, perlweeklychallenge
Published: 2023-09-14 04:50:44

Hi everybody! Back this week with a (surprisingly long) solution to just Task 1 of the weekly challenge. Task 2 makes no sense to me at all because it seems like examples 1 and 3 disagree with each other. Just sticking to one challenge for that reason. Anyways, let's dive into it!

The goal here is to find the letters that all the provided words share. Here's the code:

    #!/usr/bin/perl
    use v5.36;

    my @words;
    my %result_chars;

    for(@ARGV) {
        push(@words, [split(//, $_)])
    }
    @words = sort {$#{$a} <=> $#{$b}} @words;
    $result_chars{$_}++ for @{$words[0]};

    for my $word (1..$#words) {
        for my $key (keys(%result_chars)) {
            my $occurrences = grep(/$key/, @{$words[$word]});
            if($occurrences == 0) {
                delete($result_chars{$key});
                next;
            } elsif($occurrences <= $result_chars{$key}) {
                $result_chars{$key} = $occurrences;
            }
        }
    }

    for my $char (@{$words[0]}) {
        if($result_chars{$char}) {
            $result_chars{$char}--;
            say $char;
        }
    }

First we make a 2D array of the characters in all the words. That way we only have to split the words up once, instead of repeatedly as we seek through them. It does mean a bit more complexity to deal with a matrix, unfortunately.

We also sort the words by length so the shortest one is first, then make a histogram of all the letters in it. Now it's important to keep all the letters and not remove duplicates, because we have to print duplicates as we see from the example that prints "e, l, l".

We loop through each word, then loop through each letter in the first word (keys of the histogram) and search the current word for that letter. If we don't find it, we delete the letter from the histogram. If we find fewer occurrences than in the histogram, we remove some from the histogram to show how many we actually can make in the current word. If that letter is in the histogram fewer or equal times to the occurrences in the word, we move on to the next letter.

Next, for printing, we would have to have multiple loops to loop through the histogram and remove one instance at a time, so instead I decided I should simply search the original word for characters that successfully passed the test of the other words, then print those characters.

When I first started, I thought this would be super easy, but I discovered complications numerous times through the challenge. Perhaps others will have some better ideas of solutions I can learn from. Unfortunately Flavio Poletti hasn't been doing his solutions recently, I always enjoyed them very much, but be sure to check out past solutions of his at [github.polettix.it](https://github.polettix.it/ETOOBUSY/).

Hopefully I'll be back next week with more solutions!
Oracle-Linux 8'de Chronyd ile NTP İstemcisi Yapılandırma
Published: 2023-09-14 04:49:41

- Chronyd Servisinin Yüklenmesi ve Etkinleştirilmesi:

Öncelikle, chronyd servisinin yüklü olup olmadığını kontrol edin. Eğer yüklü değilse, yükleyin:


```
sudo dnf install chrony
```

Servisi etkinleştirin ve başlatın:


```
sudo systemctl enable --now chronyd
```

- Chrony Konfigürasyon Dosyasının Düzenlenmesi:

Özel bir NTP sunucusu kullanmak için, chrony konfigürasyon dosyasını düzenleyin:

```
sudo nano /etc/chrony.conf
```

Dosyada, aşağıdaki gibi bir veya birden fazla server veya pool satırı ekleyin (örneğin "ntp.ulakbim.gov.tr"):



```
server ntp.ulakbim.gov.tr iburst
```

İsterseniz IP adresi de kullanabilirsiniz. iburst opsiyonu, zaman senkronizasyonunu hızlandırmak için kullanılır.
- Chronyd Servisini Yeniden Başlatma:

Konfigürasyon dosyasını düzenledikten sonra, servisi yeniden başlatın:

```
sudo systemctl restart chronyd
```
- Senkronizasyon Durumunu Kontrol Etme:

chronyc komutunu kullanarak senkronizasyon durumunu kontrol edebilirsiniz:

```
chronyc tracking
```

Bu komut, senkronizasyon durumu hakkında detaylı bilgi verecektir.

- Güvenlik Duvarı Ayarları:

Eğer güvenlik duvarı etkinse, NTP trafiğine izin vermeniz gerekebilir:

```
sudo firewall-cmd --add-service=ntp --permanent
sudo firewall-cmd --reload
```

- Senronizasyon Durumunu Doğrulama:

timedatctl komutunu kullanarak NTP servisinin aktif olup olmadığı kontrol edebilirsiniz:

```
timedatectl
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvolwg7s0ck66vsec5ow.png)
Laravel Programming Workflow with Google ChromeOS
Tags: chromeos, neovim, programming, laravel
Published: 2023-09-14 04:26:37

Bagaimana komputer ChromeOS yang murah boleh digunakan sebagai komputer untuk buat programmng? 

1. cipta container alpine dalam Crosh virtual environment 
2. dalam alpine install neovim, php , mysql
3. untuk neovim, boleh guna init.vim 
https://gitlab.com/hardyweb/vim/-/blob/master/init.vim

4. Boleh tengok workflow di [Youtube ](https://youtu.be/Hx-sqWoq5y8?si=9FCdFDCR8SjuQaNK)
Logical Volume Manager (lvm)
Tags: lvm, linux
Published: 2023-09-14 04:23:52

I'm a fiddler when it comes to computers, but I'm also behind the times so new Linux utilities like `ip` still trip me up. One of the areas I'm behind is disk management. I made some progress on GPT partitions and what is happening with UEFI. But LVM is currently on my new things list.

 LVM is disk management above the partition table, but lower than the filesystem. One of the main benefits is that you can expand storage on a mount point through additional disks.

This capability is really nice but has implications when dealing with different storage mediums. I have ordered M.2 drivers and am thinking this will be where games and OS live. I can try to live within these 500GB but I expect that won't be enough and I have other desire for some backup space, movies/photos, etc. To get into the concern let me explain the LVM architecture more.

There are three primary concepts.

- physical drive/partition
- group
- logical drive/partition

The Volume Groups (VG) owns a disk partition and holds logical partitions, like the Master boot Record (MBR) does for a disk. Unlike the MBR the group can manage space across physical disks. The VG can now allocate and resize Logical Volumes (LV) and the disk partition cannot be owned by multiple Volume Groups.

If I put all my storage under a single Volume Group then I can easily assign space to where it is needed and I don't need to allocate all of it upfront. Doing so means I also lose control of what data is stored on which drives (my OS could be moved to a slower disk). Thus I'm thinking through what types of control I desire for my storage management.
69vndigital Nhà cái uy tín bậc nhất Châu Á
Published: 2023-09-14 03:51:35

69vn - Nhà cái có sức ảnh hướng lớn bậc nhất Châu Á, được thành lập vào năm 2020, xuất hiện vào năm 2021 tại thị trường Việt Nam nhà cái 69vn đã phát triển vượt bậc 
nhờ sự nỗ lực cùng với các sản phẩm cá cược tiềm năng, nhờ vậy nhà cái 69vndigital đã đứng được trên TOP bảng xếp hạng nhà cái uy tín bậc nhất Châu Á.
Nhà cái 69vn mong muốn được đồng hành cùng khách hàng để có thể hiểu biết thêm về khách hàng, tiếp đó chúng tôi sẽ phát triển để đứng ngang hàng và có thể vượt mặt các nhà cái đình đám hiện tại trong tương lai.
Cùng đội ngũ chăm sóc khách hàng nhiệt tình và năng động, chúng tôi cam kết đem đến cho quý khách một thái độ làm việc chuyên nghiệp nhất
Để mang đến cho khách hàng trải nghiệm với tốc độ nhanh nhất, chúng tôi đã tối ưu hóa website nhằm giảm thời gian chờ đợi để tránh mất thời gian của khách hàng, được các chuyên gia đầu tư rất chỉnh chu vì đây là gương mặt đại diện của nhà cái chúng tôi.
Nhà cái chúng tôi cam kết giữ bảo mật khách hàng không tiết lộ thông tin khách hàng, sẽ không có ai ngoài chúng tôi biết được rằng bạn đang chơi game tại 69vndigital
Địa chỉ: 177 Nguyễn Thị Tú, Bình Hưng Hoà B, Bình Tân, Thành phố Hồ Chí Minh, Việt Nam
Email: 69vndigital@gmail.com
Website : https://69vn.digital/
#69vn #69vn_digital
 
Social Links:

https://www.facebook.com/69vndigitall/

https://twitter.com/69vndigital

https://www.pinterest.com/69vndigital/

https://500px.com/p/69vndigital?view=photos

https://www.flickr.com/people/69vndigital/

https://www.youtube.com/@69vndigital

https://www.reddit.com/user/69vndigital

https://www.blogger.com/profile/01577033112671781227

https://69vndigital.blogspot.com/

https://69vndigital.tumblr.com/

https://www.quora.com/profile/69vndigital

https://www.producthunt.com/@69vndigital

https://vimeo.com/69vndigital

https://foursquare.com/69vnd5672221/list/69vndigital

https://scholar.google.com/citations?view_op=list_works&hl=vi&user=jRj-tccAAAAJ

https://www.goodreads.com/user/show/169861019-69vn-digital

https://soundcloud.com/69vndigital

https://wellfound.com/u/69vn-digital

https://www.twitch.tv/69vndigital/about

https://flipboard.com/profile/69vndigital

https://vi.gravatar.com/69vndigital

https://dribbble.com/69vndigital/about

https://www.behance.net/69vndigital

https://about.me/vndigital69/

https://www.instapaper.com/p/69vndigital
Dealing with AttributeError Error in Selenium 4.3.0 and Beyond
Tags: python, selenium, webdev, programming
Published: 2023-09-14 03:04:31

In recent versions of Selenium (4.3.0 and beyond), there has been a significant change regarding the `find_element_by_*` and `find_elements_by_*` methods. These methods, which were widely used in the past, have been deprecated, leading to `AttributeError` errors when running older code. This article will guide you on how to address this issue and update your Selenium code accordingly.

## 1. Import WebDriver

First and foremost, it's crucial to import the WebDriver correctly. Utilize `from selenium import webdriver` for this purpose.

```python
from selenium import webdriver
```

## 2. Create WebDriver Instance

When creating an instance of WebDriver, specify the type of driver you intend to use (e.g., Chrome, Firefox, Edge). Here's an example using the Chrome driver:

```python
driver = webdriver.Chrome(executable_path='/path/to/chromedriver')
```

## 3. Embrace the New Methods

In the latest Selenium versions, the `find_element_by_*` and `find_elements_by_*` methods have been deprecated, replaced by `find_element` and `find_elements` methods. These methods now require the use of the `By` class to specify the selector method.

For instance, if you used to have the following code:

```python
element = driver.find_element_by_id('my_id')
```

You should refactor it like this:

```python
from selenium.webdriver.common.by import By

element = driver.find_element(By.ID, 'my_id')
```

## 4. Specify the Selector Type

With the use of the `By` class, it's essential to explicitly specify the type of selector (e.g., ID, class name, name). This change allows for more clarity when selecting elements.

For example, when the selector type is a class name:

```python
element = driver.find_element(By.CLASS_NAME, 'my_class')
```

## 5. Add Error Handling

The new methods may raise a `NoSuchElementException` if an element is not found. It's advisable to include error handling to deal with such cases.

```python
from selenium.common.exceptions import NoSuchElementException

try:
    element = driver.find_element(By.ID, 'my_id')
except NoSuchElementException:
    print("Element not found.")
```

By following these steps, you can effectively address the `AttributeError` error in Selenium versions 4.3.0 and beyond, ensuring the smooth execution of your tests and web scraping scripts.

These changes make Selenium more robust and maintainable, so it's a good practice to update your code to adhere to the latest version's standards.

That's it for dealing with the changes in Selenium 4.3.0 and beyond! Update your code, leverage the new methods, and enjoy the enhanced capabilities of Selenium.
Dive into Cisco DNA Center: A Comprehensive Overview
Tags: ccna, cisco, course, network
Published: 2023-09-14 02:44:38

**Introduction:**  
In today's rapidly evolving network landscape, managing individual devices manually is becoming a thing of the past. Enter the Cisco DNA Center - a revolutionary approach to network management. This post will introduce you to the key features and benefits of the Cisco DNA Center.

---

**What is the Cisco DNA Center?**  
The Cisco DNA Center is a centralized management platform that offers a holistic view of your network. Instead of configuring each device individually, the DNA Center allows administrators to manage, monitor, and troubleshoot their entire network from a single interface.

---

**The "Single Pane of Glass" Concept:**  
One of the standout features of the DNA Center is its "single pane of glass" approach. This means that you can have complete visibility into your network from one location. Whether you're monitoring device health, tracking issues, or viewing network topology, everything is accessible from one dashboard.

---

**Key Features:**  

1. **Assurance Dashboard:**  
   - **Health Monitoring:** View the health status of wired and wireless clients, network devices, and even applications running on the network.
   - **Top Issues:** The dashboard highlights the top 10 issues your network is facing, allowing you to prioritize and address the most critical problems first.
   - **Device 360:** Dive deep into individual device details, from its current status to its neighboring devices in the topology.

2. **Client Monitoring:**  
   - Track individual users or devices on the network.
   - View detailed information about each client, including any issues they might be facing.

3. **Application Monitoring:**  
   - Monitor the health and performance of applications running on the network.
   - Identify issues like network latency affecting application performance.

4. **Provisioning:**  
   One of the standout features is the ability to automatically detect and configure new devices plugged into the network. This auto-provisioning capability reduces manual configuration errors and speeds up device deployment.

---

**Conclusion:**  
The Cisco DNA Center is shaping the future of network management. With its centralized approach, it offers a more efficient, holistic, and user-friendly way to manage complex networks. Whether you're in a small business or a large enterprise, understanding and leveraging the capabilities of the DNA Center can transform your network management experience.
AI-Tooling
Published: 2023-09-14 02:26:24

https://www.infoq.com/presentations/bicycle-ai-gpt-4-tools/?topicPageSponsorship=be5ab845-3650-4ca6-b998-6e258cb0cba1&itm_source=presentations_about_ai-ml-data-eng&itm_medium=link&itm_campaign=ai-ml-data-eng
Numbering Systems
Published: 2023-09-14 02:19:18


Let's imagine that the world of numbers is a big orchestra, where each numbering system has its own significant and unique role. Now, I'm going to talk about the main three of them. 

The first one is the Decimal numbering system, which is the Conductor of our orchestra. This system uses 10 notes or digits, 0 through 9, to create all the melodies. It's the system we use daily for counting our fingers, money, and almost everything in our lives.

Then comes the Binary numbering system: The drummer of the orchestra. However, this drummer has only two drums, one for a soft beat (0) and the second for a loud beat (1). Binary rhythms are simple but powerful and are the heartbeat of computers and digital technology. ( If you want to understand the binary numbering system more thoroughly, watch the video attached below ).

Now it's time for Hexadecimal System: The Colorful Horns. These are the brass instruments in our orchestra. They are more complex but also very versatile. Instead of just 10 notes, it uses 16. Besides the regular 0-9 notes ( digits ), it adds 6 more: A, B, C, D, E, and F. This describes colors (not only) by their own short and unique codes. 

To wrap this up, just like a composer can create beautiful symphonies by combining various orchestra sections, mathematicians and computer scientists use these different numbering systems to solve all kinds of problems and make our digital world come alive.
What is flutter text widget?
Tags: programming, flutter
Published: 2023-09-14 01:59:32

In Flutter, the "Text" widget is a fundamental building block for displaying text on the screen within your mobile or web applications. It is a [part of the Flutter](https://instructivetech.com/category/flutter-tutorial/) framework, which is an open-source UI framework developed by Google for building natively compiled applications for mobile, web, and desktop from a single codebase.

Here are some key features and properties of the Flutter "Text" widget:

1. Text Display: The "Text" widget is used to display a single line of text. It is commonly used for displaying labels, headings, or any other textual information within your app's user interface.

2. Customization: You can customize the appearance of the text using various properties such as font size, font family, text color, text alignment, and more. Flutter provides a wide range of options for [text styling](https://altechinferno.com/flutter-text-styles/).

3. Text Overflow: Flutter provides options for handling text overflow, including ellipsis (...) or fading the overflowed text.

4. Rich Text: Flutter allows you to create rich text layouts using the "RichText" widget, which can display text with different styles within the same text widget. This is useful for highlighting or formatting specific parts of the text differently.

Here's a basic example of how to use the "Text" widget in Flutter:

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Text Widget Example'),
        ),
        body: Center(
          child: Text(
            'Hello, Flutter!',
            style: TextStyle(
              fontSize: 24,
              fontWeight: FontWeight.bold,
              color: Colors.blue,
            ),
          ),
        ),
      ),
    );
  }
}
```

In this example, we create a simple Flutter app with a "Text" widget that displays the text "Hello, Flutter!" with customized styling. This demonstrates the basic usage of the "Text" widget to display text content in a Flutter application.
Unlocking the Power of Dynamic Pricing in WooCommerce
Tags: woocommerce, wordpress, webmonetization, news
Published: 2023-09-14 01:40:14


E-commerce has revolutionized the way we shop, and with platforms like WooCommerce, setting up an online store has never been easier. However, to truly stand out and maximize sales, one must leverage advanced strategies. One such strategy is dynamic pricing. Let's dive into what it is and how you can harness its power using the WooCommerce Dynamic Price Manager.

## What is Dynamic Pricing?

Dynamic pricing is a strategy where prices change based on predefined conditions. This could be in response to market demand, inventory levels, customer behavior, or other external factors. For instance, you might offer discounts to repeat visitors or during off-peak hours to boost sales.

## Benefits of Dynamic Pricing:

- **Increase Sales**: Attract new customers and incentivize existing ones to buy more.
- **Boost Profits**: Maximize revenue by setting optimal prices.
- **Target Specific Segments**: Offer tailored prices to different customer groups.
- **Enhance Customer Loyalty**: Reward loyal customers with special discounts.

## Introducing the WooCommerce Dynamic Price Manager

This plugin, available on [CodeCanyon](https://codecanyon.net/item/woocommerce-dynamic-price-manager/31347410), allows you to easily implement dynamic pricing on your WooCommerce store. Here's what it offers:

- **Dynamic Pricing Rules**: Set conditions based on roles, location, spending, and more.
- **Flash Sales**: Launch time-sensitive discounts.
- **Geo-Targeted Offers**: Discounts based on a customer's location.
- **Product Bundles**: Special prices for bundled items.
- **Loyalty Tiers**: Offer incremental discounts to repeat customers.

For a deeper dive into its features, check out this [detailed guide](https://codeplus.dev/dynamic-pricing-for-woocommerce/).

## How to Implement Dynamic Pricing with the Plugin

1. **Install and Activate**: Purchase the plugin from CodeCanyon and install it on your WooCommerce store.
2. **Set Pricing Rules**: Define conditions like user roles, total spent, or geographic location.
3. **Choose Discount Types**: Decide whether you want a percentage off, a flat discount, or a fixed price.
4. **Monitor and Adjust**: Regularly review the performance of your pricing rules and adjust as necessary.

## Conclusion

Dynamic pricing is a game-changer in the e-commerce world. With the WooCommerce Dynamic Price Manager, implementing this strategy is a breeze. Whether you're looking to boost sales, increase profits, or enhance customer loyalty, dynamic pricing can help you achieve your goals.
Assignment 1
Published: 2023-09-14 01:27:37

For Assignment 1 we had to create our online environment for the Global Distributed Systems class. We were tasked to make an account for the class website, join Microsoft teams, join the class github, create this blog, take a quiz, and complete a simple java program. This was a challenge for me because there were a lot of new platforms to figure out in a short period of time, all with their own quirks and methods to run. Github was especially confusing to set up. Eventually, I was able to complete all the tasks by splitting each and and taking it step by step. 

Although it was a confusing process, I think all of this work in the first week provides insight into the onboarding process. You will be assigned to a team and expected to adapt to their pipeline. I'm looking forward to what's coming up in the class, especially how to collaboratively create software through online mediums. I'm also interested in seeing how this journalling process goes, as it reminds me of a humanities class mixed with a technical Computer Science class.
Midjourney Integration with Zapier: A Developer's Perspective
Published: 2023-09-14 01:18:32

Hey Devs,

Exciting times ahead! Our [Unofficial Midjourney API](https://www.omnibridge.io) has now been woven into the fabric of Zapier, and we're thrilled to share the nuances with you.

### What's the Buzz?

For those in the loop with automation, Zapier stands as an unmatched tool, bridging countless apps together. With the integration of the [Unofficial Midjourney API](https://www.omnibridge.io), we're amplifying the potential of Midjourney by connecting its distinct features with your go-to applications.

**Highlights**:
- **Real-time Triggers**: Say goodbye to tedious manual checks. Be in the know instantly when a job status alters.
- **Command Actions**: Directly utilize 'imagine' and 'enhance' commands via Zapier.
- **Versatile Integrations**: Effortlessly sync Midjourney with platforms such as Slack, Google Sheets, Airtable, and more.

### The Potential:

Visualize this: Instant Slack alerts the moment a Midjourney job undergoes a status change. Or, auto-populating a Google Sheet with every executed 'imagine' or 'enhance' command. The horizon is vast, and with Zapier's expansive app ecosystem, melding the [Unofficial Midjourney API](https://www.omnibridge.io) with other platforms becomes second nature.

For those eager to get hands-on, we're offering an exclusive early access through this [private invite link to Zapier](https://zapier.com/developer/public-invite/191023/e132b53fb230f47c01deac880fe019e0/).

### Want More Details?

For the enthusiasts craving an in-depth exploration, we've crafted a detailed piece on [Medium](https://medium.com/@gdswmrh/unofficial-midjourney-api-now-on-zapier-a-developers-deep-dive-f0e687e80040) that dives deep into the integration's capabilities.

To conclude, our venture in integrating the [Unofficial Midjourney API](https://www.omnibridge.io) with Zapier is a stride towards redefining the developer journey. We're all ears for your feedback and can't wait to see the innovative workflows you concoct.

Dive in and redefine automation with Midjourney on Zapier!