Skip to content

Instantly share code, notes, and snippets.

View sdzshn3's full-sized avatar
🎯
Focusing

Zeeshan Syed sdzshn3

🎯
Focusing
  • Omniwyse Technologies
  • Hyderabad
  • X @sdzshn3
View GitHub Profile
package com.sdzshn3.android.news247.Fragments;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Bundle;
@sdzshn3
sdzshn3 / temp
Created November 27, 2019 18:41
package pp.airlineticketbooking;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import androidx.annotation.NonNull;
import android.annotation.SuppressLint
import android.content.Context
import android.location.Location
import android.location.LocationListener
import android.location.LocationManager
import android.os.Bundle
@SuppressLint("MissingPermission")
class MyLocation(
context: Context
@Suppress("DEPRECATION")
private val isNetworkAvailable: Boolean
get() {
var result = false
val connectivityManager =
getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val networkCapabilities = connectivityManager.activeNetwork ?: return false
val activeNetwork =
connectivityManager.getNetworkCapabilities(networkCapabilities) ?: return false
// QR Code Generator
implementation 'com.google.zxing:core:3.3.3'
private fun generateQr(bookingId: String) {
val size = 300
val charset = Charsets.UTF_8
val hintMap = HashMap<EncodeHintType, ErrorCorrectionLevel>()
hintMap[EncodeHintType.ERROR_CORRECTION] = ErrorCorrectionLevel.H
@sdzshn3
sdzshn3 / mathJaxTemplate.js
Created March 28, 2022 13:18
MathJax version 3 working HTML template
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>img{display: inline; height: auto; max-width: 100%;}</style>
<script>
window.MathJax = {
tex: {
inlineMath: [['${'$'}','${'$'}'], ['\\(','\\)']],
processEscapes: true
@Composable
fun MyDropDown(
modifier: Modifier = Modifier,
onClick: () -> Unit,
label: String,
placeHolder: String,
value: String,
error: String = ""
) {