Skip to content

Instantly share code, notes, and snippets.

View salihyalcin's full-sized avatar
🎯
Focusing

Salih YALÇIN salihyalcin

🎯
Focusing
View GitHub Profile
@salihyalcin
salihyalcin / calculateNet.swift
Created January 30, 2017 12:22 — forked from fozoglu/calculateNet.swift
YGS - LYS için net hesabı
import UIKit
func calculateNet(correct:Int = 0 , wrong:Int = 0 , count:Int = 0) -> (Float) {
var result : Float = 0
if (correct <= count && correct >= 0) && (wrong <= count && wrong >= 0) {
if (correct + wrong <= count){
result = Float(correct) - Float(wrong)/4
@salihyalcin
salihyalcin / BroadcastObservable.java
Created November 23, 2015 14:18 — forked from Diolor/BroadcastObservable.java
Retry with Connection
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Looper;
import rx.Observable;
import rx.Scheduler;