Posts

Featured post

-Write C program to find even and odd number using macro

-Write C program to find even and odd number using macro #include<stdio.h> #define number(n)((n%2==0)?1:0) int main() { int num; printf("enter any number"); scanf("%d",&num); if(number(num)) printf("number is even"); else printf("number is odd"); return 0; } ***************************Output*********************** amr@amrj-virtual-machine:~$ gccevenodd.c amr@samr-virtual-machine:~$ ./a.out enter any number 2 number is evensmj@amr-virtual-machine:~$

How to OCR Text Extraction in Flutter Using Google ML Kit

Image
Optical Character Recognition (OCR) is a powerful tool that enables apps to recognize and extract text from images. In this article, I'll walk you through how to implement OCR in a Flutter application using Google ML Kit. This can be particularly useful for creating document scanners, digitizing handwritten notes, or even converting printed text into digital form In this article, we will learn to recognize text from camera in Flutter. Text Recognition: This feature enables the identification of text from images or real-time camera input. The ML Kit Text Recognition API is capable of recognizing text in any Latin-based character set. For further details on Text Recognition, please refer to Google ML Kit's documentation. Using ML Kit for Text Recognition in Flutter For text recognition in Flutter, we are going to use the following Flutter plugins: google_ml_kit and camera. google_ml_kit: This plugin is used for text recognition and many other features. For more details, please...

FirebaseFirestore CRUD with bootstrap How

Here is an example of how to perform a CRUD operation using the Firebase PHP library and Bootstrap: First, you will need to install the Firebase PHP library by running the following command  composer require kreait/firebase-php Create a form in Bootstrap to add a new document to a Firestore collection. You can use Bootstrap's form classes to style the form and JavaScript to submit the form data to the PHP script. <form id="add-form">   <div class="form-group">     <label for="name">Name</label>     <input type="text" class="form-control" id="name" placeholder="Enter name">   </div>   <div class="form-group">     <label for="age">Age</label>     <input type="number" class="form-control" id="age" placeholder="Enter age">   </div>   <button type="submit" class="btn btn-prima...

To perform CRUD (create, read, update, and delete) operations on a Firebase Firestore using PHP, you will need to use the Firebase PHP library. This library allows you to interact with Firebase's Firestore using PHP.Here is an example of how to perform a CRUD operation using the Firebase PHP library:First, you will need to install the Firebase PHP library by running the following command:Copy codecomposer require kreait/firebase-phpTo create a new document in a Firestore collection, you can use the following code:Copy coderequire __DIR__ . '/vendor/autoload.php';use Kreait\Firebase\Factory;use Kreait\Firebase\ServiceAccount;$serviceAccount = ServiceAccount::fromJsonFile(__DIR__ . '/path/to/service-account.json');$firebase = (new Factory) ->withServiceAccount($serviceAccount) ->createFirestore();$docRef = $firebase->collection('users')->newDocument();$docRef->create([ 'name' => 'John Doe', 'age' => 35]);To read a document from a Firestore collection, you can use the following code:Copy code$doc = $firebase->collection('users')->document('user-id')->snapshot();echo $doc->get('name');To update a document in a Firestore collection, you can use the following code:Copy code$docRef = $firebase->collection('users')->document('user-id');$docRef->update([ ['path' => 'name', 'value' => 'Jane Doe']]);To delete a document from a Firestore collection, you can use the following code:Copy code$docRef = $firebase->collection('users')->document('user-id');$docRef->delete();Note that the above examples are simplified and may not include error handling or other necessary details for a production application. Also you need to make sure to have the correct credentials and permissions to perform the CRUD operations in your Firestore database

To perform CRUD (create, read, update, and delete) operations on a Firebase Firestore using PHP, you will need to use the Firebase PHP library. This library allows you to interact with Firebase's Firestore using PHP. Here is an example of how to perform a CRUD operation using the Firebase PHP library: First, you will need to install the Firebase PHP library by running the following command: Copy code composer require kreait/firebase-php To create a new document in a Firestore collection, you can use the following code: Copy code require __DIR__ . '/vendor/autoload.php' ; use Kreait \ Firebase \ Factory ; use Kreait \ Firebase \ ServiceAccount ; $serviceAccount = ServiceAccount :: fromJsonFile ( __DIR__ . '/path/to/service-account.json' ); $firebase = ( new Factory ) -> withServiceAccount ( $serviceAccount ) -> createFirestore (); $docRef = $firebase -> collection ( 'users' )-> newDocument (); $docRef -> create ([ ...

How to get telephoney listen after closing the app in flutter ?

In Flutter, you can use the WidgetsBindingObserver and AppLifecycleState classes to listen for changes in the app's lifecycle and perform specific actions, such as listening for phone calls even after the app has been closed. Here is an example of how you can use these classes to listen for phone calls after the app has been closed: Create a new class that extends WidgetsBindingObserver and implements the didChangeAppLifecycleState method. Copy code class LifecycleEventHandler extends WidgetsBindingObserver { @override void didChangeAppLifecycleState(AppLifecycleState state) { switch (state) { case AppLifecycleState.inactive: // Listen for phone calls here break; case AppLifecycleState.paused: // Listen for phone calls here break; case AppLifecycleState.resumed: // Listen for phone calls here break; case AppLifecycleState.suspending: // Listen for phone calls here break; } } } ...

Unhandled Exception: FormatException: Invalid radix-10 number (at character 1) E/flutter (23894): null

   Unhandled Exception: FormatException: Invalid radix-10 number (at character 1) E/flutter (23894): null this Errro showing beacuse you not parsing  json parsing. for json Parsing: - dart variable like char, double or int another json parsing like below showing here Ex: - int.parse(json['demo'].toString); just like parse the in the model class in flutter  Solution:   if (json[ 'minimum_order_qty' ] != null ) {       _minimumOrderQty = int.parse(json[ 'minimum_order_qty' ].toString());     }

A problem occurred evaluating root project 'android'. > A problem occurred configuring project ':app'. how to solve in flutter error

https://amreshtechknowledge.blogspot.com/2022/10/a-problem-occurred-evaluating-root.html  fist go to your Android inside then go build.gradle   showing  subprojects {     project.evaluationDependsOn( ':app' ) } //comment this line                                                                                                                                                        

A problem occurred evaluating root project 'android'. > A problem occurred configuring project ':app'. how to solve in flutter error

#flutter #Build file 'D:\demo\android\build.gradle' line: 30 how to solve the error in flutter * What went wrong: A problem occurred evaluating root project 'android'. > A problem occurred configuring project ':app'.    > Could not open proj generic class cache for build file 'D:\demo\android\app\build.gradle' (C:\Users\User\.gradle\caches\7.4\scripts\2km7019czj57pdwhwiktpxuex).               > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your ow...