• Android With Java - Tutorials

    Android Beginners Part 1: Installation and setup

    Installing Android Studio on 64-bit Windows 10 I launched android-studio-ide-181.5056338-windows.exe to start the installation process. The installer responded by presenting the Android Studio Setup dialog box shown in Figure 1. Clicking Next took me to the following panel, which provides the option to decline installing an Android Virtual Device (AVD). I chose to keep the default settings. After clicking Next, I was taken to the Configuration Settings panel, where I was asked to choose where to install Android Studio. I kept the default installation location and clicked Next, and was greeted with the Choose Start Menu Folder panel. I kept the default setting and clicked Install. The following Installing panel appeared: Clicking Show details causes the names…

  • Python - Tutorials

    Python Interview Question Section 1

    Q1. What is the difference between list and tuples in Python? LIST vs TUPLES LIST TUPLES Lists are mutable i.e they can be edited. Tuples are immutable (tuples are lists which can’t be edited). Lists are slower than tuples. Tuples are faster than list. Syntax: list_1 = [10, ‘Chelsea’, 20] Syntax: tup_1 = (10, ‘Chelsea’ , 20) Q2. What are the key features of Python? Python is an interpreted language. That means that, unlike languages like C and its variants, Python does not need to be compiled before it is run. Other interpreted languages include PHP and Ruby. Python is dynamically typed, this means that you don’t need…

  • Javascript - Tutorials

    JavaScript Output

    JavaScript Display Possibilities JavaScript can “display” data in different ways: Writing into an HTML element, using innerHTML. Writing into the HTML output using document.write(). Writing into an alert box, using window.alert(). Writing into the browser console, using console.log(). Using innerHTML To access an HTML element, JavaScript can use the document.getElementById(id) method. The id attribute defines the HTML element. The innerHTML property defines the HTML content: Example <!DOCTYPE html> <html> <body> <h1>My First Web Page</h1> <p>My First Paragraph</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = 5 + 6; </script> </body> </html> Using document.write() For testing purposes, it is convenient to use document.write(): Example <!DOCTYPE html> <html> <body> <h1>My First Web Page</h1> <p>My first paragraph.</p>…

  • Android With Kotlin - Tutorials

    How Cool is Kotlin?

    Before you dive deeper into Kotlin’s features, go back to DetailActivityKotlin.kt and replace the contents of the file with the following: package com.tejsumeru.android.omgandroid import android.content.Intent import android.os.Bundle import android.support.v4.view.MenuItemCompat import android.support.v7.app.AppCompatActivity import android.view.Menu import android.widget.ImageView import android.support.v7.widget.ShareActionProvider import com.squareup.picasso.Picasso class DetailActivityKotlin : AppCompatActivity() { private val imageUrlBase = "http://covers.openlibrary.org/b/id/" private var imageURL = "" private var shareActionProvider: ShareActionProvider? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_detail) actionBar?.setDisplayHomeAsUpEnabled(true) val imageView = findViewById<ImageView>(R.id.img_cover) val coverId = this.intent.extras.getString("coverID") val len = coverId?.length ?: 0 if (len > 0) { imageURL = imageUrlBase + coverId + "-L.jpg" Picasso.with(this).load(imageURL).placeholder(R.drawable.img_books_loading).into(imageView) } } private fun setShareIntent() { val…

  • Android With Kotlin - Tutorials

    Android Animations in Kotlin

    Animation is a method in which a collection of images are combined in a sepecific way and processed then they appear as moving images. Building animations make on-screen objects seems to be alive. Android has quite a few tools to help you create animations with relative ease. so in this article we will learn to create animations using Kotlin. below are some attributes which we are using while writing the code in xml. Table of Attributes : XML ATTRIBUTES DESCRIPTION android:duration It is used to specify the duration of animation to run android:fromAlpha It is the starting alpha value for…

  • Android With Java - Android With Kotlin - Tutorials

    Difference between Java and Kotlin in Android with Examples

    Kotlin KOTLIN is a cross platform, statically types, general purpose programming language with type inference. KOTLIN is designed to interoperate fully with java but type inference allows its syntax to be more concise.KOTLIN is sponsored by JetBrains and Google through the Kotlin Foundation. Java JAVA is an Object Oriented Programming Language developed by JAMES GOSLING and colleagues at SUN MICRO SYSTEMS in 1991.The language was initially called OAK. It was developed as a full fledged programming language in which one can accomplish the same sorts of tasks and solve the similar problems that one can do in other programming languages such as BASIC,C++ etc. Using Kotlin…

  • Data Structure - Tutorials

    ALGORITHM

    ALGORITHM  An Algorithm is a finite set of instruction that perform a particular task. An Algorithm should satisfy following criteria. Input: Zero or more quantities are supplied externally. Output: At least one quantity is produced. Definiteness: Each instruction is clear and unambiguous. Finiteness: Algorithm must terminate after few steps. Effectiveness: Every instruction must be very basic. ANALYSIS: It means determining amount of resources (such as time and space) needed to execute it. TIME COMPLEXITY: Time complexity of an algorithm is basically the execution time of a program. Time complexity of an algorithm depends on the number of machine instruction. SPACE…

  • Data Structure - Tutorials

    Introduction Of Linear And Non Linear Data Structure

    Linear data structure: A data structure is said to be linear if its data item form a linear sequence. Examples of the linear data structure are: (a) Array (b) Linked List (c) Stack (d) Queue Array: An array is a collection of data elements of same datatype. The elements of the array are stored in consecutive memory locations. Arrays are declared using the following syntax: type name[size]; memory representation: Stack: A stack is a linear list in which insertion and deletion operations are performed at only one end of the list.  It follows LIFO structure. Queue: A queue is a…

  • Kotlin - Tutorials

    Kotlin Basics – Kotlin String

    String is a sequence of characters. In this guide, we will see how to declare, use and manipulate strings in Kotlin. Declare a String in Kotlin There are whole bunch of ways we can define a String in Kotlin. Lets have a look at the following example, here we have declare two immutable strings website & longString and we have also declared two mutable strings name & lName. package tejprogramming fun main(args : Array<String>){ /** * These Strings are Immutable which * means they are read-only and * unchangeable */ val website = "Tej Sumeru" /** * This is how we declare long strings */ val longString…