Karthikeya Boyini has Published 2550 Articles

Python program to print the initials of a name with last name in full?

karthikeya Boyini

karthikeya Boyini

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

4K+ Views

Here we use different python inbuilt function. First we use split().split the words into a list. Then traverse till the second last word and upper() function is used for print first character in capital and then add the last word which is title of a name and here we use ... Read More

array_intersect() function in PHP

karthikeya Boyini

karthikeya Boyini

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

53 Views

The array_intersect() function compares array values, and returns the matches. It returns an array containing all of the values in the first array whose values exist in all of the parameters. Syntax array_intersect(arr1, arr2, arr3, arr4, …) Parameters arr1 − Array to compare from. Required. arr2 ... Read More

array_intersect_key() function in PHP

karthikeya Boyini

karthikeya Boyini

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

65 Views

The array_intersect_key() function compares array keys, and returns the matches. It returns an array containing all of the values in the first array whose values exist in all of the parameters. Syntax array_intersect_key(arr1, arr2, arr3, arr4, …) Parameters arr1 − Array to compare from. Required. arr2 ... Read More

Covariance and Contravariance in C#

karthikeya Boyini

karthikeya Boyini

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

178 Views

To deal with classes effectively, use the concept of covariance and contra variance. Let us consider the following as our class. One is a base class for class Two, whereas Two is a base class for Three. class One { } class Two: One { } class Three ... Read More

Python program to reverse bits of a positive integer number?

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

First convert number into binary using bin() function. Then skip the first two character of binary representation because bin() appends 0b as a prefix in a binary representation of the number and reverse the remaining part. From also character and reverse it till second last character from left. Convert a ... Read More

Plotting graph using seaborn in python.

karthikeya Boyini

karthikeya Boyini

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

436 Views

Plotly's Python graphing library makes interactive, publication-quality graphs online. this graph is mainly used when we want to make line plots, scatter plots, area charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, multiple-axes, polar charts, and bubble charts. Seaborn is a library for making statistical graphics in Python. ... Read More

How to compile unsafe code in C#?

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

For compiling unsafe code, you have to specify the /unsafe command-line switch with command-line compiler. For example, to compile a program named one.cs containing unsafe code, from command line, give the command − csc /unsafe one.cs Under Visual Studio IDE, enable use of unsafe code in the ... Read More

array_merge() function in PHP

karthikeya Boyini

karthikeya Boyini

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

186 Views

The array_merge() function merges one or more arrays into one array. It returns an array in which the elements of all arrays passed in parameters are merged. Note − In case of same keys of two or more array elements, the last one overrides the other. Syntax array_merge(arr1, arr2, ... Read More

How can we speed up Python "in" operator?

karthikeya Boyini

karthikeya Boyini

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

332 Views

The python operator performs very badly in a list, O(n), because it traverses the whole list. You can use something like a set or a dict(hashed data structures that have very fast lookups) to get the same result in ~O(1) time!But this also depends on the type of data structure ... Read More

Using client side XSLT transformations in HTML5

karthikeya Boyini

karthikeya Boyini

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

115 Views

Client-side XSLTProcessor API is part of the HTML5 scripting specification, as stated below:When an XSLT transformation program is triggered by a processing instruction and the browser implements a direct-to-DOM transformation, script elements created by the XSLT processor need to be marked "parser-inserted" and run in document oThe XSLTProcessor.transformToDocument() method adds ... Read More

Advertisements