teleren/devto huggingface dataset:
Appendix: Services and Features Overview - AWS Certified Cloud Practitioner Study Guide
Tags: aws, cloudskills, examprep, cloud
Published: 2022-02-27 20:35:29

**This series is intended to be a personal study guide. Information may not be comprehensive or accurate. I am sharing it in case others find it useful. Please feel free to comment if any information is inaccurate.**

[Return to Exam Guide](https://dev.to/aidutcher/aws-certified-cloud-practitioner-study-guide-exam-guide-outline-233o)

Services are grouped by their primary functions.  Their order and placement is no indication of relative weight or importance. 

Analytics
Application Integration
Compute and Serverless
Containers
Database
Developer Tools
Customer Engagement
Management, Monitoring, and Governance
Networking and Content Delivery
Security, Identity, and Compliance
Storage

[Return to Exam Guide](https://dev.to/aidutcher/aws-certified-cloud-practitioner-study-guide-exam-guide-outline-233o)
My personal project - event
Tags: interface, ui, gamedev
Published: 2022-02-27 20:06:02

Hi! Today I want to share the event screen.

Artist (girl art) Shen YH https://www.artstation.com/yh_shen


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyvmy13crkq8bg6rolps.png)
problem: Java Date and Time
Tags: hackerrank, java
Published: 2022-02-27 19:15:16

> [Link to the problem](https://www.hackerrank.com/challenges/java-date-and-time/problem)

Input would be `month day year`, and output the day of week.
```
//sample input
08 05 2015

//sample output
WEDNESDAY
```


---
## proper solution 
DISCLAIMER: the solution referenced from the editorial
```java
public static String findDay(int year, int month, int day) {
	Calendar date = Calendar.getInstance();
	date.set(year, month, day);
	return date.get(Calendar.DAY_OF_WEEK); //error
}
```
The code would have error because `date.get(Calendar.DAY_OF_WEEK)` returns *integer value* of day of week. For example, returns 1 for SUNDAY, 2 for MONDAY, and 7 for SATURDAY.

We need to create an additional array to reference day of week:
```java
// outside main method
static String[] dayOfWeek = {"SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"};

public static String findDay(int year, int month, int day) {
	Calendar date = Calendar.getInstance();
	date.set(year, month, day);
	return dayOfWeek[date.get(Calendar.DAY_OF_WEEK)-1];
}
```

---
## use another class
Instead of the class `java.util.Calendar` it mentioned, `java.time.LocalDate` (Java 8 and higher) actually finish all the work nice and neat.

```java
public static String findDay(int year, int month, int day) {
	LocalDate date = LocalDate.of(year, month, day);
	return date.getDayOfWeek().toString(); //getDayOfWeek() returns a DayOfWeek object
}
```
Web Development Project Service
Tags: webdeveloment, project, javascript, service
Published: 2022-02-27 19:02:29

Hello All,
Dhrumil here!
we have web development project in our master degree.
we have 3 member in our team.
our tech stack: HTML, CSS, JAVASCRIPT, NODE JS, EXPRESS JS, MONGODB, MYSQL.

Any one wants such type of service, feel free to contact me.

Thank you in advance!
Instant WordPress Theme That Matches Your Website
Tags: beginners, webcomponents, wordpress
Published: 2022-02-27 18:34:54

Theme Matcher creates an optimized custom WordPress Theme from your existing website

Over 309,200 themes created since 2012!

Existing Website
Add a blog to your website while keeping the same familiar branding that your customers love.

Designers
Offer WordPress themes to your clients faster, cheaper, and easier than ever before. No WordPress experience required.

Startups
Bootstrap your blog so it matches your landing page in seconds. Don’t waste precious time creating a custom WordPress theme!

Resellers
Create themes quickly and cheaply with Theme Matcher, and then resell to customers wanting HTML to WordPress conversions.

[Click here to more info](https://bit.ly/35BtLCV)
Java Collections
Tags: javacollections, arraylist
Published: 2022-02-27 18:27:38

ArrayList is Collection in java.util package which extends AbstractList class and implements List Interface.
It also implements RandomAccess,Cloneable and Serializable interfaces
RandomAccess ,Cloneable and Serializable interfaces doesnot have any methods to implement.
They are to say that ArrayList can be accessed random with constant time and we can use the clone() method and it can be Serializable

When we add new element for the first time it will have the initial capacity of 10 and then the element will be added.
ArrayList has grow() method which will be called when we start adding more element Arrays.copyOf(elementData,newCapacity) will be returned with the updated Array.
<u>Method in ArrayList :</u>
`
 private void grow(int minCapacity) {
`

It checks the range so in case the index that we pass exceeds the size it throws IndexOutOfBoundException.
<u>Method in ArrayList</u>
`
 private void rangeCheck(int index) {
`

It has clear method which will loop through each index and set the value to null and let GC take care of it and set the size to 0.

<u>Method in ArrayList</u>
`
public void clear() {
`

writeObject and readObject methods help for Serialization and Deserialization.
<u>Methods in ArrayList</u>
`
private void writeObject(java.io.ObjectOutputStream s){

private void readObject(java.io.ObjectInputStream s)
        throws java.io.IOException, ClassNotFoundException {
`

**Example to add elements in ArrayList and iterate in multiple ways**
  
```
package com.corejava.oops.collections;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ArrayListTest {

	public static void main(String[] args) {
		
		
		List<String>  test = new ArrayList<>();
		
		test.add("Tester1"); //index - 0
		test.add("Tester2"); //index - 1
		test.add("Tester3"); //index - 2
		test.add("Tester4"); //index - 3
		
		
		for(int i=0;i<test.size();i++) {
			
			System.out.println("In For Loop :" +test.get(i));
			
		}
		
		for(String a : test) {
			
			System.out.println("In Enhanced for loop : "+a);
			
		}
		
		Iterator<String> it = test.iterator();
		
		while(it.hasNext()) {
			System.out.println("In While Loop :" + it.next());
			
		}
		
		test.stream().forEach(System.out::println);
		
	}
	
}

```
Basic overview of terms in Kubernetes.
Tags: kubernetes, basics, theory, beginners
Published: 2022-02-27 18:25:14

After a long series of procrastination and getting the hit of motivation from reading Atomic Habits(great book which I recommend others) ,I’m finally learning kubernetes basics.As a motivator to get better at writing and publish more posts as well as learn kubernetes. Once again I’m treating my blog as a journal to showcase how much I actually understand kubernetes.Also its quite handy to have my own notes on a site. So here is a blog post on kubernetes basics part 1.This will be a multi part series.

https://www.codeklutz.com/kuberenetes/learning/study%20notes/concepts/lessons/Tackling-procrastination-and-kubernetes-study/
Evm
Published: 2022-02-27 18:21:53

[](url)EVM modular ops: https://notes.ethereum.org/@axic/evm384
Account abstraction: https://eips.ethereum.org/EIPS/eip-4337
EIP 3074: https://eips.ethereum.org/EIPS/eip-3074
Single slot confirmations: https://ethresear.ch/t/a-model-for-cumulative-committee-based-finality/10259
Address space extension: https://ethereum-magicians.org/t/thoughts-on-address-space-extension-ase/6779
DAS: https://hackmd.io/@vbuterin/das
PBS: https://notes.ethereum.org/@vbuterin/pbs_censorship_resistance

Some links:

PoS specs: https://github.com/ethereum/consensus-specs#phase-0
Sharding: https://notes.ethereum.org/@vbuterin/data_sharding_roadmap
Verkle trees: https://notes.ethereum.org/Yn_mwNa2SeeQHnKsRgekKg
Expiry: https://eips.ethereum.org/EIPS/eip-4444 (history) + https://notes.ethereum.org/@vbuterin/state_expiry_eip (state)
EVM simplification: https://hackmd.io/@vbuterin/evm_feature_removing
EVM obj format: https://eips.ethereum.org/EIPS/eip-3540
THE PHONE NUMBER TRACKING PROBLEM
Tags: python
Published: 2022-02-27 18:20:35

So many people lose theur phones daily, this genetates a huge volume of questions asking how can we track the phone back?
I also asked the same question somefays back and i feel we need to do a collabo here.
Someone please share with me how you can do this using python, the code must be able yo get precuse location of within 5 feet of accuracy
Branches & CLONES in GITHUB - where are they stored?
Tags: github
Published: 2022-02-27 18:04:42

---
title: Branches & CLONES in GITHUB - where are they stored?
published: true
description: BRANCHES, FORKS, and CLONES, oh my!
tags: GITHUB
//cover_image: https://direct_url_to_image.jpg
---
Hi all. I'm a noob coder taking tiny steps into GITHUB. I understand how to FORK, that is as easy as pushing the fork button.

However, when I'm making changes to the "FORK", does a BRANCH automatically get created? Do you automatically create a branch when you've "FORKED" the main repo? If a branch is automatically created, where is that stored? On GITHUB? Or do you have to store your FORK-->BRANCH on your local pc? Is the clone done on the "BRANCH" or the "FORK"?
Sorry for the basic questions, but I want to get good at GITHUB.

Thx,
Build a Messenger Clone with MERN Stack (MongoDB, Express, React, Node JS) + Socket.io
Tags: javascript, react, webdev, tutorial
Published: 2022-02-27 17:53:05

In this Facebook Messenger   Clone  Tutorial series, we will learn to build an Awesome Full Stack  Facebook Messenger Project with realtime messaging functionality with socket.io . We have one on one chat as well as group chatting functionality in this app.

In this video,we will download the necessary resources for our project.



{% youtube 6SBq5sJLcpM %}
What is a blockchain?
Tags: blockchain, web3, programming
Published: 2022-02-27 17:31:28

Understanding blockchain could be confusing. Let’s understand it through an analogy first.
 
You may have seen or have been to many weddings, everyone in a wedding is like a conscious blockchain. In a wedding, everyone writes in their mental register that a certain man got married to a certain woman now if anyone claims that this woman is my wife (or she is not married), then everyone (present at the wedding) will reject this claim. 

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

Similarly,

If a member of a study group misrepresents a topic in front of other members, the rest of the members will reject it because the topic written in this member's mental register does not match the rest of the members.


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

That's how blockchain works in real.

I hope you've understood blockchain through an analogies, let's look into the actual definition of a blockchain.

**Technical Definition**
 
Blockchain is a peer to peer (a network with equal permission and responsibilities), decentralized (every node/computer makes their decision), distributed (a system where parts of a system exist in different physical locations) public ledger between various nodes/computers. It keeps a complete, durable and unchanging record of the transactions that take place. The transaction is timed that is, with the transaction, the time of its occurrence is also written in such environment where there is a lack of trust.

Thanks for reading
This application file is deleted but this application not deleted the menu?
Tags: linux, ubuntu, tor, browser
Published: 2022-02-27 17:18:48

Anyone have a idea how to delete this application completely?
this application not showing the dpkg --list,then how i remove the application?
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l00xe5ulx18zivml5c0x.png)
First DEV Blog
Tags: javascript, codenewbie, programming, web
Published: 2022-02-27 17:17:04

Hi folks, I'm a 19-year-old self-taught developer!. 
I have a good grip on HTML, CSS, JAVASCRIPT. Currently, I'm learning React Js. 

_So, how did I come to learn to code?_ Not long ago, my brother told me about programming. At first, I thought I couldn't do programming, but now I enjoy learning programming languages and love problem-solving.

_Why did I start writing blogs?_ Usually, I love reading blogs to keep myself updated with technology. I started writing blogs to gain exposure to link building, and it also helps analytical thinking and increases learning to a higher level.

Today, I am typing this, and I am super excited to join this fantastic community. I hope to learn from you one way or another.

Thanks for reading

Moazam Ali
Front-end Developer
Flutter Linter Kuralları Bölüm 3: Pub Kuralları 💫 🌌 ✨
Tags: flutter, dart, flutterdev
Published: 2022-02-27 17:02:45

Bu kurallar, pub paketi kurulumuyla ilgili olası sorunları tanımlar.

**depend_on_referenced_packages**

Bir paketi import ederken, pubspec'inize bir bağımlılık (dependency) ekleyin.


Yanlış kullanım:

`import 'package:a/a.dart';`

`dependencies:`


Doğru kullanım:

`import 'package:a/a.dart';`

```
dependencies:
  a: ^1.0.0
```



**package_names**

Paket adları için lowercase_with_underscores biçimlendirmesini kullanın.

Paket adlarının tamamı küçük olmalı ve sözcükleri ayırmak için de alt çizgiler kullanılmalıdır.
Yalnızca temel Latin harflerini ve Arapça rakamları kullanın: [a-z0-9_]. Ayrıca adın rakamlarla başlamadığından ve ayrılmış bir sözcük olmadığından emin olun.


**secure_pubspec_urls**

pubspec.yaml'da güvenli URL'ler kullanın.

http veya git yerine https kullanın.

Doğru kullanım: `repository: https://github.com/dart-lang/example`

Yanlış kullanım:

`repository: http://github.com/dart-lang/example`

```
git:
  url: git://github.com/dart-lang/example/example.git 
```

**sort_pub_dependencies**

Pub bağımlılıklarını sıralayın.
Pub bağımlılıklarının listesini sıralamak bakımı kolaylaştırır.


[Reference](https://dart.dev/tools/linter-rules#style-rules)
javascript data validator (volder)
Tags: azuretrialhack, javascript, webdev, programming
Published: 2022-02-27 17:01:09

[Instructions]: # (To submit to the Microsoft Azure Trial Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
I have been working in schema builder and data validator package name volder
##### what is volder

volder is powerful Object schema validation, it lets you describe your data using a simple and readable schema and transform a value to match the requirements, it has custom error messages, custom types and nested schemas.




### Submission Category: 
javascript package


### Link to Code on GitHub

github link: https://github.com/devSupporters/volder


### Additional Resources / Info
this project by [alguerocode](https://github.com/alguerocode)

link: https://github.com/alguerocode/js-volder
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnk2xm2r6hngfi2sdr08.gif)
Setting up React Native Application
Published: 2022-02-27 16:59:49

React Native is a Javascript framework that allows us to create mobile that will run on both Andriod and iOS.


Expo is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps from the same JavaScript/TypeScript codebase.

We need to have a knowledge of javascript and reactjs.

Firstly, things needed.
1. Node.js install
2. Code Editor (Vs code)
3. React Native Tools Extension

**Step 1**

```
npm install -g expo-cli
```

**Step 2**
Create a new expo project, let's call it firstProject
```
expo init AwesomeProject
cd AwesomeProject
```

**Step 3**

```
Run npm start
```
**Step 4**

Download expo on your playstore on you phone and install. Also after expo app have been launch you'll see a barcode, scan the barcode with your phone camera.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwge70ry7pfwt4rcjku5.png)
Get temporary dictionary in PHP
Tags: php
Published: 2022-02-27 16:51:48

<small>Inspired by: https://bit.ly/2NaI8oN</small>

If you want to get a temporary dictionary you could use `sys_get_temp_dir()`. But this doesn’t guarantee that you have write access to this dictionary. So, you can also get the upload_tmp_dir property from the php.ini file.

You can combine this for simplicity in a function:

```php
<?php
    function get_temp():string{
        // Returns a temporary dictionary path.
        // When it can't find one, it returns false.
        if(is_writable(sys_get_temp_dir())){
            return sys_get_temp_dir();
        }elseif(is_writable(ini_get("upload_tmp_dir"))){
             return ini_get("upload_tmp_dir");
        }else{
            return false;
        }
    }
    echo get_temp();
?>
```

Or the short form:

```php
<?php
    function get_temp():string|bool{
        return is_writable(sys_get_temp_dir())?sys_get_temp_dir():(is_writable(ini_get("upload_tmp_dir"))?ini_get("upload_tmp_dir"):false);
    }
?>
```
How to buffer text to the client with PHP
Tags: php
Published: 2022-02-27 16:41:38

When you look over the internet there are many people, who say it isn’t possible anymore to buffer text to the clients browser. Earlier it was possible, but not anymore. That’s not true. It’s just a bit more complicated.

At the very beginning of the file (before doctype!) you have to set the following code: 

```php
<?php
    header('Content-type: text/html; charset=utf-8');
    ini_set('zlib.output_compression',0);
    ini_set('implicit_flush',1);
    ob_end_clean();
    set_time_limit(0);
?>
```
And now you can use `flush()` every time you want to output something to the client. 

An example:

```php
<?php
    header('Content-type: text/html; charset=utf-8');
    ini_set('zlib.output_compression',0);
    ini_set('implicit_flush',1);
    ob_end_clean();
    set_time_limit(0);

    echo "Hello World<br />";
    flush();
    sleep(3);
    echo "Hello World after 3 seconds";
    flush();
?>
```

The client now sees `Hello World` and after 3 seconds `Hello World after 3 seconds`.

The best way is to simply write a new function that outputs a string and then instantly flushes.

For example:

```php
<?php
    function output($text){
        echo $text;
        flush();
    }
?>
```
Use Random Integer in terraform module
Tags: terraform
Published: 2022-02-27 16:26:00

Hi there!

Today, we will learn how to use a random integer generator in terraform module.

## Situation -
You are writing a module which takes a url as variable but needs to add a random userId (or any other thing) to the url. How do you achieve this in your terraform module?

## Pre-requisites
This post is NOT covering basics of terraform and module writing so some understanding of terraform is expected.
It is assumed that you have terraform setup on your system and have an idea about how to write module.

## Steps
- Example module

Consider following datadog synthetics module
```
resource "datadog_synthetics_test" "test_template" {
    name = var.name
    request_definition {
        method = var.request_method
        url = var.start_url
    }
    // rest of the module
}
```
The above is a sample for creating a synthetic monitoring test on datadog. 
Assume you want to append a parameter `userId` with random 6 digit number to the url.

- Add random_integer resource

Add a resource for random integer 
```
resource "random_integer" "random_user_id" {
    max = 999999
    min = 100000

    keepers = {
        test_name = var.name
    }
```
[The documentation for random integer.](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer)

The above resource generates a 6-digit integer between 100000 and 999999. The `keepers` field make sure that a new random number is generated each time a new `var.name` is passed to module.

- Link random_integer resource to the example module

update the `url` field to 
```
url = "${var.start_url}/${random_integer.random_user_id.result}"
```

- Checking

Use your module as usual and verify.

That's all!
Hey Developers , check out my portfolio  
Tags: beginners, portfolio, webdev, github
Published: 2022-02-27 16:24:15

[](hakkeempa.github.io) . It is my first project , a simple portfolio website using HTML , CSS , JavaScript , jQuery , Bootstrap & Typed.js . All just please visit the site and do send some feedbacks.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh7stc3bkwluzzve2a9i.png)
Subarray Sum Equals K
Tags: beginners, programming, java, dsa
Published: 2022-02-10 13:51:57

Given an array of integers arr and an integer k, return the total number of continuous subarrays whose sum equals to k.

<u>Example 1:</u>
Input: arr = [1,1,1], k = 2
Output: 2

<u>Example 2:</u>
Input: arr = [1,2,3], k = 3
Output: 2

To solve this question click here:(https://leetcode.com/problems/subarray-sum-equals-k/)

So this is a **MEDIUM LEVEL** question. When I read this question then I knew that I have solved similar question in the past but still I couldn't solve this on my own. But after searching for a while I came across 3 approaches.
_Brute Force---------------------------->Optimized
   O(n^3)------------O(n^2)---------------O(n)_

**Approach 1:**
So this is really very simple approach, in this we just need to run 3 nested loops and then calculate the sum of each subarray and check it with the target(k).

**JAVA CODE:**
```
public static int subaaray(int arr[],int n,int X)
    {
        int ans=0;
        for(int i=0;i<n;i++)
        {
            for(int j=i;j<n;j++)
            {
                int sum=0;
                for(int k=i;k<=j;k++)
                {
                    sum+=arr[i];
                }
                if(sum==X)
                   ans++;
            }
        }
        return ans;
    }
```

**Approach 2:**
In this we just removed the last for loop and calculated the sum inside j loop itself.

**JAVA CODE:**
```
public static int subaaray(int arr[],int n,int X)
    {
        int ans=0;
        for(int i=0;i<n;i++)
        {
            int sum=0;
            for(int j=i;j<n;j++)
            {
                sum+=arr[i];
                if(sum==X)
                   ans++;
            }
        }
        return ans;
    }
```
**Approach 3:(Optimized)**
In this we used HashMap to store the cumulative sum of the array.
_Time Complexity: O(n)_

**JAVA CODE:**
```
public static int subarray(int arr[],int n,int k)
    {
        HashMap<Integer,Integer> hm=new HashMap<>();
        hm.put(0,1); // it is imp to put 0 initially in the hashmap
        int ans=0,sum=0;
        for(int i=0;i<n;i++)
        {
            sum+=arr[i];
            if(hm.containsKey(sum-k))
                ans+=hm.get(sum-k);
            
            hm.put(sum,hm.getOrDefault(sum,0)+1);
        }
        return ans;

    }
```