Skip to content

Instantly share code, notes, and snippets.

View turtlepile's full-sized avatar
🐢
Focusing

Turtlepile turtlepile

🐢
Focusing
View GitHub Profile
import 'dart:async';
import 'package:arkitek_app_internal/data/appConstant.dart';
import 'package:arkitek_app_internal/models/PostDijitalArsiv.dart';
import 'package:arkitek_app_internal/models/PostStokFis.dart';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
class DBHelper {
Database? _db;
// ignore_for_file: avoid_print
import 'dart:convert';
import 'dart:io'; //InternetAddress utility
import 'dart:async'; //For StreamController/Stream
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'appConstant.dart';
package com.arkitek.flutter.medisys;
import io.flutter.embedding.android.FlutterActivity;
import com.microsoft.appcenter.AppCenter;
import com.microsoft.appcenter.analytics.Analytics;
import com.microsoft.appcenter.crashes.Crashes;
import com.microsoft.appcenter.distribute.Distribute;
import android.os.Bundle;
public class MainActivity extends FlutterActivity {
@Override
@turtlepile
turtlepile / Notification.cs
Created July 28, 2022 21:31
FCM Notifications, notification class for server side
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
namespace Types.DTO
{
@turtlepile
turtlepile / FCMFunctions.dart
Last active September 22, 2022 11:52
Firebase Cloud Messaging functions
import 'dart:io';
import 'package:arkitek_app_internal/firebase_options.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
class FCMFunctions {
static final FCMFunctions _singleton = new FCMFunctions._internal();
@turtlepile
turtlepile / SQLTableToClass.sql
Created June 30, 2022 12:24
SQL table to c# class | SQL to c# class | table to class c#
declare @TableName sysname = 'MyTableName' // Replace this with your database table name.
declare @Result varchar(max) = 'public class ' + @TableName + '
{'
select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
'
from
(
@turtlepile
turtlepile / TreeListViewState.cs
Created June 9, 2022 20:05
Example for saving & loading node states with DevExpress TreeList.
using System.Collections;
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraTreeList.Nodes.Operations;
public class TreeListViewState
{
private ArrayList expanded;
private ArrayList selected;
private object focused;
@turtlepile
turtlepile / lodash.js
Last active June 9, 2022 20:08
debounce function
loadEntries: _.debounce(function (searchInput) {
this.customerSearchLoading = true;
this.externalUserItems = [];
this.customers = [];
if (searchInput != null && searchInput.length > 2) {
const accountFormData = {
SearchText: searchInput,
CanikId: searchInput,
};