Saturday, May 24, 2025

SQL Commands

 


-- 1. Create table for single words

CREATE TABLE single_words (

    id INTEGER PRIMARY KEY AUTOINCREMENT,

    word TEXT,

    bangla TEXT

);


-- 2. Insert only single-word entries (no spaces)

INSERT INTO single_words (word, bangla)

SELECT word, meanings FROM tbl_medical

WHERE word NOT LIKE '% %';


-- 3. Replace space with ✔ (optional, usually skipped for single words)

UPDATE single_words SET word = REPLACE(word, ' ', '✔');


-- 4. Create table for two-word entries

CREATE TABLE two_words (

    id INTEGER PRIMARY KEY AUTOINCREMENT,

    word TEXT,

    bangla TEXT

);


-- 5. Insert only two-word entries (exactly 1 space → 2 words)

INSERT INTO two_words (word, bangla)

SELECT word, meanings FROM tbl_medical

WHERE LENGTH(word) - LENGTH(REPLACE(word, ' ', '')) = 1;


-- 6. Replace space with ✔ in two-word entries

UPDATE two_words

SET word = REPLACE(word, ' ', '✔')

WHERE LENGTH(word) - LENGTH(REPLACE(word, ' ', '')) = 1;


-- 7. Revert ✔ back to space in both single_words and two_words tables


-- For single_words:

UPDATE single_words

SET word = REPLACE(word, '✔', ' ');


-- For two_words:

UPDATE two_words

SET word = REPLACE(word, '✔', ' ');


-- 8. Create table for three-word entries

CREATE TABLE three_words (

    id INTEGER PRIMARY KEY AUTOINCREMENT,

    word TEXT,

    bangla TEXT

);


-- 9. Insert only three-word entries (exactly 2 spaces → 3 words)

INSERT INTO three_words (word, bangla)

SELECT word, meanings FROM tbl_medical

WHERE LENGTH(word) - LENGTH(REPLACE(word, ' ', '')) = 2;


-- 10. Replace space with ✔ in three-word entries

UPDATE three_words

SET word = REPLACE(word, ' ', '✔')

WHERE LENGTH(word) - LENGTH(REPLACE(word, ' ', '')) = 2;


-- 11. Revert ✔ back to space in three_words table

UPDATE three_words

SET word = REPLACE(word, '✔', ' ');


Get all table name:

SELECT name FROM sqlite_master WHERE type='table'


Monday, November 11, 2024

Shortcut

 1. To edit text of websites open website inspect:

console > document.designmode = 'on'

2. Open github code in vsCode:

on link replace github.com to github.dev

and it will open in vscode

Thursday, October 3, 2024

Slide to Act

 

import 'package:slide_to_act/slide_to_act.dart';


SlideAction(

  sliderButtonIconPadding: 5,
submittedIcon: Icon(Icons.done,color: Colors.white,),
borderRadius: 8,
outerColor: safehomecolor,
elevation: 1,
height: 40,
sliderButtonIconSize: 15,
text: "Slide to Confirm",
textStyle: TextStyle(
fontSize: 15,
color: Colors.white
),
animationDuration: Duration(milliseconds: 800),
onSubmit: (){},
)

Saturday, July 13, 2024

My Code

 import 'package:flutter/cupertino.dart';

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:url_launcher/url_launcher.dart';

class ProfileScreen extends StatefulWidget {
const ProfileScreen({super.key});

@override
State<ProfileScreen> createState() => _ProfileScreenState();
}

class _ProfileScreenState extends State<ProfileScreen> {
Color myColor = const Color(0xFFE0D4E3);
String myNum = '01870345945';
String myLoc = 'https://www.google.com/maps/search/Mirpur-12/@23.8237056,90.359683,15z/data=!3m1!4b1?entry=ttu';


void makePhoneCall(String phoneNumber) async {
final url = 'tel:$phoneNumber';
// ignore: deprecated_member_use
if (await canLaunch(url)) {
// ignore: deprecated_member_use
await launch(url);
} else {
throw 'Could not launch $url';
}
}



@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
child: Column(
children: [
const SizedBox(
height: 10,
),
Stack(
children: [
Container(
height: Get.height * 0.15,
width: double.infinity,
decoration: BoxDecoration(color: myColor),
child: Padding(
padding: const EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
"Zahed Al Sabit",
style: TextStyle(
fontSize: 20,
letterSpacing: 3,
fontWeight: FontWeight.bold,
color: Colors.teal.shade800),
),
Text(
"App Developer",
style: TextStyle(
fontSize: 17,
letterSpacing: 2,
fontWeight: FontWeight.bold,
color: Colors.teal.shade800),
),
],
),
),
),
Positioned(
bottom: 1,
right: 0,
child: Container(
height: 120,
width: 120,
decoration: BoxDecoration(
border: Border.all(width: 5, color: Colors.white),
shape: BoxShape.circle,
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage("Assets/img.png"))),
),
),
],
),
Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 15),
const Divider(),
const SizedBox(height: 15),
const Text(
'Contact:',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
GestureDetector(
onTap: () {
makePhoneCall(myNum);
},
child: ListTile(
leading: const Icon(Icons.phone),
title: Text(myNum),
),
),
const ListTile(
leading: Icon(Icons.email),
title: Text('nishat@befairgroup.com'),
),
GestureDetector(
onTap: () {
Uri url = Uri.parse(myLoc);
launchUrl(url, mode: LaunchMode.inAppBrowserView);
},
child: const ListTile(
leading: Icon(Icons.location_on),
title: Text('Mirpur 12, Dhaka'),
),
),
GestureDetector(
onTap: () async {
final Uri url = Uri.parse('https://app.ebook.com.bd/');
if (!await launchUrl(url)) {
throw Exception('Could not launch');
}
},
child: const ListTile(
leading: Icon(CupertinoIcons.globe),
title: Text("https://app.ebook.com.bd/"),
),
),
const SizedBox(height: 32),
const Divider(),
const Text(
'Expertise Skills:',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const ListTile(
leading: Icon(Icons.check),
title: Text('App Development'),
),
const ListTile(
leading: Icon(Icons.check),
title: Text('Good at dart'),
),
const ListTile(
leading: Icon(Icons.check),
title: Text('Data entry operator'),
),
const SizedBox(height: 32),
const Divider(),
const Text(
'Education:',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const ListTile(
leading: Icon(Icons.school),
title: Text('Feni Polytechnic Institute'),
subtitle: Text('Feni, Bangladesh'),
),
const ListTile(
leading: Icon(Icons.school),
title: Text('Shaheen Academy School And College'),
subtitle: Text('Passing year-2019'),
),
const SizedBox(height: 32),
const Divider(),
const Text(
'Experience:',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const ListTile(
leading: Icon(Icons.work),
title: Text('Currently working at beFair Group'),
subtitle: Text('Data entry operator \nJunior app developer'),
),

],
),
)
],
),
),
),
);
}
}

create upload key

 ///Create Upload Key

1. Verify Java

2. Verify JAVA_HOME

3. keytool -genkey -v -keystore $env:USERPROFILE\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload

4. enter password

5. use BD country code 


///Use Dependencies

1. [project]/android/app/build.gradle:


+   def keystoreProperties = new Properties()

+   def keystorePropertiesFile = rootProject.file('key.properties')

+   if (keystorePropertiesFile.exists()) {

+       keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

+   }


2. [project]/android/app/build.gradle:



+       signingConfigs {

+           release {

+               keyAlias keystoreProperties['keyAlias']

+               keyPassword keystoreProperties['keyPassword']

+               storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null

+               storePassword keystoreProperties['storePassword']

+           }

+       }

        buildTypes {

           release {

              // TODO: Add your own signing config for the release build.

              // Signing with the debug keys for now,

              // so `flutter run --release` works.

-                signingConfig signingConfigs.debug

+                signingConfig signingConfigs.release

           }

        }

3. create a file name key.properties.

4. paste it here:

storePassword=<password-from-previous-step>

keyPassword=<password-from-previous-step>

keyAlias=upload

storeFile=<keystore-file-location> 


5. enter upload key password here

Friday, July 5, 2024

Firebase

SQL Commands

  -- 1. Create table for single words CREATE TABLE single_words (     id INTEGER PRIMARY KEY AUTOINCREMENT,     word TEXT,     bangla TEXT )...