Govinda Sai has Published 99 Answers

How to draw a star in HTML5 SVG?

Govinda Sai
Published on 24-Apr-2018 11:04:18
SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.To draw a polygon in HTML ... Read More

Java Regular Expressions Tutorial

Govinda Sai
Published on 23-Apr-2018 06:08:04
You can check the following website to learn Regular expression using Java.JavaRegex

Regex capturing groups and back references in Java

Govinda Sai
Published on 23-Apr-2018 06:05:15
Capturing groups are a way to treat multiple characters as a single unit. They are created by placing the characters to be grouped inside a set of parentheses. For example, the regular expression (dog) creates a single group containing the letters "d", "o", and "g".Capturing groups are numbered by counting ... Read More

Anonymous object in Java

Govinda Sai
Published on 22-Apr-2018 20:24:43
Yes, we can use a method on an object without assigning it to any reference.  exampleLive Demopublic class Tester {    public String message(){       return "Hello World!";    }    public static void main(String[] args) {       System.out.println(new Tester().message());    }  }   Here we've used message() ... Read More

Type of Java constructors

Govinda Sai
Published on 22-Apr-2018 20:20:23
There are two types of constructor java supports −Default constructor: A constructor with no argumentsParameterized constructor: A constructor with parameters.Examplepublic class Puppy {    //Default constructor    public Puppy() {    }    //Parameterized constructor    public Puppy(String name) {       // This constructor has one parameter, name. ... Read More

Java parameterized constructor

Govinda Sai
Published on 22-Apr-2018 20:14:27
Yes! it is supported. A constructor with arguments is called the parameterized constructor. It is used to initialize an object with given values. exampleLive Demopublic class Tester {      private String message;      public Tester(String message){       this.message = message;    }      public String getMessage(){ ... Read More

How to get signal names from numbers in Python?

Govinda Sai
Published on 20-Apr-2018 08:44:31
There is no straightforward way of getting signal names from numbers in python. You can use the signal module to get all its attributes. Then use this dict to filter the variables that start with SIG and finally store them in a dice. For example, Exampleimport signal sig_items = reversed(sorted(signal.__dict__.items())) ... Read More

How to generate prime twins using Python?

Govinda Sai
Published on 20-Apr-2018 07:07:22
Twin primes are pairs of primes which differ by two. The first twin primes are {3, 5}, {5, 7}, {11, 13} and {17, 19}. You can generate prime twins in python by running a for loop and checking for primality of the numbers as you do so. exampledef is_prime(n):    for ... Read More

What is Practical Use of Reversed Set Operators in Python?

Govinda Sai
Published on 19-Apr-2018 12:20:06
Reversed set operators are operators that are defined as:s & z corresponds to s.__and__(z) z & s corresponds to s.__rand__(z)These don't make much sense in normal operations like and, add, or, etc of simple objects. However in case of inheritence, reversed operations are particularly useful when dealing with subclasses because ... Read More

Usage of letter-spacing property in CSS

Govinda Sai
Published on 13-Apr-2018 11:44:01
The letter-spacing property is used to add or subtract space between the letters that make up a word. Possible values are normal or a number specifying space.<html>    <head>    </head>    <body>       <p style = "letter-spacing:7px;">          This text is having space between ... Read More
1 2 3 4 5 6 7 ... 10 Next