Skip to content

Instantly share code, notes, and snippets.

View kidinov's full-sized avatar

Andrey kidinov

  • Automattic
View GitHub Profile
Application
I applied through an employee referral. The process took 3 weeks. I interviewed at Booking.com (Amsterdam (Netherlands)) in November 2016.
Interview
The process was quick.
Everyone is so friendly and it seems to be a really nice company to work on.
Also, booking.com office is a really nice place...
Unfortunately, I did not went so well in data structures and algorithms.
- HR phone interview
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
public class Main {
public static class Thingy {
private DifferentThingy nestedThingy;
public static void main(String[] args) {
System.out.println(String.format("10 is power of two = %s", isPowerOfTwo(10)));
System.out.println(String.format("8 is power of two = %s", isPowerOfTwo(8)));
System.out.println(String.format("-3 is power of two = %s", isPowerOfTwo(-3)));
System.out.println(String.format("3.14 is power of two = %s", isPowerOfTwo(3.14f)));
}
public static boolean isPowerOfTwo(float arg) {
if (Math.floor(arg) != arg) {
return false;
04-21 12:04:46.350 1203-1203/com.imaspanse.app D/PeopleNearbySubFragment﹕ bluetoothScanReceiver onReceive d = Device{address='72:65:45:58:46:DF', name='iPad', typeConnection=BLUETOOTH}
04-21 12:04:47.593 1203-1203/com.imaspanse.app D/PeopleNearbySubFragment﹕ bluetoothScanReceiver onReceive d = Device{address='10:1C:0C:60:F4:94', name='iPad', typeConnection=BLUETOOTH}
public static Observer loadObserver(String path, ISender server, int id) {
File file = new File(path);
try {
URL url = file.getParentFile().toURI().toURL();
URL[] urls = new URL[]{url};
// Create a new class loader with the directory
ClassLoader cl = new URLClassLoader(urls);
@kidinov
kidinov / Undo_Redo android
Last active September 4, 2023 06:06
Undo/Redo with batches for any TextView descendant.
/*
* THIS CLASS IS PROVIDED TO THE PUBLIC DOMAIN FOR FREE WITHOUT ANY
* RESTRICTIONS OR ANY WARRANTY.
*/
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.text.Editable;
import android.text.Selection;
import android.text.TextUtils;