This file contains hidden or 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.exmaple | |
import android.graphics.* | |
import com.github.mikephil.charting.animation.ChartAnimator | |
import com.github.mikephil.charting.interfaces.dataprovider.BarDataProvider | |
import com.github.mikephil.charting.interfaces.datasets.IBarDataSet | |
import com.github.mikephil.charting.renderer.BarChartRenderer | |
import com.github.mikephil.charting.utils.Utils | |
import com.github.mikephil.charting.utils.ViewPortHandler |
This file contains hidden or 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.content.Context | |
import android.net.ConnectivityManager | |
import android.net.NetworkCapabilities | |
import android.net.NetworkInfo | |
import android.os.Build | |
import android.telephony.TelephonyManager | |
object NetworkUtils { | |
enum class ConnectivityMode { |
This file contains hidden or 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
<templateSet group="LogTimberKotlin"> | |
<template name="timm" value="timber.log.Timber.d($FORMAT$)" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true"> | |
<variable name="NAME" expression="groovyScript("_1.take(Math.min(23, _1.length()));", kotlinClassName())" defaultValue="" alwaysStopAt="false" /> | |
<variable name="FORMAT" expression="groovyScript("def params = _2.collect {it + ' = [$' + it + ']'}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\"'", kotlinFunctionName(), functionParameters())" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="timd" value="timber.log.Timber.d("$METHOD_NAME$: $content$")" description="Timber.d(String)" toReformat="true" toShortenFQNames="true"> | |
<variable name="NAME" expression="groovyScript("_1.take(Math.min(23, _1.length()));", kotlinClas |
This file contains hidden or 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
<templateSet group="AndroidLogKotlin"> | |
<template name="logm" value="android.util.Log.d("$NAME$", $FORMAT$)" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true"> | |
<variable name="NAME" expression="groovyScript("_1.take(Math.min(23, _1.length()));", kotlinClassName())" defaultValue="" alwaysStopAt="false" /> | |
<variable name="FORMAT" expression="groovyScript("def params = _2.collect {it + ' = [$' + it + ']'}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\"'", kotlinFunctionName(), functionParameters())" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="logd" value="android.util.Log.d("$NAME$", "$METHOD_NAME$: $content$")" description="Log.d(String)" toReformat="true" toShortenFQNames="true"> | |
<variable name="NAME" expression="groovyScript("_1.take(Math.min( |
This file contains hidden or 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
public boolean isValidIIN(String iin) { | |
if (TextUtils.isEmpty(iin)) return false; | |
String date = iin.substring(0, 6); | |
String gender = iin.substring(6, 7); | |
return iin.matches("\\d{12}") && isValidBirthday(date) && gender.matches("[1-6]") && isValidControl(iin); | |
} | |
private boolean isValidBirthday(String date) { | |
if (TextUtils.isEmpty(date) || !date.matches("\\d{2}[01]\\d[0-3]\\d")) return false; |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="wrap_content" |
This file contains hidden or 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
curl -i -X POST -H 'Content-Type: application/json-rpc' -d '{"jsonrpc":"2.0","method":"hostgroup.get", "params":{"output":["groupid", "name"]},"id":3,"auth":"2fc44689924341bc5b589d303cab8f1a"}' http://IP/zabbix/api_jsonrpc.php |