teleren/devto huggingface dataset:
Mengelola Kata Sandi Pengguna
Published: 2024-04-01 03:06:05

kata sandi terenkripsi dipindahkan ke /etc/shadowfile terpisah yang hanya dapat dibaca oleh __root. File baru ini juga memungkinkan penerapan fitur penuaan dan kedaluwarsa kata sandi.

Seperti /etc/passwd, setiap pengguna memiliki baris dalam /etc/shadowfile. Contoh baris /etc/shadowdengan sembilan bidang yang dipisahkan titik dua ditunjukkan di bawah.

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

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

**Format Kata Sandi Terenkripsi**
Kolom kata sandi terenkripsi menyimpan tiga informasi: algoritma hashing yang digunakan, salt, dan hash terenkripsi. Setiap informasi dibatasi oleh tanda $.

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

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

## Mengonfigurasi Penuaan Kata Sandi
Diagram berikut ini menghubungkan parameter penuaan kata sandi yang relevan, yang dapat disesuaikan dengan menggunakan perintah chage untuk menerapkan kebijakan penuaan kata sandi.

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

```
[user01@host ~]$ sudo chage -m 0 -M 90 -W 7 -I 14 user03
```
Perintah chage sebelumnya menggunakan opsi -m, -M, -W, dan -Iuntuk mengatur masing-masing usia minimum, usia maksimum, periode peringatan, dan periode tidak aktif kata sandi pengguna.

Perintah chage -d 0 user03 memaksa user03pengguna untuk memperbarui kata sandinya pada login berikutnya.

Perintah chage -l user03 menampilkan rincian umur kata sandi user03.

Perintah chage -E 2019-08-05 user03 menyebabkan user03akun pengguna kedaluwarsa pada 05-08-2019 (dalam format YYYY-MM-DD).

## Catatan
Perintah tanggal dapat digunakan untuk menghitung tanggal di masa depan. Opsi ini -umelaporkan waktu dalam UTC.

```
[user01@host ~]$ date -d "+45 days" -u
Thu May 23 17:01:20 UTC 2019
```

## Membatasi Akses

Anda dapat menggunakan perintah **chage** untuk menetapkan tanggal kedaluwarsa akun. Ketika tanggal tersebut tercapai, pengguna tidak dapat login ke sistem secara interaktif. Perintah **usermod** dapat mengunci akun dengan -Lopsi tersebut.
```
[user01@host ~]$ sudo usermod -L user03
[user01@host ~]$ su - user03
Password: redhat
su: Authentication failure
```
Jika pengguna keluar dari perusahaan, administrator dapat mengunci dan mengakhiri masa berlaku akun dengan satu perintah **usermod** . Tanggal harus diberikan sebagai jumlah hari sejak 01-01-1970, atau dalam _YYYY-MM-DD_ format.
```
[user01@host ~]$ sudo usermod -L -e 2019-10-05 user03
```

```
[user01@host ~]$ usermod -s /sbin/nologin user03
[user01@host ~]$ su - user03
Last login: Wed Feb  6 17:03:06 IST 2019 on pts/0
This account is currently not available.
```
Form Processing
Tags: frontendchallenge, devchallenge, css, javascript
Published: 2024-04-01 03:04:31

---
title: Form Processing
published: true
tags: frontendchallenge, devchallenge, css, javascript
---

_This is a submission for DEV Challenge v24.03.20, Glam Up My Markup: Camp Activities_

## What I Built

I created a form that process data about a camp goer's interest, allergies and general info.   

## Demo

The code is in replit.com:  
[Front end form processing](https://replit.com/@RebeccaPeltz/SubtleFinishedGraph)

## Journey
I didn't notice at first that the works was "Which camp activities" was plural. After I saw that, I changed my select to allow for multiple selections.  If this was full stack, I would have set up a way to search google for items entered in the form. 
Since it's Easter, you get a bunny when you submit.

https://dev.to/@rebeccapeltz



<!-- Thanks for participating! -->
Gastroenterologist in Singapore
Tags: gastroenterologist, gastroenterologistsingapore, gastroenterologistclinic
Published: 2024-04-01 03:03:34

Led by [Singapore gastroenterologist](https://kieronlimgastro.sg/) Dr Kieron Lim, the clinic provides on-site modern diagnostic screening tests and treatment for patients with digestive, intestinal, and liver conditions. Their healthcare specialists offer a personalized health assessment to deliver an efficient and evidence-based medical care plan. Visit the website for more information.
Affluence Best PR Agency in Singapore for Retail and F&B outlets across Asia
Tags: pragency, prfirms, prcompany, publicrelations
Published: 2024-04-01 02:56:33


Affluence [PR agency](https://affluencepr.com/) specialises in providing Public Relations services for premium retail and F&B outlets across Asia. If you are a retailer or restaurateur aiming to establish and enhance your brand image, Affluence PR is the ideal partner for you.

What sets Affluence PR apart is their tailored approach to the market. Their team of PR and marketing experts focuses on specific areas within the industry, ensuring that clients receive customised and top-quality service. With a deep understanding of media dynamics, a penchant for innovation, and extensive industry knowledge, Affluence PR is committed to delivering PR services that align closely with clients' business strategies.

One of the key strengths of Affluence PR is their dedication to creating a flexible and professional work environment that fosters creativity, teamwork, and positivity. Their pragmatic approach to problem-solving prioritises clarity and effectiveness in communication, ensuring that clients' PR issues are addressed efficiently.

In the competitive landscape of retail and F&B, having specialists who can devise and execute effective PR and marketing strategies is crucial. Affluence PR excels in meticulously addressing clients' needs, crafting innovative campaign strategies, and establishing valuable connections within the industry.

What makes Affluence PR stand out is their honesty in evaluating clients' communication goals and their creativity in devising strategies to achieve those goals. This commitment to transparency and innovation has earned them the respect of their peers in the PR industry.

Affluence PR offers comprehensive PR packages that cover a wide range of services, including public relations strategies, media relations, marketing communications, social media marketing, influencer marketing, and crisis management. Their team is dedicated to providing end-to-end solutions for clients' concerns, ensuring that every aspect of their brand's communication is handled with care and expertise.

Overall, Affluence PR is a trusted partner for retailers and restaurateurs seeking to enhance their brand visibility and reputation. With their strategic approach, industry expertise, and commitment to excellence, they are well-equipped to meet the diverse needs of clients in the competitive world of retail and F&B.

Our Services:
[Influencer Marketing Singapore](https://affluencepr.com/influencer-marketing/)
[Social Media Marketing Singapore](https://affluencepr.com/social-media-500-starter-pack/)
https://affluencepr.com
On embracing asynchronous communication
Tags: productivity, career
Published: 2024-04-01 02:54:56

I've been trying to improve my workflows this year. One thing I've known for a while, but never really got
serious about implementing, is defaulting to asynchronous communication. I first learned about this concept
a few years ago when reading [Basecamp's Employee Handbook](https://basecamp.com/handbook/how-we-work#asynchronously).

I work remotely for a company in the UK, and we use Slack for communication. The timezone difference is only
two/three hours, so the whole team is usually all online at the same time for most of the day. I, (and I'm sure most other
members of the team), just find it a lot easier to pull someone in for a 'quick' huddle each time there's something
to discuss. I always hesitate before doing this, but end up doing it anyway most of the time. The fact that it is
very easy to do doesn't help. I think it does more harm than good.

More than a few times I try to invite someone for a huddle, and they're not available. I then have to write down
whatever I wanted us to discuss - and it always ends up feeling more productive. I think better when I write. Or,
maybe writing actually forces me to think about the thing more - something I may have been avoiding and choosing
the easier option of 'discussing' it instead. I even come up with the solution sometimes in the middle of writing,
and find the call, or even the message itself, not to be necessary.

Another benefit of writing things down is that you can actually refer back to the messages months/years down the
line when you can't figure out why a certain decision was made. I know Slack huddles have threads attached to
them but we rarely ever use them. Handovers are a lot easier when you can actually search for something in threads
and follow discussions that were made in the past.

Writing is also great practice for communication skills as things usually need to be a lot more clear written down than spoken.

I know these kinds of impromptu calls are distracting, but I understand why people do them. It's just the
easiest thing to do in the moment. They're hardly ever necessary though.

In my experience, I have never been in a situation where I would be completely blocked unless I got into a call
to discuss something. I'm never in need of an immediate answer to be able to continue with my work. And even if
I am, there's no guarantee that calling someone is going to get me that answer. They may not be available, and then
I'll still have to write down whatever I wanted anyway.

It's usually not worth breaking someone's focus over whatever issue I feel needs immediate attention. It's not easy,
but it's worth embracing asynchronous communication more.

Write something down as clearly and precisely as you can and send it.
Don't expect an immediate reply. Find something else to do in the meantime.

I think that's a better way to work.
Managing Files From the Command Line Chapter 3
Tags: ramadhanbersamaredhat, redhat, cloud, rh124
Published: 2024-04-01 02:52:01

**_Hierarki Sistem File (The File-system Hierarchy)_**

Semua berkas pada sistem Linux disimpan pada sistem berkas, yang disusun dalam sebuah pohon direktori yang terbalik, yang dikenal sebagai hierarki sistem berkas. Pohon ini dikatakan terbalik karena akar dari pohon tersebut berada di puncak hierarki, dan cabang-cabang direktori dan subdirektori membentang bawah akar.

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

/ directory adalah direktori akar di bagian atas hierarki sistem file. / character juga digunakan ssebagai pemisah direktori padanama file. Sebagai contoh, jika etc merupakan subdirektori dari direktori / , Anda dapat merujuk direktori tersebut sebagai / etc. Demikian juga, jika direktori /etc berisi file bernama issue, Anda dapat merujuk file tersebut sebagai /etc/issue.

Subdirektori / digunakan uuntuk tujuan standat untuk mengatur file berdasarkan jenis dan tujuan. Hal ini memudahkan untuk menemukan file. Sebagai contoh, pada direktori root, subdirektori /boot digunakan untuk menyimpan file yang dibutuhkan untuk booting sistem.

- statis(static) konten tetap tidak berubah sampai diedit atau dikonfigurasi ulang secara eksplisit.
- dinamis(dynamic) atau variabel(variable) konten dapat dimodifikasi atau ditambahkan oleh proses aktif.
- persisten(peristent) konten tetap ada setelah reboot, sepeti pengaturan konfigurasi.
- waktu(runtime) proses konten adalah konten khusus proses atau sistem yang dihapus dengan reboot.
Tabel berikut mencantumkan beberapa direktori terpenting pada sistem berdasarkan nama dan tujuannya.


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rgf5b0zlm62tc1hxbthz.png)
Di Red Hat Enterprise Linux 7 dan yang lebih baru, empat direktori lama memiliki /konten yang identik dengan direktori lainnya yang terletak di /usr:

- /bin and /usr/bin
- /sbin and /usr/sbin
- /lib and /usr/lib
- /lib64 and /usr/lib64

Di versi Red Hat Enterprise Linux sebelumnya, ini adalah direktori berbeda yang berisi kumpulan file berbeda.

Di Red Hat Enterprise Linux 7 dan yang lebih baru, direktori di dalam /adalah tautan simbolis ke direktori yang cocok di /usr.
Challenges and Limitations of LLMs
Tags: ai, llm, deeplearning
Published: 2024-04-01 02:21:50

The exploration of Large Language Models (LLMs) reveals significant challenges and limitations that underscore the complexity and ethical considerations of deploying these AI systems. While LLMs like ChatGPT have shown remarkable capabilities in generating human-like text and assisting with language-related tasks, their applications are not without issues.


One of the core challenges of LLMs is their environmental impact, stemming from the immense computational power required for their training and operation. This concern is coupled with the models' potential for bias, where the data used to train these models may reflect existing societal biases, leading to outputs that could perpetuate these issues. Another significant limitation is the lack of interpretability of LLMs, making it challenging to understand how they arrive at certain conclusions or outputs, which raises concerns for accountability and trustworthiness​​.


Specific challenges faced by LLMs include their sometimes limited understanding of context, difficulty in handling rare or out-of-vocabulary words, and a tendency to generate nonsensical or offensive text. These issues highlight the importance of ongoing research and development aimed at enhancing the transparency, interpretability, and ethical considerations in the creation and deployment of LLMs​.


Moreover, an in-depth understanding of the mechanics of LLMs and their working limitations is crucial for managers and developers. Recognizing the boundaries of what LLMs can and cannot do, and the potential for misapplications, is essential for integrating these technologies into organizational workflows effectively. Addressing the shortcomings of LLMs requires a mix of complementary technologies and human oversight to ensure they are used responsibly and ethically​​.


These insights stress the need for a cautious and informed approach towards leveraging LLMs in any sector, emphasizing ethical AI development, environmental sustainability, and the mitigation of biases to harness the full potential of these models while minimizing their drawbacks.
Rust vs. Go, NO!, It's Rust and Go
Tags: rust, go
Published: 2024-04-01 02:18:30

# Comparing Learning Experiences: Go vs Rust

Learning about **Go** can feel like Formula 1 racing, while **Rust** resembles a marathon. So, what's the catch? I believe anyone eager to learn should not limit themselves to one language, but rather explore both. Here’s why.

## The Rust Experience

Imagine you are learning **Rust**. In the initial days, you might feel that the learning curve is very steep, which can be daunting. The Rust compiler acts like a strict father who wants to make you responsible for every step you take, while still providing a layer of safety. This rigorous approach means that for building fast backends, microservices, or any networking application, Rust might seem like overkill due to the verbosity of the code. Meanwhile, **Go** offers the ability to achieve these tasks with sheer speed, thanks to a robust ecosystem designed for rapid development.

### Job Market Considerations

When examining the job market, you'll find that the overall demand for Rust, even in freelancing, is less compared to Go. What's more, there are scarcely any positions for junior or entry-level Rust developers; you're expected to have substantial experience and several Rust projects under your belt before you can secure a job.

## The Go Experience

Now, let's consider learning **Go**. What’s the problem with focusing solely on Go? It's straightforward – "easy peasy lemon squeezy." The Go compiler acts as a loving and humble mother, encouraging you to focus solely on your goals while it handles the rest. Go boasts a higher demand than Rust, and you can become proficient and delve deep into it within a few days. However, by not learning Rust, you’re missing out on its burgeoning ecosystem, which is predicted to flourish in the future. Knowing Rust is always a plus point, as it deepens your understanding of how modern software works.

### Catering to Different Preferences

Each language caters to different preferences:
- If you love **building products quickly**, choose Go. It's ideal for those who want to develop swiftly and see immediate results.
- If you're passionate about **constructing products you can swear by**, can afford to invest more time, or simply want to appear cool, choose Rust. It offers a sense of mastery and depth, appealing to those who value robustness and detail in their work.

## Conclusion

Both technologies have their pros and cons. If you want to **move fast**, choose Go. If you prefer to **prioritize safety, depth, and responsibility**, opt for Rust.
My code to circular buffer (linked list)
Tags: cpp, datastructures, algorithms
Published: 2024-04-01 02:10:13


main.cpp

```
#include <iostream>
#include "cbuffer.hpp"


int main(){

  srand((unsigned) time(nullptr));
  int n, t, w, Tpkt = 0;
  std::cin >> n >> t >> w;  //n: buffer size, t: wait time, w: atention time.

  cbuffer Dthru(n);

  for (int i = 0; i < 360/t; i++){

    int pkt = rand() % 5 + 1;
    if (Dthru.in((float)w/t)){
          //In
          if((Tpkt+pkt) > (n*4)){
              std::cout<< "Sobrepedido de paquetes\nEl Drive-thru colapsó"<<std::endl;
              return 0;
          }else if(Dthru.full()){
              std::cout<< "Sobrecupo en la fila\nEl Drive-thru colapsó"<<std::endl;
              return 0;
          }
          Dthru.push(pkt);
          Tpkt += pkt;
          std::cout<< "  >   "<< pkt<<(Dthru.size() < 10 ? "   " : "  ")<< Dthru.size()<<(Tpkt < 10 ? "   " : "  ")<< Tpkt<< "  ";
            Dthru.print();
    }else{
          //Out
          int pop = Dthru.pop();
          Tpkt -= pop;
          std::cout<< "  <   "<< pop<<(Dthru.size() < 10 ? "   " : "  ")<< Dthru.size()<<(Tpkt < 10 ? "   " : "  ")<< Tpkt<< "  ";
            Dthru.print();
    }
  }
    std::cout<< "Buen trabajo, hasta mañana"<<std::endl;
  return 0;
}

```


cbuffer.cpp

```
#include "cbuffer.hpp"

  cbuffer::node::node(int x) {
    _data = x;
    _next = nullptr;
  }

  cbuffer::cbuffer(int c){

    n = c;
    s = 0;
    front = nullptr;
    rear = nullptr;
  }

  cbuffer::~cbuffer(){

    while(front != nullptr) {
      node *p = front;
      front = front->next();
      delete p;
    }

  }

  void cbuffer::push(int x){

    assert(!full());
    node *p = new node(x);
    if(empty()) {
        front = p;
        rear = p;
    }else{
        rear -> next(p);
        rear = p;
    }
    s++;
  }

  int cbuffer::pop(){

    if(empty()){
    return 0;
    }else{
    int x = front -> data();
    node *p = front;
    front = p -> next();
    delete p;
    s--;
    return x;
    }
  }

  void cbuffer::print(){

    node *p = front;
  std::cout << "[ ";
    while(p != nullptr){
      std::cout << p -> data() << " ";
      p = p -> next();
    }
  std::cout << "]" << std::endl;
  }
  
  bool cbuffer::in(float x){
      return (rand() / (float)RAND_MAX) < x;
  }
  
```

cbuffer.hpp

```
#ifndef cbuffer_hpp
#define cbuffer_hpp

#include <iostream>
#include <assert.h>


class cbuffer {

  class node {

  int _data;
  node *_next;

  public:

    node(int);

  int data() const { return _data; } //cual es el dato
  node *next() const { return _next; } // cual es el siguiente apuntador
  void next(node *p) { _next = p; } // cambia el siguiente apuntador
  };

  int n; // Capacity of buffer
  int s; // Size of buffer

  node *front; // Older data in the buffer, provided s > 0
  node *rear; // First aviable box, provided s < n

public:

  cbuffer(int);
  ~cbuffer();

  void push(int);
  int pop(void);
  int top(void);

  int capacity() const { return n; }
  int size() const { return s; }

  bool full() const { return s==n; }
  bool empty() const { return s==0; }

  void print();
  bool in(float);
};

#endif /* cbuffer_hpp */
```
LeetCode - 1 - Two Sum - Python
Tags: leetcode, python
Published: 2024-04-01 02:09:34



## Question: 

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.



You may assume that each input would have exactly one solution, and you may not use the same element twice.



You can return the answer in any order.



**Example 1:**



Input: nums = [2,7,11,15], target = 9

Output: [0,1]

Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].

**Example 2:**



Input: nums = [3,2,4], target = 6

Output: [1,2]

**Example 3:**



Input: nums = [3,3], target = 6

Output: [0,1]



## Answer:





`def two_sum(nums, target):

    # Create a dictionary to store the indices of elements

    num_indices = {}

    

    # Iterate through the array

    for i, num in enumerate(nums):

        # Calculate the complement needed to reach the target

        complement = target - num

        

        # Check if the complement exists in the dictionary

        if complement in num_indices:

            # Return the indices of the current element and its complement

            return [num_indices[complement], I]

        

        # Store the index of the current element in the dictionary

        num_indices[num] = I

    

    # If no solution is found, return None

    return None`



**Example usage:**

nums1 = [2, 7, 11, 15]

target1 = 9

print(two_sum(nums1, target1))  # Output: [0, 1]



nums2 = [3, 2, 4]

target2 = 6

print(two_sum(nums2, target2))  # Output: [1, 2]



nums3 = [3, 3]

target3 = 6

print(two_sum(nums3, target3))  # Output: [0, 1]


This program defines a function two_sum that takes an array nums and a target integer target as input and returns the indices of the two numbers that add up to the target. It uses a dictionary to store the indices of elements and iterates through the array to find the complement of each element needed to reach the target. If the complement exists in the dictionary, it returns the indices of the current element and its complement. If no solution is found, it returns None. Finally, it demonstrates the usage of the function with example inputs.