Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Jay-flow's full-sized avatar
🎯
Focusing

Jay-flow Jay-flow

🎯
Focusing
View GitHub Profile
@Jay-flow
Jay-flow / overflow_text.dart
Created May 13, 2022 07:21
To add 'more' text functionality for the text widget in Flutter
import 'package:artcalendar/widgets/empty.dart';
import 'package:flutter/material.dart';
import 'badge.dart';
class OverflowText extends StatefulWidget {
const OverflowText({
Key? key,
required this.text,
required this.maxLength,
}) : super(key: key);
@Jay-flow
Jay-flow / dynamic_link.dart
Created May 7, 2022 08:33
Implement dynamic links in the Flutter
@Jay-flow
Jay-flow / create_the_short_dynamic_link.dart
Last active May 7, 2022 08:11
Create the short dynamic links
@Jay-flow
Jay-flow / singleton.dart
Created February 12, 2022 07:27
Dart singleton example
class Singleton {
Singleton._privateConstructor();
static final Singleton _instance = Singleton._privateConstructor();
factory Singleton() {
return _instance;
}
}
@Jay-flow
Jay-flow / localization.dart
Created January 11, 2022 02:32
Flutter custom localization example
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class Localization {
Localization(this.locale);
final Locale locale;
@Jay-flow
Jay-flow / decorator_example2.py
Created September 10, 2020 14:48
Decorator example code
def decorator_function(original_function):
def add_espresso():
print("Add espresso")
return original_function()
return add_espresso
@decorator_function
def add_water():
@Jay-flow
Jay-flow / decorator_example1.py
Last active September 10, 2020 14:46
Decorator example code
def decorator_function(original_function):
def add_espresso():
print("Add espresso")
return original_function()
return add_espresso
def add_water():
print("Add Water")
@Jay-flow
Jay-flow / router.py
Created September 3, 2020 07:26
Falsk API Queue Crawling
import threading
from flask_api import status
from flask_restplus import Resource
from src.api.docs.const import *
q = queue.Queue()
class RequestHandling:
@Jay-flow
Jay-flow / closure_example.py
Last active September 10, 2020 14:12
decorator_example
def decorator_func(input_func):
def wrapper_func():
return input_func()
return wrapper_func
def example():
print("I'm example function")
@Jay-flow
Jay-flow / parameters_is_address.c
Created June 25, 2020 12:11
How the computer handles variables
#include <stdio.h>
void add(int *a) {
*a = (*a) + 10;
}
int main(void) {
int a = 7;
add(&a);