Skip to content

Instantly share code, notes, and snippets.

View salihyalcin's full-sized avatar
🎯
Focusing

Salih YALÇIN salihyalcin

🎯
Focusing
View GitHub Profile
void getAllListData(ListView listView){
int count = listView.getAdapter().getCount();
String[] listData = new String[count];
for (int i = 0; i < count; i++) {
listData[i] = listView.getAdapter().getItem(i).toString();
Log.i(TAG, "onClick: " + listData[i]);
}
}
@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
dependencies {
ext {
// Uygulamada kullanılan kütüphane versiyonları
testCompileVersion = '2.2.2'
supportLibraryVersion = '27.0.0'
constraintLayoutVersion = '1.1.3'
esriAndroidSDKVersion = '100.1.0'
calligraphyVersion = '2.2.0'
butterKnifeVersion = '8.8.1'
@salihyalcin
salihyalcin / kotlinparse.kt
Created April 28, 2020 11:03
Kotlin json parsing.
inline fun <reified T> Context.jsonToClass(@RawRes resourceId: Int): T =
Gson().fromJson(resources.openRawResource(resourceId).bufferedReader().use { it.readText() }, T::class.java)
inline fun <reified T> Context.fromRemoteJsonToClass(json : String): T = Gson().fromJson(json, T::class.java)
public class FlashlightCameraCapturer extends Camera1Capturer {
private FlashlightCameraSession cameraSession;
private final boolean captureToTexture;
public FlashlightCameraCapturer(String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture) {
super(cameraName, eventsHandler, captureToTexture);
this.captureToTexture = captureToTexture;
}
@salihyalcin
salihyalcin / iller.json
Last active February 15, 2024 14:19
Türkiye'nin İlleri
{
"1": "ADANA",
"2": "ADIYAMAN",
"3": "AFYONKARAHİSAR",
"4": "AĞRI",
"68": "AKSARAY",
"5": "AMASYA",
"6": "ANKARA",
"7": "ANTALYA",
"75": "ARDAHAN",