Samual Sam has Published 2659 Articles

Python program to check a sentence is a pangrams or not.

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

296 Views

Given a sentence. Our task is to check whether this sentence is pan grams or not. The logic of Pan grams checking is that words or sentences containing every letter of the alphabet at least once. To solve this problem we use set () method and list comprehension technique. Example ... Read More

Instruction type ADD R in 8085 Microprocessor

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

8K+ Views

In 8085 Instruction set, ADD R is a mnemonic that stands for “Add contents of R to Accumulator”. As addition is a binary operation, so it requires two operands to be operated on. So input operands will reside on Accumulator and R registers and after addition the result will be ... Read More

array_diff() function in PHP

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

49 Views

The array_diff() function compares array values, and returns the differences. It returns an array containing the entries from the first array that are not present in any of the other arrays. Syntax array_diff(arr1, arr2, arr3, arr4, …) Parameters arr1 − Array to compare from. Required. arr2 ... Read More

array_diff_key() function in PHP

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

55 Views

The array_diff_key() function compares array keys, and returns the differences. It returns an array containing the entries from the first array that are not present in any of the other arrays. Syntax array_diff_key(arr1, arr2, arr3, arr4, ...) Parameters arr1 − Array to compare from. Required. arr2 − ... Read More

Zip function in Python to change to a new character set.

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

66 Views

Given a 26 letter character set, here we are using a new character set. And another character set just like alphabet set (a, b, c........z), then our task is to make a relation between new character set and that alphabet set. Example New character set: qwertyuiopasdfghjklzxcvbnm Input: "wwmm" Output: ... Read More

array_fill_keys() function in PHP

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

52 Views

The array_fill_keys() function fill an array with values, specifying keys. It returns the filled array. Syntax array_fill_keys(keys, values) Parameters keys − Array of values to be used as keys. values − Values that would be used to fill. Return The array_fill_keys() function returns the filled array. ... Read More

How to find a matching substring using regular expression in C#?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

1K+ Views

Our string is − string str = " My make "; Use the following regular expression to find the substring “make” @"\bmake\b" Here is the complete code − Example Live Demo using System; using System.Text.RegularExpressions; namespace RegExApplication { public class ... Read More

Database Operations in C#

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

1K+ Views

The most common databases used in C# are Microsoft SQL Server and Oracle. The following is done to work with databases. Connect Set the Database Name, Optional Parameters and Credentials. The username and password is needed to set a connection to the database. The connection string would look somewhat like ... Read More

SequenceMatcher in Python for Longest Common Substring.

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

744 Views

Given two strings, our task is to print the longest common sub-string. We will solve problem in python using SequenceMatcher.find_longest_match () method. Class difflib.SequenceMatcher is a flexible class for comparing pairs of sequences of any type, so long as the sequence elements are hashable. find_longest_match(a, x, b, y) Find ... Read More

array_flip() function in PHP

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:23

87 Views

The array_flip() function exchanges all keys with their associated values in an array. It returns flipped array on success, else NULL on failure. Syntax array_flip(arr) Parameters arr − Specify the array of key/value pairs to be flipped. Return The array_flip() function returns flipped array on success, ... Read More

Advertisements