If you have an image stored in the public folder of Laravel, you can access or, display it in the browser using various methods. In this article, we will learn some of these methods. Assume we have the image of a flower (flower.jpg) stored in the Public folder as shown below Now let us use the image to view inside the browser. Using url() method The url() helper function helps to return you the full path i.e., it will add the HTTP or HTTPS and return the complete path for the given URL. For example, consider the following URL ... Read More
Canvas is undoubtedly one of the most versatile widgets in Tkinter. With Canvas, we can create shapes, texts, animate stuff, modeling 3D shapes, modeling simulations, and many more.In order to add text inside a tkinter frame, we can use the create_text() method. We can define create_text() by adding values of font, text, and other options such as create_text(x, y, font, text, options….).Example#Import the required library from tkinter import * #Create an instance of tkinter frame win= Tk() #Set the geometry win.geometry("750x280") #Create a canvas object canvas= Canvas(win, width= 1000, height= 750, bg="SpringGreen2") #Add a text in ... Read More
The computer system is a combination of many parts such as peripheral devices, secondary memory, CPU, etc. This can be explained more clearly using a diagram.The salient points about the above figure displaying Computer System Organisation is −The I/O devices and the CPU both execute concurrently. Some of the processes are scheduled for the CPU and at the same time, some are undergoing input/output operations.There are multiple device controllers, each in charge of a particular device such as keyboard, mouse, printer etc.There is buffer available for each of the devices. The input and output data can be stored in these ... Read More
ER model stands for the Entity Relationship Model in the database management system (DBMS). It is the first step of designing to give the flow for a concept. It is the DFD (Data Flow Diagram) requirement of a company.It is the basic building block for relational models. Not that much training is required to design the database project. It is very easy to convert the E-R model into a relational table or to a normalized table.It is a high-level data model diagram that defines the conceptual view of the database. It acts as a blueprint to implement a database in ... Read More
There might be times when we need to take the user input in our Tkinter application. We can get the user Input in a Single Line text input through the Entry widget using get() method. To display the Captured input, we can either print the message on the screen or display the input with the help of the Label widget.Example#Import the required Libraries from tkinter import * from tkinter import ttk #Create an instance of Tkinter frame win= Tk() #Set the geometry of Tkinter frame win.geometry("750x250") def display_text(): global entry string= entry.get() label.configure(text=string) ... Read More
Binary is the simplest kind of number system that uses only two digits of 0 and 1 (i.e. value of base 2). Since digital electronics have only these two states (either 0 or 1), so binary number is most preferred in modern computer engineer, networking and communication specialists, and other professionals.Whereas Decimal number is most familiar number system to the general public. It is base 10 which has only 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.Conversion from Binary to Decimal number systemThere are mainly two methods to convert a binary number into decimal number ... Read More
What is Z-Transform?The Z-transform (ZT) is a mathematical tool which is used to convert the difference equations in time domain into the algebraic equations in z-domain.The Z-transform is a very useful tool in the analysis of a linear shift invariant (LSI) system. An LSI discrete time system is represented by difference equations. To solve these difference equations which are in time domain, they are converted first into algebraic equations in z-domain using the Z-transform, then the algebraic equations are manipulated in z-domain and the result obtained is converted back into time domain using the inverse Z-transform.The Z-transform may be of ... Read More
JavaScript is an untyped language. This means that a JavaScript variable can hold a value of any data type. To declare variables in JavaScript, you need to use the var, let, or const keyword. Whether it is a string or a number, use the var, let, or const keyword for its declaration. But for declaring a string variable we had to put the string inside double quotes or single quotes.Here’s how you can declare strings in JavaScript -var name = "David"; var subject = "Programming";ExampleYou can try to run the following code to learn how to declare strings in JavaScript ... Read More
Using the Date classYou can create a Date object using the Date() constructor of java.util.Date constructor as shown in the following example. The object created using this constructor represents the current time.ExampleLive Demoimport java.util.Date; public class CreateDate { public static void main(String args[]) { Date date = new Date(); System.out.print(date); } }OutputThu Nov 02 15:43:01 IST 2018Using the SimpleDateFormat classUsing the SimpleDateFormat class and the parse() method of this you can parse a date string in the required format and create a Date object representing the specified date.ExampleLive Demoimport java.text.ParseException; ... Read More
In this tutorial, we will learn to format the strings in TypeScript. The string is the sequence of characters in any programming language, and the same goes for TypeScript. In TypeScript, strings are immutable. The meaning of the immutable is that we can’t change the string character at the particular index, but we can append the character to the string. Below, we will learn different methods to format the string in TypeScript. Using the + operator to merge two or more strings Generally, the '+' operator performs the addition operation of two or more numbers. When we use the + ... Read More