teleren/devto huggingface dataset:
Week 6!
Published: 2024-04-22 01:49:13

Week 6 was just a normal internship. I did my daily task, as well as the specific task that I need to do every Monday. I also did the new task that was just taught to me by my trainer but it was an easy one since I only have to check the website and see if there are shipment IDs that needs to be processed. We also only need to attend three days for this week since Tuesday and Wednesday was a holiday, so we get to relax and enjoy our rest day for this week. After we got back, I did the same task which was my daily task and another specific task that I need to do every Friday. On Friday, my trainer told me that for my next task that I need to learn, I will be taught by their Vietnamese employee. I was a bit nervous since of course I will need to speak in English and we might not understand each other, but everything went smoothly even if sir he kind of had a hard time explaining things to me. Thankfully I was able to record our discussion so I was able to review it and took down notes on how to process the task.
Stay Updated with PHP/Laravel: Weekly News Summary (15/04/2024–21/04/2024)
Tags: laravel, php
Published: 2024-04-22 01:43:51

Hey everyone, I recently published a blog post summarizing the latest news and updates in the PHP/Laravel community from April 15th to April 21st, 2024. Check out the key points below for a quick overview:

- Laravel 9.0.1 and 8.77.1 have been released, addressing several issues and providing improvements.
- The Laravel team introduced Laravel Stream, a real-time event streaming service built on top of Laravel WebSockets.
- Laravel Telescope now supports tracking query performance with a new "Performance" tab.
- Vapor, Laravel's serverless deployment platform, added support for scheduled tasks and Vapor Networks.
- Laravel Elixir has been officially deprecated in favor of Laravel Mix.
- The Laravel Ecosystem has seen updates to various packages, including Nova, Sanctum, and Jetstream.
- Laravel Meetups and events are happening globally, fostering community engagement and knowledge sharing.
- Stay tuned for more updates and releases in the vibrant PHP Laravel ecosystem!

This summary offers a concise overview of recent advancements in the PHP/Laravel framework, providing valuable insights for developers and enthusiasts alike. Explore the full post for more in-depth coverage and stay updated on the latest in PHP/Laravel development.

Check out the complete article here [https://poovarasu.dev/php-laravel-weekly-news-summary-15-04-2024-to-21-04-2024](https://poovarasu.dev/php-laravel-weekly-news-summary-15-04-2024-to-21-04-2024)
Go history
Tags: go, backend, history
Published: 2024-04-22 01:31:01

Go was conceived in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson, all at Google, and was announced in November 2009. 

Go is especially suited for building infrastructure like networked servers, and tools and system for programmers.

Go is an open-source project, so source code for its compiler, libraries, and tools is freely available to anyone.

![Go history tree](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zo1ttmr2nwkls85xill2.png)




Go is described as a “C-like language”. From C, Go inherited its expression syntax, control-flow statements, basic data types, call-by-value parameter passing, pointers, and above all, C’s emphasis on programs that compile to efficient machine code. 

Modula-2 inspired the package concept. Oberon eliminated the distinction between module interface files and module implementation files. Oberon-2 influenced the syntax for packages, imports, and declarations, and Object Oberon provided the syntax for method declarations.

In CSP (or ***Communicating sequential process***), a program is a parallel composition (simultaneous execution of computations) of processes that have no shared state; the process communicate and synchronize using channels. Hoare’s CSP was a formal language for describing the fundamental concepts of concurrency, not a programming language for writing executable programs.

Pike and others began to experiment with CSP implementations as actual languages. They created Squeak, which provided a language for handling mouse and keyboards events, with statically created channels. It was a purely functional language with garbage collection. Channels became first-class values, dynamically created and storable in variables.

Go’s innovative slices provide dynamic arrays with efficient random access but also permit sophisticated sharing arrangements reminiscent of linked lists.

It has Garbage Collection, a package system, first-class functions, lexical scope, a system call interface, and immutable string in which text is generally encoded in UTF-8.

Its built-in data types and most library data structures are crafted to work naturally without explicit initialization or implicit constructors, so relatively few memory allocations and memory writes are hidden in the code. Go’s aggregate types (structs and arrays) hold their elements directly, requiring less storage and fewer allocations and pointer indirections than languages that use indirect fields. Go has concurrency features based on CSP. The variable size stacks of Go’s lightweight threads or goroutines are initially small enough that creating one is cheap and creating a million is practical.
SAP Basis Snippets #2
Tags: sap, sapbasis, hana, saphana
Published: 2024-04-22 01:30:00

## Start and stop commands for Hana database

First login to `<sid>adm` user of hana database

```
su  - <sid>adm
```

> Execute the below command

```
HDB start
```
This executes the HDB program in path `/usr/sap/<SID>/HDB<instance no.>/`

The below command for stopping also uses same HDB program

```
HDB stop
```
One more program that can be used for start/stop of Hana DB is the sapcontrol program located in the path `/usr/sap/hostctrl/exe/`

> The start command is as follows

```
sapcontrol -nr <instance no.> -function Start
```

> The stop command is as given below

```
sapcontrol -nr <instance no.> -function Stop
```
Economistas Reales y realidades virtuales
Published: 2024-04-22 00:36:02

La relación entre la economía y los videojuegos ha crecido significativamente en los últimos años, dando lugar a mundos virtuales con economías complejas y desafiantes. A continuación, describo cómo los economistas están colaborando con la industria de los videojuegos para mantener la estabilidad económica dentro de estos mundos virtuales.

**Economía virtual compleja:**
Juegos como EVE Online presentan economías virtuales comparables a las de países pequeños, donde los jugadores comercian con materias primas, forman mercados y bancos, y enfrentan situaciones económicas como inflación y recesiones.

**Colaboración con economistas:**
Empresas de videojuegos como CCP Games y Valve han contratado economistas de planta, como Eyjolfur Gudmundsson para EVE Online y Yanis Varoufakis para Valve, quienes aplican principios económicos para mantener el equilibrio en sus juegos.

**Ventajas para los economistas:**
Estudiar mundos virtuales permite a los economistas obtener datos a gran escala y realizar experimentos imposibles en la vida real, lo que lleva a una mayor innovación en la teoría económica.

**Desafíos económicos:**
Sin supervisión adecuada, los juegos pueden enfrentar crisis económicas, como la crisis bancaria virtual en Second Life en 2007, que afectó a muchos jugadores.

**Conclusión:**
Los mundos virtuales ofrecen una oportunidad única para que economistas y desarrolladores de juegos trabajen juntos y aprendan unos de otros, permitiendo un mejor entendimiento de la economía en un entorno controlado y estimulante.
El estudio de la economía en los videojuegos está revolucionando tanto la teoría económica como el diseño de juegos, y promete traer nuevas perspectivas e innovaciones en ambos campos.
Exploring the Basics of Elixir
Tags: webdev, beginners, programming, tutorial
Published: 2024-04-22 00:31:40

## Introduction

Elixir is a high-level, functional, and dynamic language that has gained popularity in recent years. Developed in 2011 by José Valim, it runs on the Erlang Virtual Machine (VM) and shares the same characteristics as the Erlang programming language. Elixir's syntax is similar to Ruby, making it easy to read and learn for developers from various backgrounds. In this article, we will explore some of the basics of Elixir and its key features.

## Advantages of Elixir

1. **Scalability:** One of the major advantages of Elixir is its scalability. It is built on top of the Erlang VM, which is known for its ability to handle large amounts of concurrent processes.

2. **Fault-tolerant:** Elixir has fault-tolerant features built into its core, allowing developers to write code that can handle unexpected errors and continue running without crashing.

3. **Functional programming:** Elixir is a functional programming language, which means it focuses on declaring what should be done rather than how it should be done. This makes it easier to maintain and test code.

## Disadvantages of Elixir

1. **Learning curve:** While Elixir's syntax is similar to Ruby, it may still be challenging for developers coming from other programming languages to learn due to its functional programming paradigm.

2. **Libraries and tools:** As Elixir is a relatively new language, it may still lack some mature libraries and tools compared to more established languages like Java or Python.

## Features of Elixir

1. **Metaprogramming:** Elixir allows developers to write code that can generate and modify itself at runtime, making it easier to write code that adapts to different data or situations.

2. **Concurrency:** Elixir makes use of lightweight processes called actors that communicate with each other through message passing. This makes it easier to handle multiple tasks simultaneously.

3. **Phoenix framework:** Elixir's most popular web framework, Phoenix, is known for its high-performance and scalability, making it a preferred choice for building web applications.

### Example of Elixir Code

```elixir
defmodule Greeter do
  def hello(name) do
    "Hello, #{name}!"
  end
end

IO.puts Greeter.hello("World")
```

This simple example demonstrates defining a module and a function in Elixir, and how string interpolation works within function bodies. The `IO.puts` is used to print the greeting to the console.

## Conclusion

Elixir is a versatile and powerful programming language that offers many advantages for developers. With its growing community and constantly evolving features, it is becoming a popular choice for building web applications and distributed systems. Although it may have a learning curve, its scalability and fault-tolerant nature make it a valuable addition to any developer's toolkit.
Programação não é fácil, mas ao mesmo tempo é fascinante
Tags: programming, beginners
Published: 2024-04-22 00:27:29

Programar um sistema é uma arte. Criar algo com linhas de código. Algo incrivel, curioso, lindo e nada fácil. Até tomar forma,chegar no ponto que se deseja, leva um tempo. Mas é fascinante, ver em algumas linhas de código tomar formar algo que a principio era um mero pensamento abstrato. Durante esse processo é possivel se inovar, o conhecimento é colocado a prova e o principal se aprende algo novo, e outro ponto não há um modo certo de fazer. Vejo alguns programadores que para resolver um determinado problema, apresentam a solução de muitas formas, código curto, código longo e outros medianos. O interessante é fazer do seu jeito, pois com o passar do tempo, quando olhar o mesmo código, feito a uns meses ou anos atras, a reação é de risos, pois é perceptivel, poderia ser melhor. Mas isso de uma certa forma serve para motivação e reflexão, pois anos se esforçando para evoluir,se tornar melhor, entender os emaranhados de códigos prontos ou até mesmo seguindo um tutorial, os error acontecendo e a frustação tomando conta de todo o seu ser, logo vem a frase: "Programação não é para mim". Nesse momento se levante e esfri a cabeça, se distraia, assista um episódio de dorama ou vários episódios de anime ou algo que você curte passar o tempo. Passado um tempo, volte, talvez a solução apareça no primeiro artigo de um forum de programação. Por fim, programação não é fácil, mas ao mesmo tempo é fascinante. Vale a pena se dedicar e mergulhar nesse universo.
Unity Dev post 7
Published: 2024-04-22 00:15:52

I'm still working away at the game, I knew games took a while but I'm surprised by how slow progress has been. Part of that is just me being lazy, I'm trying to do at least something everyday but have taken a few breaks recently.

I got made redundant at my job so that meant more time spent looking for work and doing interview practice but I also just hit a period of fatigue, perhaps its the changing seasons.

I did feel like I reached a sort of eureka moment where adding new menus and game objects felt easy. All of a sudden things clicked into place. However, then I tried adding other weapons and I got bogged down in issues and my architecture for that system now looks bad. I got stuck in issues of rotating bullets into the right place and having missiles that move correctly. As in rotating to their target, having the right amount of acceleration.

I think i'm over that hump but I'll likely need to re-work the weapon/bullet system. Also I don't think i'm using scripted objects correctly. I'm not getting the advertised benefits from them but maybe thats also due to the structure.

I'm now working through leetcode. I'm surprisingly bad at it, I have gone through periods of algorithm practice in the past so I thought I'd be ok.
11章2
Published: 2024-04-22 00:03:49


java --module-path lib -m sample/com.test.Hello


このコマンドは、Java プログラムを実行するためのものです。それぞれの部分について説明します。

1. `java`: Java ランタイムを起動するためのコマンドです。
2. `--module-path lib`: `--module-path` オプションは、モジュールが格納されている場所を指定します。ここでは `lib` ディレクトリにモジュールが格納されていると指定しています。モジュールパスは、モジュールシステムがモジュールを検索する場所を示します。
3. `-m sample/com.test.Hello`: `-m` オプションは、実行するモジュールとそのメインクラスを指定します。ここでは `sample` モジュールの `com.test.Hello` クラスがメインクラスです。これにより、指定されたモジュールのメインクラスが実行されます。

つまり、このコマンドは、`lib` ディレクトリにある `sample` モジュールの `com.test.Hello` クラスを実行します。これにより、`Hello` クラスのメインメソッドが実行されます。
Creating Custom Validation Rules in Laravel
Tags: laravel, php
Published: 2024-04-21 23:52:32

by default we using request laravel which validates user input data.

but we want Create Custom Validation rules which by default request validation we don't use.

with under command create two file ValiMobile and ValiPassword:

```
php artisan make:rule ValidMobile
php artisan make:rule ValidPassword
```

I got for Regex from site under helping.

```
https://ihateregex.io/
```

Code VailMobile :

```
class ValidMobile implements ValidationRule
{
    public function __construct()
    {
        //
    }
    public function passes($attribute, $value): bool|int
    {
        return preg_match('/^9[0-9]{9}$/', $value);
    }

    public function validate(string $attribute, mixed $value, Closure $fail): void
    {
        if (!preg_match('/^9[0-9]{9}$/', $value)) {
            $fail('Your ' . $attribute . 'number is 10 digits and enter without zero.');
        }
    }
}
```

Code VailPassword :

```
class ValidPassword implements ValidationRule
{
    public function __construct()
    {
        //
    }
    public function passes($attribute, $value): bool|int
    {
        return preg_match('/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/', $value);
    }

    public function validate(string $attribute, mixed $value, Closure $fail): void
    {
        if (!preg_match('/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/', $value)) {
            $fail('The type of'  . $attribute .  'is inappropriate and must be a combination of uppercase, lowercase letters and numbers.');
        }
    }
}
```

at the end Calling Two File VailMobile and VailPassword:

```
use App\Rules\ValidMobile;
use App\Rules\ValidPassword;

return Validator::make($data,
   [
      'mobile' => ['nullable', 'string', 'unique:users', new ValidMobile()],
      'password' => ['required', 'string', 'confirmed', new ValidPassword()],
   ]
);
```
Good luck :)
Help Needed: "Object reference not set to an instance of an object" Error in Visual Studio
Tags: visualstudio, sqlserver
Published: 2024-04-21 23:17:45





Hey Dev community!

I'm excited to be joining this platform and reaching out for some assistance. I'm relatively new to coding and have been exploring Visual Studio for my projects. However, I've recently encountered an issue that has me stumped.

Every time I try to run a new query in Visual Studio, Visual Studio throws an error: "Object reference not set to an instance of an object." I've tried to troubleshoot it myself by searching online, but I'm not quite grasping the solution.

Could someone please shed some light on what this error means and how I can go about fixing it? Any guidance or tips would be greatly appreciated!

Looking forward to being a part of this community and learning from all of you.

Thanks in advance!
CSS Cascade, Selector and Specificity.
Published: 2024-04-21 22:58:29

The backbone of website development includes HTML, CSS and a programming language, which JavaScript take lead out of many. HTML basically deal with the content on the website while CSS focus on styling the content to make it appealing and JavaScript focus on functionality. Lets look into CSS, to start with, CSS stands for Cascading Styling Sheet and the topic is to explain CSS Cascade, CSS Selector and CSS Specificity. Lets go
CSS Cascading is set of rules that matters to the result you get. If two rules are set to a particular tag which one will work depends on the rules.

**[CSS Selector](https://www.w3schools.com/css/css_selectors.asp)** is the way of selecting html elemnt, and styling it.
Ways include, tag selector, class selector, ID selector... e.t.c

```
p {
  text-align: center;
  color: red;
}
```
The above is element selector but what happens when we have something like this

```
<!DOCTYPE html>
<html>
<head>
<style>
.center{
  text-align: center;
  color: red;
}
</style>
</head>
<body>

<h1 class="center">This heading will be red and center-aligned</h1>
<p class="center">This paragraph will be red and center-aligned.</p> 

</body>
</html>
```
but if i want to it to take effect on P alone, then we have it as 

```
p {
  text-align: center;
  color: red;
}
```
The above is element selector but what happens when we have something like this

```
<!DOCTYPE html>
<html>
<head>
<style>
p.center{
  text-align: center;
  color: red;
}
</style>
</head>
<body>

<h1 class="center">This heading will not be affected</h1>
<p class="center">This paragraph will be red and center-aligned.</p> 

</body>
</html>
```
The H1 is not affected because of more specification given to the selector.

[**CSS Specificity**](https://www.w3schools.com/css/css_specificity.asp) is selecting with more specification which you want to style having the rule in mind(Cascading). It what give priority to which rules to be override when we have more than one to rule to an element, just like the example above.

The specificity can be calculated by you and this helps you to know what and what is working or not working from the code you wrote, to calculate this type of selectors and how you combine it caries weight. Check this [Specificity Calculator](https://specificity.keegan.st/#google_vignette), need some help? [check this out.](https://www.youtube.com/watch?v=F9gC3oz397s) 

If you find this helpful, leave a comment. Also, have any opinion or contribution drop it in comment section. Thanks
python range()
Published: 2024-04-21 20:22:18

 Python'daki range() fonksiyonu, belirli bir aralıktaki sayıları oluşturmak için kullanılır. İşte bazı örnekler:

**Tek parametreli kullanım**: range(n) - Bu kullanım, 0'dan (n-1)'e kadar olan sayıları oluşturur.

```
for i in range(5):
    print(i)
Bu kodun çıktısı:

0
1
2
3
4
```

**İki parametreli kullanım**: range(start, stop) - Bu kullanım, 'start' değerinden başlayarak, 'stop' değerine kadar (stop-1) olan sayıları oluşturur.

```
for i in range(5, 10):
    print(i)
Bu kodun çıktısı:

5
6
7
8
9
```

**Üç parametreli kullanım**: range(start, stop, step) - Bu kullanım, 'start' değerinden başlayarak, 'stop' değerine kadar olan sayıları 'step' miktarında artırarak oluşturur.

```
for i in range(0, 10, 2):
    print(i)
Bu kodun çıktısı:

0
2
4
6
8
```

Bu örnekte, 0'dan başlayarak 10'a kadar olan sayılar oluşturuluyor ve her adımda sayı 2 artırılıyor. Bu yüzden çıktıda sadece çift sayıları görüyoruz.
Educational kindergarten games
Published: 2024-04-21 20:14:22

Educational kindergarten games are a fantastic way to engage young learners while helping them develop important skills. Here are some popular and effective educational games for kindergarten:

**Letter and Number Recognition Games**: Activities that involve identifying letters and numbers, such as alphabet puzzles, number matching games, or letter bingo.
**Color and Shape Activities**: Sorting games with colored objects or shape matching puzzles can enhance cognitive skills.
**Memory and Matching Games**: Memory card games where children match pairs or find matching shapes, colors, or numbers.
**Storytelling and Role-Playing**: Encourage creativity and language development through storytelling games or pretend play activities.
**Fine Motor Skills Activities**: Games that involve cutting, pasting, threading beads, or playing with building blocks help improve hand-eye coordination.
Javascript factorial
Tags: discuss, webdev, javascript, programming
Published: 2024-04-21 20:01:59

Hey everyone!

I've stumbled upon this interesting JavaScript code that calculates the factorial of a number, and I'd love to hear your thoughts on it!

```Javascript

function factorial(n) {
    if (n === 0 || n === 1) {
        return 1;
    } else {
        return n * factorial(n - 1);
    }
}

// Test the factorial function
const num = 5;
console.log(`Factorial of ${num} is: ${factorial(num)}`);

```

## Discussion Points:

- **Logic in the Code:** Can you explain how the factorial function works, especially the recursive part?

- **Test Case:** The code tests the factorial function with the number 5. How would you test it with different numbers?

- **Recursion:** What are your thoughts on using recursion to solve this problem? Are there alternative approaches you would consider?

- **Improvements:** Are there any improvements or optimizations you would suggest for this code?

[Explore more on my Youtube channel](https://www.youtube.com/channel/UCeGzR-6TI58skwlha6JNhDw)

Feel free to share your insights, questions, or any other comments you have about the code!

Let's dive in and explore together! 🚀🔍