teleren/devto huggingface dataset:
Digital Marketing Strategy for SEO: What You Need to Know to Expand Your Business
Published: 2022-10-21 04:31:41

Search Engine Optimization (SEO), a crucial component of any digital marketing plan, is essential for attracting qualified clients to your organization through online channels. It's necessary for effective [Marketing For Small Business Near Me](https://www.w3era.com/).
In this blog, we'll go over the fundamentals of developing an SEO plan with the help of Organic Seo Services. Let's begin immediately!

**How to develop an SEO plan**
Forget all you believe you know about SEO and consider it to be a dynamic industry. SEO and its supporting strategies change as quickly as user behavior and search engine capabilities do over time. Not only is the web marketing sector changing, but so have your business's industry and competitors in recent years.
The goal of SEO Performance Marketing Company is to increase your organic search traffic from search engines over time. You should be preparing to use search engine optimization best practices if you're serious about bringing visitors to your website without using paid advertising.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5f3q2qnkbo3kle1rhw7a.png)

**Important factors to think about when preparing your SEO strategy
Your target market consists of who?**

Today's SEO goes beyond simply trying to attract as much visitors as possible. Instead, it focuses on luring visitors who are specifically looking for what you have to offer.
Who are you trying to reach? What are they looking to buy? When looking for the services your business offers, how and what do people search? What location are they in? What are they now fighting during their search?

Your investments in SEO become more useful the more detailed answers you provide to each of these queries by addressing them in written content found throughout your website. You can find out where your visitors are coming from and which pages they are engaging with most by hiring the best [Marketing Company In Usa](https://www.w3era.com/).

**Most individuals conduct searches on mobile devices**
The online mobile market has grown tremendously in recent years, far outpacing desktops.

When creating a new website or revamping an old one, the first step is to ensure that it functions properly on all platforms, including desktop computers, laptops, and smartphones. It's crucial to take into account the kind of information that will work well on each type of gadget. If you want to appear high in search engine results pages, you must optimize your website for mobile browsers. 

**There are more search engines now**

Google has such a significant market share that the word "Googling" is now a verb. But a sizable share of searches go on alternate websites, including Microsoft's Bing.

To see where you rank, make it a point to search for your website on Google alternatives. You may only need to increase your social media involvement and add Meta tags to move up a few positions on Bing.
Interning for an AP Computer Science Class
Tags: beginners, motivation, writing
Published: 2022-10-21 03:51:54

I had the amazing opportunity to intern for an AP (Advanced Placement) Computer Science class in high school, more specifically AP Computer Science Principles. I was a senior during that time, taking that same class last year and thought it would be a _great_ opportunity to help other students start their journeys in Computer Science. 

For those interested, the class covered basic HTML, CSS, and JS topics for the first semester, then during the second semester the class shifted gears into teaching Python, later using some APIs during the final weeks. Such as the Twitter API. 

The most important takeaway from my internship experience was that:

## It is ok to say **"I don't know"**

During the first semester I would get flustered and try to make up some shoddy solution if I didn't know the answer to one of the students' questions. I would feel embarrassed because I thought I should have known the answer to all their questions, and somehow be some kind of **Computer Science God**, whereas this was just **not** the case. 

I learned how to be comfortable with not knowing something, and instead of saying, 

>_"Uhh, yea the mainframe is just broken I guess, have you tried restarting your computer?"_

I'm more comfortable saying,

>_"Hey, **I don't know.** Let's debug it together and find out why."_

That way, I was way more relatable to the students, they wouldn't be afraid to ask me questions, and at the end of the day **I** ended up learning alongside them.

_Happy Hacking!_
Laravel 8 Get Last 30 Days Record From Database
Tags: laravel, laravel8, mysql, database
Published: 2022-10-21 03:43:26

In this article, we see laravel 8 get the last 30 days record from the database. In PHP, you can use INTERVAL to get the last 30 days record from the database. 

Also, we can see how to get the last 1 month's data records in laravel 6/7/8 using Carbon functions and you can simply get the last 30 days record using the laravel 8 eloquent model. 

For MySQL queries, we use the INTERVAL operator. It is mainly used to calculate the date and time values. And In laravel, we will use the carbon subDays() function to get the last 30 days records.

So, let's see how to get the last 30 days record in laravel 8 or laravel 8 to get the last 30 days record from the database.

> Get Last 30 Days Records Using MySQL Query Example:

In this example, we will see an SQL query to get records from the last 30 days in MySQL.

```
select * from users where created_at > now() - INTERVAL 30 day;
```

You can also use the current_date instead of the now() function.

```
select * from users where created_at > current_date - interval 30 day;
``` 

---

**_[Read Also: Laravel 8 Get Last 7 Days Records](https://techsolutionstuff.com/post/laravel-8-get-last-7-days-records)_**
 
---

> Get Last 30 Days Records In Laravel Using Carbon Example:

In laravel, we are using the carbon subDays() function to get the last 30 days records.

```
$date = \Carbon\Carbon::today()->subDays(30);
$users = User::where('created_at','>=',$date)->get();
```
JPA Criteria API | Hibernate — Criteria Queries
Tags: jpa, java, hibernate, sql
Published: 2022-10-21 02:31:05

**Criteria API**
============
->it is the Object based persistence logic where no queries will be written the
entire persistence logic will be developed by using the java statements

->this persistence 100% java statements based persistence , so it
is database s/w independent persistence logic

-> while developing these persistence logic we use class names and property names

For Detailed example on using criteria api you can watch video:
https://youtu.be/n4Ox43N3N4o
{% embed https://youtu.be/n4Ox43N3N4o %}

**JPA Criteria API**
===============
->Modern API — given by JPA and supported by hibernate
->Supports both select and non-select queries
->Support both entity select operation i.e all col values and
Scalar operations(Specific col values)

=>Main Object or Base Object in this api is CriteriaBuilder Object
and this Object is used to create CriteriaQuery Obj,Root Obj,Parameter Obj,
Order Objs, Predicate Obj,CriteriaUpdate and CriteriaDelete Obj

**To create the Criteria Query Follow the below steps**
==================================================
1)Create the Object of CriteriaBuilder interface
Session ses = HiebernateUtil.getSession();
CriteriaBuilder cb = ses.getCriteriaBuilder();

2)Create the CriteriaQuery Object
CriteriaQuery<EntityClassName> cq = cb.createQuery(Entity.class);

3)Create the root Object Specifying the from operation
Root<EntityClassName> root = cq.from(EntityClassName.class);

4)apply the clause condition if any
cq.select(root).where(cb.ge(root.get(“id”),5),cb.le(root.get(“id”),10)));

5)Create the query Object having the CriteriaQuery Object
Query query = ses.createQuery(cq);

6)Now,Control the execution of query by calling the methods of query Interface
List<EntityClassName> list = query.getResultList();
In One Minute : Apache Tomcat
Tags: beginners, programming, tutorial, oneminut
Published: 2022-10-21 02:06:23

Apache Tomcat is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies.
Tomcat provides a "pure Java" HTTP web server environment in which Java code can run.

{% embed https://youtu.be/3W-KXopMH7Y %}

Tomcat started off as a servlet reference implementation by James Duncan Davidson, a software architect at Sun Microsystems.

The Components of Tomcat are,
Catalina
Coyote
Jasper
Cluster
High availability
Web application

Catalina is Tomcat's servlet container.
Coyote is a Connector component for Tomcat that supports the HTTP 1.1 and 2 protocol as a web server. 
Jasper is Tomcat's JSP Engine. 
Cluster component has been added to manage large applications. 
A high-availability feature has been added to facilitate the scheduling of system upgrades without affecting the live environment.
Web application has added user- as well as system-based web applications enhancement to add support for deployment across the variety of environments.

Official Website :- https://tomcat.apache.org/
What is Tailwind CSS ? ? #1
Published: 2022-10-21 02:04:11

## What is Tailwind CSS exactly?

Tailwind CSS is a utility-first CSS framework designed to enable users to create applications faster and easier. You can use utility classes to control the layout, color, spacing, typography, shadows, and more to create a completely custom component design — without leaving your HTML or writing a single line of custom CSS.
It's a customizable and low-level CSS framework that provides all the building blocks to create designs without any styles.

## Advantages of Tailwind CSS 

- No more names for CSS classes and Id.
- Minimum lines of Code in CSS file.
- We can customize the designs to make the components.
- Makes the website responsive.
- Makes the changes in the desired manner.
- Tailwind CSS is a time saver
- Tailwind’s utility classes are designed to serve
[one specific purpose](https://www.seancdavis.com/posts/wtf-is-single-responsibility-principle/)

## Why Tailwind CSS is different from other framework?

Tailwind CSS is a very popular CSS framework and it is one of the best-known CSS frameworks as a low-level, utility-first, and robust choice. The framework itself can be used progressively or as a foundation for your entire design and UI.

With this framework, one of its best features is you are not locked into an opinionated structure. Everything is progressive, you can just use the pre-defined CSS classes and start building your layout and design. No annoying overriding styles, just simple build blocks that you can follow.

It provides a lot more flexibility and control over what your application looks like than other CSS frameworks. This can enable you to create a more unique site.

To learn more about what Tailwind CSS is, what benefits it offers, and why you should use it, check out this video:

[What is Tailwind? (and why is it awesome?)](https://www.youtube.com/watch?v=9U8eKmwUbIs&feature=emb_title)

If you liked this article, consider following me on Dev.to for my latest publications. Follow me on  [Twitter](https://twitter.com/heyShubhi) to know more about my self-taught
Mentoring as a Beginner
Tags: beginners, programming, career
Published: 2022-10-21 00:58:28

I had a thought a few weeks back: "Can you mentor without being an expert?". As a proud member of the ever-growing Tech Community, I went to Twitter and asked, openly, for their opinion.

The results were surprising, although not shocking: three resounding yesses. Actually, I _had_ been mentoring a few students as a beginner. This question wasn't about intention, it was about validation.

See, there's a plague roaming around: the Impostor Syndrome. Everyone is susceptible to it, newcomers and masters. It may be an old friend of yours, or hiding just around the corner.

I'm a beginner myself. And mentoring was a double-edged sword to me. It felt amazing to see my guidance be worthy. Many of the people I instructed were simply months behind me or not as fortunate. And yet, it felt terrible to be unable to respond to their expectation when the question was beyond my capacity.

That's where my thought arised. In reality, there is no shame in saying "I don't know" and handing the person a gigantic stackoverflow thread from 2011. It is foolish to assume that I can have _all_ the answers. It is foolish to assume that an expert would.

Mentoring goes beyond the technical, it's also about trust and connection. A beginner has the upper hand here: no one is closer to a student than a Junior Developer (except for another student... and hell, get mentoring from them too!).

A student may be unaware of the true value. For now, their mentor may just be a clever friend with the right answers.

For the mentor, the value  is crystal clear. No knowledge is as well consolidated as the one you can teach.

Still, mentoring isn't about having the answer. It's about being however many steps ahead of someone and deploying your knowledge with empathy.

In short, it's a win-win. It's a must for both. As a student, seek beginner mentors (or other students!). If you have been recently employed in tech, share your story and provide for the people trying to enter the field. Your aid will be a familiar face.
Code Smell 171 - Plural Classes
Tags: webdev, beginners, programming, tutorial
Published: 2022-10-21 00:57:47

*Classes are my precious*

> TL;DR: Classes represent concepts. And concepts are singular.

# Problems

- Naming

- Code Standards

# Solutions

1. Rename classes to singular

# Context

Naming things is hard.

We need to agree on certain rules.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/5d0c869a94d623684baefce9897563e2)
```scala
class Users
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/34c2fa54fa1629971b55d084541e9ce2)
```scala
class User
```

# Detection

[X] Automatic 

This is a syntactic rule.

# Tags

- Naming

# Conclusion

Name concepts in the singular.

Classes are concepts.

# More Info

{% post https://dev.to/mcsee/what-exactly-is-a-name-part-ii-rehab-20gd %}

# Disclaimer

Code Smells are just my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Anton Malanin](https://unsplash.com/@antomalani) on [Unsplash](https://unsplash.com/s/photos/twins)
  
* * *

> We are still in the infancy of naming what is really happening on software development projects.

_Alistair Cockburn_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
VS Code ProTip™: paste path of active file into terminal
Tags: vscode
Published: 2022-10-21 00:09:40

I need to use the path to the current active file in my VS Code editor all. The. Time!

Eventually I figured there must be a shortcut but there is none that's built-in. However, you can quickly add it yourself.

1. Open the command palette (Windows: Ctrl+Shift+P, Mac: Command+Shift+P)
2. Search for "Preferences: Open Keyboard Shortcuts (JSON)"
3. In the opened `keybindings.json` file, add a new item to the array

```js
  {
    "key": "ctrl+shift+t",
    "command": "workbench.action.terminal.sendSequence",
    "args": { "text": "${relativeFile}" },
    "when": "terminalFocus"
  }
```

Now open any file, then open a terminal within VS Code, and press `Ctrl+Shift+T` and it will paste the full path to that file where your cursor is in the terminal.
Track all Firestore write activity in Firestore
Tags: firestore, firebase, activity
Published: 2022-10-24 01:01:35

---
title: Track all Firestore write activity in Firestore
published: true
date: 2022-10-21 00:00:00 UTC
tags: firestore, firebase, activity
canonical_url: https://justin.poehnelt.com/posts/tracking-firestore-user-activity/
---

## Introduction

As part of a little side project, I wanted to log all Firestore writes for a user to a user specific collection that I can use to display a user’s activity. I was able to accomplish this using Audit Logs, Pub/Sub, and Cloud Functions.

## Requirements

- Log all Firestore writes for a user, ignore reads
- Access the writes as an activity collection for the user, `users/{userId}/activity`

## Architecture

There are a few moving parts to this solution, but it’s pretty automatic.

  
![Firestore Audit Logs to Collection](https://justin.poehnelt.com/images/firestore-audit-logs-to-collection--UDach1eAM-600.jpeg)       

1. Audit Logs are enabled for Firestore writes
  
![Enable Firestore Audit Logs](https://justin.poehnelt.com/images/firestore-audit-logs-F0XtUFLCbq-600.jpeg)    

1. Logs are sent to a Pub/Sub topic via a sink
  
![Create PubSub Sink](https://justin.poehnelt.com/images/activity-logs-sink-pubsub--PQvjCTA4J-400.jpeg)    

1. Cloud Function is triggered by Pub/Sub message

```js
import * as firebaseAdmin from "firebase-admin";
import * as functions from "firebase-functions";

export default functions.pubsub
  .topic("firestore-activity")
  .onPublish(async (message) => {
    const { data } = message;
    const { timestamp, protoPayload } = JSON.parse(
      Buffer.from(data, "base64").toString()
    );

    const uid =
      protoPayload.authenticationInfo.thirdPartyPrincipal.payload.user_id;

    const writes = protoPayload.request.writes;

    const activityRef = firebaseAdmin
      .firestore()
      .collection("users")
      .doc(uid)
      .collection("activity");

    await Promise.all(
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      writes.map((write: any) => {
        activityRef.add({ write, timestamp });
      })
    );
  });

```

1. Cloud Function writes to Firestore
  
![User Collection Containing Activity](https://justin.poehnelt.com/images/firestore-activity-collection-document-acUKFgNTlR-600.jpeg)    

And that's it. I now have a `/user/{userId}/activity` collection!
Blog: 2022-10-21: Content & Tooling Team Status Update
Tags: puppet, community, security
Published: 2022-10-21 21:34:47

---
title: Blog: 2022-10-21: Content & Tooling Team Status Update
published: true
date: 2022-10-21 00:00:00 UTC
tags: puppet, community, security
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/updates/2022-10-21-status-update/
---

## Relax it’s Friday!

Hey y’all, it’s Friday! That means it’s time to reflect on the week just passed. We hope you’ve had a good week and are looking forward to a well earned rest this weekend.

## puppet-lint 3.0.1 release

[Craig](https://github.com/chelnak) worked with [ekohl](https://github.com/ekohl) to release puppet-lint 3.0.1 which fixed a regression that stopped plugin authors from consuming the spec helpers from puppet-lint. Big thanks to [ekohl](https://github.com/ekohl) for your contributions.

## puppet-lint plugin to check for unsafe interpolations

[I’ve](https://github.com/GSPatton) continued to work on a plugin for puppet-lint which checks for unsafe interpolations in Puppet code. This piece of work comes as part of our efforts to make writing Puppet code more secure.

## Community Contributions

We’d like to thank the following people in the Puppet Community for their contributions over this past week:

- [`puppetlabs-accounts#426`](https://github.com/puppetlabs/puppetlabs-accounts/pull/426): “Update bash\_profile so that it identifies itself as “Puppet Managed””, thanks to [bschonec](https://github.com/bschonec)

- [`puppetlabs-postgresql#1376`](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1376): “pg\_hba\_rule: Validate userinput in postgresql::server”, thanks to [bastelfreak](https://github.com/bastelfreak)

- [`puppetlabs-stdlib#1280`](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1280): “Drop Puppet < 3.6 support in package\_provider fact”, thanks to [ekohl](https://github.com/ekohl)

- [`puppetlabs-stdlib#1279`](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1279): “Correct bcrypt salt regex”, thanks to [sabo](https://github.com/sabo) and the following people who helped get it over the line ([kenyon](https://github.com/kenyon))

- [`puppetlabs-stdlib#1278`](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1278): “Determine root\_home without shelling out”, thanks to [ekohl](https://github.com/ekohl)

- [`puppet-lint#66`](https://github.com/puppetlabs/puppet-lint/pull/66): “Fix plugin regressions introduced in 3.0.0”, thanks to [ekohl](https://github.com/ekohl)

- [`puppetlabs-kubernetes#581`](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/581): “etcd data dir path configurable by hiera”, thanks to [metode-cz](https://github.com/metode-cz)
Map-based (functional) namespacing
Tags: javascript, programming
Published: 2022-10-20 23:55:37

### Motivation

As far as I know PHP is lack of definition of modular namespacing, although PHP `\App`-like signature of namespaces is one the features I was missing for ages in JavaScript implementation (ECMAScript specification) . However, it seems we can reproduce similar behaviour via Maps since ES6, except that the signature looks more "Erlangish" (i.e. "functional"), code base :

{% codesandbox map-based-functional-namespaces-js-17z0hi %}

---

### References :
- [Constructorless namespaces](https://dev.to/projektorius96/constructorless-namespaces-in-es5-es6-14pk)
- [PHP namespaces by Dave Hollingworth](https://youtu.be/lNaWD7kRBC8?t=1)
Why Discord is Betting Big on Devs
Tags: devops, podcast, career, management
Published: 2022-10-20 22:15:21

How does a platform with 150 million monthly active users build for the future? In a word: Developers.

Discord is betting big that the future of their company, their product and their community is in supporting developers - and they're putting their money where their mouth is.   

On this week's episode of Dev Interrupted, Anjney Midha, Discord's VP of Platform Ecosystem, sits down with us to discuss Discord's past, present and future.

In this incredible episode, Anjney details Discord's recent product announcement, its spiritual connection to gaming, and why a totally moddable platform is the key to user experience. 

{% spotify spotify:episode:2mw2Jz1b4A87k3blYqzmqe %}

## Episode Highlights Include:
* (3:00) Anjney's journey to Discord
* (9:17) Discords acquisition of Ubiquity6
* (13:53) How devs can contribute to Discord
* (22:34) Discord's big announcement
* (30:02) Ecosystem fund
* (37:12) Biggest takeaway for devs

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!*** 

{% youtube 2SZ8-ytQedM %}

## [You’re invited to Interact on October 25th!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

*Want to know how engineers at Slack and Stripe connect their dev teams’ work to the business bottom line? Or how team leads at Shopify and CircleCI keep elite cycle time while minimizing dev burnout and maximizing retention?*

*These are just two of the topics we’ll tackle at [Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) on October 25th.* 

*A* ***free, virtual, community-driven engineering leadership conference,*** *[Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) is a one-day event featuring over 25 of the most respected minds in development, all selected by the thousands of engineering leaders in the Dev Interrupted community.* 

## [Register now!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)


![Register now!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9xpvwbw5xfawom98qga.jpg)