This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun bubbleSortLoop(inputArray: Array<Int>): Array<Int> { | |
var iterations = 1 | |
var isSorted: Boolean | |
for (i in 0 until inputArray.size -1) { | |
isSorted = true | |
// This print is for see the interactions in sort algorithm | |
println("Iteration number: ${iterations++}") | |
for (j in 0 until inputArray.size -i -1) { | |
if (inputArray[j] > inputArray[j+1]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun bubbleSort(inputArray: Array<Int>, nextIterIndex: Int = inputArray.size): Array<Int> { | |
// This print is for see the interactions in sort algorithm | |
println("iteration number ${inputArray.size - nextIterIndex+1}") | |
val lastIndex = nextIterIndex -1 | |
var isSorted = true | |
for (i in 0 until lastIndex) { | |
val currentItem = inputArray[i] | |
val nextItem = inputArray[i+1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions'); | |
const gcs = require('@google-cloud/storage')(); | |
const spawn = require('child-process-promise').spawn; | |
const mkdirp = require('mkdirp-promise'); | |
const path = require('path'); | |
const os = require('os'); | |
const fs = require('fs'); | |
// // Create and Deploy Your First Cloud Functions | |
exports.optimizeImages= functions.storage.object().onFinalize((data) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.develer.circularsliderule; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.ScaleGestureDetector; | |
import android.view.View; |