Create Random Strings in Golang

Akhil Sharma
Updated on 19-Jul-2023 14:31:01

180 Views

A string in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type in Go, the string type can be used in a variety of ways much like any other data type. Syntax rand.Seed(value) Rand.Seed() function is used to generate random numbers. It takes a user input as argument which is the upper limit for generating random numbers. func Now() Time The Now() function is defined in time package. this ... Read More

Circular Oval-Like Button Using Canvas in Kivy

Prince Yadav
Updated on 19-Jul-2023 14:29:46

434 Views

Kivy is a free and open−source Python framework that allows developers to create cross−platform applications. It comes with a plethora of pre−built widgets such as buttons, labels, text inputs, and many more. However, there may be situations where these pre−built widgets do not fit the project's requirements, and we may need to create custom widgets. In such cases, the Canvas module in Kivy provides an excellent solution to create bespoke user interface elements. In this article, we will focus on creating a circular button with an oval−like shape using the Canvas module in Kivy. We will guide you through ... Read More

Cellular Networks

Satish Kumar
Updated on 19-Jul-2023 14:29:17

2K+ Views

Cellular networks are the backbone of modern communication, connecting people and devices across the globe. These networks are the foundation of the mobile phone industry, enabling users to make calls, send text messages, and access the internet. Cellular networks have evolved significantly over the years, becoming faster, more reliable, and more accessible than ever before. What are Cellular Networks? Cellular networks are a type of wireless communication system that uses a network of cells to connect devices. Each cell is a geographic area that is covered by a base station, which is a transmitter and receiver that connects to a ... Read More

Chatbots Using Python and Rasa

Prince Yadav
Updated on 19-Jul-2023 14:27:39

440 Views

Chatbots have been recognized as a preferred communication tool for businesses to interact with their customers, offering a more efficient and convenient interaction method. Python, a programming language that makes it easy because of the development resources, has become a top choice for building all kinds of chatbots. On the other hand, Rasa is a specialized tool that focuses on constructing chatbots with natural language understanding. In this article, we will delve into the fascinating world of chatbot development using Python and Rasa. We will take a closer look at the process of defining a chatbot's purpose, training it to ... Read More

Create a Module with Constant in Go

Akhil Sharma
Updated on 19-Jul-2023 14:27:09

132 Views

In the Go programming language, a module is a collection of packages and it helps to manage them and their dependencies. In this article, we will create a module with constant using two examples. In the first example, we will create a constant string that will be returned by the function and that function will be called from the main of another module. In the second example, a function will be created to return the string and print when called by the main of another module. Algorithm Import the required packages in the program Create a constant string in ... Read More

Calculate Sum of Left Diagonal of Matrix in Swift

Ankita Saini
Updated on 19-Jul-2023 14:26:19

268 Views

A matrix is an arrangement of numbers in rows and columns. Matrix can be of various type like square matrix, horizontal matrix, vertical matrix etc. So here we calculate the sum of the left diagonal of the square matrix using Swift Programming. A square matrix is a matrix in which the number of rows and columns are same. For example 2x2, 5x5, etc. For example, we have the following matrix − Matrix = 3 4 5 1 5 3 2 2 1 ... Read More

Chatbot in Python with ChatterBot Module

Prince Yadav
Updated on 19-Jul-2023 14:24:18

312 Views

Nowadays, chatbots have become an omnipresent feature in various industries as they are being utilized to enhance customer service and engagement. Python, which is a versatile and easy−to−use programming language, has emerged as a favored option for constructing chatbots. In this article, we’ll dive into the details of how to build a chatbot using the ChatterBot module in Python. ChatterBot is a machine learning library that offers immense potential to developers for designing intelligent chatbots that can adapt and learn from user input. We will go over the fundamental steps involved in setting up a chatbot instance, training it, ... Read More

Calculate Sum of Right Diagonal of Matrix in Swift

Ankita Saini
Updated on 19-Jul-2023 14:23:32

331 Views

A matrix is an arrangement of numbers in rows and columns. A matrix has two diagonals i.e. Right diagonal and Left diagonal. So here we calculate the sum of the right diagonal of the square matrix using Swift Programming. For example, we have the following matrix − Matrix = 3 4 5 5 3 2 1 8 1 The right diagonal elements are 5, 3, 1. So the sum of right diagonal is 9(5+3+1). Algorithm Step 1 − ... Read More

Check if a String is Numeric in Swift

Ankita Saini
Updated on 19-Jul-2023 14:22:07

2K+ Views

To check if the given string is numeric or not we use Double() initializer in Swift Programming. A string is an ordered collection of characters for example “Sky”. A string can be numeric and non-numeric. A numeric string is a string which only contains numbers for example “12345”. So the valid numeric strings are: “3423”, “222333”, “34.342”, etc., whereas non-valid numeric strings are “23hfd23”, “423131sdd”, etc. So it converts the given string into double and return true if the given string is numeric otherwise return false. Algorithm Step 1 − Create a function Step 2 − Return ... Read More

Convert Array to String with Specified Character in Swift

Ankita Saini
Updated on 19-Jul-2023 14:21:19

571 Views

In this article, we will learn how to write a swift program to convert an array into a string and join elements with a specified character. An array is used to store elements of same data type in an order. Here we use the following methods to join elements of the array with a specified character − Using joined(separator:) function Without using inbuilt function Method 1: Using joined(separator:) Function So to convert an array into a string and join elements with a specified character we use joined(separator:) method. This method is used to concatenate the elements of the ... Read More

Advertisements