Karthikeya Boyini has Published 2193 Articles

How to set target and action for UIBarButtonItem at runtime?

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

To create a bar button action at run time we’ll need to go through a few steps. First of all let’s start by creating a new project.Once you have created the project, go to it’s storyboard directly, select the ViewController and Embed it into a navigation controller.Now go to the ... Read More

Can I change the size of UIActivityIndicator in Swift?

karthikeya Boyini

karthikeya Boyini

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

796 Views

It is possible to change the size of UIActivityIndicator in swift using some tricks but it’s not recommended to change the size. To change the size of activity indicator let’s first add an indicator on an empty screen and see how it looks. For this example, I’ll also change the ... Read More

Why is python best suited for Competitive Coding

karthikeya Boyini

karthikeya Boyini

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

259 Views

Competitive programming is generally referred to coding to make use of efficient algorithms using an appropriate data structure. They test the skills of programmers on many levels.With the help of algorithms and data structures, you have to solve a hypothetical programming problem posed to you by applying different logics. You ... Read More

Convert one base number system to another base system in MySQL

karthikeya Boyini

karthikeya Boyini

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

160 Views

The CONV() function can be used to convert one base number system to another base system.For Example, The 16 is one base system and 10 is another base system. The 16 base system is hexadecimal and 10 is a decimal.The syntax is as follows −SELECT CAST(CONV('yourColumnName', 16, 10) AS UNSIGNED ... Read More

Formatter Specifier for Octal and Hexadecimal in Java

karthikeya Boyini

karthikeya Boyini

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

197 Views

For Formatter, import the following package −import java.util.Formatter;Now create a Formatter object like this −Formatter f1 = new Formatter(); Formatter f2 = new Formatter(); Formatter f3 = new Formatter();If you want a Format specifier for Octal, use %o −f3.format("Octal values %o %o %o", 15, 55, 78);If you want a Format ... Read More

How to use Swift to detect when AVPlayer video ends playing?

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

To detect the end of a video in swift we’ll need to create a video player, then use notifications to detect when the video stops playing. We’ll do this with help of an example in swift.Let’s create a project and drag and drop any video with extension “mp4”, select copy ... Read More

Using “WHERE binary” in SQL?

karthikeya Boyini

karthikeya Boyini

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

3K+ Views

The binary keyword can be used after WHERE clause to compare a value with exact case sensitive match.The following is an example −Case 1 − Case insensitive matchThe query is as follows −mysql> select 'joHN'='JOHN' as Result;The following is the output −+--------+ | Result | +--------+ | ... Read More

Replacing strings with numbers in Python for Data Analysis

karthikeya Boyini

karthikeya Boyini

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

903 Views

Sometimes there is a requirement to convert a string to a number (int/float) in data analysis. For each string, we can assign a unique integer value to differentiate string values.For this, we use the data in Comma Separated Values(CSV) files. Say we have an excel file containing CSV data as ... Read More

MySQL select distinct rows into a comma delimited list column?

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

You can achieve it with the help of GROUP_CONCAT() function. The syntax is as follows −SELECT yourColumnName1, yourColumnName2, yourColumnName3, ..N, GROUP_CONCAT(yourColumnName4) as anyAliasName FROM yourTableName group by yourColumnName3, yourColumnName1, yourColumnName2;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create ... Read More

How to create multiple styles inside a TextView on iOS App?

karthikeya Boyini

karthikeya Boyini

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

451 Views

To create multiple styles inside a textview we need to use attributed string. The text view in ios has a property attributedText which can be used to style the text inside a text view. We’ll see this with help of an example.First, we’ll create an attributelet attributeOne : [NSAttributedString.Key : ... Read More

Advertisements