• Kotlin - Tutorials

    Kotlin Basics – Kotlin Keywords

    [vc_row][vc_column][vc_column_text]There are certain words in Kotlin that have special meaning and cannot be used as identifiers(variable name, function name, class name etc). These words are called reserved words or keywords. In this guide, we will learn about keywords and identifiers.[/vc_column_text][vc_custom_heading text=”Types of Keywords in Kotlin “][vc_column_text]We have two types of keywords: 1. Hard Keywords 2. Soft Keywords[/vc_column_text][vc_custom_heading text=”1. Hard Keywords”][vc_column_text]These keywords cannot be used as identifiers. For example This is valid: //valid variable name val myvar = 5 This is invalid: //error: "else" cannot be used as a variable name val else = 5 Kotlin Hard keywords Table as class break…

  • Kotlin - Tutorials

    Kotlin Tutorial for Beginners | Learn Kotlin

    [vc_row][vc_column][vc_column_text]Kotlin is a statically-typed programming language, developed by JetBrains. If you have basic knowledge of Java, you will be able to learn Kotlin in no time. This Kotlin tutorial is designed for beginners so you would be able to understand Kotlin programming even if you have no knowledge of Java. Kotlin and Java are interoperable which means you can use them together in a Project as well as you can re-write a Java code in Kotlin efficiently. The syntax of Kotlin is concise than Java. In this tutorial you will learn why use Kotlin, what are the advantages of it and several guides…

  • PHP - Tutorials

    PHP Syntax

    [vc_row][vc_column][vc_custom_heading text=”PHP Syntax”][vc_column_text]The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as ‘escaping to PHP’. There are four ways to do this −[/vc_column_text][vc_custom_heading text=”Canonical PHP tags”][vc_column_text]The most universally effective PHP tag style is − <?php ... ?> If you use this style, you can be positive that your tags will always be correctly interpreted.[/vc_column_text][vc_custom_heading text=”Short-open (SGML-style) tags”][vc_column_text]Short or short-open tags look like this − <? ... ?> [/vc_column_text][vc_column_text]Short tags are, as one might expect, the shortest option You must do one of two things to…

  • PHP - Tutorials

    Environment Setup Of PHP

    [vc_row][vc_column][vc_column_text]In order to develop and run PHP Web pages three vital components need to be installed on your computer system.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][ul] Web Server − PHP will work with virtually all Web Server software, including Microsoft’s Internet Information Server (IIS) but then most often used is freely available Apache Server. Database − PHP will work with virtually all database software, including Oracle and Sybase but most commonly used is freely available MySQL database. PHP Parser − In order to process PHP script instructions a parser must be installed to generate HTML output that can be sent to the Web Browser. This tutorial will guide you…

  • PHP - Tutorials

    Introduction Of PHP

    [vc_row][vc_column][vc_column_text]The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. This tutorial helps you to build your base with PHP.[/vc_column_text][vc_custom_heading text=”Why to Learn PHP?”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]PHP started out as a small open source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994. PHP is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Web Development Domain. I will…

  • Java

    HackerRank Solution :: 30 Days Of Code – 3.Intro to Conditional Statements

    Objective In this challenge, we’re getting started with conditional statements. Check out the Tutorial tab for learning materials and an instructional video! Task Given an integer, n, perform the following conditional actions: If n is odd, print Weird If n is even and in the inclusive range of 2 to 5, print Not Weird If n is even and in the inclusive range of 6 to 20, print Weird If n is even and greater than 20, print Not Weird Complete the stub code provided in your editor to print whether or not n is weird. Input Format A single line containing a positive integer, n . Constraints 1<= n <= 100 Output Format Print Weird if…

  • Java

    HackerRank Solution :: 30 Days Of Code – 2.Operators

    ObjectiveIn this challenge, you’ll work with arithmetic operators. Check out the Tutorial tab for learning materials and an instructional video! TaskGiven the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal’s total cost. Note: Be sure to use precise values for your calculations, or you may end up with an incorrectly rounded result! Input Format There are 3 lines of numeric input:The first line has a double,  mealCost(the cost of the meal before tax and tip).The second line has an integer, tipPercent (the percentage of mealCost being…

  • Java

    HackerRank Solution :: 30 Days Of Code – 1.Data Types

    Objective Today, we’re discussing data types. Check out the Tutorial tab for learning materials and an instructional video! Task Complete the code in the editor below. The variables i ,d , and s are already declared and initialized for you. You must: Declare 3 variables: one of type int, one of type double, and one of type String. Read 3 lines of input from stdin (according to the sequence given in the Input Format section below) and initialize your 3 variables. Use the + operator to perform the following operations: Print the sum of i plus your int variable on a new line. Print the sum of d plus your double variable to a scale of…

  • Python - SciPy

    Image Processing with SciPy – scipy.ndimage

    Image Processing with SciPy – scipy.ndimage scipy.ndimage is a submodule of SciPy which is mostly used for performing an image related operation ndimage means the “n” dimensional image. SciPy Image Processing provides Geometrics transformation (rotate, crop, flip), image filtering (sharp and de nosing), display image, image segmentation, classification and features extraction. MISC Package in SciPy contains prebuilt images which can be used to perform image manipulation task Example: Let’s take a geometric transformation example of images from scipy import misc from matplotlib import pyplot as plt import numpy as np #get face image of panda from misc package panda = misc.face()…

  • Python - SciPy

    Nelder –Mead Algorithm

    Nelder –Mead Algorithm: Nelder-Mead algorithm selects through method parameter. It provides the most straightforward way of minimization for fair behaved function. Nelder – Mead algorithm is not used for gradient evaluations because it may take a longer time to find the solution. import numpy as np from scipy.optimize import minimize #define function f(x) def f(x): return .4*(1 - x[0])**2 optimize.minimize(f, [2, -1], method="Nelder-Mead") Output: final_simplex: (array([[ 1. , -1.27109375], [ 1. , -1.27118835], [ 1. , -1.27113762]]), array([0., 0., 0.])) fun: 0.0 message: 'Optimization terminated successfully.' nfev: 147 nit: 69 status: 0 success: True x: array([ 1. , -1.27109375])