This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.content.Context | |
import android.content.SharedPreferences | |
@Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS") | |
@SuppressLint("CommitPrefEdits") | |
class PreferenceManager() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ESP8266WiFi - Version: Latest | |
#include <ESP8266WiFi.h> | |
const char* ssid = "abc";//type your ssid | |
const char* password = "12345678";//type your password | |
int relayPin = 2; // GPIO2 of ESP8266 | |
WiFiServer ESPserver(80);//Service Port | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.experiments.preferencehelper | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.util.Log | |
import com.experiments.preferencehelper.PreferenceHelper.get | |
import com.experiments.preferencehelper.PreferenceHelper.set | |
class MainActivity : AppCompatActivity() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object PreferenceHelper { | |
fun defaultPrefs(context: Context): SharedPreferences | |
= PreferenceManager.getDefaultSharedPreferences(context) | |
fun customPrefs(context: Context, name: String): SharedPreferences | |
= context.getSharedPreferences(name, Context.MODE_PRIVATE) | |
inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) { | |
val editor = this.edit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url 'https://oss.sonatype.org/content/repositories/snapshots/' | |
} | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.9.+' | |
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"अहमदनगर", | |
"tahasil" : [ "अकोले", "जामखेड", "कर्जत", "कोपरगाव", "नगर", "नेवासा", "पारनेर", "पाथर्डी", "राहाता", "राहुरी", "संगमनेर", "शेवगांव", "श्रीगोंदा", "श्रीरामपूर" ] | |
}, | |
{ | |
"name":"अकोला", |