Seam Carving is a content Aware resizing algorithm developed by Shai Avidan, of Mitsubishi Electric Research Laboratories (MERL), and Ariel Shamir...
[Program][Kotlin] Count words from a file
import java.io.File fun main(args: Array<String>){ val file = File("src\\text.txt") val count = file.readText().split(" ").size println(count) }
[Program][Kotlin] Count Numbers in a File
import java.io.File fun main(args: Array<String>) { val file = File("src\\words_with_numbers.txt") val count: Int = file.readLines().count { try { Integer.parseInt(it) return@count true } catch (e: NumberFormatException) { return@count false } } println(count) }
[Program][Kotlin]Rotate Array by N
import java.util.* fun main(args: Array<String>) { val scanner = Scanner(System.`in`) val a = IntArray(scanner.nextInt()) { scanner.nextInt() } var r = scanner.nextInt() if (r > a.size) r = r % a.size if (r != a.size) { repeat(r) { val last = a.last() var prev = a[0] var temp: Int for (i in 1..a.lastIndex) { temp = … Continue reading [Program][Kotlin]Rotate Array by N
[Pattern][Java]
a pattern program in java Pa Pat Patt Patte Patter Pattern attern ttern tern ern rn n
[C++]Eucliden GCD Finding
#include <iostream> using namespace std; int GCD(int a,int b){ if(a==0) return b; else if(b==0) return a; return GCD(b,a%b); } int main() { cout<<GCD(270,192); return 0; }
[How-To][C#]Dynamically adding MenuItem and using Binding with viewModel
WPF's databinding is a powerful feature and I love how easy it becomes once you start to learn. so in my journey of MVVM, I had the requirement to use a WPF Menu Control, where I created Menu in XAML and then binded their commands via ViewModel, but I was Curious as if there was … Continue reading [How-To][C#]Dynamically adding MenuItem and using Binding with viewModel
[How-To][VB.NET] Setting custom icon for a folder and refresh it instantly
Shows how to implement PInvoke methods in .Net to instantly set and refresh custom folder icon
Journey to MVVM – an equally epic story
Hey there! Today I wanted to share with you the ups and down as I create my first wpf app in a complete MVVM architecture. I have used it before but just the bits and some copy-paste so its still new for me. so I created the view (XAML) and a viewModel (cs file). I … Continue reading Journey to MVVM – an equally epic story
[How-To] Manually install emulator for Android Studio
I was installing android studio and it required to setup sdk, download emulator and platform tools etc, while downloading emulator, android studio showed no progress and after 3-4 attempts at it failing, and wasting my network data for nothing.I downloaded the emulator archive directly from the given link, but now the question was how do … Continue reading [How-To] Manually install emulator for Android Studio

