Skip to content

Instantly share code, notes, and snippets.

View SohanChy's full-sized avatar

Sohan Chowdhury SohanChy

View GitHub Profile
@SohanChy
SohanChy / tests_for_toptal_on_codility.py
Created May 19, 2022 19:58 — forked from 1st/tests_for_toptal_on_codility.py
My answers for tests on http://codility.com that I passed for company http://toptal.com I use Python language to solve problems.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Test that I passed on codility.com for TopTal company
#
# Task #1
def binary_gap(N):
@SohanChy
SohanChy / EditCell.java
Created January 21, 2017 16:00 — forked from james-d/EditCell.java
(Fairly) reusable edit cell that commits on loss of focus on the text field. Overriding the commitEdit(...) method is difficult to do without relying on knowing the default implementation, which I had to do here. The test code includes a key handler on the table that initiates editing on a key press.
import javafx.event.Event;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableColumn.CellEditEvent;
import javafx.scene.control.TablePosition;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
@SohanChy
SohanChy / lab_5_solve.sql
Created February 16, 2016 15:11 — forked from abrarShariar/lab_5_solve.sql
Solving lab_5 sql problems
1)>> select customer_name,customer_city from customer where customer_name in (select customer_name from
borrower);
2)>> select customer_name,customer_city from customer where customer_name in (select customer_name from
borrower where loan_number in (select loan_number from loan where branch_name='Perryridge'));