How to Prioritize Integrations for Your B2B SaaS Product

Featured Imgs 23

One of the most frequent integration questions we hear from SaaS teams is, "Which integrations should we build first?"

This question often arises as they start with our embedded integration platform (since it substantially increases how quickly they can launch new integrations). Still, it's relevant no matter how you build integrations to the other products your customers use.

Chris’ Corner: Gradients, Generators, and Glows

Category Image 052

Radial gradients do represent a bit of a leap up in complexity compared to linear gradients in CSS. With linear gradients, you sorta pick a direction and plop some stops on there. The default direction, to bottom, you don’t even have to include if that’s the direction you want, and two color stops with no additional values just mean “all the way at the top to all the way at the bottom”. Something like this linear-gradient(darkblue, blue).

Good news: radial gradients do maintain making most parameters optional, so radial-gradient(darkblue, blue) is still functional and half-decently-useful. But the complexity goes up from there.

  • Radial gradients need to be told to behave like a circle if that’s the shape you want, not the default ellipse.
  • You can tell a radial gradient where to stop, before you even get to the color stops.
  • You can choose a starting position for the radial gradient, it doesn’t have to be dead center.
  • There are keywords that tell radial gradients to extend to certain relevant points of the container, like closest-side and furthest-corner and such.

It was enough for Patrick Brosset to ask Do you really understand CSS radial-gradients?, which, ya know, fair.

human eyes drawn with css radial gradients.

There is no built-in way to generate a random number in CSS. Maybe there should be, as there are countless demos that use some other technology to feed random numbers into CSS. The use case is often generative art or decorative effects, but there is so much of that and the results can be so cool, it’s almost shame we don’t have it. So what do we do to get random numbers in CSS?

  • We use the random function in a CSS processor (e.g. random() works in Sass) — but then it’s only random at build time.
  • We use a random number created in JavaScript, then set a --custom-property with it. Maybe even Houdini.
  • We use user input somehow to make a value feel random.

Kacper Kula’s Randomness in CSS kinda gets into all three of those. He uses a hand-built random number generator in Sass based on prime numbers. The @property syntax is used to ensure a custom property is an integer and is sometimes used as a seed that comes in via JavaScript.

Demo Pen

Let me leave you this week with just a tiny classy snippet of CSS from CodyHouse:

.component {
  /* inner glow 👇 */
  box-shadow: 
    inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075),

  /* shadow ring 👇 */
    0 0 0 1px hsla(0, 0%, 0%, 0.05),

  /* multiple soft shadows 👇 */
    0 0.3px 0.4px hsla(0, 0%, 0%, 0.02),
    0 0.9px 1.5px hsla(0, 0%, 0%, 0.045),
    0 3.5px 6px hsla(0, 0%, 0%, 0.09);
}
Demo Pen

That’s just a nice look right there.

10 Tips To Optimize PostgreSQL Queries in Your Django Project

Featured Imgs 23

This article showcases optimization techniques that had great results at GitGuardian. You’ll find basic and advanced optimization techniques using Django and PostgreSQL, yet most of the principles we discuss are general enough to be applied to other frameworks or relational databases. However, a basic understanding of database transactions and how ORMs work is necessary to get the most out of it.

But don’t believe me, test them yourself! We provide a fully functional Django Playground where you can run all the queries shown in this article. Here it is.

Shopify vs Shopify Plus: Which Is Better for an Ecommerce Store?

Category Image 025
Shopify vs Shopify PlusThe basic Shopify service is an all-inclusive selling platform from which you can promote, sell, and ship products. Still, the company also offers an enterprise version, Shopify Plus, which is better suited for larger companies. In this article, we will compare these two platforms in terms of their pricing, features, integrations, and support and show you the key differences between them. So, let's get started!

The Difference Between the :where() and :is() CSS Selectors

Category Image 052

The CSS selectors :where() and :is() are two pseudo-classes that allow you to select elements based on their relationship with other elements. Although they sound similar, they are different in terms of functionality and syntax.

Your Web Designer Toolbox
Unlimited Downloads: 500,000+ Web Templates, Icon Sets, Themes & Design Assets


The :where() pseudo-class was introduced as part of the CSS Selectors Level 4 specification and allows you to select elements based on the presence of other elements that match a specific condition. In other words, you can select elements based on the relationship between elements in a DOM tree. For example, you can use the :where() selector to select a list item li only if it is the first child of an unordered list ul:

li:where(:first-child of ul) {
  background-color: yellow;
}

On the other hand, the :is() pseudo-class is part of the CSS Selectors Level 3 specification and allows you to select an element if it is one of several different selectors. It is similar to the logical OR operator, in CSS. For example, you can use the :is() selector to select a p element if it is either the first child of its parent or has a class of highlight:

p:is(:first-child, .highlight) {
  background-color: yellow;
}

It’s important to note that the :where() selector has better browser support than the :is() selector, and that the :is() selector should not be used in conjunction with the :not() pseudo-class.

How to Restrict Content By Member in WordPress

Featured Imgs 13

How to Restrict Content By Member in WordPressAre you looking to limit/restrict access to certain parts of your WordPress site? In this article we’ll show you how you can restrict your site’s content based on who is logged into your website using popular WordPress plugins. In other words how to setup a membership style website with WordPress. There are many reasons to create a […]

The post How to Restrict Content By Member in WordPress appeared first on WPExplorer.

How to Display Author’s Twitter and Facebook on the Profile Page

Featured Imgs 23

Want to display your author’s Twitter and Facebook links on their WordPress profile page?

By default, WordPress user profile pages don’t include fields for adding social media profiles such as Facebook or Twitter.

In this article, we will show you how to easily display your author’s Twitter and Facebook profile links in WordPress.

How to Display Author's Twitter and Facebook on the Profile Page

Why Display Author’s Twitter and Facebook Profiles on Your Site?

Social media platforms are an important source of traffic for your WordPress website. That’s why we put together a social media cheat sheet that will help you set up your social media profiles the right way.

Your authors will also have their own social profiles, and you can display them on your site to build credibility with your readers and strengthen your site’s authority.

Your visitors will be able to follow their favorite authors on social media and discover new articles on your site sooner. You can also add their social media profiles to your site’s schema, boosting your site’s trust score on Google and other search engines.

With that being said, let’s take a look at how to display an author’s Twitter and Facebook links on their user profile page.

Some of the best WordPress themes will display an author info box below each article. You can use this feature to display simple links to your author’s social profiles.

Simply go to Users » All Users in your WordPress admin panel and click the name of the author, or the ‘Edit’ link underneath to open the Edit User page.

Click on a User in the All Users List

Next, you should scroll down to the ‘About the user’ section and look for the ‘Biographical Info’ box.

If it is there, then your theme has built-in support for an author box.

Adding HTML Social Links to the User Bio

Here you can type a description of the author using text or HTML. You can manually add HTML links for the author’s Twitter and Facebook profile URLs, like this:

ADD BIO HERE. Follow them on <a href="https:/twitter.com/USERNAME">Twitter</a> and <a href="https://facebook.com/USERNAME">Facebook</a>.

Make sure you add a short biography about the author and change ‘USERNAME’ to their actual Twitter and Facebook usernames.

Once you’re finished, don’t forget to scroll to the bottom of the page and click the ‘Update User’ button to store your settings.

You will now see Twitter and Facebook links with the user’s bio on the posts that they write. Here’s how it looks on our demo website:

Preview of Author Bio with Twitter and Facebook Links

Method 2: Displaying Social Icons With an Author Bio Box Plugin

If your theme doesn’t display an author bio box, or if you want one that is more customizable and displays social icons instead of links, then you can use a plugin.

Simple Author Box is the best free author bio box plugin. It lets you customize nearly every Aspect of your author bio box, including adding social media links for your authors.

First, you need to install and activate the Simple Author Box plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

If you want even more features, then there’s a pro version that lets you display an author box before or after content, add website links, get more social icon styles, include guest authors and co-authors, and more.

Upon activation, the plugin adds social media fields to each user profile. Simply navigate to the Users » All Users page in your WordPress admin area and click on the author’s name or the ‘Edit’ link below.

Click on a User in the All Users List

Tip: To quickly edit your own user profile, you can go to the Users » Profile page.

When you scroll to the bottom of the author profile, you will notice some new fields that have been added by the Author Bio Box plugin.

Scroll until you see the section labeled ‘Social Media Links (Simple Author Box).’ Now you need to select ‘Facebook’ from the drop-down menu, and then paste the URL to their Facebook profile into the next field.

Adding a Facebook Profile Using Author Bio Box

Now you can click the button labeled ‘+ Add new social platform.’

A new drop-down and field will be added where you can add their Twitter URL.

Adding Facebook and Twitter Links Using Simple Author Box

Once you’ve done that, make sure you click the ‘Update User’ button to store your settings.

Note: Don’t worry if the Facebook and Twitter URLs vanish after clicking the button. At the time of writing, there is a minor bug that hides the URLs, but the settings have been saved.

Now Facebook and Twitter icons will be displayed with the author’s profile at the bottom of their posts. Clicking these icons will take your visitors to their social profiles, but these links will open in the same window as your blog.

Preview of Simple Author Box with Social Icons

If you would prefer that the links open in a new tab, then you can navigate to the Appearance » Simple Author Box page and then click on the Elements tab. Once there, you need to find the option to ‘Open social icon links in a new tab’ and toggle it to the on position.

Open Simple Author Box Icons in a New Tab

Now the author’s social profiles will open in a new tab.

Method 3: Adding Social Profiles to Your Site’s Schema for SEO

All in One SEO (AIOSEO) is the original WordPress SEO plugin that’s used on over 3 million websites. It can also be used to add social profile fields on the author’s profile page.

Unlike the other methods, this method will improve your website’s SEO since AIOSEO adds these social profiles to your site’s schema markup.

The problem is that AIOSEO does not automatically display them in the author bio. But don’t worry, we will show you how to do that.

For this tutorial, we’ll use the free version of All in One SEO since it allows you to add social profiles for your website and each user. However, AIOSEO Pro offers even more features to help you rank better in search engine results pages.

The first thing you need to do is install the free All in One SEO Lite plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Once you have the AIOSEO plugin set up, you need to head over to the Users » All Users page, and then click on the author’s name or the ‘Edit’ link just below.

Click on a User in the All Users List

This will open the Edit User page for that author.

Notice that AIOSEO has added a Social Profiles tab at the top of the page. You need to click on that tab now.

All in One SEO Social Profiles Tab

You can now enter the URL to the user’s social profiles in the boxes provided, such as:

https://facebook.com/johnsmith345
https://twitter.com/johnsmith345

Note that simply adding the username is not enough.

Alternatively, if the author uses the same username on multiple social networks, then you can click the box labeled ‘Use the same username for multiple social networks.’

Quickly Adding Multiple Social Networks With Same Username

You can then type in that username and check the social networks it is used on. For other social networks, you can simply type the full URL as before.

Once you are done, click on the ‘Update User’ button at the bottom of the page to store your changes.

Pro Tip: If you have Twitter and Facebook profiles for your business or website, then you can add these to your site’s schema in a similar way by visiting All in One SEO » Social Networks and adding the links on the Social Profiles tab.

The author’s social media profiles have now been added to your site’s schema, helping search engines understand your site better. But they are not yet being displayed on your website.

Displaying AIOSEO Author Twitter and Facebook Links in Your Theme

Now you need to display these fields as links in your theme.

If you are an advanced user, then you can display links from All in One SEO’s social profiles by editing your WordPress theme files. If you haven’t done this before, then check out our guide on how to copy and paste code in WordPress.

Note: If you’re not familiar with editing your theme’s core files and adding custom code, then we recommend you use AIOSEO to add the social profiles to your site’s schema, and then display them on your website using method 1 or method 2 above.

Advanced users can add the following code to your theme files where you want to display the author profile links.

<?php
$twitter = get_the_author_meta( 'aioseo_twitter', $post->post_author );
$facebook = get_the_author_meta( 'aioseo_facebook', $post->post_author );
echo '<a href="' . $twitter .'" rel="nofollow" target="_blank">Twitter</a> | <a href="'. $facebook .'" rel="nofollow" target="_blank">Facebook</a>';
?>

Save your changes and view a post on your website.

Here’s how it looks on our demo website. We added the code snippet to the biography.php file in the template-parts folder of the Twenty Sixteen theme.

Displaying AIOSEO Social Profiles in Your Theme Using Code

We hope this article helped you learn how to display the author’s Twitter and Facebook profile links in WordPress. You may also want to see our guide on how to display recent tweets or how to display your Facebook timeline in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Display Author’s Twitter and Facebook on the Profile Page first appeared on WPBeginner.

Blenderbot: A Pre-Eminent AIML Model for Chatbot Development

Featured Imgs 23

Table of Contents

  • Introduction
  • Installation of dependencies  and importing of Blenderbot model
  • Chatting with the model
  • Conclusion
  • References

Blenderbot

Introduction

In Artificial Intelligence, Blenderbot comes under the category of conversational agents. A conversational agent, or CA, is a computer program designed to have a conversation with a person, according to Wikipedia. In other words, conversational agents are automated systems — often driven by artificial intelligence — that are designed to have natural-language conversations with people.

Collision in VB.Net

558fe5180e0e8fc922d31c23ef84d240

I'm trying to make the picturebox collide with the others.
I tried to do several things but they don't work.
I spoke to my teacher and he said I should do something like this:

PictureBox1.Left + PictureBox1.Width >= PictureBox2.Left And
         PictureBox1.Top + PictureBox1.Height >= PictureBox2.Top And
         PictureBox1.Top <= PictureBox2.Top + PictureBox2.Height And
         PictureBox1.Left <= PictureBox2.Left + PictureBox2.Width

But it didn't work either, not if it was because I didn't set the variables right or if I didn't put it in the right place.

This is The full code:

Imports System.Math
Imports System.Security.Policy

Public Class Form1
    Dim CoordX As Single
    Dim CoordY As Single
    Dim Velocity As Double = 0
    Dim Angle As Double
    Dim Time As Double = 0
    Dim Gravity As Double = 9.8
    Dim moving As Boolean = False
    Dim mousePosX As Integer
    Dim mousePosY As Integer
    Dim X As Integer = 80
    Dim Y As Integer = 250
    Dim picturebox1 As New PictureBox
    Dim Timer1 As New Timer
    Dim Timer2 As New Timer
    Dim Tracking As New RichTextBox
    Dim Angle2 As Single
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Time += 0.1
        'formula da trajetoria para o x e o y
        CoordX = Velocity * Time * Cos(Angle)
        CoordY = (Velocity * Time * Sin(Angle)) - ((Gravity / 2) * Time * Time)
        picturebox1.Invalidate() 'desenhar a bola 

        picturebox1.Top += 0.1
        If picturebox1.Bounds.IntersectsWith(PictureBox3.Bounds) Then
        End If
    End Sub
    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim deltaY As Integer = 250 - mousePosY
        Dim deltaX As Integer = mousePosX - 86
        Dim temp As Single
        temp = Math.Atan2(deltaY, deltaX) * 180 / Math.PI
        If Not temp >= 0 Then
            temp += 360
        End If
        Angle2 = temp
        'mostar as cordenadas - mas para isso funconar  preciso criar uma label na public class
        'Tracking.Text = " Ball Coord_X: " & CoordX & vbNewLine & " Ball Coord_Y: " & CoordY & vbNewLine _
        ' & " Gravity: 9.8" & vbNewLine & " Velocity: " & Velocity & vbNewLine & " Angle: " & Angle2
        Tracking.Text = "Pontos:"
    End Sub
    Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        ' verificar se a bola est em movimento ou a saltar
        If Timer1.Enabled = True Then
            moving = False
        Else
            'reiniciar
            CoordX = 0
            CoordY = 0
            Time = 0
            Velocity = 0
            X = mousePosX - 8
            Y = mousePosY - 8
            moving = True
        End If
    End Sub
    Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        If Timer1.Enabled = False Then
            moving = False
            X = mousePosX - 8
            Y = mousePosY - 8
            Timer1.Interval = 10
            FindAngle()
            Timer1.Start()
            'label.Visible = False - isto s  valido no caso de mostrar-mos os dados na label
        End If
    End Sub
    Public Sub FindAngle()
        'obter 2 angulos x
        ' (250,80) est no meio 
        Dim deltaY As Integer = 250 - mousePosY
        Dim deltaX As Integer = mousePosX - 86
        Dim temp As Single
        temp = Math.Atan2(deltaY, deltaX) * 180 / Math.PI
        'Tirar numeros negativos
        If Not temp >= 0 Then
            temp += 360
        End If
        'angulo inverso
        'se a bola tiver em 225, entao vai ser lanado num angulo de 45
        If temp + 180 > 360 Then
            temp += 180
        Else
            temp -= 180
        End If
        'degrees to radians
        temp = temp * PI / 180
        Angle = temp
    End Sub
    Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        'Mover a bola
        If moving = True Then
            mousePosX = e.X
            mousePosY = e.Y
            picturebox1.Invalidate()
        End If
    End Sub
    Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs)
        If moving = True Then
            ' regras
            If mousePosX - 8 < 120 And mousePosX - 8 > 10 Then
                e.Graphics.FillEllipse(Brushes.OrangeRed, mousePosX - 8, mousePosY - 8, 16, 16)
            Else
                If mousePosX - 8 > 120 Then
                    e.Graphics.FillEllipse(Brushes.OrangeRed, 118, mousePosY - 8, 16, 16)
                    mousePosX = 118
                Else
                    e.Graphics.FillEllipse(Brushes.OrangeRed, 12, mousePosY - 8, 16, 16)
                    mousePosX = 12
                End If
            End If
            'da velociade ao calcular a distancia que esta se encontra do  centro
            'quando mais for a distncia maior  a fora
            Dim xx As Integer
            Dim yy As Integer

            If mousePosX > 80 Then
                xx = mousePosX - 80
            Else
                xx = 80 - mousePosX
            End If

            If mousePosY > 250 Then
                yy = mousePosY - 250
            Else
                yy = 250 - mousePosY
            End If

            If yy > xx Then
                Velocity = yy
            Else
                Velocity = xx
            End If

        Else
            'single - para desenhar melhor 
            e.Graphics.FillEllipse(Brushes.Navy, X + CoordX, Y - CoordY, 16, 16)
        End If
        If Y - CoordY > 315 Then
            Timer1.Stop()
            Time = 0
            X = X + CoordX
            Y = Y - CoordY
            ' a velocidade tem de diminuir enquanto a bola tocar no cho 
            Velocity -= 5
            If Velocity < 1 Then
                Timer1.Stop()
                Velocity = 0
                e.Graphics.FillEllipse(Brushes.OrangeRed, 80, 250, 16, 16)
            Else
                Timer1.Start()
            End If

        End If
        e.Graphics.FillEllipse(Brushes.White, 82, 254, 8, 8)
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Black
        Me.Size = New Size(900, 370)
        Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
        picturebox1.Location = New Point(0, 0)
        picturebox1.Size = New Size(900, 390)
        picturebox1.BackColor = Color.Transparent
        picturebox1.Name = "picturebox1"
        Tracking.Location = New Point(750, 12)
        Tracking.Size = New Size(200, 106)
        Tracking.BackColor = Color.Black
        Tracking.Cursor = Cursors.Default
        Tracking.BorderStyle = BorderStyle.None
        Tracking.ReadOnly = True
        Tracking.ForeColor = Color.GreenYellow
        Me.Controls.Add(picturebox1)
        Me.Controls.Add(Tracking)
        Tracking.BringToFront()
        AddHandler picturebox1.Paint, AddressOf PictureBox1_Paint
        AddHandler picturebox1.MouseMove, AddressOf PictureBox1_MouseMove
        AddHandler picturebox1.MouseUp, AddressOf PictureBox1_MouseUp
        AddHandler picturebox1.MouseDown, AddressOf PictureBox1_MouseDown
        AddHandler Timer1.Tick, AddressOf Timer1_Tick
        AddHandler Timer2.Tick, AddressOf Timer2_Tick
        Timer2.Start()
    End Sub
    End Class

Why Twilio Customers Are Not Going Anywhere

Featured Imgs 23

It’s no secret: we’re fans of Twilio. With more than ten million customers using their platform, it seems we’re not alone.

Longtime the darling of developers, Twilio’s approachable platform makes it easy to send voice, video, and SMS messages across nearly any context.

How To Increase Data Quality With Memphis Schemaverse

Featured Imgs 23

Using Schemaverse, you force producers to produce messages based on the given structure by validating each ingested message. This is especially useful if you’re working with multiple producers. It also allows you to set up standards for your product’s schema and evolve your schema (In RUN TIME). Let’s find out how using Memphis Schemaverse will increase your data quality. 

What Is Memphis?

Memphis{dev} is an open-source real-time data processing platform that provides end-to-end support for in-app streaming use cases using Memphis distributed message broker.

Resolving the Memory Saturation Error

Featured Imgs 23

In this blog, we are going to look at the resolution to the memory saturation error reported by Dynatrace on a machine that hosts multiple JVMs. 

The memory saturation error is thrown from Dynatrace when the memory usage goes beyond 80% and the page faults go beyond 20-page faults/second on a Linux machine.