Skip to content

Instantly share code, notes, and snippets.

View amirul12's full-sized avatar
🏠
Software Engineer at Millennium Information Solution Ltd. (MISL)

MD. AMIRUL ISLAM amirul12

🏠
Software Engineer at Millennium Information Solution Ltd. (MISL)
View GitHub Profile
//Collection Interface Example
import java.util.ArrayList;
import java.util.Collection;
public class CollectionDemo {
public static void main(String[] args) {
Collection < String > fruitCollection = new ArrayList < > ();
fruitCollection.add("banana");
@amirul12
amirul12 / InterestCalculation.java
Created November 10, 2024 03:39
In Java, a TreeMap is part of the java.util package and implements the NavigableMap interface. It stores key-value pairs in a sorted order based on the keys. A common use case of TreeMap is to store account balances of customers, where the account balance is the key, and the account holder or other information is the value. You can then use this…
import java.util.Map;
import java.util.TreeMap;
public class InterestCalculation {
public static void main(String[] args) {
// Creating a TreeMap to store account balances sorted by balance
TreeMap<Double, String> accountBalances = new TreeMap<>();
// Adding account balances and account holder names
accountBalances.put(5000.00, "John Doe");
@amirul12
amirul12 / convert-to-markdown.js
Created August 16, 2023 19:32 — forked from bnb/convert-to-markdown.js
This script converts Google Docs to Markdown files.
/*
Usage:
Adding this script to your doc:
- Tools > Script Manager > New
- Select "Blank Project", then paste this code in and save.
Running the script:
- Tools > Script Manager
- Select "ConvertToMarkdown" function.
- Click Run button.
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...".
@amirul12
amirul12 / Text_size.dart
Created December 3, 2022 06:01
Text with bellow dot
import 'package:flutter/material.dart';
class SizedText extends StatelessWidget {
final String text;
final Color color;
const SizedText({Key? key, required this.text,required this.color}) : super(key: key);
@override
Widget build(BuildContext context) {
👉Arrays -
1. Two Sum
2. Container With Most Water
3. 3Sum
4. Search in Rotated Sorted Array
5. Maximum Subarray
6. Best Time to Buy and Sell Stock
7. Maximum Product Subarray
8. Find Minimum in Rotated Sorted Array
9. Contains Duplicate
import 'package:bizcard/model/business_card/business_card_model.dart';
import 'package:bizcard/model/user/user_model.dart';
import 'package:bizcard/util/testing.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'package:google_sign_in/google_sign_in.dart';
class FirebaseServiceRepository {
final FirebaseAuth _firebaseAuth;
@amirul12
amirul12 / MainActivity
Created February 15, 2021 12:08 — forked from sreelallalu/MainActivity
SearchableSpinner
initilize
------------------>
country_spinner = (SearchableSpinner) findViewById(R.id.country_spinner);
adapter setting
------------------------>
_countryAdapter = new ArrayAdapter(this,
R.layout.simple_text, countryList);
country_spinner.setAdapter(_countryAdapter);
public class CustomListenerService {
public interface MyCustomListener{
public void onSetText(String text);
}
private List<MyCustomListener> myCustomListeners = new ArrayList<>();
public static volatile CustomListenerService customListenerService;
package com.syntax.gtcl.ui.activity.gmap;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentActivity;
import android.Manifest;
import requests
def DownloadImage(pic_url_prefix, pic_name):
with open(pic_name, 'wb') as handle:
response = requests.get(pic_url_prefix, stream=True)
if not response.ok:
print(pic_url_prefix, response)
for block in response.iter_content(1024):