teleren/devto huggingface dataset:
Синтаксис С++
Tags: webdev, beginners, programming, cpp
Published: 2023-05-09 18:05:05

Ассаламу алейкум уважаемые программисты, смотрите Синтаксис в языке программирования C++.

Я хотел бы попросить вас взглянуть на приведенный ниже код, чтобы понять его синтаксис.

```
#include <iostream>

using namespace std;

int main()
{

   cout << "Hello World";

  return 0;
}
```

Теперь разберем каждую строчку кода.

- **строка:** #include <iostream> из которой вызывается библиотека (#include). "iostream" означает поток ввода и вывода - позволяет работать с объектами ввода и вывода, cout (см. 5 строк в коде).

- **строка:** использование пространства имен std означает, что мы можем использовать имена для объектов и переменных из стандартной библиотеки.

- Не беспокойтесь, если вы не понимаете, как включить #include <iostream> и как использовать пространство имен std. Просто подумайте об этом как о чем-то, что всегда будет появляться в вашей программе.

- **строка:** пустая строка опущена. С++ игнорирует пробелы.

`Еще одна вещь, которая все время возникает в программе на C++, — это int main(). Это называется функцией. Любой код внутри фигурных скобок {} будет выполнен. Код внутри скобок {} будет прочитан как первая строка операторов, которые будут выполняться при запуске программы.Если код написан вне скобок {}, программа не запустится, потому что код, который мы написали, должен быть внутри только скобки {}!`

- **строка: **cout (произносится как «видеть») — это объект, используемый в сочетании с оператором ввода ( ) для вывода/печати текста. В нашем примере будет выведено «Hello World» << .

`cout `добавляется из комбинаций `"c"` + `"out"`, то есть расширение `"c"` C++ (язык программирования C++) `"out"` - `"выход"`.

- В языке программирования C++ после каждого оператора `;` ставится точка с запятой.

**Например:** `cout << "Привет, мир";`

`Тело программы может быть записано в функции int main() (помните, что его можно записать в одну строку).`

```
int main() {cout << "Hello World"; return 0;}
```

 

-  **строка: **вернуть 0; завершает основную функцию.

-   **строка:** } Не забудьте добавить закрывающую фигурную скобку, чтобы фактически завершить основную функцию.

`использование пространства имен std; в отсутствие`

```
#include <iostream>

int main()
{
std::cout << "Biz boshladik!";

return 0;
}
```
Optional Chaining in JavaScript(?.)
Tags: webdev, javascript, api, objects
Published: 2023-05-10 04:07:27

The Optional Chaining Operator denoted with a question mark and a dot (?.) is a feature introduced in JavaScript ES2020.

Decided to write about this operator because for a very long time I used to be very confused when I was going through code and saw it. Looks like the Ternary Operator but I could not just grasp its use until I started writing more advanced React.js code.

The Optional Chaining Operator is generally used to avoid the `TypeError` which occurs when we try to access the property of a non existent field in nested objects. The nested object could be data from an API. Anyone who has ever worked with a Rest API for instance, can attest to the nesting of data that goes on there. This Optional Chaining Operator creates more user-friendly errors.

A non existent field is undefined and as we know data types like undefined and null are primitive data types and one thing about primitives is that they don't have properties. Let us illustrate with code below.

```javascript
const person={
name:'Steve',
address:{
city:'Abuja',
street:'5 garki lamido'
}
```
1. If we try to access `person.name` in the above code we get Steve as output.
```
console.log(person.name)
```

2. But if we try to access `person.country`:

```javascript
console.log(person.country)
```
We get undefined above because we don't have a country field.

 Now if we try to access `person.country.name`

```javascript
console.log(person.country.name)
```

Recall from 2 we got `undefined`, then  we tried to access `undefined.name` and we got a `TypeError:cannot read properties of undefined`. Primitives cannot have properties never forget that.

Bring in Mr Optional Chaining to mitigate against the `TypeError` which we are getting. So if we were to try

```javascript
console.log(person.country?.name)
```
_we get undefined as output_.

## Use With Methods

Suppose we try to access a method with the above code, as we can see there is no method in our `person` object so if we have a method called `methodMan()`

```javascript
console.log(person.methodMan())
```

we would get an error message telling us it is not a function.

But if we were to do:

```javascript
console.log(person.methodMan?.())
```
we would get undefined.

> ### Note

We can use optional chaining multiple times in nested objects.

```javascript
const building={
name:"better days ahead",
place:"school",
details:{
location:"mayfield way",
education:"basic"
}
}

```
let us try to access
`building.founded.age.education`

```javascript
console.log(building.found.age.education)
```
we get a `TypeError: cannot  read properties of undefined`.
Notice that we don't have `found` and `age` in our object
So let us do some Optional Chaining.

```javascript
console.log(building.found ?.age?.education)
```
_we get undefined_

## Conclusion
So we can see that the `?.` operator is a very good error handling operator that can help generate user friendly errors when we are working on our applications.
New Community to check out
Published: 2023-05-10 04:35:08

Hello everyone,



I am excited to announce the launch of ShiftSync, a new community dedicated to quality engineering. Whether you're a developer, tester, or DevOps specialist, ShiftSync is the place to be.



I am thrilled to be part of a platform where we can share our expertise and collaborate on all things quality engineering. Whether you have a question about automation testing, need advice on deployment strategies, or want to discuss the latest industry trends, ShiftSync is the perfect place to do it.



At ShiftSync, we believe that quality engineering is the foundation of successful software development. That's why we've created a community that focuses on the importance of QA and the value it brings to the entire software development lifecycle.



So, if you're passionate about quality engineering and want to connect with like-minded individuals, join us at ShiftSync. Let's build a community where we can learn, grow, and inspire each other to create better software.



Tag a friend and let them know about this exciting new community.



Thank you and see you at ShiftSync!



https://shiftsync.tricentis.com/?utm_source=is-md&utm_medium=referral&utm_campaign=mp_community_launch_global_en_2023-05

#automation #testing #qa #software #developer #share #devops #softwaredevelopment #thankyou #quality #engineering #engineering #like #community
Anahtarı olmayan APT deposuna güvenilirliğin sağlanması
Tags: apt, trusted, guven
Published: 2023-05-10 15:27:15

Debian tabanlı sistemlerde güvenilir olmayan bir depodan indirme yaparken sizi güvenlik konusunda uyarmaktadır. "apt update" komutu sonrasında muhtemelen aşağıdaki gibi bir hata ile karşılaşılmaktadır:

```
Err:1 https://www.xyz.com/ubuntu stable InRelease                                             
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: X.Y.Z.K 443]
```

Bu hatanın asıl çözümü uygun olan bir anahtarın bulunup, /etc/apt/trusted.gpg.d/ klasörü altına anahtarın eklenmesi olacaktır. Fakat elinizde anahtar yoksa depolara istisna olarak güvenmek gerekmektedir.

# Eski sürümlerle uyumlu yol

Eski sürümlerde [trusted=yes] gibi ifadelerle çeşitli depolara güvenilir istisna verilmesi sağlanmakta idi. Güncel sürümlerde ise bu özellik işe yaramamaktadır.

# Güncel çözüm

Bu konuda çözüm için ise */etc/apt/apt.conf.d/* klasörü içerisine örneğin 10depo.conf adında bir dosya oluşturup dosyanın içeriğini aşağıdaki gibi yazmanız gerekmektedir.

```
Acquire::https::www.xyz.com::Verify-Peer "false";
```

Bu dosya içerisindeki www.xyz.com yerine, güvenilmesi istenen deponun domain adresini yazmanız yeterlidir. Bu adımdan sonra "apt update" dediğinizde ilgili depoya güvendiği ve ilgili paketlerin meta verilerini çekebildiğini göreceksiniz.
Free hosting providers for front-end & back-end applications
Tags: java, javascript, microservices
Published: 2023-05-10 21:42:41

I have created a list of free web hosting service providers. I have checked each and every website in the past weeks!
- My youtube channel - Vuelancer

hosting providers

**Freemium Resources**
Heroku - https://heroku.com - Deploying Front & Backend
Netlify - https://netlify.com
Vercel (Zeit) - https://vercel.com - Deploying Front & Backend apps at free of cost
Firebase - https://firebase.com - Deploying Front & Backend apps at free of cost
Surge - https://surge.sh
Render - https://render.com
Hostman - https://hostman.com - free for frontend always, pay only for backend apps. (free credits will also there for you)
Glitch - https://glitch.com - Deploying Front & Backend apps at free of cost
Deno deploy - https://deno.com/deploy - Site for deploying for apps created using deno.
Fly - https://fly.io - Deploying Front & Backend apps at free of cost
Fleek - https://fleek.co
Begin - https://begin.com
Stormkit - https://stormkit.io - Deploying Front & Backend apps at free of cost
Deta - https://deta.sh - Deploying Node.js and Python apps and APIs. They support most web frameworks like Express, Koa, Flask, and FastAPI. They also provide a very fast and powerful NoSQL database for free. (updated)
Commonshot - https://commons.host - Static web hosting and CDN.
Heliohost - https://heliohost.org - PHP, Ruby on rails, perl, django, java(jsp)
Fast - https://fast.io (newly added)
kintohub - https://kintohub.com - supports the static site, web app, backend apps. (updated)
Hubspot - https://hubspot.com - CRM tool for marketing, sales, content management, and customer service (newly added)
Torus.host - https://torus.host - needs an aws account.}
Bip - https://bip.sh - Static web hosting provider (updated)
Cloudflare pages - https://pages.cloudflare.com - Static frontend hosting provider (updated)
Qoddi - https://qoddi.com/ - PaaS App Hosting Platform (newly added)

Thank you!

We can use github pages, gitlab, bitbucket to deploy static web pages!
**Premium providers**
AWS
GCP
Digitalocean
Microsoft Azure
Vultr
Alibaba Cloud
Linode
**Final thoughts**
Use VERCEL for any front-end application as well as medium-level backend apps.
Use HEROKU for any level backend apps.

Other websites are also useful when you are deploying static sites. But I recommend you to go through each website and find which one suits your project.
Dictionary Methods of Python
Published: 2023-05-11 04:29:56

### 1. items() :-
It gives a list containing a tuple for each key value pair
example:-
```
>>> thisdict = {
...   "brand": "Ford",
...   "model": "Mustang",
...   "year": 1964
... }
>>> thisdict.items()
dict_items([('brand', 'Ford'), ('model', 'Mustang'), ('year', 1964)])

```
###  2. clear() :-
It removes all the elements from the dictionary
example:-
```
>>> thisdict.clear()
>>> thisdict
{}
```

###  3. copy() :-
It gives a copy of the dictionary
example:-
```
>>> newdict=thisdict.copy()
>>> newdict
{'brand': 'Ford', 'model': 'Mustang', 'year': 1964}
```

###  4. fromkeys() :-
it is used to create a new dictionary  with keys from the old dictionary list .
example:-
```
>>> newDict=dict.fromkeys(thisdict,'ankit')
>>> newDict
{'brand': 'ankit', 'model': 'ankit', 'year': 'ankit'}
```
###  5. get() :-
It gives the value of the specified key
example:-
```
>>> newDict.get('brand')
'ankit'
```

###  6. keys() :-
It gives a list containing the dictionary's keys
example:-
```
>>> newDict.keys()
dict_keys(['brand', 'model', 'year'])
```

### 7. pop() :-

It removes the element with the specified key
example:-
```
>>> newdict.pop('brand')
'Ford'
>>> newdict
{'model': 'Mustang', 'year': 1964}
```

### 8. popitem() :-
It removes the last inserted key-value pair
example:-
```
>>> newdict.popitem()
('year', 1964)
>>> newdict
{'model': 'Mustang'}
```

### 9. setdefault() :-
It gives the value of the specified key. If the key does not exist: insert the key, with the specified value
example:-
```
>>> newdict.setdefault('year',1964)
1964
>>> newdict
{'model': 'Mustang', 'year': 1964}
```

### 10. update() :-
It updates the dictionary with the specified key-value pairs
example:-
```
>>> fruits1 = {'apple': 2, 'banana': 3}
>>> fruits2 = {'orange': 4, 'pear': 1}
>>> fruits1.update(fruits2)
>>> fruits1
{'apple': 2, 'banana': 3, 'orange': 4, 'pear': 1}
```
### 11. values() :-
It returns a list of all the values in the dictionary
example:-
```
>>> fruits1
{'apple': 2, 'banana': 3, 'orange': 4, 'pear': 1}
>>> fruits1.values()
dict_values([2, 3, 4, 1])
```
## References
GeeksforGeeks
W3Schools
freecodecamp
Hexagon rotating gradient border
Published: 2023-05-13 07:12:00

Hexagon rotating gradient border

---
#### This CodePen was created by [Temani Afif](https://codepen.io/t_afif)

{% codepen https://codepen.io/t_afif/pen/VwEXoaw %}

---

>This codepen was not created by me, all rights belong to its respective owners

---

### Check Our Latest Post 

{% link https://dev.to/jon_snow789/glassmorphism-css-generator-k90 %}

---

Thanks for Reading ❤️! Check my website [Demo coding](https://democoding.in/) for updates about my latest CSS Animation, CSS Tools, and some cool web dev tips. Let's be friends!

Don't forget to subscribe to our channel : [Demo code](https://www.youtube.com/@democode)

---

{% twitter 1655834579394252800 %}
9 Pillars to Build a Rock-Solid SaaS Platform
Tags: saas, startup, devops, webdev
Published: 2023-05-12 10:16:02

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7b5ibpdk8a2amh83laz.jpg)
In today’s fast-paced world, where businesses are shifting gears and treading on the digital transformation journey, Software as a Service (SaaS) platforms have become indispensable. In this article, we’ll uncover the nine key elements of a successful SaaS platform to help you navigate the entwined, uncharted paths of web application and software development.

**[Read now](https://www.cygnismedia.com/blog/9-pillars-to-build-saas-platform/)**
Always experiment first
Tags: html, css, javascript, webdev
Published: 2023-05-12 11:19:00

This is a quickie post! One of the things people getting into doing websites is that they mess up their ways of working by developing straight into production. Back in the days this often meant FTP, making changes locally on files and then copying the files into production.

There is however a big problem with this way of working: production site is optimized for production use! This means there are things like caching that come into your way. You might end up doing some silly things like disabling caching on your production `.htaccess` file, or something similar.

The above is solving the wrong issue. What you should instead consider is how you do your work. Instead of developing straight into production (and then having problems) you should isolate your development from production.

To do this there are multiple ways. One way is to have a local production environment. However this has one downfall: you may need to gain access to it from your phone for testing things out. So, while most of your development can happen on your local machine there are times you need to opt-out. But how?

One solution is to use services like [Codepen](https://codepen.io): instead of trying our your new stuff in production you can write the stuff you need to experiment with in isolation. This way you can even develop and debug on your phone! It is possible to plug or connect a keyboard to your phone.

Another alternative is to go for frameworks. Tools like Astro and publish to Vercel lets you skip a lot of the issues and complexity related to development vs production, such as the caching problem. Astro provides it's own local development environment, and you can also build a production static site locally and then serve it with for example `npx http-server public`. While there is some initial learning curve to Astro and Vercel they also let you avoid getting neck deep into some other topics when you're focusing in just getting things done.

So what to learn from here? Always consider your ways of working before solving problems by writing more code. If you're making a new feature or learning some new cool CSS and you're still not sure if things work ok in a multitude of different browsers, experiment in isolation! It saves you time and allows fast iteration.
Description of important clauses in SQL and Apache age query format part 2
Tags: apache, apacheage, postgressql, sql
Published: 2023-05-12 13:01:20

In this blog we will discuss some of the important clauses in Apache age here. For part 1 you can visit [here](https://dev.to/talhahahae/description-of-important-clauses-in-sql-and-apache-age-query-format-part-1-8j8)

## Match:
The MATCH clause allows you to specify the patterns Cypher will search for in the database. 
Cypher:
```
SELECT * FROM cypher('graph_name', $$
MATCH (v)
RETURN v
$$) as (v agtype);
```
Above query will return all the vertices in the graph.

## Return:
Return statement returns a node 
Cypher:
```
SELECT *
FROM cypher('graph_name', $$
    MATCH (n {name: 'B'})
    RETURN n
$$) as (n agtype);
```
Above query will return node n.

## Order by:
Order by is used for sorting of output on basis of properties of the output.
Cypher:
```
SELECT *
FROM cypher('graph_name', $$
    MATCH (n)
    WITH n.name as name, n.age as age
    ORDER BY n.name
    RETURN name, age
$$) as (name agtype, age agtype);
```
The query returns the nodes sorted by the name.

## Limit:
Limit is used to constraint the number of output records.
Cypher:
```
SELECT * 
FROM cypher('graph_name', $$
	MATCH (n)RETURN n.name
	ORDER BY n.name
	LIMIT 3
$$) as (names agtype);
```
The query returns the name of first 3 nodes.

## Create:
Create clause is used to create graph vertices and edges.
Cypher for creating a vertex:
```
SELECT * 
FROM cypher('graph_name', $$
    CREATE (n)
$$) as (v agtype);
```
Above query will return nothing.

Cypher for creating an edge between 2 nodes:
```
SELECT * 
FROM cypher('graph_name', $$
    MATCH (a:Person), (b:Person)
    WHERE a.name = 'Node A' AND b.name = 'Node B'
    CREATE (a)-[e:RELTYPE]->(b)
    RETURN e
$$) as (e agtype);
```
Above query will return the created edge.

## Delete: 
The delete clause is used to delete the graph and vertices. You cannot delete a node without also deleting edges that start or end on said vertex. Either explicitly delete the vertices or use DETACH DELETE.
Cypher:
```
SELECT * 
FROM cypher('graph_name', $$
	MATCH (v:Useless)
	DELETE v
$$) as (v agtype);
```
Above query will delete the selected vertex.

## Remove
Remove and delete are completely different clauses. Remove is used to remove properties from vertex and edges.
Cypher:

```
SELECT * 
FROM cypher('graph_name', $$
    MATCH (andres {name: 'Andres'})
    REMOVE andres.age
    RETURN andres
$$) as (andres agtype);
```
The returned node has no age property in it.
References:
1. https://age.apache.org
SQL Server vs MySQL: Difference, Performance, and Features
Tags: mysql, sql, database, dbforge
Published: 2023-05-12 17:08:13

In the world of database management systems, SQL Server and MySQL are two of the most popular and widely used solutions. Both platforms offer solid features and solid performance, but which one is best for your needs? Let's check - https://blog.devart.com/mysql-vs-sql-server.html

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ajitumykq3f5r0xhd28i.png)
My Journey as a Beginner in Full Stack Development
Tags: development, beginners, github, javascript
Published: 2023-05-13 21:49:18


As someone who is new to the world of full stack development, I recently completed the Phase 1 Full Stack Development Course and wanted to share my experience. This course covered a wide range of topics, from front-end development to back-end development, and provided me with a solid foundation for building web applications.

_What I Learned_
Throughout the course, I learned the following key concepts and technologies:

_HTML, CSS, JSON, and JavaScript_
These are the fundamental building blocks of web development and are essential for creating dynamic and interactive web pages. HTML is used to structure content on the page, while CSS is used to style the content and give it visual appeal. JavaScript is used to add interactivity and functionality to the web page, such as responding to user input and manipulating the content on the page. JSON is a lightweight data interchange format that is commonly used to send and receive data between client and server.

During the course, I learned how to create basic HTML and CSS layouts, how to use JSON to exchange data between client and server, and how to use JavaScript to add interactivity and functionality to my web pages. I also learned about best practices for organizing and structuring my code, which helped me write more maintainable and scalable code.

_Git and Github_
Git is a popular version control system that allows developers to track changes to their code over time, collaborate with other developers, and maintain different versions of their code. Github is a web-based platform that provides hosting for Git repositories and offers a variety of collaboration and project management tools.

During the course, I learned how to use Git to track changes to my code, create branches, merge changes, and collaborate with other developers. I also learned how to use Github to host my code, collaborate with other developers, and manage project tasks and issues.

_Slack, Piazza, and Canvas_
Slack, Piazza, and Canvas are communication and collaboration tools commonly used in online courses and in the workplace. Slack is a messaging and collaboration platform that allows teams to communicate and collaborate in real-time. Piazza is a Q&A platform that allows students to ask and answer questions related to course material. Canvas is an online learning management system that provides course materials, assignments, and grades to students.

During the course, I learned how to use these tools to communicate with my classmates and instructors, ask and answer questions related to course material, and access course materials and assignments.

_Conclusion_
Overall, the Phase 1 Full Stack Development Course provided me with a solid foundation in front-end and back-end development, as well as important tools for collaboration and project management. I look forward to building on these skills in future courses and projects and share my knowledge.