Friday, January 25, 2019

FizzBuzz in different languages

Java:

import java.util.TreeMap;
public class Main {

    public static void main(String[] args) {

        System.out.println("Hello World!");
        TreeMap fizzbuzz = new TreeMap();
        for (int i = 0; i < 100;) {
            i++;
            if (i % 3 == 0) {
                fizzbuzz.put(i, "Fizz");            }
            if (i % 5 == 0) {
                fizzbuzz.put(i, "Buzz");            }

            if (i % 3 == 0 && i % 5 == 0) {
                fizzbuzz.put(i, "FizzBuzz");            }
        }

        for (Object i: fizzbuzz.keySet()) {
            System.out.println(i.toString() + " " + fizzbuzz.get(i));        }
    }
}

Kotlin:

fun main(args: Array) {

    println("Hello World!")

    val fizzbuzz = mutableMapOf<Int, String>()

    var i = 0    while (i < 100) {
        i++

        when {
            i % 3 == 0 -> fizzbuzz[i] = "Fizz"        }
        when {
            i % 5 == 0 -> fizzbuzz[i] = "Buzz"        }
        when {
            i % 3 == 0 && i % 5 == 0 -> fizzbuzz[i] = "FizzBuzz"        }
    }

    fizzbuzz.forEach { i, j -> println("$i, $j") }
}

Monday, January 14, 2019

Fix for "Can't remove payment method on Google Play"

Here's a fix for those who cannot remove a google payment method AND has/had Project Fi.

2. Go to "Billing"
3. Click "Payment method"
4. Add a new payment method or click the drop-down box on another card and make that the primary.
5. You should now be able to remove the original payment method.

Friday, May 29, 2015

Fix for (12c only): ORA-01792: MAXIMUM NUMBER OF COLUMNS IN A TABLE OR VIEW IS 1000



SOLUTION

The workaround is to set "_fix_control"='17376322:OFF'
SQL> alter session set "_fix_control"='17376322:OFF';
or at system level :
SQL> alter system set "_fix_control"='17376322:OFF';

OR

Apply Patch 19509982 if available for your DBVersion and Platform

FizzBuzz in different languages

Java: import java.util.TreeMap ; public class Main { public static void main (String[] args) { System. out .println( &...