teleren/devto huggingface dataset:
Working with Content Objects in Flotiq headless CMS
Tags: webdev, headlesscms, content, automation
Published: 2022-11-14 15:53:00

## Updating content through the API
There are two ways to update the content of an object:
`PUT`: When updating the object (`PUT` requests), all properties must be present in the request body, as the object data are replaced with the request body. The id property inside the object is ignored in PUT requests. Validation of update request works the same as in saving requests.
`PATCH`: When updating an object (a `PATCH` request), it is not necessary to specify all the properties of the object. The id property inside the object is ignored in `PATCH` requests. Validating the update request works the same as it does when saving requests.

> Note
> You will need to use your `Application Read and write API KEY` to perform this action or `User API KEY` scoped to accept update on the Content Type you wish to update. Read more about [API keys and scoped API keys.](https://flotiq.com/docs/API/content-type/updating-co/#:~:text=API%20keys%20and%20scoped%20API%20keys)

## Updating Content Objects through the API
For a Content-Type defined according to the [create Content Type example](https://flotiq.com/docs/API/content-type/creating-ctd/), a very simple `PUT` the payload can be sent to the supporting endpoint `https://api.flotiq.com/api/v1/content/{name}/{id}` to update Content Object:
```
  "title": "Object with changed title",
  "postContent": "This will be the new <b>content</b>"
}
```
- `name` is the name of the content type definition
- `id` is the ID of the object to update

Example
CURL
```
curl --location --request PUT 'https://api.flotiq.com/api/v1/content/blogposts/blogposts-456712' \
--header 'X-AUTH-TOKEN: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
    "title": "Object with changed title",
    "postContent": "This will be the new <b>content</b>"
}'
```
Responses
200 OK
Returned when data has been correct, and the object was saved
```
    "id": "blogposts-456712",
    "internal": {
        "contentType": "blogposts",
        "createdAt": "2021-04-09T13:30:48+00:00",
        "updatedAt": "2021-04-09T13:30:48+00:00",
        "deletedAt": ""
    },
    "title": "Object with changed title",
    "postContent": "This will be the new <b>content</b>"
}
```
**Possible validation errors**
Possible validation errors are the same as in creating Content Object; you can find the list [here](https://flotiq.com/docs/API/content-type/creating-co/#possible-validation-errors).

## Batch update Content Objects through API
Updating up to 100 objects at once is described [here](https://flotiq.com/docs/API/content-type/creating-co/#batch-create-content-objects-through-api), as batch creating and updating are done on the same API endpoint.
Openstack Manual install Part 7 - Testing our compute cluster
Published: 2022-11-14 15:40:01

---
title: Openstack Manual install Part 7 - Testing our compute cluster
published: true
description: In this video, we test our installation, adding volumes, making backups, and working with instances.
tags:
cover_image: https://i.ytimg.com/vi/0iILJ2tYKc8/maxresdefault.jpg
---

{% youtube 0iILJ2tYKc8 %}

In this video, we test our installation, adding volumes, making backups, and working with instances.
Participating in GitHub Game Off this November
Tags: gamedev, programming
Published: 2022-11-14 15:38:43

I'm taking part in my first ever game jam at GitHub Game Off 2022 and I'm super excited. Thinking of using kaboom.js to build a cool game. Hoping for a great experience.

Link to the jam [home page](https://itch.io/jam/game-off-2022). Entries open till December 1st.
How to Make Digital Clock Using JavaScript
Tags: html, css, javascript
Published: 2022-11-14 15:37:51

Hey, guys hope you are fine, today I'm going to share with Your How to Make a Digital Clock Using JavaScript. 

I've used HTML and CSS3 to design the page, then I've used JavaScript to display content dynamically.

It's for newbies or beginners who are interested in the web designing field. So, You need to watch a complete tutorial, inside there you will learn everything steps by step practically.

In this video tutorial, you will how to make a digital clock, inside that you will learn How to display hours minutes and seconds also you will learn how to display Day, Month, and also years.

{% embed https://www.youtube.com/watch?v=VIcjQ6TdyrM
 %}

If you've any questions/suggestions please leave a comment below. I will be happy to give you a response as possible.

Thanks for watching the tutorial.
Reflect for PR1 in Release 0.3
Published: 2022-11-14 15:32:02

## Links
**Issue link**: [#6152](https://github.com/AntennaPod/AntennaPod/issues/6152)
**Pull Request link**: [#6186](https://github.com/AntennaPod/AntennaPod/pull/6186)

## Which Repository and Issue I was working on?
Although Hacktoberfest has already officially been over, our contribution to GitHub will still be going on. In Release 0.3, we are going to make 2 pull requests, and 2 code reviews. For the first pull request I made, it is an open-source podcast app on Android which has 4.5K stars. The issue I was working on is a new feature adding. 

In this issue, the issue reporter suggests adding a mechanism to remember the user’s decision to let the "remove all from inbox" confirmation dialog never show again. Since this was the last repository I was working on for Hacktoberfest 2022, I still remember the structure of this project, I don't need to spend a lot of time getting familiar with the code base, so I decided to work on this one.

## How did I fix it?
To make the app remember the users’ decisions on Remove all from inbox dialog, the first solution I came up with was to add the popup dialog with a “never ask again” check box which users can click to check to inform the app that they do not want to see this confirmation again. To make this data persistent, I used the mechanism named “SharedPreference” which is provided by the Android system for developers to save the basic typed data into the app. 

I also considered the situation where users may want to withdraw this decision since once the users have checked the “never ask again” check box, they will no longer be able to see this dialog to withdraw their decision. My solution is to add an extra option to the Setting Activity so that the users can toggle on or off the “never show remove all from inbox dialog again”, from which users can withdraw their previous selection.

After a few twitches here and there, this flow finally runs well. This is what this dialog now looks like.

![Updated remove all from inbox](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai92bydk6bg351wt4aef.png)



## Lesson learned
Right before I made a PR, I sent a comment to the issue page to ask what the maintainer thinks about it. However, the maintainer did prefer the already-bloated setting page, since it will give more of a headache in finding the settings they want. He thought it is not necessary to give users a selection for them to withdraw this decision. Hence, I had to remove all the code related to settings. 
From this experience, I learned that always make everything clear before starting coding, because I don't want to expect surprise and make the code that I have already written futile.
Characteristics of User Experience (UX) Design
Tags: ux, design, writing, product
Published: 2022-11-14 15:30:00

> The strange thing about UX design is that you won't notice it when it's good. You will only notice it when it's bad.

**1. Usable**
If a product is usable, it means the design, structure, and purpose of the product are clear and easy to use.

**2. Equitable**
If a product is equitable, it means a design is helpful to people with diverse abilities and backgrounds.

**3. Enjoyable**
If a product is enjoyable, it means the design delights the user.

**4. Useful**
If a product is useful, that means it solves user problems.

---

{% user moazamdev %}
Open Sourcing My Biggest Freelancing Project That Made Me $5000 In Just 2 months of work
Tags: webdev, javascript, react, node
Published: 2022-11-14 15:29:41

I am open-sourcing my biggest freelancing project which is a full fledged Business Management System that i created for a Canadian painting company. Today, all his company’s day-to-day operations which includes Payrolls, Expenses, Invoices generation, Estimates generation, Time Tracking, Production Calendar, client emailing etc… are managed on this system.

I am open sourcing this project to help new devs who are struggling to get their first freelancing client or first dev job. 

I want to help new #developers by providing a ready-to-use project which they can use to show their skills to their clients or future employers and get their first client or first dev job.

I have written a whole article that contains all the info of the project with GitHub and the Project Demo Link. Pls, checkout that and lmk what u think abt it.

[Article Link](https://webbrainsmedia.com/blogs/business-management-system)

Also before clicking on the link, It would really help this tweet to help more new devs if u give a like and share to the first tweet of this thread.

Thanks for reading!!❤️
"Time in Words" Helper for Ruby on Rails
Published: 2022-11-14 15:04:30

One clever way to format time using Ruby is by using a Rails method called "time_ago_in_words". This method translates the **hard to read** default format for a date and time, making it more human friendly. Here is a quick example:
```
time_ago_in_words(Time.now)  # => less than a minute
```
Here is how to use it in a controller:
```
class UsersController
  def index
    helpers.time_ago_in_words(Time.now)
  end
end
```
P1 Bounties: Cross-Site Scripting (XSS) Tips And Tricks
Tags: cybersecurity, bugbountytips, hacking, xssattack
Published: 2022-11-18 04:23:48

---
title: P1 Bounties: Cross-Site Scripting (XSS) Tips And Tricks
published: true
date: 2022-11-14 15:03:01 UTC
tags: cybersecurity,bugbountytips,hacking,xssattack
canonical_url: https://medium.com/the-gray-area/p1-bounties-cross-site-scripting-xss-tips-and-tricks-10bf84daff38
---

[![](https://cdn-images-1.medium.com/max/619/1*q-kHlLcboP8p_bA_rhI5Eg.png)](https://medium.com/the-gray-area/p1-bounties-cross-site-scripting-xss-tips-and-tricks-10bf84daff38?source=rss-79a7fbf51e21------2)

TL;DR- A guide on what XSS is, how to find it, how to exploit it, and then how to make the most money off of it.

[Continue reading on The Gray Area »](https://medium.com/the-gray-area/p1-bounties-cross-site-scripting-xss-tips-and-tricks-10bf84daff38?source=rss-79a7fbf51e21------2)
Filtering application logs
Tags: showdev
Published: 2022-11-14 15:01:16

🚀 New talker feature in 2.1.0 release is filtering logs, exceptions and errors. Now I want to tell you how it works.

There can be a lot of logs in a large application. Working with network via http, local storage, controllers, exceptions, errors, verbose info, etc.

👀 Sometimes it becomes difficult to track something very important. And at this moment, the talker update is rushing to your aid.

## ⚙️ Filtering data with Talker
Let's imagine that there are a lot of logs in your application

![Talker logs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44trmao51lpl81gpca42.png)

But our interest is to see only navigation logs.
How we can make it?

![Talker logs selected](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phgnylvhb452jwh8mlbo.png)


Add filter to your Talker constructor, or set it by configure() method
```dart
  final talker = Talker(
    filter: BaseTalkerFilter(
      types: [TalkerRouteLog],
    ),
  );
```
```dart
  final talker = Talker();
  talker.configure(
    filter: BaseTalkerFilter(
      types: [TalkerRouteLog],
    ),
  );
```
**types:** - log types driven by Talker package or your custom logs that you create. [How I can make custom log?](https://dev.to/frezyx/colored-logs-in-flutter-application-with-talker-2d25)

Result:
![Logs gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7chqznzbdbtku3duugr.gif)

But, how can I make it if I do not know what type of log is it?
Talker can do it 🙂 Use **titles:** filed of filter
```dart
  final talker = Talker(
    filter: BaseTalkerFilter(
      titles: ['ROUTE'],
    ),
  );
```
Result will be same as of types: [TalkerRouteLog]

Thank you for reading post!
💻 Article [example](https://github.com/Frezyx/talker/tree/master/examples/shop_app_example) source code here

Show some ❤️ and [put a star](https://github.com/Frezyx/talker) on the GitHub to support the project! We are trying to make the best logs and errors manager for Flutter applications.
Day38 of #100DaysOfCode
Tags: 100daysofcode, nextjs, tailwindcss, webdev
Published: 2022-11-14 14:58:35

I finished the ui for the company section! 

Fixed all of the bugs.

Learned how to use svg (a bit).

Now I just need to work on the backend. I think I will have to use Prismic so there will be a lot of learning to do. Wish me luck! 🥳
What are your goals for the week of November 14?
Published: 2022-11-14 14:48:48

What are your goals for this week? 

- What are your goals for the week?   
- What are you building? 
- What will be a good result by week's end?
- Did you meet your goals last week?

**Last Week's Goals**
 How did I do?

- [:white_check_mark:] **Continue Job search.** 
- [:x:] **Do some code challenges.** No challenges. 
- [:white_check_mark:] **Write blog posts.** Blogged about HacktoberFest.
- [:white_check_mark:] Support VC members with monthly Challenge.
- [1/2] **Attend VC, JobScan webinars, and GitHub Universe sessions.** VC and GitHub Universe Keynote were at the same time. 

- Monthly goal is to beat my word count for last year's blog challenge. It was 3,511. (currently at 1905)


**This Week's Goals** 

- Continue Job search.
- Make a Pomodoro timer 
- Do some code challenges.
- Write blog posts. Virtual Coffee has a blogging Challenge for the month. Inspired by NaNoWriMo we're trying to as a group hit 100,000 words for the month. I plan to write at least one blog post a week. 
- Secondary monthly goal is to beat my word count for last year. It was 3,511. (currently at 1546)
- Support VC members with monthly Challenge.


```
-$JarvisScript git push
```
window.uetq.push('event', 'page_view', { page_path: window.location.pathname }); Error getting in React web application
Published: 2022-11-14 14:37:23

Hi Guys I have a "react": "^17.0.2" web application in which This string in getting attached in the webpage bottom
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6jr66vnpn25bfiuobfq.png) below **window.uetq = window.uetq || [];
window.uetq.push('event', 'page_view', { page_path: window.location.pathname });** any idea how to resolve this issue.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0emv6e9e13hge16tqbh6.png) any help will appreciate I'm stuck due to which and not able to find any root cause of this. Please help.
Importance of joining a Tech Community
Tags: beginners, writing, career
Published: 2022-11-14 14:36:39

You might ask, “what’s the fuss about?” or “why are they even necessary?” 
Outlined below are some of the benefits of being a part of tech communities:

**1) Making Connections**
Joining a community group is a great way to meet other tech professionals within the industry. Engaging with the community provides the perfect opportunity to network, collaborate, and innovate with individuals who share your interests. 

Alongside the professional advantages of making connections within the tech community, there are also personal benefits. Particularly in these uncertain times when many people are socially distancing and working remotely, joining a group within the community is an excellent way to connect with people and reduce loneliness.

**2) An Emergency Helpline**
Tech communities are your 911, literally. If you encounter problems or need guidance on something, you can share it with your community members, and you will get a timely solution or the help required. It saves you from spending longer-than-necessary periods, missing deadlines, or getting discouraged.

**3) An opportunity to sell yourself**
The most rewarding and lucrative reason for joining a tech community is that you get to sell yourself. Unlike the usual dropping of CVs, you might be fortunate enough to have an employer give yo an opportunity. It is often in the process of giving that you receive. In giving to your tech community, you’ll be making a name for yourself, impacting people who may recommend you for one or more deals.

In conclusion,
Online communities have made it easy for IT Professionals to crowd-source their knowledge, display their technical prowess, and reach out to like-minded techies and subject matter experts.
Thoughts on testing
Published: 2022-11-22 16:03:34

---
title: Thoughts on testing
published: true
date: 2022-11-14 14:33:12 UTC
tags: 
canonical_url: https://alex.party/posts/2022-11-14-thoughts-on-testing/
---

Chris Coiyer had an [interesting post](https://chriscoyier.net/2022/11/11/the-difference-between-integration-testing-and-end-to-end-testing/) on integration vs end to end testing. I made a reply that I want to kinda dig into a little bit.

## The Testing Pyramid is Weird

I have always found the Unit, Integration, and End to End testing pyramid to be a bit... clunky? The names describe how much you are testing, which is great, but it doesn't give much perspective as to what you are actually trying to test.

I personally think testing should be thought about more as testing that an interface works as intended. An interface, in this case, is anything someone might interact with. I like to break this out into 3 categories: Developer, Consumer, and User interfaces.

## Developer Interface Tests

These tests are mostly Unit tests for the internal code of your code base. Only developers helping make your product will really get direct benefit from these tests. You want to focus on making your developer interface tests check that functions/classes/components all work as expected for a developer who is using them. You should not test HOW the interface gets its result, only that it does get the result you are looking for.

## Consumer Interface Tests

A Consumer is anyone who will be using your product as potentially a developer, or maybe an application, that is outside of the people developing it. A good example of this would be a public REST or GraphQL API that is used by outside developers. (maybe if you are a back-end developer, the consumer is your front-end team!) It can also be someone who is using your published library. This is still in a way a technical interface test. This is where you get more integration tests as well as unit tests depending on the situation. If you say your REST API will return a JSON object, gosh darn, make sure it does!

## User Interface Tests

User tests are often thought of as being only E2E tests, but I disagree. A User test is testing how a user (generally non technical, but sometimes not depending on what you make) will interact with a thing. E2E tests are very helpful here. but also, if you can atomically do unit tests on an interface, do it! same for integration tests. if you click a button and you want to make sure it displays data from an API, maybe you don't need the full app to check that functionality. that can be an integration test! User tests are a touch more fluid in my mind than most people make them out to be.

## That's enough

Hopefully this might help you think about how you approach your tests and maybe next time you don't know how to write a test for a thing, you'll ask yourself "Who am I writing this test for?"

Originally Posted as [Thoughts on testing](https://alex.party/posts/2022-11-14-thoughts-on-testing/) at alex.party
Creating simple analytics dashboard for users
Tags: help, analytics
Published: 2022-11-14 14:30:54

I'm building a project and part of it is managing media files. Those are publicly available and I want to provide the user simple analytics in their account on specifically those files: total downloads and some meta data (country, device, which source url, etc).

My aim is to use an analytics (open-source) project/platform that can record that data and I can generate a simple analytics dashboard based on that data through its API.

I've searched for options but I'm honestly a bit lost on good options out there and what would be a great fit for the given purpose. I do prefer not to use Google Analytics.

Does anyone have suggestions what products/projects to look at?
Question
Tags: react
Published: 2022-11-14 14:26:08

Imagine, a MERN-based comparison page that lets you compare 2 products. The page URL may look something like this:
 https://.../compare?productIds[]=p1001&productIds[]=p22
This comparison page needs to show name, price, and ratings in a table for the 2 productIds in the URL. Mongo products table has fields {_id, name, price, ratings}.

a) You will use ____________ hook that returns the current state, say products, and the function ____________ that updates the state.
b) You will use ___________ hook to make an API call and post the following payload: __________ .
c) API will use the above payload and get data in **one** query: ___________. (Note: Provide the actual Mongo/Mongoose query you'd use.)
d) API will return the following JSON data: ___________.
e) _________ hook will receive this data from API and will use the function __________ to update state and re-render the component.
Get Started with .NET MAUI
Tags: dotnet, mobile, android, ios
Published: 2022-11-14 14:17:32

**Installation**
If you want to develop native, cross-platform .NET Multi-platform App UI (.NET MAUI) apps requires Visual Studio 2022 17.3 or greater, or Visual Studio 2022 for Mac 17.4 or greater.

**Prerequisites**
Visual Studio 2022 17.3 or greater. For information about supported operating systems, hardware, supported languages, and additional requirements and guidance, see Visual Studio 2022 System Requirements.
To build, sign, and deploy .NET MAUI apps for iOS, you'll also need:

- A Mac that is compatible with the latest version of Xcode. For more information, see Apple's minimum requirements documentation
- The latest version of Xcode.
- An Apple ID and paid Apple Developer Program enrollment. An Apple ID is required to deploy apps to devices, and to submit apps to the Apple Store.
- Alternatively, to deploy debug builds of your app directly from Windows to your iOS device with hot restart, you'll need:

An Apple Developer account and paid Apple Developer Program enrolment.

**Installation**
To create .NET MAUI apps, you'll need the latest version of Visual Studio 2022:

[](https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=Community&channel=Release&Version=VS2022&source=VSLandingPage&add=Microsoft.VisualStudio.Workload.CoreEditor&add=Microsoft.VisualStudio.Workload.NetCrossPlat;includeRecommended&cid=2305)Download Visual Studio 2022 Community

[](https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=Professional&channel=Release&Version=VS2022&source=VSLandingPage&add=Microsoft.VisualStudio.Workload.CoreEditor&add=Microsoft.VisualStudio.Workload.NetCrossPlat;includeRecommended&cid=2305)Download Visual Studio 2022 Professional

[](https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=Enterprise&channel=Release&Version=VS2022&source=VSLandingPage&add=Microsoft.VisualStudio.Workload.CoreEditor&add=Microsoft.VisualStudio.Workload.NetCrossPlat;includeRecommended&cid=2305)Download Visual Studio 2022 Enterprise

Either install Visual Studio, or modify your existing installation, and install the .NET Multi-platform App UI development workload with its default optional installation options:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zp1d7si09vv8p21cqljs.png)

Install .NET MAUI today and take it for a spin