teleren/devto huggingface dataset:
[LeetCode] Concatenation of Array with Modular Arithmetic
Tags: algorithms
Published: 2024-05-04 05:17:51

This is a memo of when I solved [1929. Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/).

## Question

You're given an array, nums, of arbitrary length. Your task is to return a new array, ans, that is twice as long as nums. The new array, ans, should satisfy the following conditions: ans[i] == nums[i] and ans[i + n] == nums[i], where 0 ≤ i < n.

## Modular Arithmetic

Modular arithmetic is a mathematical system that operates on integers by focusing on the remainder. The expression, x mod N, asks for the remainder of x when divided by N. For example, 13 mod 5 results in 3, because 3 is the remainder when 13 is divided by 3. a ≡ b (mod N) means that they share the same remainder when divided by N — for instance, 17 ≡ 8 (mod 3). In other words, modular arithmetic is a system that groups integers with their reminders.

![an image of i mod 3 where i is an integers](https://cdn-images-1.medium.com/max/2672/1*qpZVI5_iXUnOIv3P-RsCYg.png)

## Solution Approach

Let’s say the nums = [1, 2, 3]. The ans should be [1, 2, 3, 1, 2, 3] = [nums[0], nums[1], nums[2], nums[0], nums[1], nums[2]]. Therefore in general, we want to get an array of [nums[0], nums[1],,,, nums[nums.lenght-1], nums[0], nums[1],,,, nums[nums.lenght-1]].

Here is the time to employ modular. Let’s set i as an arbitral index of nums, N as the length of nums, and idx as an arbitral index of ans. Then we can get idx with i mod N. With the example above, 0 mod 3 = 3 mod 3 = 0, 1 mod 3 = 4 mod 3 = 1, 2 mod 3 = 5 mod 3 = 2.

## Implementation

% is the operator that gets reminders in JavaScript.
```javascript
    /**
     * @param {number[]} nums
     * @return {number[]}
     */
    var getConcatenation = function(nums) {
        let ans = []
        for(let i = 0; i < nums.length * 2 ; i ++){
            const idx = i % nums.length // i mod nums.length
            ans.push(nums[idx])
        }
        return ans
    };
```

## Generalization

What I like about the solution most is that it’s easy to generalize the number of concatenations. The question asks to repeat two times, but we can easily modify the code to repeat any number of times you want.
```javascript
    /**
     * @param {number[]} nums
     * @param {number} x // the number of repetition
     * @return {number[]}
     */
    var getConcatenation = function(nums, x) {
        let ans = []
        for(let i = 0; i < nums.length * x; i ++){
            const idx = i % nums.length // i mod nums.length
            ans.push(nums[idx])
        }
        return ans
    };
```
⚠️ This is not a recommended answer, but I just wanted to say there is a way to utilize Math. You can find a model answer here: https://youtu.be/68isPRHgcFQ

## Ref
[**Modular Arithmetic | Brilliant Math & Science Wiki**](https://brilliant.org/wiki/modular-arithmetic/)

The original article is [here](https://medium.com/@lada496/leetcode-concatenation-of-array-with-modular-arithmetic-a944bfc0cecf)
Krug Xtreme - Buy Best Gym Wear & Sportswear For Men & Women Online Shopping In India
Tags: tiedy, leggings, tshirts, sportsbra
Published: 2024-05-04 05:10:31

Krug Xtreme - Buy Best Gym Wear & Sportswear For Men & Women Online Shopping In India
KrugXtreme — Buy Best Gym Wear & Sportswear For Men & Women Online Shopping In India, KrugXtreme — Buy Best Gym Wear & Sportswear Metallic Body Sets, Tie & Die Body Sets, Xtreme Co-ord set, Leggings & Sweatpants, Tie & Dye Leggings, All Bottom Wear For Women , T-shirts, Sports Bra, Gym Tank Tops, All Topwear For Women, Ladies, Girls Online Shopping In India,
KrugXtreme — Buy Best Gym Wear & Sportswear T-shirts, Tanks, Vest & Stringers, Joggers & Track pants, Shorts, All Bottomwear And Topwear For Men, Boys
KrugXtreme is your ultimate destination for top-notch gym wear and sportswear in India. With a diverse range of high-quality products designed to elevate your performance and style, KrugXtreme ensures that you look and feel your best during every workout session.

Metallic Body Sets, Tie & Die Body Sets, Xtreme Co-ord set, Leggings & Sweatpants, Tie & Dye Leggings, All Bottom Wear For Women , T-shirts, Sports Bra, Gym Tank Tops, All Topwear For Women,
T-shirts, Tanks, Vest & Stringers, Joggers & Track pants, Shorts, All Bottomwear And Topwear For Men.

https://www.krugxtreme.com/

https://www.krugxtreme.com/collections/men

https://www.krugxtreme.com/collections/t-shirt

https://www.krugxtreme.com/collections/tanks

https://www.krugxtreme.com/collections/vests-stringers

https://www.krugxtreme.com/collections/all-topwear

https://www.krugxtreme.com/collections/all-bottomwears

https://www.krugxtreme.com/collections/joggers-track-pants

https://www.krugxtreme.com/collections/shorts

https://www.krugxtreme.com/collections/women

https://www.krugxtreme.com/collections/bodysuits

https://www.krugxtreme.com/collections/metallic-bodysuits

https://www.krugxtreme.com/collections/tie-die-bodysuits

https://www.krugxtreme.com/collections/xtreme-co-ord-set

https://www.krugxtreme.com/collections/t-shirts

https://www.krugxtreme.com/collections/sports-bra

https://www.krugxtreme.com/collections/tank-tops

https://www.krugxtreme.com/collections/women-topwears

https://www.krugxtreme.com/collections/leggings-sweatpants

https://www.krugxtreme.com/collections/tie-dye-leggings

https://www.krugxtreme.com/collections/womens-bottomwear

https://www.krugxtreme.com/collections/best-seller

https://www.krugxtreme.com/pages/contact
Krazy Box - Buy Gym & Sports Wear For Men & Women Online In Indian
Tags: gymtshirts, sportsbra, leggings, tanktop
Published: 2024-05-04 05:09:31

Krazy Box - Buy Gym & Sports Wear For Men & Women Online In Indian
krazybox — Buy Gym & Sports Wear For Men & Women Online In Indian

India’s №1 Gym Clothing. Get Ready for Summer Season with krazybox. Get Up To 20% Off. Limited Time Offer. Revolutionary Gym Wear Designed For The Fitness Enthusiasts. Shop Your Fav Gym Wear Today. T-shirts. Hoodies. Sweatproof Material. Express Delivery. Gym Stringers.
trusted Gym Wear for men. Athleisure Gym clothes — Outfit & Apparel consist T shirts, Shorts, Dress, Hoodies, Track Pants, Stringers for workout. The outfit are exclusively designed for Fitness Enthusiasts who love Drifit Gym & Fitness Clothes. A recognized name in Gym Wear For Women too.
Gym dress for men: krazybox is India’s leading Gym clothing brands for men. Buy sports wear, fitness clothing and Gym dress for men online in India directly from the manufacturer at a low wholesale price.

https://krazybox.in/
https://krazybox.in/categories/men/
https://krazybox.in/categories/men/t-shirts-m/
https://krazybox.in/categories/men/t-shirtsm-graphics/
https://krazybox.in/categories/men/polos/
https://krazybox.in/categories/men/polos/premium-organic-cotton-polos-certified/
https://krazybox.in/categories/men/polos/premium-cotton-polos/
https://krazybox.in/categories/unisex/hoodies/
https://krazybox.in/categories/men/printed-m-hoodies/
https://krazybox.in/categories/unisex/hoodies/solid-m-hoodies/
https://krazybox.in/categories/men/jackets-men/
https://krazybox.in/categories/unisex/reversible-jackets/
https://krazybox.in/categories/women/
https://krazybox.in/categories/women/t-shirts-w/
https://krazybox.in/categories/women/loungewear/
https://krazybox.in/categories/women/t-shirtsw-graphics/
https://krazybox.in/categories/women/polosw/
https://krazybox.in/categories/women/polosw/premium-organic-cotton-certified-polos-w/
https://krazybox.in/categories/women/polosw/premium-cotton-polos-w/
https://krazybox.in/categories/unisex/hoodies/
https://krazybox.in/categories/women/printed-w-hoodies/
https://krazybox.in/categories/unisex/hoodies/
https://krazybox.in/categories/women/jackets-women/
https://krazybox.in/categories/unisex/reversible-jackets/
https://krazybox.in/categories/unisex/
https://krazybox.in/categories/unisex/hoodies/
https://krazybox.in/categories/unisex/reversible-jackets/
https://krazybox.in/categories/themes/
https://krazybox.in/categories/themes/ashudh/
https://krazybox.in/categories/themes/bikers/
https://krazybox.in/categories/themes/daaru/
https://krazybox.in/categories/themes/doodles/
https://krazybox.in/categories/themes/environment/
https://krazybox.in/categories/themes/foodies/
https://krazybox.in/categories/themes/funny/
https://krazybox.in/categories/themes/gym/
https://krazybox.in/categories/themes/lazy/
https://krazybox.in/categories/themes/pets/
https://krazybox.in/categories/themes/travel/
https://krazybox.in/categories/combos/
LA. Care Phone Number 888-452-XXXX, Email ID Details, Service
Published: 2024-05-04 05:06:20

LA. Care Phone Number: A public [organisation ](https://www.companycontactdetail.com/)called the Local Initiative Health Authority for Los Angeles County (L.A. Care) offers Medi-Cal and four other health [coverage](https://www.companycontactdetail.com/nathaly-cuevas-phone-number/) programmes to low-income residents of Los Angeles County.
The [California ](https://www.companycontactdetail.com/rhett-mclaughlin-phone-number/)Department of Managed Health Care and the California Department of Health Care Services fined $55 [million ](https://www.companycontactdetail.com/drew-dirksen-phone-number/)to LA Care in March 2022 for “[deep-rooted](
https://www.companycontactdetail.com/connor-darlington-phone-number/), systemic failures that [threaten ](
https://www.companycontactdetail.com/belk-credit-card-phone-number-1-800-669-xxxx-email-id-details-history/)the health and safety of its members.” The business [consented ](v)to a $1.3 million settlement in September 2023 to address two HIPAA infractions...read more
Suggested Link: 
[Company Contect Detail](https://www.companycontactdetail.com/)

[Nathaly cuevas](https://www.companycontactdetail.com/nathaly-cuevas-phone-number/)

[rhett mclaughin](https://www.companycontactdetail.com/rhett-mclaughlin-phone-number/)

[dirken](https://www.companycontactdetail.com/drew-dirksen-phone-number/)

[connor darlington](https://www.companycontactdetail.com/connor-darlington-phone-number/)

[Belk credit card phone number](https://www.companycontactdetail.com/belk-credit-card-phone-number-1-800-669-xxxx-email-id-details-history/)

[Global lending phone number](https://www.companycontactdetail.com/global-lending-phone-number/)

[Toyota phone number](https://www.companycontactdetail.com/toyota-phone-number/)

[La care phone number](https://www.companycontactdetail.com/la-care-phone-number/)

[Lands end phone number](https://www.companycontactdetail.com/lands-end-phone-number/)


ROT
AWS fundamental RoadMap 🎯
Tags: aws, beginners, webdev, interview
Published: 2024-05-04 04:38:29

Hello devs! 🫶🏻
Here is roadmap of AWS fundamentals, everything you need to hit your full stack developer interview!

So if you come from Instagram you know 
if we reach to 5k followers we will do online session for this!
so follow now if you haven’t did 
https://www.instagram.com/codeandcrunch/

MindMap Link : https://miro.com/app/board/uXjVKP6CDLc=/

Follow me on Instagram and let's hit **5k followers**! 🎉 
Once we reach our goal, I'll host an exclusive expert session to guide you through mastering AWS like a pro! 💡 Don't miss out on this opportunity to level up your skills and transform your career! Follow now and be part of the AWS adventure! 🔥
fill this form
https://docs.google.com/forms/d/e/1FAIpQLSeFlPtWvqWNypoc-voNzPwl-HW5deklonTqorurI48zydABIw/viewform?usp=sf_link
Welcome
Published: 2024-05-04 04:26:58


  

My name is Eduardo Valverde, I´m from México.

I like sports and exercise very much, I used to train swimming and American football. 

I'm the kind of person who prefers to spend his time getting to know places, having a coffee in different cafes, visiting different restaurants and relaxing in different parks. 

I can say that I like dancing very much, I know how to dance cumbia, bachata, salsa, etc. This is because since I was a child my family forced me to dance at parties, it went from being my worst nightmare to what I enjoy the most at a party. 

If whoever is reading this is Latino, you will understand. If you are not Latino, then basically in every Latino party, there will be an aunt, uncle, your mom, cousin, etc, who will always want to dance, because for them a party is not just sitting and eating, they must drink and dance to enjoy.

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

Anyway that's a little bit about me, now I'm a young-adult getting into the programming world living in Canada.


---

What I expect from this course is to understand more about the world of programming. 

A funny detail is that I regret having chosen to study industrial engineering instead of computer systems engineering. I think when you are only 18 years old is a little to hard to choose the career you will have to survive with for the rest of your life. 

Never mind, i like my career, but i have always been attracted to technology, understand how it works and how you can use it to built useful tools with it. 

Up to this point I have enjoyed the course very much, I have learn a bunch of information that makes me feel more optimistic and enthusiastic about taking this course. 

What I want to achieve at the end of this course, is to be able to have the basis to be able to do my own research and start testing on my computer. Generate programs, that don't work, stress myself out and try again. 

And well, that's a little muddy about me and what I'm studying, I hope for the next one this blog will be about how I became a millionaire generating an application that has impacted society .......... or to fulfill another task that they leave me in this course.

If you want to know more about me.....
https://www.instagram.com/lalo_valv/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gaz8q392eip1omnryisn.jpeg)
Sahibganj Jharkhand, List of CD Blocks / Subdivisions, Geographical Location
Published: 2024-05-04 04:18:42

Sahibganj Jharkhand: Sahibganj [district ](https://ourjharkhand.com/)ranks thirteenth in terms of the total population in the state and thirteenth in respect of [decadal ](https://ourjharkhand.com/cu-jharkhand/)population [growth ](https://ourjharkhand.com/jharkhand-bhumi-sudhar/
)rate (2001–11) out of twenty-four districts. With a sex ratio of 952, it ranks fifteenth	 in the [state](https://ourjharkhand.com/jharkhand-university-of-technology/). The district comprises nine blocks, namely Sahibganj, Mandro, Borio, Barhait, Taljhari, Rajmahal, Udhwa, Pathna and Barharwa. As per the 2011 census, the district has 1349 villages and 8 towns [distributed ](https://ourjharkhand.com/amity-university-jharkhand/)over three assembly constituencies. The Census 2011 data [indicated ](https://ourjharkhand.com/shramadhan-jharkhand/)that the percentage share of the Scheduled Caste population to the total population was 6.29 per cent while that of Scheduled Tribes was 26.80 per cent. The percentage of BPL [households ](https://ourjharkhand.com/amity-university-jharkhand/)in rural areas is 86.03 per cent based on the [total number](https://ourjharkhand.com/shramadhan-jharkhand/) of rural households in the 2011 census and the BPL [revision ](https://ourjharkhand.com/cu-jharkhand/)survey of 2010-11...[read more](https://ourjharkhand.com/sahibganj-jharkhand/)
Suggested link: 
[our jharkhand](https://ourjharkhand.com/)

[cu jharkhand](https://ourjharkhand.com/cu-jharkhand/)

[Jharkhand university](https://ourjharkhand.com/jharkhand-university-of-technology/)

[amity university](https://ourjharkhand.com/amity-university-jharkhand/)

[shramadhan](https://ourjharkhand.com/shramadhan-jharkhand/)

[amity-university-jharkhand](https://ourjharkhand.com/amity-university-jharkhand/)

[cu-jharkhand](https://ourjharkhand.com/cu-jharkhand/)

[shramadhan-jharkhand](https://ourjharkhand.com/shramadhan-jharkhand/)

[sahibganj-jharkhand](https://ourjharkhand.com/sahibganj-jharkhand/)

[jharkhand-bhumi-sudhar](https://ourjharkhand.com/jharkhand-bhumi-sudhar/)


ROT
Manuel's Article
Published: 2024-05-04 04:15:23

Hello everyone, My name is Manuel Trujillo I'm from Cuernavaca, Mexico. I'm 25 years old and nowadays I'm living in Mission BC. 

I'm a person who likes video games and also tech. 
Something that I enjoy is making funny videos, sometimes I post them on Instagram like stories other times I post them on TikTok. 
If you want to see more about me go to my IG:
https://www.instagram.com/_manuel.tru/

I studied Industrial Engineering in Mexico, I worked for 2 years as a Production Supervisor in a cardboard and paper factory, and then I decided to obligate myself to improve my English skills to get the chance to have a better job so that is why I decided to move to Canada and my interest in technology make me chose the Web Development Diploma. 

In this course, I expect to learn some basic tools such as git and GitHub and their commands, how they work, and also how useful they are.

During the first week, all the topics were so interesting, the most I liked was "Number Systems" I enjoyed doing the exercises. 


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

Even though I'm taking the classes online, Awshaf (the teacher) pays attention to us if there are questions about something, which is cool. 

After this course, I would like to know more about Git, GitHub, or even about Visual Studio Code and also, know commands that gonna help me in the next courses. 
If it's possible to make new friends although I take the classes online would be awesome.


Thanks for reading me.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fe3gg35avfs5vq7fwex4.gif)
5 HTML Tags & Attributes ที่ควรรู้สำหรับ SEO
Tags: seo, website, html, webdev
Published: 2024-05-04 04:15:12

[SEO คืออะไร?](https://contentmastery.io/learn-seo/what-is-seo/) เชื่อว่า Dev หลายคนอาจจะเคยได้ยินเกี่ยวกับ SEO มาบ้างไม่มากก็น้อยครับ ซึ่งมันก็คือกระบวนการปรับเว็บไซต์ของเราให้ดีต่อ Search Engine อย่าง Google เพื่อที่ว่า Google จะได้นำเว็บเราไปแสดงผลบนหน้าแรก ๆ นั่นเอง

ส่วนของการทำ SEO ก็มีอยู่มากมายหลากหลายวิธี แต่ในวันนี้เราจะมาทำความรู้จักกับ HTML Tags & Attributes 5 ตัวที่จำเป็นสำหรับ SEO

## Title Tag
Meta Title Tag เป็นส่วนหนึ่งของ HTML tag ที่ใช้ในการกำหนดชื่อหรือหัวข้อของหน้าเว็บไซต์ ซึ่งจะปรากฏบนแถบหัวของเบราว์เซอร์เมื่อผู้ใช้งานเข้ามายังหน้าเว็บไซต์ของคุณ นอกจากนี้ Meta Title Tag ยังมีความสำคัญสูงในการทำ SEO เพราะเป็นหนึ่งในปัจจัยที่ส่งผลต่อการติดอันดับบนเครื่องมือค้นหา

ตัวอย่าง Title Tag
`<title> HTML Tags & Attributes ที่ควรรู้สำหรับ SEO | Dev.to`

## Meta Description
Meta Description คือ แท็กหนึ่งในเว็บไซต์ที่ใช้ในการกำหนดและบรรยายเนื้อหาหลักของหน้าเว็บเพจ ซึ่งจะปรากฏในผลการค้นหาของเครื่องมือค้นหา (เช่น Google) เมื่อเว็บไซต์ของคุณปรากฏในผลการค้นหา โดยปกติแล้ว Meta description จะปรากฏใต้ชื่อเว็บไซต์ในผลการค้นหา และเป็นที่บ่งบอกให้ผู้ใช้รู้ว่าเนื้อหาของเว็บเพจนั้นเกี่ยวข้องกับเรื่องอะไร และสรุปเนื้อหาหลักในหน้าเว็บนั้นๆ ให้กับผู้ใช้งาน

## H1 (Heading Tag)
Heading tag (แท็กหัวข้อ) คือแท็กในภาษา HTML ที่ใช้ในการกำหนดระดับของหัวข้อในเว็บเพจ ซึ่งมีหน้าที่ช่วยให้เนื้อหาบนหน้าเว็บเรียงลำดับและมีโครงสร้างที่เป็นระเบียบ หัวข้อจะช่วยให้ผู้ใช้และเครื่องมือค้นหา (search engine) เข้าใจเนื้อหาของเว็บไซต์ได้ง่ายขึ้น และสามารถนำเสนอหัวข้อและสาระความสำคัญของเนื้อหาให้กับผู้ใช้ได้ถูกต้อง


## alt (Image Alternate Tag)
alt เป็นแท็กที่ใช้สำหรับใส่คำอธิบายรูปภาพเพิ่มเติม ซึ่งควรใส่ให้สอดคล้องกับภาพ เพื่อที่จะให้ Google เข้าใจเกี่ยวกับภาพนั้นมากยิ่งขึ้น ซึ่งจะทำให้ Google นำภาพนั้นมาแสดงเมื่อมีคนเสิร์ชเกี่ยวกับภาพนั้น


## Do follow & No follow
ในเว็บโลกนิยม (World Wide Web), การใช้งานและการตั้งค่าลิงก์ (links) สามารถแบ่งออกเป็นสองประเภทหลัก คือ No-follow และ Do-follow ซึ่งมีความแตกต่างกันดังนี้
- No-follow เป็นแอตทริบิวต์ (attribute) ที่สามารถใส่ในแท็ก <a> (ลิงก์) เพื่อบ่งบอกต่อเครื่องมือการค้นหา (search engine) ว่าไม่ควรติดตามลิงก์นี้ไปยังหน้าเว็บปลายทาง ซึ่งหมายความว่าลิงก์นั้นไม่มีผลต่อการส่งความสำคัญ (link juice) หรือส่งสัญญาณการค้นหาของเว็บไซต์ปลายทางที่เชื่อมโยงไป
- Do-follow เป็นลิงก์ที่ไม่มีแอตทริบิวต์ No-follow ต่ออยู่ในแท็ก <a> เพื่อเชื่อมโยงไปยังหน้าเว็บปลายทาง และเครื่องมือการค้นหาจะติดตามลิงก์นี้และให้ความสำคัญในเรื่องของ link juice
Reinforcement learning
Published: 2024-04-30 15:26:51

Reinforcement learning is a type of machine learning method in which an agent learns to find the best actions or decisions to achieve a specific goal. This is usually accomplished through a reward function: the agent receives positive rewards when it performs correct actions and negative rewards (or punishments) when it performs wrong actions.

Reinforcement learning is often used in fields such as game theory, control theory, information theory and statistics. For example, in a game of chess, the agent's goal is to win the game, and each move affects the agent's progress in achieving that goal.

The basic components of the progressive learning model are:

Agent: An entity with the ability to learn and make decisions.
Environment: The world with which the agent interacts.
Actions: Actions that the agent can perform in the environment.
States: States of the environment that can be perceived by the agent.
Reward: The feedback the agent receives for each action.
The agent tries to learn which action will yield the highest total reward in each situation. This often requires a process of trial and error, and the agent develops better strategies over time.

Reinforcement learning provides the ability to make decisions in complex and uncertain environments and is used in many applications such as autonomous vehicles, robotics, gaming, and resource management.

In the reinforcement learning model, reward and punishment are usually delivered through a human-determined reward function. This function is based on the actions the agent takes and the consequences of those actions.

For example, in a chess game, if the agent makes a move and wins the game, the reward function may reward the agent with a positive reward (e.g., +1). If the agent loses the game, the reward function can penalize the agent with a penalty (e.g. -1).

The design of the reward function is often done to encourage a specific task or goal. For example, in a maze solving task, the reward function may encourage the agent to find the exit of the maze.

This process is usually completely automatic and does not require human intervention. However, the process of designing the right reward function often requires trial and error and expert knowledge. Additionally, the design of the reward function greatly affects the agent's learning rate and overall performance.

As a result, reward and punishment are given automatically through a reward function to encourage the agent to perform a specific task or goal. This function is usually designed by the human and is based on the agent's actions and the consequences of those actions.