teleren/devto huggingface dataset:
Split a Number into an Array in JavaScript
Published: 2024-03-06 13:20:02

Title : [Split a Number into an Array in JavaScript ](https://askyt.info/split-a-number-into-an-array-in-javascript/)

let's split a number into an array in [JavaScript](https://askyt.info/category/javascript/) using the specified steps:

### Example 1:

```javascript
const number = 123456;
const array = String(number).split('').map(Number);
console.log(array); // Output: [1, 2, 3, 4, 5, 6]
```

Explanation:
1. `String(number)` converts the number `123456` to a string, resulting in the string `'123456'`.
2. `.split('')` splits the string into an array of individual characters, resulting in `['1', '2', '3', '4', '5', '6']`.
3. `.map(Number)` maps each element of the array to its numeric equivalent, resulting in `[1, 2, 3, 4, 5, 6]`.

### Example 2:

```javascript
const number = 987654;
const array = String(number).split('').map(Number);
console.log(array); // Output: [9, 8, 7, 6, 5, 4]
```

Explanation:
- Same steps as above, but applied to the number `987654`, resulting in `[9, 8, 7, 6, 5, 4]`.

### Example 3:

```javascript
const number = 1000;
const array = String(number).split('').map(Number);
console.log(array); // Output: [1, 0, 0, 0]
```

Explanation:
- Same steps as above, but applied to the number `1000`, resulting in `[1, 0, 0, 0]`.

### Example 4:

```javascript
const number = 123;
const array = String(number).split('').map(Number);
console.log(array); // Output: [1, 2, 3]
```

Explanation:
- Same steps as above, but applied to the number `123`, resulting in `[1, 2, 3]`.

### Example 5:

```javascript
const number = 987;
const array = String(number).split('').map(Number);
console.log(array); // Output: [9, 8, 7]
```

Explanation:
- Same steps as above, but applied to the number `987`, resulting in `[9, 8, 7]`.

In each example, we convert the number into a string, split it into individual characters, and then convert each character back into a number. This results in an array where each element represents a digit of the original number.
Spring Boot @RestController, 2024-03-06
Tags: springboot
Published: 2024-03-06 12:15:55

Java MVC 구조에서 Controller은 흐름을 제어하며, View를 반환하는 역할도 합니다. 하지만 Controller에서 View뿐만 아니라, Data(Json)를 반환해야 하는 경우도 있습니다. 그럴 때 @ResponseBody 어노테이션을 사용해 줍니다.

```
@Controller 
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @GetMapping(value = "/users")
    public @ResponseBody ResponseEntity<User> findUser(@RequestParam("userName") String userName){
        return ResponseEntity.ok(userService.findUser(user));
    }
    
```

@RestController는 @Controller에 @ResponseBody가 추가된 것으로 Json 형태로 데이터를 반환합니다.

```
@RestController
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @GetMapping(value = "/users")
    public User findUser(@RequestParam("userName") String userName){
        return userService.findUser(user);
    }
```

이러한 경우 클라이언트가 예상하는 HttpStatus를 설정이 불가능하기 때문에, 따로 설정이 필요합니다.

```
	@RequestMapping("/errorCode")
	public ResponseEntity<Void> errorCode(){
		
		return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
	}
```

리스트와 함께 404 에러 코드를 같이 보낼 수도 있습니다.
```
return new ResponseEntity<>(slist, HttpStatus.NOT_FOUND);
```

@RequiredArgsConstructor는 초기화 되지않은 final 필드나, @NonNull 이 붙은 필드에 대해 생성자를 생성해 줍니다.
새로운 필드를 추가할 때 다시 생성자를 만들어서 관리해야하는 번거로움을 없애줍니다. (@Autowired를 사용하지 않고 의존성 주입)

_참조: https://mangkyu.tistory.com/49

https://dreamcoding.tistory.com/83

https://dydals5678.tistory.com/2_
Lappe's Bee Supply
Published: 2024-03-06 13:14:19

Lappe's Bee Supply offers some of the best mated Saskatraz Hybrid queen bees for sale online! Queens will be shipped from April through the end of August. Queens will arrive in California mini queen cages, or 3 hole queen cages. Regardless of whichever type of queen cage your queen arrives in, there will be a candy plug already in one end filled with queen candy.


[Carniolan queen bees for sale](https://www.lappesbeesupply.com/carniolan-queen-bee-free-shipping/)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6070h22cmpe3014p95q1.jpg)
UPSC Classes Fees in Surat | UPSC Tuition in Surat | CompetitionPedia
Tags: upsc
Published: 2024-03-06 13:13:35

Join CompetitionPedia, the [Best UPSC Tution in Surat ](https://competitionpedia.in)& Vadodara. We offer UPSC Classes with low fees for students willing to learn. To know more please call us at 9510011074 or visit our official website competitionpedia.in
First Program Part-03
Tags: beginners, programming, python, tutorial
Published: 2024-03-06 13:00:00

এই টা tutorial সিরিজ এর সব চেয়ে ছোট ব্লগ হবে। কারন এখানে শুধু মাত্র একটা বিষয় নিয়ে আলোচনা করার চেষ্টা করব। আজকে আমরা প্রোগ্রামিং এর জগতে পা দিব। ভয় পাচ্ছেন?

ভয় পাওয়ার কোন প্রয়োজন নেই। একবার ভেবে দেখুন তো যারা এখন প্রোগ্রামিং খুব ভালো পারে তারা কিভাবে শিখেছে। তারা আপনার মত এইরকম পর্যায়ে ছিল। তারা শিখতে পেরেছে আপনিও পারবেন। 

যাই হোক , চলুন এবার শুরু করি,

- প্রথমে PyCharm ওপেন করুন। নিচের মত একটা window আসবে। এখান থেকে New project এ click করতে হবে।

![Step 0. Open PyCharm and Create a Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qhi6bdenbw1vlzaqom57.png)


- এরপর নিচের মত window আসলে, এখান থেকে Project এর নাম type করে create এ ক্লিক করতে হবে।
![Step 1. Set Pycharm Configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70q2w2wq1bj1bqbvyvcw.png)

- এরপর নিচের মত একটা window আসবে। বাম side panel টি হলো ফাইল ম্যানেজার আর ডানদিকের অংশ টি হল code editor।

![Step 2. Overview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqb3lygcd9zze5hopj42.png)

- এবার ডান দিকের যত কোড আছে কেটে দিতে হবে। তারপর নিচের কোডটাকে রান লিখতে হবে।

```py
print('Hello World')
```

![Step 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmhv4zs5g9eucmzlekr5.png)




- এর Menu Bar থেকে Navigation Bar টা Enable করতে হবে। এই জন্য View → Appearance → Navigation Bar এর ক্লিক করতে হবে। এরপর নিচের মত একটা Bar দেখা যাবে।

![Step 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ln5bhyzyi8vrfdrmxte0.png)
- এখানে থেকে Play আইকন এ ক্লিক করতে হবে। এবার প্রোগ্রাম রান করবে।

![Step 5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/re79nn3tr3yhq7ru8bm1.png)

- প্রোগ্রাম এর Output দেওয়ার জন্য নিচের দিকে একটা প্যানেল ওপেন হবে এবং সেখানই আমারদের প্রোগ্রাম এর Output দেখাবে।

![Step 6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8r4v7zd9idctvpf1vbi4.png)

অতপর সফল ভাবে প্রথম প্রোগ্রাম রান করতে পেরেছি। 

আজ এই পর্যন্তই কোন কিছু বুঝতে অসুবিধা হলে অবশ্যই জানাবেন।
"Day 40 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Maths for Data Analysis (Stats Day -19)
Tags: data, journey, learning, datascience
Published: 2024-03-06 13:10:01

STATISTICS FOR DATA ANALYTICS - 19

T-test - numerical - 2


T - test : Unpaired Two sample Mean Test :- 

Mostly data is unpaired :- 
Eg :- testing a new drug over the existing one.

Two different sample ( comparison ) 

It is divided into 2 parts :-  

Equal variance


Unequal variance

Step 1 :- 

Null hypothesis =>  mean of sample A = mean of  sample B.
Alternate hypothesis => mean of sample A is not equal to  mean of  sample B.

Step 2 :-

T- statistics 

Step 3 :- 

t - tabular(critical)  >  t- calculated { reject the null hypothesis )

T - test : Two sample Proportion Test :- 

It cannot be used directly in excel so, we have to use the extension XLSTATS.
It is used when sample output is  in Categorical form.

SAMPLE A 0  1
SAMPLE B 0  1


Like :- A person SHOWS SYMPTOMS OF DISEASE AFTER MEDICATION OR NOT..

ITS BEST APPLICATION  :-

A/B testing 
It is a direct industry application of the two sample proportion tests.

Z vs T test 

If standard deviation is given, go for the Z-test or T- test.
If standard deviation is not given, go for the T- test
If sample size is above 30 go for Z-test
If sample size is less than 30 go for T-test


Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!


🙏 Thank you all for your time and support! 🙏

Don't forget to catch me daily at 6:30 Pm (Monday to Friday)for the latest updates on my programming journey! Let's continue to learn, grow, and inspire together! 💻✨
C++
Tags: beginners, tutorial, backend, frontend
Published: 2024-03-06 13:02:14

****
Assalomu aleykum dasturchi do'stlar men bugun point mavzusini o'tdik

C++ dasturlash tilida bir nuqta (point) tushuntirib berishimiz kerak bo'lsa, ushbu narsani quyidagi ko'rinishda amalga oshirishimiz mumkin:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/59jy6km2k8u3a266qcpm.png)

Bu dastur bir nuqta (point) o'zgaruvchisini e'lon qiladi, uni qiymat bilan bog'lash uchun & operatoridan foydalanadi va uni * operatori orqali qiymatga murojat qiladi. Yuqoridagi dasturda, point o'zgaruvchisi value o'zgaruvchining manzilini o'z ichiga oladi va *point orqali value o'zgaruvchining qiymatiga murojat qiladi. Natijada dastur 5 ni chiqaradi.
Unlocking the Power of AI Presentation Maker for Your Company
Tags: ai, presentation, ppt, maker
Published: 2024-03-06 13:01:11

Introduction:
In today's fast-paced business environment, effective communication is key to success. With the advancement of technology, companies are constantly seeking innovative solutions to enhance their presentation skills and leave a lasting impression on their audience. One such solution is the AI Presentation Maker, a powerful tool that harnesses the capabilities of artificial intelligence to revolutionize the way companies create and deliver presentations.

At [Company Name], we understand the importance of staying ahead of the curve and embracing cutting-edge technologies. That's why we have integrated the AI Presentation Maker into our workflow, enabling us to create dynamic and engaging presentations that captivate and resonate with our clients and stakeholders. In this article, we will explore the benefits of leveraging AI Presentation Maker for your company and how it can elevate your presentation game to new heights.

1. Streamlined Content Creation:
   The AI Presentation Maker simplifies the content creation process by offering smart suggestions, templates, and design elements that align with your company's branding and messaging. This not only saves time and effort but also ensures consistency and professionalism across all presentations.

2. Personalized Engagement:
   With its advanced algorithms, the [AI Presentation Maker](https://simplified.com/ai-presentation-maker/company) can analyze audience demographics and preferences to tailor the content and delivery for maximum impact. By personalizing each presentation, companies can effectively connect with their target audience and deliver a memorable experience.

3. Data-Driven Insights:
   Leveraging AI, the Presentation Maker provides valuable insights into the performance of presentations, including audience engagement metrics, content effectiveness, and areas for improvement. This data-driven approach empowers companies to refine their presentations and continuously enhance their communication strategies.

Conclusion:
In conclusion, the AI Presentation Maker holds the potential to revolutionize the way companies create and deliver presentations. By harnessing the power of artificial intelligence, companies can streamline content creation, personalize engagement, and gain valuable insights to elevate their presentation game. At Company Name], we have experienced firsthand the transformative impact of AI Presentation Maker and encourage other companies to embrace this innovative tool to stay ahead in their presentation game. Embrace the future of presentations with AI Presentation Maker and unlock new possibilities for your company's success.
Netsuite Retail
Tags: netsuite, retail, business, software
Published: 2024-03-06 12:53:22

NetSuite offers a cloud-primarily based answer particularly designed to deal with the desires of retail groups. here are a few key functions of NetSuite for Retail:

Omnichannel trade: Unifies on line, cell, in-shop, and speak to center channels, offering a steady purchasing experience for clients.

[Netsuite Retail](https://www.circularedge.com/netsuite/netsuite-for-retail/)

stock control: offers real-time visibility and control over inventory across all places, permitting better forecasting and achievement.

Order control: facilitates "purchase everywhere, fulfill anywhere, return everywhere" capabilities, enhancing flexibility for customers.

Point-of-Sale (POS): affords a current POS system that empowers sales associates with client and inventory records to enhance client engagement.

Financials: delivers real-time economic insights, permitting knowledgeable selection-making based totally on correct data throughout shops, marketplaces, and e-trade channels.

consumer relationship management (CRM): allows control consumer interactions and build more potent relationships through steady and applicable studies.

universal, NetSuite for Retail aims to offer a complete answer for retailers, assisting them manipulate their business efficiently, benefit a 360-degree view of their operations, and supply an high-quality patron revel in throughout all channels.
New post
Tags: cpp
Published: 2024-03-06 12:46:54

Hello everyone, today we have covered the topic "Pointer" in c++ programming language.
This is how the codes are written in this thread
`
#include <iostream>

using namespace std;

int main()
{
int a = 10;
	int *ptr = &a;
	*ptr = 30;

	cout << a << endl;
	cout << &a << endl;
	cout << a << endl << *ptr << endl;
	cout << a << endl << ptr << endl;

return 0;
}
`
A pointer is a variable that stores the address of another bit variable in memory. Pointer returns that input variable in its own language
Nested CSS Borders - A hidden puzzle
Tags: css, frontend, html, design
Published: 2024-03-06 12:33:15

Hey there ✌🏼

In this article, we'll tackle a common CSS issue that can be a bit puzzling.

Imagine you're sitting on your desk, working on the frontend of your million-dollar idea application. You have a main outer container with smaller box elements inside it. 

![https://sudorealm.com/post_assets/ooaWBeSD1jeiq7mjczXBcrgkUpX1nAkKP0OvNO92.png](https://sudorealm.com/post_assets/ooaWBeSD1jeiq7mjczXBcrgkUpX1nAkKP0OvNO92.png)

To make them look good, you've decided to round the corners of the outer container. In this example let’s say you decide for the outside container to have 50px of border radius and a padding of 20px with the inside elements.

![my image saved on sudorealm.com](https://sudorealm.com/post_assets/F1f1HslSKVDJdJu5Sm98ywbjnat5I2598bqdzBYi.png)

And of course you want everything to match, so you've given the smaller boxes the same rounded corners.

![my image saved on sudorealm.com](https://sudorealm.com/post_assets/lURTpvx7vMdQXxtGTdNC274xQUFxoNO62zD5waf9.png)

But wait a minute…

Something is off isn't it?

When you apply the same border radius to both the outer and inner elements, you might expect them to seamlessly nestle together, sharing the same rounded edges. However, that's not the case.

The inner elements inherit the border radius from the outer container, but they also inherit the padding. This means that the inner elements will have their rounded corners start from the edge of their content box, which includes the padding space. As a result, the corners of the inner elements might appear to stick out beyond the edges of the outer container.

To resolve this issue and restore peace inside your application you'd need to perform a simple calculation

```
// The Calculation
Inner Border Radius = Outer Border Radius - Padding

// So in our case
Inner Border Radius = 50px - 20px = 30px
```

Of course you can apply the same principle with more than pixels, using other units.

Let's see the result with our new border radius values:

![my image saved on sudorealm.com](https://sudorealm.com/post_assets/VMWmiKGgMM5gzHHSGHYYNuNnb8n5FiJHyj4kngCd.png)

Let's also examine it with one inner element to make the difference more distinct

![my image saved on sudorealm.com](https://sudorealm.com/post_assets/pu9AlcKEOj2KrHoeB3ZHpTEFFf6b941GF7izKa4Q.png)

That's it for today, thanks for taking the time to read 🙏🏼
Unveiling Textile Yarns: A Revolution in Home Textiles
Published: 2024-03-06 12:21:04

In the fast-paced world of home textile manufacturing, [understanding the secrets behind crafting quality yarns](https://blog.aymsyntex.com/product-strength/what-secrets-are-behind-textile-yarns-craft-revolution) is paramount. We're dedicated to revolutionizing the industry by producing exceptional textile threads, setting new benchmarks for quality and performance.

## The Strength of Our Textile Yarns

### Nano-Fiber Tech: Elevating Durability

Our textile yarns boast superior strength through advanced nano-fiber technology. These tiny fibers fortify the yarns, ensuring they are robust and durable, perfectly suited for the demands of home textiles.

### Microscopic Precision in Blending

Attention to detail is the cornerstone of crafting outstanding yarns. We meticulously blend fibers at a microscopic level, resulting in a unique texture that strikes the perfect balance between softness and strength. This makes our yarns stand out for their comfort and longevity, making them ideal for home textiles.

## Eco-Friendly Practices

### Sustainable Materials for Home Textiles

Environmental responsibility is a top priority. Our commitment is reflected in the careful selection of raw materials, sourced from sustainable and renewable sources. These eco-friendly practices contribute to a greener textile yarn industry.

### Water-Efficient Manufacturing

Conscious resource use defines our manufacturing process. Implementing water-efficient technologies minimizes waste, ensuring a sustainable approach from production to the end product. This commitment aligns with the growing demand for environmentally conscious home textile solutions.

## Innovations in Textile Craftsmanship

### IoT Integration for Home Textiles

Revolutionizing the home textile industry involves embracing digital advancements. Our yarns integrate Internet of Things (IoT) technology, enabling real-time monitoring of performance metrics. This smart integration enhances quality control, ensuring that every thread meets the highest standards for home textiles.

### AI-Driven Quality Assurance for Textile Threads

Quality assurance is paramount. Our yarns undergo meticulous checks facilitated by artificial intelligence. Advanced algorithms scrutinize every inch of our textile threads, guaranteeing that they conform to the highest standards for home textiles.

## Conclusion
In our relentless pursuit of excellence, our textile yarns redefine the very fabric of home textiles. Our commitment to innovation, durability, and sustainability positions us as leaders in the yarn textile industry. As we navigate the craft revolution, our dedication to quality remains unwavering, setting the stage for a future where home textiles are synonymous with cutting-edge advancements.

By choosing our textile yarns, you're not merely acquiring a product; you're embracing a revolution that transforms the landscape of home textiles. Elevate your home with the finest quality textile threads, crafted with precision, durability, and a commitment to a sustainable future in the yarn textile industry.
C++ Урок #3
Tags: cpp, tutorial, beginners
Published: 2024-03-06 12:16:55

**Типы данных в c++**
Привет, друзья! Одним из ключевых аспектов программирования на C++ является понимание различных типов данных, которые можно использовать для хранения информации. Давайте рассмотрим основные типы данных в C++ и их особенности.

1. Целочисленные типы данных:

int: Основной тип данных для целых чисел в C++. Обычно занимает 4 байта памяти.
short int: Короткий целочисленный тип, обычно занимает 2 байта памяти.
long int: Длинный целочисленный тип, обычно занимает 4 байта памяти.
long long int: Очень длинный целочисленный тип, обычно занимает 8 байт памяти.
2. Типы данных с нецелыми числами:

float: Не целое число. Обычно занимает 4 байта памяти.
double: Не целое число. Обычно занимает 8 байт памяти.
3. Символьные типы данных:

char: Используется для хранения отдельных символов. Обычно занимает 1 байт памяти.

```
#include <iostream>

using namespace std;

int main() 
{
    int age = 25;
    float height = 175.5;
    char grade = 'A';
    double pi = 3.14159;

    cout << "Возраст: " << age << endl;
    cout << "Рост: " << height << " см" << endl;
    cout << "Оценка: " << grade << endl;
    cout << "Значение числа pi: " << pi << endl;

    return 0;
}
```
В этом примере мы объявляем переменные различных типов данных и выводим их значения на экран с помощью `cout`.

Продолжайте практиковаться и не бойтесь экспериментировать с различными типами данных! Если у вас возникнут вопросы, не стесняйтесь обращаться за помощью. Удачи в изучении C++!
What is the difference between React and React Native ?
Tags: react, reactnative, javascript, frontend
Published: 2024-03-06 12:15:49

Are you new to web or mobile app development? Maybe you’ve heard of React or React Native but aren’t sure what’s the difference. Don’t worry, we’ve got you covered.

In today’s ever-changing web and mobile development landscape, two frameworks stand out: React and React Native. Both of these frameworks have become hugely popular in recent years because of their efficiency, scalability, and performance.

But while they share the same name and foundation, the two frameworks serve different purposes and have distinct features. Let’s explore the key differences between them, along with their pros and cons.

## React
[React](https://react.dev/) is a JavaScript library that is open-source. It was created by [Facebook](https://www.facebook.com/) and is mainly used to create dynamic user interfaces (UDIs) for web apps. React is built on a component-oriented architecture, meaning that user interfaces are reusable components that maintain their state.

---

## React Native
[React Native](https://reactnative.dev/) is a native mobile app development framework created by [Facebook](https://www.facebook.com/). It uses JavaScript and React to build native mobile applications. React Native enables developers to write one piece of code and deploy it to multiple platforms (i.e. iOS and Android) while still providing a native user experience.

---

## Key Differences
**Platform:** The biggest difference between React and Native is the platforms they focus on. React is mainly used in web development, while React Native is primarily used in mobile app development.

**UI Components:** React and React Native both use the same concepts to build UI components, but they are different in that React components are built for web browsers, and React Native is built for mobile.

---

## Which One Should You Choose?
The answer to this question depends on what you’re building. If you’re creating a website, you’ll want to go with React because it’s great for building interactive and responsive web applications…

---

Would you like to read the rest of the post? Here it is [What is the difference between React and React Native ?](https://www.swhabitation.com/blogs/what-is-the-difference-between-react-and-react-native) 

Don't forget to follow us on [Medium](https://medium.com/@swhabitation) for more engaging content covering web development and technology!
Realizing an RBAC scheme in Laravel Nova
Tags: laravel, php, security
Published: 2024-03-06 12:12:19

[Laravel Nova](https://nova.laravel.com) is the administration panel solution for the [Laravel](https://laravel.com) framework, and you know that when it comes to administration, you want to have a tight grip on who is doing what.

In [this](https://sharesquare-engineering.medium.com/custom-role-based-access-control-rbac-in-laravel-nova-a-handy-implementation-example-09a5dc0fd123) story we have a look at a practical implementation example, with a step-by-step approach based on Laravel natives, so that you will be able to realize your [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) scheme in No(va) time!