- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
357 Views
Given a string that has set of words and spaces, our task is to move all spaces to front of string, by traversing the string only once. We will solve this problem quickly in Python using List Comprehension.ExampleInput: string = "python program" Output: string= “ pythonprogram"AlgorithmStep1: input a string with ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
5K+ Views
Number is given, we have to check that the number is even or odd and positive or negative.AlgorithmStep 1: input number Step 2: check number is greater than equal to 0 or not. If true then positive otherwise negative and if it 0 then number is 0. Step 3: if ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
400 Views
Here n is given value which is positive number m is the number of times till which the series run. Our task is to calculate this series.AlgorithmStep 1: Input n, m; Step 2: Converting the number to string. Step 3: Initializing result as number and string. Step 4: Adding remaining ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
107 Views
Pseudo class is to show different state of an element or a css selector. visited pseudo class is to show that the link is already visited.This pseudo class is mostly being associated with link.Syntaxa:visited { color:green;}Let's check the actual usage of :visited pseudo class with different scenarios, as follows -Example Live ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
111 Views
Every human being have emotions just like happy, sad, neutral, surprise, sorrow etc., if we create the emotions of images like happy, sad, neutral, surprise, etc. in Python. We can use Microsoft emotion API for any development purpose.We can easily elaborate all these emotions using Microsoft emotion API's.Example Codeimport http.client, ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
670 Views
Extension methods are static methods, which are called as if they were instance methods on the extended type. With Extension methods, you can add methods to existing types without even creating a new derived type, recompiling, or modifying the original type.The following is the extension method we have created.public static ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
To find intersection of two lists in C#, use the Intersect() method.The following is our list 1.List list1 = new List(); list1.Add(2); list1.Add(3); list1.Add(5); list1.Add(7);The following is our list 2.List list2 = new List(); list2.Add(5); list2.Add(4); list2.Add(6); list2.Add(8);The following is the code to find the intersection of two lists in ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
78 Views
Pass array in a method as a method argument.Let’s say the following is our array declaration and initialization.MyArray app = new MyArray(); /* an int array with 5 elements */ int [] balance = new int[]{1000, 2, 3, 17, 50};Now call the method getAverage() and pass the array as method ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
182 Views
The ‘for loop’ executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.The following is our for loop.Example Live Demousing System; namespace ArrayApplication { class MyArray { static void Main(string[] args) { int [] n = new ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
147 Views
The continue statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.The continue statement in C# works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code ... Read More