├── .gitignore ├── .vscode └── settings.json ├── CONTRIBUTING.md ├── Flutter Apps └── Chess.dart ├── Java Tutorial Program ├── DiamondPattern.java └── ForEach_loop.java ├── Name Programs ├── Armstrong.java ├── Fibonacci.java ├── Krishnamurthy.java ├── Neon.java └── Tribonacci.java ├── README.md ├── c_programs ├── ArmstrongRecursion.c ├── bubble_sort.c ├── insertionSort.c ├── matrix_multi.c ├── queue.cpp └── quickSort.c ├── cpp_programs ├── Cpp_Pattrens │ ├── TwetlthPattren.cpp │ ├── eightPattren.cpp │ ├── elventhPattren.cpp │ ├── fifthPattren.cpp │ ├── fourthpattren.cpp │ ├── fristPattren.cpp │ ├── ninthPattren.cpp │ ├── secondPattren.cpp │ ├── sevenPattren.cpp │ ├── sixthPattren.cpp │ ├── tempCodeRunnerFile.cpp │ ├── tenthPattren.cpp │ └── thirdpattren.cpp ├── Josephus.cpp ├── heap_sort.cpp ├── quickSort.cpp └── sorting.cpp ├── flutter_apps └── tasks │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── google-services.json │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── tasks │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle │ ├── fonts │ ├── Lobster │ │ ├── Lobster-Regular.ttf │ │ └── OFL.txt │ └── Pacifico │ │ ├── OFL.txt │ │ └── Pacifico-Regular.ttf │ ├── images │ ├── applicant2.webp │ ├── hey.jpg │ ├── required.webp │ ├── task.png │ ├── task2.jpg │ ├── task3.jpg │ ├── task4.webp │ └── tasklist.jpg │ ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ ├── lib │ ├── Framework │ │ ├── task.dart │ │ └── task_data.dart │ ├── main.dart │ ├── screens │ │ ├── TaskScreen.dart │ │ ├── homeScreen.dart │ │ └── new_tasks.dart │ └── widgets │ │ ├── myWorkList.dart │ │ └── work.dart │ ├── pubspec.lock │ ├── pubspec.yaml │ └── test │ └── widget_test.dart ├── go_programs └── amountInWords.go ├── html_css └── donationOldAgeHomes │ ├── index.html │ ├── phone.css │ └── style.css ├── java_programs ├── Array_element.java ├── BinarySearch.java ├── BinarySearchWithExample ├── CalculatorUsingApplet │ └── CalculatorUsingAppletawt.java ├── Dec2Bin.java ├── Downward Triangle Pattern.java ├── EncapsulationInJava │ ├── Encapsulation.jpg │ └── main.java ├── Fibonacci Pattern (Pattern 4).java ├── For_loop.java ├── Half Pyramid Pattern.java ├── Helloworld.java ├── Hollow Diamond Pattern(Pattern 6).java ├── If_else.java ├── InsertionSort.java ├── Leetcode_100.java ├── MinFlips.java ├── Minimum_Ascii_Delete_Sum_For_Two_Strings.java ├── PairSum.java ├── Polymorphism │ └── Overriding.java ├── Pow.java ├── Reverse-Linked-List.java ├── SelectionSort.java ├── V13BubbleSort.java ├── V17TowerOfHanoi.java ├── While_Loop.java ├── armstrong.java ├── bubblesort.java ├── calculator.java ├── fibonacci.java ├── inheritance │ ├── Child.java │ ├── Main.java │ └── Perant.java ├── integerToRoman.java ├── mergesort.java └── student.java ├── others ├── Bubble sort.txt ├── cpp_programs └── quicksort.txt └── python ├── coinProblem.py ├── login_page.py ├── password genarator.py └── quickSort.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guides 2 | 3 | - Fork the project 4 | 5 | - Clone to your local machine 6 | 7 | - Find an issue to solve 8 | 9 | - Or Implement any DSA 10 | 11 | - Comment your changes and commits 12 | 13 | - Push your changes 14 | 15 | - Click the Compare & pull request button 16 | 17 | - Create new Pull Request to open new PR 18 | -------------------------------------------------------------------------------- /Flutter Apps/Chess.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_chess_board/flutter_chess_board.dart'; 3 | 4 | void main() { 5 | runApp(const MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | const MyApp({Key? key}) : super(key: key); 10 | 11 | // This widget is the root of your application. 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | debugShowCheckedModeBanner: false, 16 | theme: ThemeData( 17 | primarySwatch: Colors.blue, 18 | ), 19 | home: const MyHomePage(), 20 | ); 21 | } 22 | } 23 | 24 | class MyHomePage extends StatefulWidget { 25 | const MyHomePage({Key? key}) : super(key: key); 26 | 27 | @override 28 | State createState() => _MyHomePageState(); 29 | } 30 | 31 | class _MyHomePageState extends State { 32 | ChessBoardController controller = ChessBoardController(); 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | controller.addListener(() {}); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | centerTitle: true, 45 | title: const Text("Chess Game"), 46 | ), 47 | body: Center( 48 | child: ChessBoard( 49 | controller: controller, 50 | boardColor: BoardColor.darkBrown, 51 | boardOrientation: PlayerColor.white, 52 | onMove: () { 53 | // 54 | }, 55 | arrows: [ 56 | BoardArrow(from: "b2", to: "b4", color: Colors.red.withOpacity(0.9)) 57 | ], 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | 64 | //Make sure to add 65 | //flutter_chess_board: any 66 | //chess: any in pubspec.yml 67 | // also run 68 | //dart pub outdated --mode=null-safety 69 | //dart pub upgrade --null-safety -------------------------------------------------------------------------------- /Java Tutorial Program/DiamondPattern.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class DiamondPattern{ 3 | public static void main(String[] args){ 4 | int i,j,k; 5 | Scanner sc= new Scanner(System.in); 6 | System.out.print("Enter the number of row for diamond shape : "); 7 | int num = sc.nextInt(); 8 | for(i=0;i0;i--) 20 | { 21 | for(j=num-1;j>=i;j--){ 22 | System.out.print(" "); 23 | } 24 | for(k=2*i-1;k>0;k--){ 25 | System.out.print("*"); 26 | } 27 | System.out.println(""); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Java Tutorial Program/ForEach_loop.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | class ForEach_loop 4 | { 5 | public static void main(String[] args){ 6 | Scanner input = new Scanner(System.in); 7 | double numbers[] = new double[10]; 8 | 9 | for (int i = 0; i < numbers.length; i++) 10 | { 11 | System.out.println("Please enter number : "); 12 | numbers[i] = input.nextDouble(); 13 | } 14 | 15 | for (double number: numbers){ 16 | System.out.println(number); 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Name Programs/Armstrong.java: -------------------------------------------------------------------------------- 1 | public class Armstrong { 2 | 3 | public static void main(String[] args) { 4 | 5 | int number = 1634, originalNumber, remainder, result = 0, n = 0; 6 | 7 | originalNumber = number; 8 | 9 | for (;originalNumber != 0; originalNumber /= 10, ++n); 10 | 11 | originalNumber = number; 12 | 13 | for (;originalNumber != 0; originalNumber /= 10) 14 | { 15 | remainder = originalNumber % 10; 16 | result += Math.pow(remainder, n); 17 | } 18 | 19 | if(result == number) 20 | System.out.println(number + " is an Armstrong number."); 21 | else 22 | System.out.println(number + " is not an Armstrong number."); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Name Programs/Fibonacci.java: -------------------------------------------------------------------------------- 1 | class Fibonacci { 2 | public static void main(String[] args) { 3 | 4 | int n = 10, firstTerm = 0, secondTerm = 1; 5 | System.out.println("Fibonacci Series till " + n + " terms:"); 6 | 7 | for (int i = 1; i <= n; ++i) { 8 | System.out.print(firstTerm + ", "); 9 | 10 | // compute the next term 11 | int nextTerm = firstTerm + secondTerm; 12 | firstTerm = secondTerm; 13 | secondTerm = nextTerm; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Name Programs/Krishnamurthy.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | import java.io.*; 3 | 4 | //create KrishnamurthyNumber class to check whether the given number is a Krishnamurthy number or not 5 | class Krishnamurthy { 6 | 7 | // create fact() method to calculate the factorial of the number 8 | static int fact(int number) 9 | { 10 | int f = 1; 11 | while (number != 0) { 12 | f = f * number; 13 | number--; 14 | } 15 | return f; 16 | } 17 | 18 | // create checkNumber() method that returns true when it founds number krishnamurthy 19 | static boolean checkNumber(int number) 20 | { 21 | int sum = 0; //initialize sum to 0 22 | 23 | int tempNumber = number; //create a copy of the original number 24 | 25 | //perform operation until tempNumber will not equal to 0 26 | while (tempNumber != 0) { 27 | // calculate the factorial of the last digit of the tempNumber and then add it to the sum 28 | sum = sum + fact(tempNumber % 10); 29 | 30 | // replace the value of tempNumber by tempNumber/10 31 | tempNumber = tempNumber / 10; 32 | } 33 | 34 | // Check whether the number is equal to the sum or not. If both are equal, number is krishnamurthy number 35 | if(sum == number) 36 | return true; 37 | else 38 | return false; 39 | } 40 | 41 | // main() method start 42 | public static void main(String[] args) 43 | { 44 | int n; //initialize variable n 45 | 46 | //create scanner class object to read data from user 47 | Scanner sc = new Scanner(System.in); 48 | 49 | //custom message 50 | System.out.println("Enter any number:"); 51 | 52 | //store user entered value into variable n 53 | n = sc.nextInt(); 54 | 55 | if (checkNumber(n)) 56 | System.out.println(n + " is a krishnamurthy number"); 57 | else 58 | System.out.println(n + "is not a krishnamurthy number"); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Name Programs/Neon.java: -------------------------------------------------------------------------------- 1 | // Java Program to Check If a Number is Neon number or not 2 | 3 | // Importing java input/output library 4 | import java.io.*; 5 | 6 | class Neon { 7 | 8 | // Method to check whether number is neon or not 9 | // Boolean type 10 | public static boolean checkNeon(int n) 11 | { 12 | // squaring the number to be checked 13 | int square = n * n; 14 | 15 | // Initializing current sum to 0 16 | int sum = 0; 17 | 18 | // If product is positive 19 | while (square > 0) { 20 | 21 | // Step 1: Find remainder 22 | int r = square % 10; 23 | 24 | // Add remainder to the current sum 25 | sum += r; 26 | 27 | // Drop last digit of the product 28 | // and store the number 29 | square = square / 10; 30 | } 31 | 32 | // Condition check 33 | // Sum of digits of number obtained is 34 | // equal to original number 35 | if (sum == n) 36 | 37 | // number is neon 38 | return true; 39 | else 40 | 41 | // number is not neon 42 | return false; 43 | } 44 | 45 | // Main driver method 46 | public static void main(String[] args) 47 | { 48 | // Custom input 49 | int n = 9; 50 | 51 | // Calling above function to check custom number or 52 | // if user entered number via Scanner class 53 | if (checkNeon(n)) 54 | 55 | // Print number considered is neon 56 | System.out.println("Given number " + n 57 | + " is Neon number"); 58 | else 59 | 60 | // Print number considered is not neon 61 | System.out.println("Given number " + n 62 | + " is not a Neon number"); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Name Programs/Tribonacci.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class Tribonacci 3 | { 4 | public static void main(String args[]) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | System.out.print("Enter No. of terms: "); 8 | int n=sc.nextInt(); 9 | int a = 1, b = 0, c = 1; 10 | int d = a + b + c; 11 | System.out.println("\nTribonacci Series: "); 12 | System.out.print(a+"\t"+b+"\t"+c); 13 | for(int i=4; i<=n; i++) 14 | { 15 | System.out.print("\t"+d); 16 | a=b; 17 | b=c; 18 | c=d; 19 | d=a+b+c; 20 | } 21 | System.out.println(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

Hacktoberfest-2022

3 | 4 | *** 5 |

6 | 7 | Link To HacktoberFest 2022 8 | 9 |

10 | 11 | ## Event details : 12 | 13 | - Hacktoberfest® is open to everyone in our global community. Whether you’re a developer, student learning to code, event host, or company of any size, you can help drive growth of open source and make positive contributions to an ever-growing community. All backgrounds and skill levels are encouraged to complete the challenge. 14 | 15 | - Hacktoberfest is a celebration open to everyone in our global community. 16 | - Pull requests can be made in any GitHub-hosted repositories/projects. 17 | - You can sign up anytime between October 1 and October 31. 18 | 19 | ## HacktoberFest Rules : 20 | 21 | To earn your Hacktoberfest tee or tree reward, you must register and make four valid pull requests (PRs) between October 1-31 (in any time zone). Pull requests can be made in any participating GitHub or GitLab hosted repository/project. Look for the 'hacktoberfest' topic to know if a repository/project is participating in Hacktoberfest. Pull requests must be approved by a maintainer of the repository/project to count. If a maintainer reports your pull request as spam or behavior not in line with the project’s code of conduct, you will be ineligible to participate. This year, the first 55,000 participants who successfully complete the challenge will be eligible to receive a prize. 22 | *** 23 |

Whether it’s your first or fiftieth pull request, there’s always more to learn! We’ve put together a few resources that can help you create quality pull requests, keep your repositories pristine, and build on your open source knowledge.

24 | 25 | *** 26 | 27 |

28 | 29 | Join Discord Conversation 30 | 31 |

32 | 33 | *** 34 | ## Rules To Contribute To This Repo 35 | 36 | - Use any language. 37 | - C, C++, JAVA, Data Structure and Algorithms, HTML, CSS, Android Projects. 38 | - Anything valuable. 39 | 40 | ## Steps For Contribution 41 | 42 | 1. Fork this repo 43 | 2. Star this repo 44 | 3. Add a file 45 | 4. Commit the code 46 | 5. Make pull request 47 | *** 48 |

49 |

50 | Thank You 51 |

52 |

53 | -------------------------------------------------------------------------------- /c_programs/ArmstrongRecursion.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int digcount(int); 5 | int arm(int,int); 6 | int main() 7 | { 8 | int n; 9 | printf("Enter a no.\n"); 10 | scanf("%d",&n); 11 | if(arm(n,digcount(n)) == n) 12 | printf("%d is Armstrong\n",n); 13 | else 14 | printf("%d is not Armstrong\n",n); 15 | } 16 | int digcount(int a) 17 | { 18 | if(a == 0) 19 | return 0; 20 | else 21 | return digcount(a/10) + 1; 22 | } 23 | int arm(int a,int l) 24 | { 25 | if(a == 0) 26 | return 0; 27 | else 28 | return (pow(a%10,l) + arm(a/10,l)) ; 29 | } -------------------------------------------------------------------------------- /c_programs/bubble_sort.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(){ 4 | 5 | int arr[50], num, x, y, temp; 6 | 7 | printf("Please Enter the Number of Elements you want in the array: "); 8 | 9 | scanf("%d", &num); 10 | 11 | printf("Please Enter the Value of Elements: "); 12 | 13 | for(x = 0; x < num; x++) 14 | 15 | scanf("%d", &arr[x]); 16 | 17 | for(x = 0; x < num - 1; x++){ 18 | 19 | for(y = 0; y < num - x - 1; y++){ 20 | 21 | if(arr[y] > arr[y + 1]){ 22 | 23 | temp = arr[y]; 24 | 25 | arr[y] = arr[y + 1]; 26 | 27 | arr[y + 1] = temp; 28 | 29 | } 30 | 31 | } 32 | 33 | } 34 | 35 | printf("Array after implementing bubble sort: "); 36 | 37 | for(x = 0; x < num; x++){ 38 | 39 | printf("%d ", arr[x]); 40 | 41 | } 42 | 43 | return 0; 44 | 45 | } -------------------------------------------------------------------------------- /c_programs/insertionSort.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void insert(int a[], int n) /* function to sort an aay with insertion sort */ 4 | { 5 | int i, j, temp; 6 | for (i = 1; i < n; i++) { 7 | temp = a[i]; 8 | j = i - 1; 9 | 10 | while(j>=0 && temp <= a[j]) /* Move the elements greater than temp to one position ahead from their current position*/ 11 | { 12 | a[j+1] = a[j]; 13 | j = j-1; 14 | } 15 | a[j+1] = temp; 16 | } 17 | } 18 | 19 | void printArr(int a[], int n) /* function to print the array */ 20 | { 21 | int i; 22 | for (i = 0; i < n; i++) 23 | printf("%d ", a[i]); 24 | } 25 | 26 | int main() 27 | { 28 | int a[] = { 12, 31, 25, 8, 32, 17 }; 29 | int n = sizeof(a) / sizeof(a[0]); 30 | printf("Before sorting array elements are - \n"); 31 | printArr(a, n); 32 | insert(a, n); 33 | printf("\nAfter sorting array elements are - \n"); 34 | printArr(a, n); 35 | 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /c_programs/matrix_multi.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(){ 3 | int a[10][10],b[10][10],mul[10][10],r,c,i,j,k; 4 | printf("enter the number of row="); 5 | scanf("%d",&r); 6 | printf("enter the number of column="); 7 | scanf("%d",&c); 8 | printf("enter the first matrix element=\n"); 9 | for(i=0;i 2 | using namespace std; 3 | int* enqueue (int n, int queue[20], int rear, int front, int arr[2]) 4 | { 5 | int val; 6 | rear = arr[0]; 7 | front = arr[1]; 8 | cout << "Enter the value to be inserted" << endl; 9 | cin >> val; 10 | if (rear == n-1) 11 | { 12 | cout << "Sorry, Overflow" << endl; 13 | } 14 | else if ((front == -1) && (rear == -1)) 15 | { 16 | rear ++; 17 | front ++; 18 | queue[rear] = val; 19 | } 20 | else 21 | { 22 | rear ++; 23 | queue[rear] = val; 24 | } 25 | arr[0] = rear; 26 | arr[1] = front; 27 | return arr; 28 | } 29 | int* dequeue (int n, int queue[20], int rear, int front, int arr[2]) 30 | { 31 | rear = arr[0]; 32 | front = arr[1]; 33 | if (rear == -1 && front == -1) 34 | { 35 | cout << "Underflow" << endl; 36 | } 37 | else if (rear == front) 38 | { 39 | cout << "The element which will be deleted is " << queue[front] << endl; 40 | rear = front = -1; 41 | } 42 | else 43 | { 44 | cout << "The element which will be deleted is " << queue[front] << endl; 45 | front ++; 46 | } 47 | arr[0] = rear; 48 | arr[1] = front; 49 | return arr; 50 | } 51 | int main() 52 | { 53 | int n; 54 | int arr[2]; 55 | fill (arr, arr + 2, -1); 56 | int *p1; 57 | p1 = arr; 58 | cout << "Enter the number of elements : " << endl; 59 | cin >> n; 60 | int queue[20]; 61 | int rear = -1; 62 | int front = -1; 63 | int choice = 1; 64 | while (choice == 1 || choice == 2) 65 | { 66 | cout << "Input 1 for enqueue and 2 for dequeue operation of queue" << endl; 67 | cin >> choice; 68 | if (choice == 1) 69 | { 70 | p1 = enqueue(n, queue, rear, front, p1); 71 | } 72 | else if (choice == 2) 73 | { 74 | p1 = dequeue (n, queue, rear, front, p1); 75 | } 76 | for (int i = p1[1]; i <= p1[0]; i ++) 77 | { 78 | cout <<"\t" << queue[i]; 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /c_programs/quickSort.c: -------------------------------------------------------------------------------- 1 | // Quick sort in C 2 | 3 | #include 4 | 5 | // function to swap elements 6 | void swap(int *a, int *b) { 7 | int t = *a; 8 | *a = *b; 9 | *b = t; 10 | } 11 | 12 | // function to find the partition position 13 | int partition(int array[], int low, int high) { 14 | 15 | // select the rightmost element as pivot 16 | int pivot = array[high]; 17 | 18 | // pointer for greater element 19 | int i = (low - 1); 20 | 21 | // traverse each element of the array 22 | // compare them with the pivot 23 | for (int j = low; j < high; j++) { 24 | if (array[j] <= pivot) { 25 | 26 | // if element smaller than pivot is found 27 | // swap it with the greater element pointed by i 28 | i++; 29 | 30 | // swap element at i with element at j 31 | swap(&array[i], &array[j]); 32 | } 33 | } 34 | 35 | // swap the pivot element with the greater element at i 36 | swap(&array[i + 1], &array[high]); 37 | 38 | // return the partition point 39 | return (i + 1); 40 | } 41 | 42 | void quickSort(int array[], int low, int high) { 43 | if (low < high) { 44 | 45 | // find the pivot element such that 46 | // elements smaller than pivot are on left of pivot 47 | // elements greater than pivot are on right of pivot 48 | int pi = partition(array, low, high); 49 | 50 | // recursive call on the left of pivot 51 | quickSort(array, low, pi - 1); 52 | 53 | // recursive call on the right of pivot 54 | quickSort(array, pi + 1, high); 55 | } 56 | } 57 | 58 | // function to print array elements 59 | void printArray(int array[], int size) { 60 | for (int i = 0; i < size; ++i) { 61 | printf("%d ", array[i]); 62 | } 63 | printf("\n"); 64 | } 65 | 66 | // main function 67 | int main() { 68 | int data[] = {8, 7, 2, 1, 0, 9, 6}; 69 | 70 | int n = sizeof(data) / sizeof(data[0]); 71 | 72 | printf("Unsorted Array\n"); 73 | printArray(data, n); 74 | 75 | // perform quicksort on data 76 | quickSort(data, 0, n - 1); 77 | 78 | printf("Sorted array in ascending order: \n"); 79 | printArray(data, n); 80 | } 81 | -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/TwetlthPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int size=6; 6 | for(int i=1;i<=size;i++) 7 | { 8 | 9 | if(i==size) 10 | { 11 | for(int j=0;j 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=1;i<=5;i++) 6 | { 7 | for(int j=1;j<=5-i;j++) 8 | { 9 | cout<<" "; 10 | } 11 | 12 | for(int j=1;j<=(2*i-1);j++) 13 | { 14 | cout<<"*"; 15 | } 16 | 17 | 18 | cout<<"\n"; 19 | 20 | } 21 | 22 | for(int i=5;i>=1;i--) 23 | { 24 | for(int j=5-i;j>0;j--) 25 | { 26 | cout<<" "; 27 | } 28 | 29 | for(int j=(2*i-1);j>=1;j--) 30 | { 31 | cout<<"*"; 32 | } 33 | 34 | 35 | cout<<"\n"; 36 | 37 | } 38 | 39 | return 0; 40 | } 41 | 42 | /* 43 | 44 | * 45 | *** 46 | ***** 47 | ******* 48 | ********* 49 | ********* 50 | ******* 51 | ***** 52 | *** 53 | * 54 | */ -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/elventhPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | int size=5; 6 | for(int i=0;i 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=1;i<=5;i++) 6 | { 7 | for(int j=5;j>=i;j--) 8 | { 9 | cout<<"* "; 10 | } 11 | cout<<"\n"; 12 | 13 | } 14 | return 0; 15 | } 16 | 17 | /* 18 | * * * * * 19 | * * * * 20 | * * * 21 | * * 22 | * 23 | 24 | */ 25 | -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/fourthpattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=1;i<=5;i++) 6 | { 7 | for(int j=1;j<=i;j++) 8 | { 9 | cout< 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=0;i<5;i++) 6 | { 7 | for(int j=0;j<5;j++) 8 | { 9 | cout<<"* "; 10 | } 11 | cout<<"\n"; 12 | 13 | } 14 | return 0; 15 | } 16 | 17 | /** 18 | * ***** 19 | * ***** 20 | * ***** 21 | * ***** 22 | * ***** 23 | * 24 | */ 25 | -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/ninthPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=0;i<5;i++) 6 | { 7 | for(int j=0;j<=i;j++) 8 | { 9 | cout<<"*"; 10 | } 11 | cout<<"\n"; 12 | } 13 | 14 | for(int i=0;i<=4;i++) 15 | { 16 | for(int j=4-i;j>0;j--) 17 | { 18 | cout<<"*"; 19 | } 20 | cout<<"\n"; 21 | } 22 | 23 | return 0; 24 | } 25 | 26 | /* 27 | 28 | * 29 | ** 30 | *** 31 | **** 32 | ***** 33 | **** 34 | *** 35 | ** 36 | * 37 | 38 | */ -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/secondPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=0;i<5;i++) 6 | { 7 | for(int j=0;j<=i;j++) 8 | { 9 | cout<<"* "; 10 | } 11 | cout<<"\n"; 12 | 13 | } 14 | return 0; 15 | } 16 | 17 | /** 18 | * * 19 | * ** 20 | * *** 21 | * **** 22 | * ***** 23 | * 24 | */ 25 | -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/sevenPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=1;i<=5;i++) 6 | { 7 | for(int j=1;j<=5-i;j++) 8 | { 9 | cout<<" "; 10 | } 11 | 12 | for(int j=1;j<=(2*i-1);j++) 13 | { 14 | cout<<"*"; 15 | } 16 | 17 | 18 | cout<<"\n"; 19 | 20 | } 21 | return 0; 22 | } 23 | 24 | // Reverse of this can be done easily do it yourself. 25 | /* 26 | 27 | * 28 | *** 29 | ***** 30 | ******* 31 | ********* 32 | 33 | */ -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/sixthPattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=0;i<5;i++) 6 | { 7 | for(int j=1;j<=5-i;j++) 8 | { 9 | cout< 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=0;i<5;i++) 6 | { 7 | for(int j=5-i;j>=1;j--) 8 | { 9 | cout<<"*"; 10 | } 11 | 12 | for( int j=1;j<=i*2;j++) 13 | { 14 | cout<<" "; 15 | } 16 | 17 | for(int j=5-i;j>=1;j--) 18 | { 19 | cout<<"*"; 20 | } 21 | cout<<"\n"; 22 | } 23 | 24 | for(int i=1;i<=5;i++) 25 | { 26 | for(int j=1;j<=i;j++) 27 | { 28 | cout<<"*"; 29 | } 30 | 31 | for( int j=1;j<=10-i*2;j++) 32 | { 33 | cout<<" "; 34 | } 35 | 36 | for(int j=1;j<=i;j++) 37 | { 38 | cout<<"*"; 39 | } 40 | cout<<"\n"; 41 | } 42 | return 0; 43 | } 44 | 45 | /* 46 | 47 | ********** 48 | **** **** 49 | *** *** 50 | ** ** 51 | * * 52 | * * 53 | ** ** 54 | *** *** 55 | **** **** 56 | ********** 57 | 58 | */ -------------------------------------------------------------------------------- /cpp_programs/Cpp_Pattrens/thirdpattren.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | for(int i=1;i<=5;i++) 6 | { 7 | for(int j=1;j<=i;j++) 8 | { 9 | cout< 2 | #include 3 | #include 4 | #define vi vector 5 | #define vll vector 6 | #define pi pair 7 | typedef long long ll; 8 | using namespace __gnu_pbds; 9 | using namespace std; 10 | template 11 | using ordered_set = tree,rb_tree_tag,tree_order_statistics_node_update>; 12 | int gcd(int a, int b) 13 | { 14 | if (a == 0) 15 | return b; 16 | return gcd(b % a, a); 17 | } 18 | ll ncr(int n, int r) 19 | { 20 | if (n < r) return 0; 21 | long long p = 1, k = 1; 22 | if (n - r < r) 23 | r = n - r; 24 | if (r != 0) { 25 | while (r) { 26 | p *= n; 27 | k *= r; 28 | long long m = __gcd(p, k); 29 | p /= m; 30 | k /= m; 31 | n--; 32 | r--; 33 | } 34 | } 35 | else 36 | p = 1; 37 | return p; 38 | } 39 | template 40 | vector vcreate(int n){ 41 | vector v(n); 42 | for (int i = 0; i < n; i++) 43 | { 44 | cin>>v[i]; 45 | } 46 | return v; 47 | } 48 | int main(){ 49 | ios_base::sync_with_stdio(false); 50 | cin.tie(NULL); 51 | int n,k; cin>>n>>k; 52 | ordered_set s; 53 | for (int i = 0; i < n; i++) 54 | { 55 | s.insert(i+1); 56 | } 57 | 58 | int ind=k%n; 59 | while(n--){ 60 | auto itr=s.find_by_order(ind); 61 | cout<<*itr<<" "; 62 | s.erase(itr); 63 | if(n) ind=(ind%n+k)%n; 64 | } 65 | 66 | return 0; 67 | } -------------------------------------------------------------------------------- /cpp_programs/heap_sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void heapify(int arr[], int n, int i) 5 | { 6 | int largest = i; 7 | int l = 2*i + 1; 8 | int r = 2*i + 2; 9 | if (l < n && arr[l] > arr[largest]) 10 | largest = l; 11 | 12 | if (r < n && arr[r] > arr[largest]) 13 | largest = r; 14 | 15 | if (largest != i) 16 | { 17 | swap(arr[i], arr[largest]); 18 | heapify(arr, n, largest); 19 | } 20 | } 21 | 22 | void buildheap(int arr[],int n){ 23 | for (int i = n / 2 - 1; i >= 0; i--) 24 | heapify(arr, n, i); 25 | } 26 | 27 | void heapSort(int arr[], int n) 28 | { 29 | buildheap(arr,n); 30 | 31 | for (int i=n-1; i>0; i--) 32 | { 33 | swap(arr[0], arr[i]); 34 | heapify(arr, i, 0); 35 | } 36 | } 37 | 38 | int main(void) 39 | { 40 | int a[10]; 41 | cout << "Enter 10 elements of array: " << endl; 42 | for (int i=0; i<10; i++) 43 | cin >> a[i]; 44 | cout << "Original Array is: "; 45 | for (int i=0; i<10; i++) 46 | cout << a[i] << " "; 47 | int n=sizeof(a)/sizeof(a[0]); 48 | cout <<"\nArray after sorting is: "; 49 | heapSort(a,n); 50 | for(int x: a) 51 | cout< 4 | using namespace std; 5 | 6 | // function to swap elements 7 | void swap(int *a, int *b) { 8 | int t = *a; 9 | *a = *b; 10 | *b = t; 11 | } 12 | 13 | // function to print the array 14 | void printArray(int array[], int size) { 15 | int i; 16 | for (i = 0; i < size; i++) 17 | cout << array[i] << " "; 18 | cout << endl; 19 | } 20 | 21 | // function to rearrange array (find the partition point) 22 | int partition(int array[], int low, int high) { 23 | 24 | // select the rightmost element as pivot 25 | int pivot = array[high]; 26 | 27 | // pointer for greater element 28 | int i = (low - 1); 29 | 30 | // traverse each element of the array 31 | // compare them with the pivot 32 | for (int j = low; j < high; j++) { 33 | if (array[j] <= pivot) { 34 | 35 | // if element smaller than pivot is found 36 | // swap it with the greater element pointed by i 37 | i++; 38 | 39 | // swap element at i with element at j 40 | swap(&array[i], &array[j]); 41 | } 42 | } 43 | 44 | // swap pivot with the greater element at i 45 | swap(&array[i + 1], &array[high]); 46 | 47 | // return the partition point 48 | return (i + 1); 49 | } 50 | 51 | void quickSort(int array[], int low, int high) { 52 | if (low < high) { 53 | 54 | // find the pivot element such that 55 | // elements smaller than pivot are on left of pivot 56 | // elements greater than pivot are on righ of pivot 57 | int pi = partition(array, low, high); 58 | 59 | // recursive call on the left of pivot 60 | quickSort(array, low, pi - 1); 61 | 62 | // recursive call on the right of pivot 63 | quickSort(array, pi + 1, high); 64 | } 65 | } 66 | 67 | // Driver code 68 | int main() { 69 | int data[] = {8, 7, 6, 1, 0, 9, 2}; 70 | int n = sizeof(data) / sizeof(data[0]); 71 | 72 | cout << "Unsorted Array: \n"; 73 | printArray(data, n); 74 | 75 | // perform quicksort on data 76 | quickSort(data, 0, n - 1); 77 | 78 | cout << "Sorted array in ascending order: \n"; 79 | printArray(data, n); 80 | } 81 | -------------------------------------------------------------------------------- /cpp_programs/sorting.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class student 5 | { 6 | string name; 7 | int roll; 8 | float sgpa; 9 | 10 | public: 11 | void getdata() 12 | { 13 | cout << "Enter Name : "; 14 | cin >> name; 15 | cout << "Enter Roll no : "; 16 | cin >> roll; 17 | cout << "Enter SGPA : "; 18 | cin >> sgpa; 19 | } 20 | void putdata() 21 | { 22 | cout << "Name : " << name << endl; 23 | cout << "Roll no : " << roll << endl; 24 | cout << "SGPA : " << sgpa << endl; 25 | cout << "=========================================" << endl; 26 | } 27 | void putdata_qs(student s[], int n) 28 | { 29 | int x; 30 | cout << "ENTER NO OF TOPPERS: "; 31 | cin >> x; 32 | for (int i = n - 1; i > n - x - 1; i--) 33 | { 34 | s[i].putdata(); 35 | } 36 | } 37 | void linearsearch(student s[], int n, float key) 38 | { 39 | int f = 0; 40 | for (int i = 0; i < n; i++) 41 | { 42 | if (s[i].sgpa == key) 43 | { 44 | f = 1; 45 | s[i].putdata(); 46 | continue; 47 | } 48 | } 49 | if (f == 0) 50 | { 51 | cout << "NOT FOUND" << endl; 52 | } 53 | } 54 | void binarysearch(student s[], int n, string key) 55 | { 56 | student tmp; 57 | tmp.bubblesortbyname(s, n); 58 | int l = 0, r = n - 1, m, f = 0; 59 | while (l <= r) 60 | { 61 | m = (l + r) / 2; 62 | if (s[m].name < key) 63 | { 64 | l = m + 1; 65 | } 66 | else if (s[m].name > key) 67 | { 68 | r = m - 1; 69 | } 70 | else if (s[m].name == key) 71 | { 72 | f = 1; 73 | break; 74 | } 75 | } 76 | if (f == 0) 77 | { 78 | cout << "NOT FOUND\n"; 79 | } 80 | else 81 | { 82 | cout << "FOUND\n"; 83 | s[m].putdata(); 84 | } 85 | } 86 | void bubblesort(student s[], int n) 87 | { 88 | for (int i = 0; i < n; i++) 89 | { 90 | for (int j = 0; j < n - 1 - i; j++) 91 | { 92 | if (s[j + 1].roll < s[j].roll) 93 | swap(s[j + 1], s[j]); 94 | } 95 | } 96 | for (int i = 0; i < n; i++) 97 | { 98 | s[i].putdata(); 99 | } 100 | } 101 | void bubblesortbyname(student s[], int n) 102 | { 103 | for (int i = 0; i < n; i++) 104 | { 105 | for (int j = 0; j < n - 1 - i; j++) 106 | { 107 | if (s[j + 1].name < s[j].name) 108 | swap(s[j + 1], s[j]); 109 | } 110 | } 111 | } 112 | void insertionSort(student s[], int n) 113 | { 114 | int i, j, key; 115 | 116 | for (i = 1; i < n; i++) 117 | { 118 | j = i; 119 | while (j > 0 and s[j].name < s[j - 1].name) 120 | { 121 | swap(s[j], s[j - 1]); 122 | 123 | j--; 124 | } 125 | } 126 | for (int i = 0; i < n; i++) 127 | { 128 | s[i].putdata(); 129 | } 130 | } 131 | int partition(student s[], int l, int h) 132 | { 133 | int i = l; 134 | int j = h; 135 | float p = s[l].sgpa; 136 | while (i < j) 137 | { 138 | while (p >= s[i].sgpa) 139 | i++; 140 | while (p < s[j].sgpa) 141 | j--; 142 | if (i < j) 143 | swap(s[i], s[j]); 144 | } 145 | swap(s[l], s[j]); 146 | return j; 147 | } 148 | 149 | void quicksort(student s[], int l, int h) 150 | { 151 | if (l < h) 152 | { 153 | int j = partition(s, l, h); 154 | quicksort(s, l, j - 1); 155 | quicksort(s, j + 1, h); 156 | } 157 | } 158 | }; 159 | 160 | int main() 161 | { 162 | 163 | int n; 164 | cout << "Enter the number of students: "; 165 | cin >> n; 166 | 167 | student s[n]; 168 | 169 | while (true) 170 | { 171 | cout << "Press 1: To enter the details of each student" << endl; 172 | cout << "Press 2: To Display the details of each student" << endl; 173 | cout << "Press 3: Linear Search by SGPA" << endl; 174 | cout << "Press 4: Binary Search by NAME" << endl; 175 | cout << "Press 5: Bubble Sort by ROLL NO" << endl; 176 | cout << "Press 6: Insertion Sort by NAME" << endl; 177 | cout << "Press 7: Quick Sort by SGPA" << endl; 178 | 179 | int t; 180 | cin >> t; 181 | 182 | switch (t) 183 | { 184 | 185 | case 1: 186 | { 187 | cout << "ENTER DETAILS\n\n"; 188 | for (int i = 0; i < n; i++) 189 | { 190 | cout << "Student " << i + 1 << "\n\n"; 191 | s[i].getdata(); 192 | } 193 | break; 194 | } 195 | case 2: 196 | { 197 | cout << "DISPLAY DETAILS\n\n"; 198 | for (int i = 0; i < n; i++) 199 | { 200 | cout << "Student " << i + 1 << "\n\n"; 201 | s[i].putdata(); 202 | } 203 | break; 204 | } 205 | case 3: 206 | { 207 | cout << "LINEAR SEARCH\n\n"; 208 | float key; 209 | cout << "SGPA,you want to search : "; 210 | cin >> key; 211 | student temp; 212 | temp.linearsearch(s, n, key); 213 | break; 214 | } 215 | case 4: 216 | { 217 | cout << "BINARY SEARCH\n\n"; 218 | string find_name; 219 | student temp; 220 | cout << "Name,you want to search : "; 221 | cin >> find_name; 222 | temp.binarysearch(s, n, find_name); 223 | break; 224 | } 225 | case 5: 226 | { 227 | cout << "BUBBLE SORT\n\n"; 228 | student temp; 229 | temp.bubblesort(s, n); 230 | break; 231 | } 232 | case 6: 233 | { 234 | cout << " INSERTION SORT\n\n"; 235 | student temp; 236 | temp.insertionSort(s, n); 237 | break; 238 | } 239 | case 7: 240 | { 241 | cout << "QUICK SORT\n\n"; 242 | student temp; 243 | temp.quicksort(s, 0, n - 1); 244 | temp.putdata_qs(s, n); 245 | } 246 | } 247 | bool continu; 248 | cout << "ENTER 1: IF U WANT TO CONTINUE OPERATIONS: "; 249 | cin >> continu; 250 | if (continu != 1) 251 | break; 252 | } 253 | 254 | return 0; 255 | } 256 | -------------------------------------------------------------------------------- /flutter_apps/tasks/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /flutter_apps/tasks/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 18 | - platform: android 19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 21 | - platform: ios 22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /flutter_apps/tasks/README.md: -------------------------------------------------------------------------------- 1 | # tasks 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /flutter_apps/tasks/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | 25 | apply plugin: 'com.android.application' 26 | apply plugin: 'com.google.gms.google-services' 27 | apply plugin: 'kotlin-android' 28 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 29 | 30 | android { 31 | compileSdkVersion flutter.compileSdkVersion 32 | ndkVersion flutter.ndkVersion 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | kotlinOptions { 40 | jvmTarget = '1.8' 41 | } 42 | 43 | sourceSets { 44 | main.java.srcDirs += 'src/main/kotlin' 45 | } 46 | 47 | defaultConfig { 48 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 49 | applicationId "com.Schedula.application" 50 | // You can update the following values to match your application needs. 51 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 52 | minSdkVersion 19 53 | multiDexEnabled true 54 | targetSdkVersion flutter.targetSdkVersion 55 | versionCode flutterVersionCode.toInteger() 56 | versionName flutterVersionName 57 | } 58 | 59 | buildTypes { 60 | release { 61 | // TODO: Add your own signing config for the release build. 62 | // Signing with the debug keys for now, so `flutter run --release` works. 63 | signingConfig signingConfigs.debug 64 | } 65 | } 66 | } 67 | 68 | flutter { 69 | source '../..' 70 | } 71 | 72 | dependencies { 73 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 74 | implementation platform('com.google.firebase:firebase-bom:30.3.2') 75 | implementation 'com.google.firebase:firebase-analytics' 76 | } 77 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "206572238275", 4 | "project_id": "schedula-893b8", 5 | "storage_bucket": "schedula-893b8.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:206572238275:android:c98a0f0cbc5952e93d3976", 11 | "android_client_info": { 12 | "package_name": "com.Schedula.application" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "206572238275-6qqmdt2dr5cc5ca9fbhlp6ihs4jffrlc.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyDww7yQvI54F72qxgkSoChA-jPgW-QHdJg" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "206572238275-6qqmdt2dr5cc5ca9fbhlp6ihs4jffrlc.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/kotlin/com/example/tasks/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.tasks 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.13' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /flutter_apps/tasks/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /flutter_apps/tasks/fonts/Lobster/Lobster-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/fonts/Lobster/Lobster-Regular.ttf -------------------------------------------------------------------------------- /flutter_apps/tasks/fonts/Lobster/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2010 The Lobster Project Authors (https://github.com/impallari/The-Lobster-Font), with Reserved Font Name "Lobster". 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /flutter_apps/tasks/fonts/Pacifico/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2018 The Pacifico Project Authors (https://github.com/googlefonts/Pacifico) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /flutter_apps/tasks/fonts/Pacifico/Pacifico-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/fonts/Pacifico/Pacifico-Regular.ttf -------------------------------------------------------------------------------- /flutter_apps/tasks/images/applicant2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/applicant2.webp -------------------------------------------------------------------------------- /flutter_apps/tasks/images/hey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/hey.jpg -------------------------------------------------------------------------------- /flutter_apps/tasks/images/required.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/required.webp -------------------------------------------------------------------------------- /flutter_apps/tasks/images/task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/task.png -------------------------------------------------------------------------------- /flutter_apps/tasks/images/task2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/task2.jpg -------------------------------------------------------------------------------- /flutter_apps/tasks/images/task3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/task3.jpg -------------------------------------------------------------------------------- /flutter_apps/tasks/images/task4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/task4.webp -------------------------------------------------------------------------------- /flutter_apps/tasks/images/tasklist.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/images/tasklist.jpg -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Tasks 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | tasks 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /flutter_apps/tasks/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/Framework/task.dart: -------------------------------------------------------------------------------- 1 | class Task { 2 | final String name; 3 | bool isDone; 4 | 5 | Task(this.name, this.isDone); 6 | 7 | void toggle() { 8 | isDone = !isDone; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/Framework/task_data.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tasks/screens/TaskScreen.dart'; 6 | import 'task.dart'; 7 | 8 | class TaskData extends ChangeNotifier { 9 | List tasks = []; 10 | int get count { 11 | return tasks.length; 12 | } 13 | 14 | void addNewTask(String newText) { 15 | tasks.add(Task(newText, false)); 16 | notifyListeners(); 17 | } 18 | 19 | void updateTask(Task task) { 20 | task.toggle(); 21 | notifyListeners(); 22 | } 23 | 24 | void deleteTask(Task task) { 25 | tasks.remove(task); 26 | notifyListeners(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'screens/TaskScreen.dart'; 4 | import 'package:tasks/Framework/task_data.dart'; 5 | import 'package:tasks/screens/homeScreen.dart'; 6 | import 'package:firebase_core/firebase_core.dart'; 7 | 8 | void main() async { 9 | runApp(MyApp()); 10 | WidgetsFlutterBinding.ensureInitialized(); 11 | await Firebase.initializeApp(); 12 | } 13 | 14 | class MyApp extends StatelessWidget { 15 | @override 16 | Widget build(BuildContext context) { 17 | return ChangeNotifierProvider( 18 | create: (context) => TaskData(), 19 | child: MaterialApp( 20 | debugShowCheckedModeBanner: false, 21 | home: HomeScreen(), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/screens/TaskScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tasks/Framework/task_data.dart'; 3 | import 'package:tasks/widgets/myWorkList.dart'; 4 | import 'new_tasks.dart'; 5 | import 'package:tasks/Framework/task.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | class TaskScreen extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | backgroundColor: Color(0xFF347bbb), 13 | floatingActionButton: FloatingActionButton( 14 | backgroundColor: Color(0xFF347bbb), 15 | child: Icon(Icons.add_card_outlined), 16 | onPressed: () { 17 | showModalBottomSheet( 18 | context: context, 19 | builder: (context) => AddList(), 20 | ); 21 | }, 22 | elevation: 5.00, 23 | ), 24 | body: Column( 25 | crossAxisAlignment: CrossAxisAlignment.start, 26 | children: [ 27 | Container( 28 | padding: EdgeInsets.only(top: 60, right: 30, left: 30, bottom: 30), 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | CircleAvatar( 33 | backgroundColor: Colors.white, 34 | child: Icon( 35 | Icons.task, 36 | size: 30, 37 | color: Color(0xFF347bbb), 38 | ), 39 | radius: 30), 40 | SizedBox( 41 | height: 10, 42 | ), 43 | Text( 44 | 'Schedula', 45 | style: TextStyle( 46 | fontFamily: 'Pacifico', 47 | color: Colors.white, 48 | fontSize: 50.00, 49 | fontWeight: FontWeight.normal), 50 | ), 51 | Text( 52 | '${context.watch().count} Tasks Remaining', 53 | style: TextStyle( 54 | color: Colors.white, 55 | fontSize: 18.00, 56 | ), 57 | ), 58 | ], 59 | ), 60 | ), 61 | Expanded( 62 | child: Container( 63 | decoration: BoxDecoration( 64 | color: Colors.white, 65 | image: DecorationImage( 66 | opacity: 0.2, 67 | image: AssetImage('images/hey.jpg'), 68 | ), 69 | borderRadius: BorderRadius.only( 70 | topLeft: Radius.circular(20.00), 71 | topRight: Radius.circular(20.00)), 72 | ), 73 | child: MyWorkList(), 74 | ), 75 | ) 76 | ], 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/screens/homeScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:animated_text_kit/animated_text_kit.dart'; 3 | import 'package:tasks/screens/TaskScreen.dart'; 4 | 5 | class HomeScreen extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | backgroundColor: Color(0xFF347bbb), 10 | body: SafeArea( 11 | child: Container( 12 | padding: EdgeInsets.symmetric(horizontal: 25.00, vertical: 160), 13 | child: Center( 14 | child: Column( 15 | children: [ 16 | Row( 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | children: [ 19 | CircleAvatar( 20 | radius: 30.00, 21 | backgroundColor: Colors.white, 22 | child: Icon( 23 | Icons.task, 24 | color: Color(0xFF347bbb), 25 | size: 30, 26 | )), 27 | SizedBox(width: 20.00), 28 | Text( 29 | 'Schedula', 30 | style: TextStyle( 31 | fontFamily: 'Pacifico', 32 | fontSize: 45.00, 33 | color: Colors.white), 34 | ), 35 | ], 36 | ), 37 | Text( 38 | ' Your Personal Day to Day Manager', 39 | style: TextStyle(color: Colors.white, fontSize: 20.00), 40 | ), 41 | SizedBox( 42 | height: 30, 43 | ), 44 | Row( 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | DefaultTextStyle( 48 | style: TextStyle(fontSize: 30.00, fontFamily: 'Lobster'), 49 | child: AnimatedTextKit( 50 | animatedTexts: [ 51 | ScaleAnimatedText('Manage Tasks'), 52 | ScaleAnimatedText('Write Notes'), 53 | ScaleAnimatedText('Create Memos'), 54 | ], 55 | totalRepeatCount: 1, 56 | pause: Duration(milliseconds: 1000), 57 | onFinished: () { 58 | Navigator.push( 59 | context, 60 | MaterialPageRoute( 61 | builder: (context) => TaskScreen())); 62 | }, 63 | ), 64 | ), 65 | ], 66 | ) 67 | ], 68 | ), 69 | ), 70 | ), 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/screens/new_tasks.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tasks/Framework/task_data.dart'; 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:tasks/Framework/task.dart'; 6 | import 'package:firebase_core/firebase_core.dart'; 7 | 8 | class AddList extends StatelessWidget { 9 | late String newTextTitle; 10 | final _firestore = FirebaseFirestore.instance; 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | color: Color(0xFF757575), 15 | child: Container( 16 | decoration: BoxDecoration( 17 | image: DecorationImage( 18 | image: AssetImage('images/applicant2.webp'), opacity: 0.15), 19 | color: Colors.white, 20 | borderRadius: BorderRadius.only( 21 | topRight: Radius.circular(20.00), 22 | topLeft: Radius.circular(20.00)), 23 | ), 24 | padding: EdgeInsets.all(60.00), 25 | child: Column( 26 | crossAxisAlignment: CrossAxisAlignment.center, 27 | children: [ 28 | Text( 29 | 'Add Task or Memo', 30 | style: TextStyle( 31 | fontFamily: 'Lobster', 32 | color: Color(0xFF347bbb), 33 | fontSize: 30.00, 34 | fontWeight: FontWeight.normal), 35 | ), 36 | TextField( 37 | cursorColor: Colors.black, 38 | style: TextStyle(fontSize: 20), 39 | textAlign: TextAlign.center, 40 | autofocus: true, 41 | onChanged: (newText) { 42 | newTextTitle = newText; 43 | }), 44 | SizedBox( 45 | height: 30, 46 | ), 47 | MaterialButton( 48 | elevation: 5.00, 49 | onPressed: () { 50 | _firestore.collection('tasks').add({'task': newTextTitle}); 51 | print(Provider.of((context), listen: false).count); 52 | Provider.of(context, listen: false) 53 | .addNewTask(newTextTitle); 54 | 55 | Navigator.pop(context); 56 | }, 57 | child: Text( 58 | 'Add', 59 | style: TextStyle(color: Colors.white, fontSize: 25.00), 60 | ), 61 | color: Color(0xFF347bbb), 62 | minWidth: 300, 63 | height: 50, 64 | ), 65 | SizedBox(height: 15), 66 | Text( 67 | 'Instructions', 68 | style: TextStyle(fontSize: 20.00), 69 | ), 70 | SizedBox(height: 5.00), 71 | Text('1. Check the box to mark task completed', 72 | style: TextStyle(fontSize: 15)), 73 | SizedBox(height: 5.00), 74 | Text('2. Tap on the data to delete it from the list', 75 | style: TextStyle(fontSize: 15)), 76 | ], 77 | ), 78 | ), 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/widgets/myWorkList.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'work.dart'; 4 | import 'package:tasks/Framework/task.dart'; 5 | import 'package:tasks/Framework/task_data.dart'; 6 | 7 | class MyWorkList extends StatefulWidget { 8 | @override 9 | State createState() => _MyWorkListState(); 10 | } 11 | 12 | class _MyWorkListState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Consumer(builder: (context, taskData, child) { 16 | return ListView.builder( 17 | itemBuilder: (context, index) { 18 | return Work( 19 | Provider.of(context, listen: false).tasks[index].name, 20 | Provider.of(context, listen: false) 21 | .tasks[index] 22 | .isDone, (bool? checkBoxState) { 23 | Provider.of(context, listen: false).updateTask( 24 | Provider.of(context, listen: false).tasks[index]); 25 | }, () { 26 | taskData.deleteTask(taskData.tasks[index]); 27 | }); 28 | }, 29 | itemCount: Provider.of(context, listen: false).count); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /flutter_apps/tasks/lib/widgets/work.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Work extends StatelessWidget { 4 | final bool isChecked; 5 | final String work; 6 | var checkBoxCallBack; 7 | var onTap; 8 | Work(this.work, this.isChecked, this.checkBoxCallBack, this.onTap); 9 | @override 10 | Widget build(BuildContext context) { 11 | return ListTile( 12 | leading: Icon( 13 | Icons.dashboard_rounded, 14 | color: Color(0xFF347bbb), 15 | ), 16 | onTap: onTap, 17 | title: Text( 18 | work, 19 | style: TextStyle(color: isChecked ? Colors.red : null, fontSize: 20.00), 20 | ), 21 | trailing: Checkbox( 22 | activeColor: Color(0xFF347bbb), 23 | value: isChecked, 24 | onChanged: checkBoxCallBack), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /flutter_apps/tasks/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animated_text_kit: 5 | dependency: "direct main" 6 | description: 7 | name: animated_text_kit 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "4.2.2" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.8.2" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | characters: 26 | dependency: transitive 27 | description: 28 | name: characters 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.3.1" 39 | clock: 40 | dependency: transitive 41 | description: 42 | name: clock 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0" 46 | cloud_firestore: 47 | dependency: "direct main" 48 | description: 49 | name: cloud_firestore 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "3.4.4" 53 | cloud_firestore_platform_interface: 54 | dependency: transitive 55 | description: 56 | name: cloud_firestore_platform_interface 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "5.7.1" 60 | cloud_firestore_web: 61 | dependency: transitive 62 | description: 63 | name: cloud_firestore_web 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.8.4" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.16.0" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.0.5" 81 | fake_async: 82 | dependency: transitive 83 | description: 84 | name: fake_async 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.3.0" 88 | firebase_core: 89 | dependency: "direct main" 90 | description: 91 | name: firebase_core 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.20.1" 95 | firebase_core_platform_interface: 96 | dependency: transitive 97 | description: 98 | name: firebase_core_platform_interface 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "4.5.0" 102 | firebase_core_web: 103 | dependency: transitive 104 | description: 105 | name: firebase_core_web 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.7.1" 109 | flutter: 110 | dependency: "direct main" 111 | description: flutter 112 | source: sdk 113 | version: "0.0.0" 114 | flutter_lints: 115 | dependency: "direct dev" 116 | description: 117 | name: flutter_lints 118 | url: "https://pub.dartlang.org" 119 | source: hosted 120 | version: "2.0.1" 121 | flutter_test: 122 | dependency: "direct dev" 123 | description: flutter 124 | source: sdk 125 | version: "0.0.0" 126 | flutter_web_plugins: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.0" 131 | js: 132 | dependency: transitive 133 | description: 134 | name: js 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.6.4" 138 | lints: 139 | dependency: transitive 140 | description: 141 | name: lints 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "2.0.0" 145 | matcher: 146 | dependency: transitive 147 | description: 148 | name: matcher 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "0.12.11" 152 | material_color_utilities: 153 | dependency: transitive 154 | description: 155 | name: material_color_utilities 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.1.4" 159 | meta: 160 | dependency: transitive 161 | description: 162 | name: meta 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.7.0" 166 | nested: 167 | dependency: transitive 168 | description: 169 | name: nested 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.0.0" 173 | path: 174 | dependency: transitive 175 | description: 176 | name: path 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.8.1" 180 | plugin_platform_interface: 181 | dependency: transitive 182 | description: 183 | name: plugin_platform_interface 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.1.2" 187 | provider: 188 | dependency: "direct main" 189 | description: 190 | name: provider 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "6.0.3" 194 | sky_engine: 195 | dependency: transitive 196 | description: flutter 197 | source: sdk 198 | version: "0.0.99" 199 | source_span: 200 | dependency: transitive 201 | description: 202 | name: source_span 203 | url: "https://pub.dartlang.org" 204 | source: hosted 205 | version: "1.8.2" 206 | stack_trace: 207 | dependency: transitive 208 | description: 209 | name: stack_trace 210 | url: "https://pub.dartlang.org" 211 | source: hosted 212 | version: "1.10.0" 213 | stream_channel: 214 | dependency: transitive 215 | description: 216 | name: stream_channel 217 | url: "https://pub.dartlang.org" 218 | source: hosted 219 | version: "2.1.0" 220 | string_scanner: 221 | dependency: transitive 222 | description: 223 | name: string_scanner 224 | url: "https://pub.dartlang.org" 225 | source: hosted 226 | version: "1.1.0" 227 | term_glyph: 228 | dependency: transitive 229 | description: 230 | name: term_glyph 231 | url: "https://pub.dartlang.org" 232 | source: hosted 233 | version: "1.2.0" 234 | test_api: 235 | dependency: transitive 236 | description: 237 | name: test_api 238 | url: "https://pub.dartlang.org" 239 | source: hosted 240 | version: "0.4.9" 241 | vector_math: 242 | dependency: transitive 243 | description: 244 | name: vector_math 245 | url: "https://pub.dartlang.org" 246 | source: hosted 247 | version: "2.1.2" 248 | sdks: 249 | dart: ">=2.17.6 <3.0.0" 250 | flutter: ">=1.22.0" 251 | -------------------------------------------------------------------------------- /flutter_apps/tasks/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tasks 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.17.6 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | cloud_firestore: ^3.4.2 38 | firebase_core: ^1.20.0 39 | provider: ^6.0.3 40 | animated_text_kit: ^4.2.2 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # The "flutter_lints" package below contains a set of recommended lints to 47 | # encourage good coding practices. The lint set provided by the package is 48 | # activated in the `analysis_options.yaml` file located at the root of your 49 | # package. See that file for information about deactivating specific lint 50 | # rules and activating additional ones. 51 | flutter_lints: ^2.0.0 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter packages. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | assets: 66 | - images/ 67 | # - images/a_dot_ham.jpeg 68 | 69 | # An image asset can refer to one or more resolution-specific "variants", see 70 | # https://flutter.dev/assets-and-images/#resolution-aware 71 | 72 | # For details regarding adding assets from package dependencies, see 73 | # https://flutter.dev/assets-and-images/#from-packages 74 | 75 | # To add custom fonts to your application, add a fonts section here, 76 | # in this "flutter" section. Each entry in this list should have a 77 | # "family" key with the font family name, and a "fonts" key with a 78 | # list giving the asset and other descriptors for the font. For 79 | # example: 80 | fonts: 81 | - family: Pacifico 82 | fonts: 83 | - asset: fonts/Pacifico/Pacifico-Regular.ttf 84 | - family: Lobster 85 | fonts: 86 | - asset: fonts/Lobster/Lobster-Regular.ttf 87 | # - asset: fonts/Schyler-Italic.ttf 88 | # style: italic 89 | # - family: Trajan Pro 90 | # fonts: 91 | # - asset: fonts/TrajanPro.ttf 92 | # - asset: fonts/TrajanPro_Bold.ttf 93 | # weight: 700 94 | # 95 | # For details regarding fonts from package dependencies, 96 | # see https://flutter.dev/custom-fonts/#from-packages 97 | -------------------------------------------------------------------------------- /flutter_apps/tasks/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:tasks/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /go_programs/amountInWords.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | 4 | import ( 5 | "fmt" 6 | "strings" 7 | "strconv" 8 | "log" 9 | "errors" 10 | ) 11 | func main(){ 12 | amountInWords,err := ConvertAmountInIndianWords("10001") 13 | if err != nil { 14 | log.Fatal("Error", err) 15 | return 16 | } 17 | fmt.Println(amountInWords) 18 | } 19 | 20 | func ConvertToRupees(amount string) (output string) { 21 | words := make([]string, 91) 22 | words[0] = "Zero" 23 | words[1] = "One" 24 | words[2] = "Two" 25 | words[3] = "Three" 26 | words[4] = "Four" 27 | words[5] = "Five" 28 | words[6] = "Six" 29 | words[7] = "Seven" 30 | words[8] = "Eight" 31 | words[9] = "Nine" 32 | words[10] = "Ten" 33 | words[11] = "Eleven" 34 | words[12] = "Twelve" 35 | words[13] = "Thirteen" 36 | words[14] = "Fourteen" 37 | words[15] = "Fifteen" 38 | words[16] = "Sixteen" 39 | words[17] = "Seventeen" 40 | words[18] = "Eighteen" 41 | words[19] = "Nineteen" 42 | words[20] = "Twenty" 43 | words[30] = "Thirty" 44 | words[40] = "Forty" 45 | words[50] = "Fifty" 46 | words[60] = "Sixty" 47 | words[70] = "Seventy" 48 | words[80] = "Eighty" 49 | words[90] = "Ninety" 50 | 51 | amountSplit := strings.Split(amount, ".") 52 | numberSplit := strings.Split(amountSplit[0], ",") 53 | number := strings.Join(numberSplit, "") 54 | 55 | numberLength := len(number) 56 | wordString := "" 57 | if numberLength <= 9 { 58 | 59 | numArr := [9]int{0, 0, 0, 0, 0, 0, 0, 0, 0} 60 | 61 | numRecvdInArr := make([]int, 20) 62 | for i := 0; i < numberLength; i++ { 63 | 64 | tempNumber, _ := strconv.Atoi(string(number[i])) 65 | numRecvdInArr[i] = tempNumber 66 | } 67 | 68 | for i, j := 9-numberLength, 0; i < 9; i, j = i+1, j+1 { 69 | numArr[i] = numRecvdInArr[j] 70 | } 71 | for i, j := 0, 1; i < 9; i, j = i+1, j+1 { 72 | 73 | if i == 0 || i == 2 || i == 4 || i == 7 { 74 | if numArr[i] == 1 { 75 | numArr[j] = 10 + numArr[j] 76 | numArr[i] = 0 77 | } 78 | } 79 | } 80 | var value int 81 | for i := 0; i < 9; i++ { 82 | 83 | if i == 0 || i == 2 || i == 4 || i == 7 { 84 | value = numArr[i] * 10 85 | } else { 86 | value = numArr[i] 87 | } 88 | if value != 0 { 89 | wordString += words[value] + " " 90 | } 91 | if (i == 1 && value != 0) || (i == 0 && value != 0 && numArr[i+1] == 0) { 92 | wordString += "Crores " 93 | } 94 | if (i == 3 && value != 0) || (i == 2 && value != 0 && numArr[i+1] == 0) { 95 | wordString += "Lakhs " 96 | } 97 | if (i == 5 && value != 0) || (i == 4 && value != 0 && numArr[i+1] == 0) { 98 | wordString += "Thousand " 99 | } 100 | if i == 6 && value != 0 && (numArr[i+1] != 0 && numArr[i+2] != 0) { 101 | wordString += "Hundred " 102 | } else if i == 6 && value != 0 { 103 | wordString += "Hundred " 104 | } 105 | } 106 | wordStringSplit := strings.Split(wordString, " ") 107 | wordString = strings.Join(wordStringSplit, " ") 108 | } 109 | 110 | return wordString 111 | 112 | } 113 | 114 | func ConvertAmountInIndianWords(amount string) (output string, err error) { 115 | amt, err := strconv.ParseFloat(amount, 64) 116 | if err != nil { 117 | fmt.Println("Error", err) 118 | err = errors.New("Amount is incorrect, Please check the amount") 119 | return 120 | 121 | } 122 | if amt > 9999999999.99 { 123 | err = errors.New("Amount to big to convert") 124 | return 125 | 126 | } 127 | nums := strings.Split(amount, ".") 128 | whole := ConvertToRupees(nums[0]) 129 | if len(nums) > 1 { 130 | if nums[1] == "" { 131 | nums[1] = "0" 132 | 133 | } 134 | 135 | if len(nums[1]) == 1 { 136 | nums[1] = nums[1] + "0" 137 | } 138 | if len(nums[1]) > 2 { 139 | tempNum1 := nums[1] 140 | nums[1] = tempNum1[0:len(nums)] 141 | 142 | } 143 | 144 | } 145 | 146 | finalOutPut := "" 147 | if len(nums) >= 1 { 148 | tempNums, _ := strconv.Atoi(nums[0]) 149 | 150 | if tempNums <= 9 { 151 | nums[0] = strconv.Itoa(tempNums * 10) 152 | } else { 153 | nums[0] = nums[0] 154 | } 155 | fraction := "" 156 | if len(nums) == 2 { 157 | fraction = ConvertToRupees(nums[1]) 158 | 159 | } 160 | if whole == "" && fraction == "" { 161 | finalOutPut = "Zero only." 162 | } 163 | if whole == "" && fraction != "" { 164 | finalOutPut = fraction + "paise only." 165 | } 166 | if whole != "" && fraction == "" { 167 | finalOutPut = whole + "rupees only." 168 | } 169 | if whole != "" && fraction != "" { 170 | finalOutPut = whole + "rupees and " + fraction + "paise only." 171 | } 172 | 173 | } 174 | return finalOutPut, err 175 | 176 | } -------------------------------------------------------------------------------- /html_css/donationOldAgeHomes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Donation for Old Age Homes 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 28 | 29 |
30 |

Join Us

31 |

in making

32 |

Old Age easy

33 |
34 | 36 |
37 |
38 |
39 |

Our Services

40 |
41 |
42 | 44 |

Accommodation

45 |

46 | All our accommodation rooms are well-furnished and come with plenty of in-room amenities. 47 |

48 |
49 |
50 | 52 |

Interaction Centre

53 |

We try and initiate a better understanding of the problems of ageing from a social 54 | perspective.

55 |
56 |
57 | 59 |

Nursing & Personal Care

60 |

We provide self-contained rooms and 24 hour nursing & personal care for aged person. 61 |

62 |
63 |
64 |
65 |
66 |

Contact Us

67 |
68 |
69 |
70 | 71 | 72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 | 80 |
81 |
82 | 83 | 84 |
85 | 86 | 87 | 88 | 89 |
90 |
91 |
92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /html_css/donationOldAgeHomes/phone.css: -------------------------------------------------------------------------------- 1 | 2 | #navbar { 3 | flex-direction: column; 4 | } 5 | #navbar ul li a{ 6 | font-size: 1rem; 7 | padding: 0px 7px; 8 | padding-bottom: 8px; 9 | } 10 | #services{ 11 | flex-direction: column; 12 | } 13 | .h-primary{ 14 | font-size:26px; 15 | } 16 | .btn{ 17 | font-size: 13px; 18 | padding: 4px 8px; 19 | } 20 | #home{ 21 | display: flex; 22 | flex-direction: column; 23 | align-items: flex-end; 24 | justify-content: flex-end; 25 | height: 475px; 26 | padding: 3px 28px; 27 | 28 | } 29 | #home::before{ 30 | height: 510px; 31 | } 32 | 33 | #home p{ 34 | font-size: 25px; 35 | } 36 | #services .box { 37 | padding: 14px; 38 | margin: 2px 0px; 39 | margin-bottom: 20px; 40 | } 41 | #contact-box form{ 42 | width:80%; 43 | } 44 | #services .box img{ 45 | height: 130px; 46 | margin: auto; 47 | display: block; 48 | } -------------------------------------------------------------------------------- /html_css/donationOldAgeHomes/style.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* CSS Variables */ 8 | :root{ 9 | --navbar-height: 59px; 10 | } 11 | /* Navigation */ 12 | #navbar { 13 | display: flex; 14 | align-items: center; 15 | position: sticky; 16 | top: 0px; 17 | } 18 | #navbar::before{ 19 | content: ""; 20 | background-color:black; 21 | position: absolute; 22 | top:0px; 23 | left:0px; 24 | height: 100%; 25 | width:100%; 26 | z-index: -1; 27 | opacity: 0.7; 28 | } 29 | /* Navigation Bar: Logo and Image */ 30 | #logo{ 31 | margin: 10px 34px; 32 | } 33 | #logo img{ 34 | height: 80px; 35 | margin: 3px 6px; 36 | } 37 | /* Navigation Bar: List Styling */ 38 | 39 | #navbar ul{ 40 | display: flex; 41 | font-family: 'Baloo Bhai', cursive; 42 | } 43 | #navbar ul li{ 44 | list-style: none; 45 | font-size: 1.3rem; 46 | } 47 | #navbar ul li a{ 48 | /* color: white; 49 | display: block; */ 50 | padding: 3px 22px; 51 | /* border-radius: 20px; */ 52 | text-decoration: none; 53 | color: white; 54 | } 55 | #navbar ul li a:hover{ 56 | color: grey; 57 | 58 | } 59 | /* Home Section */ 60 | #home{ 61 | display: flex; 62 | flex-direction: column; 63 | /* padding:3px 200px; */ 64 | height: 650px; 65 | align-items: end; 66 | justify-content: center; 67 | } 68 | #home::before{ 69 | content: ""; 70 | position: absolute; 71 | background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR5Nl2h_YGzmIeOrpV2F-nMYAJZAGT5xMQAkA&usqp=CAU') no-repeat center center/cover; 72 | height: 642px; 73 | top:110px; 74 | left:0px; 75 | width: 100%; 76 | z-index: -1; 77 | opacity:0.89; 78 | } 79 | #home p{ 80 | color:black; 81 | /* text-align: center; */ 82 | font-size: 4.5rem; 83 | font-family: 'Bree Serif', serif; 84 | } 85 | .center{ 86 | text-align: center; 87 | } 88 | .h-primary{ 89 | font-family: 'Bree Serif', serif; 90 | font-size: 3.8rem; 91 | padding: 12px; 92 | } 93 | /* Services Section */ 94 | #services{ 95 | margin: 34px; 96 | display: flex; 97 | } 98 | #services .box{ 99 | border: 2px solid black; 100 | padding: 34px; 101 | margin: 2px 55px; 102 | border-radius: 28px; 103 | background: #f2f2f2; 104 | margin-bottom: 20px; 105 | } 106 | #services .box img{ 107 | height: 160px; 108 | margin: auto; 109 | display: block; 110 | } 111 | #services .box p{ 112 | font-family: 'Bree Serif', serif; 113 | 114 | } 115 | /* Contact Section */ 116 | #contact{ 117 | position: relative; 118 | 119 | } 120 | #contact-box{ 121 | display: flex; 122 | justify-content: center; 123 | align-items: center; 124 | padding-bottom: 34px; 125 | display: flex; 126 | align-items: center; 127 | justify-content: center; 128 | } 129 | #contact-box input, 130 | #contact-box textarea{ 131 | width: 100%; 132 | padding: 0.5rem; 133 | border-radius: 9px; 134 | font-size: 1.1rem; 135 | } 136 | 137 | #contact-box form{ 138 | width: 40%; 139 | } 140 | #contact-box label{ 141 | font-size: 1.3rem; 142 | font-family: 'Bree Serif', serif; 143 | 144 | } 145 | .btn{ 146 | padding: 6px 20px; 147 | border: 2px solid white; 148 | background-color: black; 149 | color: white; 150 | margin: 17px; 151 | font-size: 1.5rem; 152 | border-radius: 10px; 153 | cursor:pointer; 154 | 155 | } 156 | -------------------------------------------------------------------------------- /java_programs/Array_element.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | class Array_element 3 | { 4 | public static void main(String[] args) 5 | { 6 | int n; 7 | Scanner s = new Scanner(System.in); 8 | System.out.print("Enter no. of elements you want in array:"); 9 | n = s.nextInt(); 10 | int a[] = new int[n]; 11 | System.out.println("Enter all the elements:"); 12 | for (int i = 0; i < n; i++) 13 | { 14 | a[i] = s.nextInt(); 15 | } 16 | System.out.print("Enter the k th position at which you want to check number:"); 17 | int k = s.nextInt(); 18 | System.out.println("Number:"+a[k-1]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /java_programs/BinarySearch.java: -------------------------------------------------------------------------------- 1 | public class binarysearch { 2 | int Binary(int arr[],int search) 3 | { 4 | int start=0,mid=0; 5 | int end=(arr.length)-1; 6 | while(start<=end) 7 | { 8 | mid=start+(end-start)/2; 9 | 10 | if(searcharr[mid]) 15 | { 16 | start=mid+1; 17 | } 18 | else 19 | { 20 | return mid; 21 | } 22 | } 23 | return -1; 24 | } 25 | 26 | public static void main(String[] args) { 27 | int arr[]= {1,2,3,4,5}; 28 | 29 | int a=0; 30 | BinarySearch ol=new BinarySearch(); 31 | a=ol.Binary(arr,3); 32 | System.out.println(a); 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /java_programs/BinarySearchWithExample: -------------------------------------------------------------------------------- 1 | //This is an example of a biotonic array 2 | 3 | /** 4 | * This is the answer of the question that is available on leetcode : 853 peak index in a Mountain Array 5 | */ 6 | 7 | 8 | // This code will help you understand the concept of binary search very easily. 9 | 10 | /** 11 | * Binary search is always applied on a sorted array. 12 | * It is a search that uses the mid element in the array to find the element. 13 | * Try to dry this code with the example and seeing the question from leetcode , 14 | * it will clearfy you how it is working internally. 15 | * Time Complexity = log(N) 16 | * 17 | */ 18 | 19 | 20 | class Solution { 21 | public int peakIndexInMountainArray(int[] arr) { //say arr = [0,1,0] target = peak element 22 | 23 | int start = 0; 24 | int end = arr.length-1; 25 | 26 | while(startarr[mid+1]){ 31 | end = mid; //becoz it is in the decreasing array and the there 32 | // is a possiblity that the largest element is still behind the mid one. 33 | } 34 | else{ 35 | start = mid +1; 36 | 37 | } 38 | 39 | 40 | } 41 | return start; 42 | 43 | } 44 | } 45 | 46 | // Let us take an example for the above code 47 | /** 48 | * initial value of start and end are 49 | * start = 0 50 | * end = 2 51 | * 52 | * while loop starts for the first time ( 1 time ) 53 | * 54 | * mid = 1 55 | * 56 | * Now here it checks whether arr[1]>arr[2] , Yes it is 57 | * so it gives 58 | * end = mid = 1 59 | * 60 | * now while checks the condition is startarr[1] ;;; No it is false 65 | * hence the value of start will become 66 | * start = mid 67 | * 68 | * now we can see that the value of end > start , 69 | * 70 | * hence the loop is gonna break thus the searching is completed , 71 | * and it will return start , means the peak element. 72 | */ 73 | 74 | 75 | // OVERALL binarySearch is a algo that is used in searching and which decreases the 76 | // complixity of code and of time also. -------------------------------------------------------------------------------- /java_programs/CalculatorUsingApplet/CalculatorUsingAppletawt.java: -------------------------------------------------------------------------------- 1 | package Java.CalculatorUsingApplet; 2 | 3 | // importing some basic packages for applet 4 | 5 | import java.applet.Applet; 6 | import java.awt.*; 7 | import java.awt.event.ActionEvent; 8 | import java.awt.event.ActionListener; 9 | 10 | class CalculatorUsingAppletawt extends Applet implements ActionListener { 11 | TextField inp; 12 | 13 | //Function to add features to the frame 14 | public void init() { 15 | setBackground(Color.white); 16 | setLayout(null); 17 | int i; 18 | inp = new TextField(); 19 | inp.setBounds(150, 100, 270, 50); 20 | this.add(inp); 21 | Button button[] = new Button[10]; 22 | for (i = 0; i < 10; i++) { 23 | button[i] = new Button(String.valueOf(9 - i)); 24 | button[i].setBounds(150 + ((i % 3) * 50), 150 + ((i / 3) * 50), 50, 50); 25 | this.add(button[i]); 26 | button[i].addActionListener(this); 27 | } 28 | Button dec = new Button("."); 29 | dec.setBounds(200, 300, 50, 50); 30 | this.add(dec); 31 | dec.addActionListener(this); 32 | 33 | Button clr = new Button("C"); 34 | clr.setBounds(250, 300, 50, 50); 35 | this.add(clr); 36 | clr.addActionListener(this); 37 | 38 | Button symbol[] = new Button[5]; 39 | symbol[0] = new Button("/"); 40 | symbol[1] = new Button("*"); 41 | symbol[2] = new Button("-"); 42 | symbol[3] = new Button("+"); 43 | symbol[4] = new Button("="); 44 | for (i = 0; i < 4; i++) { 45 | symbol[i].setBounds(300, 150 + (i * 50), 50, 50); 46 | this.add(symbol[i]); 47 | symbol[i].addActionListener(this); 48 | } 49 | symbol[4].setBounds(350, 300, 70, 50); 50 | this.add(symbol[4]); 51 | symbol[4].addActionListener(this); 52 | } 53 | 54 | String num1 = ""; 55 | String op = ""; 56 | String num2 = ""; 57 | 58 | 59 | //Function to calculate the expression to what to calculate 60 | 61 | public void actionPerformed(ActionEvent e) { 62 | String button = e.getActionCommand(); 63 | char ch = button.charAt(0); 64 | if (ch >= '0' && ch <= '9' || ch == '.') { 65 | if (!op.equals("")) 66 | num2 = num2 + button; 67 | else 68 | num1 = num1 + button; 69 | inp.setText(num1 + op + num2); 70 | } else if (ch == 'C') { 71 | num1 = op = num2 = ""; 72 | inp.setText(""); 73 | } else if (ch == '=') { 74 | if (!num1.equals("") && !num2.equals("")) { 75 | double value; 76 | double n1 = Double.parseDouble(num1); 77 | double n2 = Double.parseDouble(num2); 78 | 79 | // All basic operations are as follows 80 | 81 | if (n2 == 0 && op.equals("/")) { 82 | inp.setText(num1 + op + num2 + " = Zero Division Error"); 83 | num1 = op = num2 = ""; 84 | } else { 85 | if (op.equals("+")) 86 | value = n1 + n2; 87 | else if (op.equals("-")) 88 | value = n1 - n2; 89 | else if (op.equals("/")) 90 | value = n1 / n2; 91 | else 92 | value = n1 * n2; 93 | inp.setText(num1 + op + num2 + " = " + value); 94 | num1 = Double.toString(value); 95 | op = num2 = ""; 96 | } 97 | } else { 98 | num1 = op = num2 = ""; 99 | inp.setText(""); 100 | } 101 | } else { 102 | if (op.equals("") || num2.equals("")) 103 | op = button; 104 | else { 105 | double value; 106 | double n1 = Double.parseDouble(num1); 107 | double n2 = Double.parseDouble(num2); 108 | if (n2 == 0 && op.equals("/")) { 109 | inp.setText(num1 + op + num2 + " = Zero Division Error"); 110 | num1 = op = num2 = ""; 111 | } else { 112 | if (op.equals("+")) 113 | value = n1 + n2; 114 | else if (op.equals("-")) 115 | value = n1 - n2; 116 | else if (op.equals("/")) 117 | value = n1 / n2; 118 | else 119 | value = n1 * n2; 120 | num1 = Double.toString(value); 121 | op = button; 122 | num2 = ""; 123 | } 124 | } 125 | inp.setText(num1 + op + num2); 126 | } 127 | } 128 | 129 | 130 | } 131 | /**------------------ Running the Program---------------------- 132 | * To the this , there are two methods 133 | * First of all use appletviewer 134 | * Second use html file to view it . 135 | * For more refer youtube for complete details 136 | */ 137 | 138 | 139 | // Needed to run the code in html so don't remove this 140 | /* 141 | 142 | 143 | */ -------------------------------------------------------------------------------- /java_programs/Dec2Bin.java: -------------------------------------------------------------------------------- 1 | // Converting a decimal number into binary in Java using while loop. 2 | // By Soham Gupta (http://github.com/gupta-soham/) (https://www.linkedin.com/in/soham-gupta-in/) 3 | public class Dec2Bin { 4 | public static void decToBin(int n){ 5 | int Num = n; 6 | int pow = 0; 7 | int biNum = 0; 8 | while(n > 0){ 9 | int rem = n % 2; 10 | biNum = biNum + (rem * (int)Math.pow(10, pow)); 11 | pow++; 12 | n /= 2; 13 | } 14 | System.out.println("Binary form of " + Num + " = " + biNum); 15 | } 16 | 17 | public static void main(String[] args) { 18 | decToBin(15); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /java_programs/Downward Triangle Pattern.java: -------------------------------------------------------------------------------- 1 | // * * * * * * 2 | // * * * * * 3 | // * * * * 4 | // * * * 5 | // * * 6 | // * 7 | import java.util.*; 8 | public class Main { 9 | public static void main (String args[]) { 10 | Scanner sc=new Scanner(System.in); 11 | int n=sc.nextInt(); 12 | int row=1; 13 | int nsp=0; 14 | int nst=n; 15 | while(row<=n){ 16 | int csp=1; 17 | while(csp<=nsp){ 18 | System.out.print(" "); 19 | csp+=1; 20 | } 21 | int cst=1; 22 | while(cst<=nst){ 23 | System.out.print("* "); 24 | cst+=1; 25 | } 26 | row+=1; 27 | nst-=1; 28 | nsp+=1; 29 | System.out.println(); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /java_programs/EncapsulationInJava/Encapsulation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawk-lib/hactoberfest2022/23626e07746427143a0d572bfe15c3b4a7f86a09/java_programs/EncapsulationInJava/Encapsulation.jpg -------------------------------------------------------------------------------- /java_programs/EncapsulationInJava/main.java: -------------------------------------------------------------------------------- 1 | package EncapsulationInJava; 2 | 3 | import java.util.Calendar; 4 | 5 | /** 6 | * Encapsulation is defined as the wrapping up of data under a single unit. 7 | * 8 | * In Simple terms you are just putting the variables , functions , or any kind , 9 | * of data members in a box(where box stands for a class ,function or an interface 10 | * or any kind of thing. 11 | * 12 | */ 13 | 14 | 15 | // Lets us see an example of encapsulation , then we will deep dive into the advantages of it . 16 | 17 | // Here we have created a Gun Class 18 | class EncapsulationGunClass { 19 | 20 | // It consists of properties of obejct of a gun 21 | // Let us take a gun AK-47 22 | 23 | 24 | 25 | private int noOfBullets; // These are the some of the properties of Gun 26 | private int accuracy; 27 | private String colorOfGun; 28 | 29 | // Now according to the access modifier private we can't acces these variables 30 | // To access them we have to make getter and setter or public methods. 31 | 32 | 33 | // -------------------------------------------- getter and setter methods 34 | public int getNoOfBullets() { 35 | return noOfBullets; 36 | } 37 | 38 | public void setNoOfBullets(int noOfBullets) { 39 | this.noOfBullets = noOfBullets; 40 | } 41 | 42 | public int getAccuracy() { 43 | return accuracy; 44 | } 45 | 46 | public void setAccuracy(int accuracy) { 47 | this.accuracy = accuracy; 48 | } 49 | 50 | public String getColorOfGun() { 51 | return colorOfGun; 52 | } 53 | 54 | public void setColorOfGun(String colorOfGun) { 55 | this.colorOfGun = colorOfGun; 56 | } 57 | // -------------------------------------------- getter and setter methods end 58 | 59 | } 60 | 61 | // Now here you can access the private varibles only by using the public methods. 62 | // let us try to do so. 63 | 64 | public class main { 65 | 66 | public static void main(String[] args) { 67 | 68 | EncapsulationGunClass aK47 = new EncapsulationGunClass(); // Creation of Gun object 69 | 70 | // let us save some values to the varibles with the use of methods. 71 | 72 | aK47.setNoOfBullets(45); 73 | aK47.setAccuracy(94); 74 | aK47.setColorOfGun("brown"); 75 | 76 | System.out.println(aK47.getNoOfBullets()); 77 | System.out.println(aK47.getAccuracy()); 78 | System.out.println(aK47.getColorOfGun()); 79 | 80 | // Now as you can see you can access the variables using the objects . 81 | 82 | // ------------------------But you can't do the same with directly setting the varibles with form like 83 | 84 | // EncapsulationGunClass.setNoOfBullets(45) ------> Gives error 85 | // EncapsulationGunClass.noOfBullets = 45; ------> Gives error 86 | 87 | } 88 | /** 89 | * So here as you can see all the varibles ( noOfBullets / accuracy / colorOfGun ) and the functions are inside 90 | * a class EncapsulationGunClass . So the box(class) is having the varibles and functions hence can be called 91 | * as encapsulation. 92 | */ 93 | 94 | 95 | // Advantages of Encapsulation 96 | 97 | /** 98 | * 1> Actually Encapsulation = data hiding + abstraction 99 | * >> We had declared three variables which were private , means no one can access them directly . 100 | * To change them we have to use methods . OR by declaring them private we said that these variables will 101 | * only be used by the class EncapsulationGunClass , no other class can access these variables directly , 102 | * thus hiding data from other class . 103 | * 104 | * Example of it ---> 105 | */ 106 | 107 | 108 | // this is a Person class 109 | 110 | class Person { 111 | 112 | private int yearOfBirth; 113 | public int ageOfPerson; 114 | 115 | public Person(int yearOfBirth) { 116 | this.yearOfBirth = yearOfBirth; 117 | 118 | this.ageOfPerson = Calendar.getInstance().get(Calendar.YEAR) - yearOfBirth; 119 | } 120 | 121 | public int getAge() { 122 | return ageOfPerson; 123 | } 124 | } 125 | 126 | } 127 | 128 | 129 | /* 130 | public class main { 131 | 132 | public static void main(String[] args) { 133 | 134 | Person ram = new Person(2000); 135 | 136 | System.out.println("Ram's age: " + ram.getAge()); 137 | 138 | ram.ageOfPerson = 100; // This is not good because the Person calss is automatically giving us age but we are 139 | // Also giving age which is incorrect as currently the ageOfPerson should be = 22 140 | // but we gave ageOfPerson = 100 141 | 142 | // Thus we use the private varibles and methods so that other class can't access the variables 143 | // directly and hence in this example the main class can't able to change the ageOfPerson varible. 144 | } 145 | after changing the person class for abstraction and data hiding it will become -- 146 | 147 | 148 | class Person { 149 | 150 | private int yearOfBirth; 151 | private int ageOfPerson; 152 | 153 | public Person(int yearOfBirth) { 154 | this.yearOfBirth = yearOfBirth; 155 | 156 | this.ageOfPerson = Calendar.getInstance().get(Calendar.YEAR) - yearOfBirth; 157 | } 158 | 159 | public int getAge() { 160 | return ageOfPerson; 161 | } 162 | } 163 | } 164 | 165 | // now no other class can access the variable ageOfPerson , hence we have hided the data , and restricted 166 | // the usage of it , hence applying the concept of abstraction . 167 | 168 | */ 169 | 170 | 171 | /** 172 | * Advantage 2 173 | * >> Code can be reused again and again hence saving time. 174 | * 175 | * Advantage 3 176 | * >> It uses OOPS Programming which is a good practice from industry purpose 177 | */ 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /java_programs/Fibonacci Pattern (Pattern 4).java: -------------------------------------------------------------------------------- 1 | // 0 2 | // 1 1 3 | // 2 3 5 4 | // 8 13 21 34 5 | import java.util.*; 6 | public class Main { 7 | public static void main(String args[]) { 8 | Scanner sc=new Scanner(System.in); 9 | int n=sc.nextInt(); 10 | int t1=0; 11 | int t2=1; 12 | int temp; 13 | for(int i=1;i<=n;i++){ 14 | for(int j=1;j<=i;j++){ 15 | System.out.print(t1+"\t"); 16 | temp=t1+t2; 17 | t1=t2; 18 | t2=temp; 19 | } 20 | System.out.println(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /java_programs/For_loop.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class For_loop 3 | { 4 | public static void main(String[] args) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | System.out.println("Enter number"); 8 | int n=sc.nextInt(); 9 | for(int i = 1; i <= 10; i++) 10 | { 11 | System.out.println(n+"X"+i+"="+n*i); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /java_programs/Half Pyramid Pattern.java: -------------------------------------------------------------------------------- 1 | // 1 2 | // 1 2 3 | // 1 2 3 4 | // 1 2 3 4 5 | // 1 2 3 4 5 6 | import java.util.*; 7 | public class Main { 8 | public static void main (String args[]) { 9 | Scanner sc=new Scanner(System.in); 10 | int N=sc.nextInt(); 11 | int row=1; 12 | int nst=1; 13 | int val=1; 14 | while(row<=N){ 15 | int cst=1; 16 | int cval=val; 17 | while(cst<=nst){ 18 | System.out.print(cval+" "); 19 | cst+=1; 20 | cval+=1; 21 | } 22 | 23 | row+=1; 24 | nst+=1; 25 | System.out.println(); 26 | 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /java_programs/Helloworld.java: -------------------------------------------------------------------------------- 1 | class HelloWorld { 2 | public static void main(String[] args) { 3 | System.out.println("Hello, World!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /java_programs/Hollow Diamond Pattern(Pattern 6).java: -------------------------------------------------------------------------------- 1 | // * * * * * 2 | // * * * * 3 | // * * 4 | // * * * * 5 | // * * * * * 6 | import java.util.*; 7 | public class Main { 8 | public static void main(String args[]) { 9 | Scanner sc=new Scanner(System.in); 10 | int n=sc.nextInt(); 11 | int row=1; 12 | int nsp=-1; 13 | int nst=n/2+1; 14 | while(row<=n){ 15 | int cst=1; 16 | while(cst<=nst){ 17 | System.out.print("*\t"); 18 | cst+=1; 19 | } 20 | int csp=1; 21 | while(csp<=nsp){ 22 | System.out.print("\t"); 23 | csp+=1; 24 | } 25 | cst=1; 26 | if(row==1||row==n){ 27 | cst=2; 28 | } 29 | while(cst<=nst){ 30 | System.out.print("*\t"); 31 | cst+=1; 32 | } 33 | if(row0 && arr[hole-1]>val){ 22 | 23 | arr[hole] = arr[hole-1]; 24 | 25 | hole--; 26 | 27 | } 28 | 29 | arr[hole] = val; 30 | 31 | } 32 | 33 | for(int i : arr){ 34 | 35 | System.out.print(i+" "); 36 | 37 | } 38 | 39 | } 40 | 41 | ======= 42 | // Insertion sort in Java 43 | 44 | import java.util.Arrays; 45 | 46 | class InsertionSort { 47 | 48 | void insertionSort(int array[]) { 49 | int size = array.length; 50 | 51 | for (int step = 1; step < size; step++) { 52 | int key = array[step]; 53 | int j = step - 1; 54 | 55 | // Compare key with each element on the left of it until an element smaller than 56 | // it is found. 57 | // For descending order, change keyarray[j]. 58 | while (j >= 0 && key < array[j]) { 59 | array[j + 1] = array[j]; 60 | --j; 61 | } 62 | 63 | // Place key at after the element just smaller than it. 64 | array[j + 1] = key; 65 | } 66 | } 67 | 68 | // Driver code 69 | public static void main(String args[]) { 70 | int[] data = { 9, 5, 1, 4, 3 }; 71 | InsertionSort is = new InsertionSort(); 72 | is.insertionSort(data); 73 | System.out.println("Sorted Array in Ascending Order: "); 74 | System.out.println(Arrays.toString(data)); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /java_programs/Leetcode_100.java: -------------------------------------------------------------------------------- 1 | //Same Tree 2 | class Solution { 3 | public boolean isSameTree(TreeNode p, TreeNode q) { 4 | if (p == null && q == null) { 5 | return true; 6 | } 7 | 8 | if (p == null || q == null) { 9 | return false; 10 | } 11 | 12 | if (p.val != q.val) { 13 | return false; 14 | } 15 | 16 | return isSameTree(p.left, q.left) && isSameTree(p.right, q.right); 17 | } 18 | } -------------------------------------------------------------------------------- /java_programs/MinFlips.java: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public int minFlips(String target) { 3 | int pair = 0; 4 | for(int i = 0;i map = new HashMap<>(); 23 | int[] ans = new int[2]; 24 | for(int i = 0;i < arr.length;i++){ 25 | if(map.containsKey(target - arr[i])){ 26 | ans[0] = i; 27 | ans[1] = map.get(target - arr[i]); 28 | break; 29 | } 30 | map.put(arr[i],i); 31 | } 32 | return ans; 33 | } 34 | public static void main(String[] args){ 35 | Scanner sc = new Scanner(System.in): 36 | int n = sc.nextInt(); 37 | int[] arr = new int[n]; 38 | for(int i = 0;i < n;i++)arr[i] = sc.nextInt(); 39 | int target = sc.nextInt(); 40 | int[] ans = twoSum(arr,target); 41 | System.out.println(arr[0] + " " + arr[1]); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /java_programs/Polymorphism/Overriding.java: -------------------------------------------------------------------------------- 1 | package Polymorphism; 2 | 3 | // Definition of Overriding : 4 | /** 5 | * In Java, method overriding occurs when a subclass (child class) has the same method as the parent class 6 | * The function should have same signatures in the terms of name or anything except the inner body 7 | * let us see an example of it first 8 | */ 9 | 10 | 11 | 12 | // First class which is going to be extended by some other class 13 | class A { 14 | void printString(int a){ // This function is already defined here 15 | System.out.println("The Value of a is "+a); 16 | } 17 | } 18 | 19 | 20 | // Second class that is extending the A class ( extends is used for inheritance ) 21 | class B extends A{ 22 | 23 | void printString(int a){ // Again the same function is redefined with same signature and name 24 | // Every thing is same , only the inside code is different 25 | System.out.println("The value of a+a+a is "+3*a); 26 | } 27 | 28 | } 29 | 30 | public class Overriding { 31 | public static void main(String[] args) { 32 | B objectOfB = new B(); 33 | objectOfB.printString(4); // Function of B class printString is followed instead of A class's printString 34 | } 35 | 36 | } 37 | 38 | // Uses 39 | /** 40 | * Here as you can see that an interface act as a template for the Rectangle and Square class. 41 | * Also Rectangle and Square class uses "area" function that is already defined in the interface. 42 | * Thus showing us the use case of overriding. 43 | */ 44 | interface Area{ 45 | public void area(int a,int b); 46 | } 47 | 48 | class Rectangle implements Area{ 49 | public void area(int a,int b){ 50 | System.out.println("The area of rectangle is "+ a*b); 51 | } 52 | } 53 | 54 | class Square implements Area{ 55 | public void area(int a,int b){ 56 | System.out.println("The area of rectangle is "+ a*a); 57 | } 58 | } -------------------------------------------------------------------------------- /java_programs/Pow.java: -------------------------------------------------------------------------------- 1 | // find n to the power m; 2 | import java.util.*; 3 | class Pow{ 4 | public static int pow(int n,int m){ 5 | if(m==0)return 1; 6 | return n * pow(n,m-1); 7 | } 8 | public static void main(String[] args){ 9 | Scanner sc = new Scanner(System.in); 10 | int n = sc.nextInt(); 11 | int m = sc.nextInt(); 12 | System.out.println(pow(n,m)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /java_programs/Reverse-Linked-List.java: -------------------------------------------------------------------------------- 1 | public class ReverseLinkedList { 2 | public static class Node { 3 | int data; 4 | Node next; 5 | 6 | public Node(int data) { 7 | this.data = data; 8 | this.next = null; 9 | } 10 | } 11 | 12 | public static Node head; 13 | public static Node tail; 14 | 15 | public void addLast(int data) { 16 | Node newNode = new Node(data); 17 | 18 | if(head == null) { 19 | head = tail = newNode; 20 | } 21 | 22 | tail.next = newNode; 23 | 24 | tail = newNode; 25 | } 26 | 27 | public void print() { 28 | if(head == null) { 29 | System.out.println("Linked List is Empty"); 30 | return; 31 | } 32 | 33 | Node temp = head; 34 | while(temp != null) { 35 | System.out.print(temp.data + "->"); 36 | temp = temp.next; 37 | } 38 | System.out.print("null"); 39 | System.out.println(); 40 | } 41 | 42 | public void reverse() { 43 | Node prev = null; 44 | Node curr = tail = head; 45 | Node next; 46 | 47 | while(curr != null) { 48 | next = curr.next; 49 | curr.next = prev; 50 | prev = curr; 51 | curr = next; 52 | } 53 | head = prev; 54 | } 55 | 56 | public static void main(String[] args) { 57 | ReverseLinkedList ll = new ReverseLinkedList(); 58 | ll.addLast(1); 59 | ll.addLast(2); 60 | ll.addLast(3); 61 | ll.addLast(4); 62 | ll.print(); 63 | 64 | ll.reverse(); 65 | ll.print(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /java_programs/SelectionSort.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | import java.lang.*; 4 | 5 | import java.io.*; 6 | 7 | //selection Sort 8 | 9 | class SelectionSort { 10 | 11 | public static void main(String[] args){ 12 | 13 | int[] arr = {2,7,4,1,5,3}; 14 | 15 | for(int i=0;i arr[si + 1]) { 33 | int temp = arr[si]; 34 | arr[si] = arr[si + 1]; 35 | arr[si + 1] = temp; 36 | } 37 | 38 | // STEP 2 39 | // Increment si to compare all adjacent elements for completing the iteration 40 | bsort(arr,si+1,li); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /java_programs/V17TowerOfHanoi.java: -------------------------------------------------------------------------------- 1 | package File6_Recursion; 2 | 3 | public class V17TowerOfHanoi { 4 | public static void main(String[] args) { 5 | int n = 3; 6 | toh(n, "Source", "Destination", "Helper"); 7 | } 8 | 9 | public static void toh(int n, String src, String dest, String help){ 10 | 11 | // Step 4 12 | // Base Condition: when n reaches to 0 by gradual decrement in its value, we have to return 13 | if(n==0){ 14 | return; 15 | } 16 | 17 | // Step 1: we have to move n-1 disks to the helper using destination tower 18 | // Our helper will behave like destination and detination will work as helper 19 | toh(n-1,src,help,dest); 20 | 21 | // Step 2: move nth disc from source to destination 22 | System.out.println("Move " + n + "th disc from " + src + " to " + dest); 23 | 24 | // Step 3: Move n-1 disc from helper to destination using source as helper 25 | // Helper works as source 26 | // Source works as helper 27 | toh(n-1, help, dest, src); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /java_programs/While_Loop.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class While_Loop 3 | { 4 | public static void main(String[] args) 5 | { 6 | int num, temp, reverse = 0, rightDigit; 7 | Scanner in = new Scanner(System.in); 8 | System.out.println("Enter a number"); 9 | num = in.nextInt(); 10 | temp = num; 11 | while(temp != 0) 12 | { 13 | rightDigit = temp % 10; 14 | reverse = reverse*10 + rightDigit; 15 | temp = temp/10; 16 | } 17 | if(reverse == num) 18 | System.out.print(num + " is Palindrome number"); 19 | else 20 | System.out.print(num + " is not a Palindrome number"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /java_programs/armstrong.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | import java.lang.Math; 3 | public class hello 4 | { 5 | //function to check if the number is Armstrong or not 6 | static boolean isArmstrong(int n) 7 | { 8 | int temp, digits=0, last=0, sum=0; 9 | //assigning n into a temp variable 10 | temp=n; 11 | //loop execute until the condition becomes false 12 | while(temp>0) 13 | { 14 | temp = temp/10; 15 | digits++; 16 | } 17 | temp = n; 18 | while(temp>0) 19 | { 20 | //determines the last digit from the number 21 | last = temp % 10; 22 | //calculates the power of a number up to digit times and add the resultant to the sum variable 23 | sum += (Math.pow(last, digits)); 24 | //removes the last digit 25 | temp = temp/10; 26 | } 27 | //compares the sum with n 28 | if(n==sum) 29 | //returns if sum and n are equal 30 | return true; 31 | //returns false if sum and n are not equal 32 | else return false; 33 | } 34 | //driver code 35 | public static void main(String args[]) 36 | { 37 | int num; 38 | Scanner sc= new Scanner(System.in); 39 | System.out.print("Enter the number: "); 40 | //reads the limit from the user 41 | num=sc.nextInt(); 42 | if(isArmstrong(num)) 43 | { 44 | System.out.print("Armstrong "); 45 | } 46 | else 47 | { 48 | System.out.print("Not Armstrong "); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /java_programs/bubblesort.java: -------------------------------------------------------------------------------- 1 | public class BubbleSortExample { 2 | static void bubbleSort(int[] arr) { 3 | int n = arr.length; 4 | int temp = 0; 5 | for(int i=0; i < n; i++){ 6 | for(int j=1; j < (n-i); j++){ 7 | if(arr[j-1] > arr[j]){ 8 | //swap elements 9 | temp = arr[j-1]; 10 | arr[j-1] = arr[j]; 11 | arr[j] = temp; 12 | } 13 | 14 | } 15 | } 16 | 17 | } 18 | public static void main(String[] args) { 19 | int arr[] ={3,60,35,2,45,320,5}; 20 | 21 | System.out.println("Array Before Bubble Sort"); 22 | for(int i=0; i < arr.length; i++){ 23 | System.out.print(arr[i] + " "); 24 | } 25 | System.out.println(); 26 | 27 | bubbleSort(arr);//sorting array elements using bubble sort 28 | 29 | System.out.println("Array After Bubble Sort"); 30 | for(int i=0; i < arr.length; i++){ 31 | System.out.print(arr[i] + " "); 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /java_programs/calculator.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | class Main { 4 | public static void main(String[] args) { 5 | 6 | char operator; 7 | Double number1, number2, result; 8 | 9 | // create an object of Scanner class 10 | Scanner input = new Scanner(System.in); 11 | 12 | // ask users to enter operator 13 | System.out.println("Choose an operator: +, -, *, % or /"); 14 | operator = input.next().charAt(0); 15 | 16 | // ask users to enter numbers 17 | System.out.println("Enter first number"); 18 | number1 = input.nextDouble(); 19 | 20 | System.out.println("Enter second number"); 21 | number2 = input.nextDouble(); 22 | 23 | switch (operator) { 24 | 25 | // performs addition between numbers 26 | case '+': 27 | result = number1 + number2; 28 | System.out.println(number1 + " + " + number2 + " = " + result); 29 | break; 30 | 31 | // performs subtraction between numbers 32 | case '-': 33 | result = number1 - number2; 34 | System.out.println(number1 + " - " + number2 + " = " + result); 35 | break; 36 | 37 | // performs multiplication between numbers 38 | case '*': 39 | result = number1 * number2; 40 | System.out.println(number1 + " * " + number2 + " = " + result); 41 | break; 42 | 43 | // performs division between numbers 44 | case '/': 45 | result = number1 / number2; 46 | System.out.println(number1 + " / " + number2 + " = " + result); 47 | break; 48 | 49 | // performs Remainder between numbers 50 | case '%': 51 | result = number1 % number2; 52 | System.out.println(number1 + " % " + number2 + " = " + result); 53 | break; 54 | 55 | default: 56 | System.out.println("Invalid operator!"); 57 | break; 58 | } 59 | 60 | input.close(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /java_programs/fibonacci.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | class Fib{ 4 | public static int fibo(int n,int[] dp){ 5 | if(n==0||n==1)return n; 6 | if(dp[n]!=-1)return dp[n]; 7 | return dp[n] = fibo(n-1,dp) + fibo(n-2,dp); 8 | } 9 | public static void main(String[] args){ 10 | Scanner sc = new Scanner(System.in); 11 | int n = sc.nextInt(); 12 | int[] dp = new int[n+1]; 13 | Arrays.fill(dp,-1); 14 | System.out.println(fibo(n,dp)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /java_programs/inheritance/Child.java: -------------------------------------------------------------------------------- 1 | package com.company; 2 | 3 | public class Child extends Perant{ 4 | int age; 5 | 6 | public void write(){ 7 | System.out.println(height); 8 | System.out.println(weight); 9 | System.out.println("write letters"); 10 | } 11 | 12 | 13 | public Child(int age, int height) { 14 | this.age = age; 15 | this.height= height; 16 | System.out.println("age "+ age); 17 | System.out.println("height "+height); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /java_programs/inheritance/Main.java: -------------------------------------------------------------------------------- 1 | package com.company; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | Child c1 = new Child(10, 20); 7 | c1.sing(); 8 | c1.write(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /java_programs/inheritance/Perant.java: -------------------------------------------------------------------------------- 1 | package com.company; 2 | 3 | public class Perant { 4 | protected int height; 5 | protected int weight; 6 | 7 | public void sing(){ 8 | System.out.println("sing a song"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /java_programs/integerToRoman.java: -------------------------------------------------------------------------------- 1 | import java.io.BufferedReader; 2 | import java.io.IOException; 3 | import java.io.InputStreamReader; 4 | 5 | class Solution { 6 | public String intToRoman(int num) { 7 | String str=""; 8 | int n=num; 9 | while((n/1000)>0){ 10 | str= str+"M"; 11 | n=n-1000; 12 | } 13 | while(n/100 > 0){ 14 | if(n/100==9){ 15 | str=str+"C"+"M"; 16 | n=n-900; 17 | } 18 | else if(n/100 >=5){ 19 | str=str+"D"; 20 | n=n-500; 21 | } 22 | else if(n/100==4){ 23 | str=str+"C"+"D"; 24 | n=n-400; 25 | } 26 | else{ 27 | str=str+"C"; 28 | n=n-100; 29 | } 30 | } 31 | while(n/10 > 0){ 32 | if(n/10==9){ 33 | str=str+"X"+"C"; 34 | n=n-90; 35 | } 36 | else if(n/10 >=5){ 37 | str=str+"L"; 38 | n=n-50; 39 | } 40 | else if(n/10 ==4){ 41 | str=str+"X"+"L"; 42 | n=n-40; 43 | } 44 | else{ 45 | str=str+"X"; 46 | n=n-10; 47 | } 48 | } 49 | while(n > 0){ 50 | if (n==9){ 51 | str=str+"I"+"X"; 52 | n=n-9; 53 | } 54 | else if(n>=5){ 55 | str=str+"V"; 56 | n=n-5; 57 | } 58 | else if(n ==4){ 59 | str=str+"I"+"V"; 60 | n=n-40; 61 | } 62 | else{ 63 | str=str+"I"; 64 | n=n-1; 65 | } 66 | } 67 | return str; 68 | } 69 | } 70 | public class integertoroman { 71 | public static void main(String[] args) throws IOException{ 72 | Solution s= new Solution(); 73 | BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); 74 | int str=Integer.parseInt(br.readLine()); 75 | String ss= s.intToRoman(str); 76 | System.out.println(ss); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /java_programs/mergesort.java: -------------------------------------------------------------------------------- 1 | class test { 2 | public static void divide(int arr[],int si,int ei) 3 | { 4 | if(si>=ei) 5 | return; 6 | int mid=(si+ei)/2; 7 | divide(arr,si,mid); 8 | divide(arr,mid+1,ei); 9 | conquer(arr,si,mid,ei); 10 | } 11 | public static void conquer(int arr[],int si,int mid,int ei) 12 | { 13 | int merged[] = new int[ei-si+1]; 14 | int idx1=si; 15 | int idx2=mid+1; 16 | int x=0; 17 | while(idx1<=mid && idx2<=ei) 18 | { 19 | if(arr[idx1]<=arr[idx2]) 20 | { 21 | merged[x++]=arr[idx1++]; 22 | } 23 | else 24 | { 25 | merged[x++]=arr[idx2++]; 26 | } 27 | } 28 | while(idx1<=mid) 29 | { 30 | merged[x++]=arr[idx1++]; 31 | } 32 | while(idx2<=ei) 33 | { 34 | merged[x++]=arr[idx2++]; 35 | } 36 | for(int i=0, j=si;i< merged.length;i++,j++) 37 | { 38 | arr[j]=merged[i]; 39 | } 40 | 41 | } 42 | 43 | public static void main(String[] args) { 44 | Scanner sc = new Scanner(System.in); 45 | int arr[] = {6,3,9,5,2,8}; 46 | int n=arr.length -1; 47 | 48 | divide(arr,0,n); 49 | 50 | for(int i=0;i 4 | 5 | // function to swap elements 6 | void swap(int *a, int *b) { 7 | int t = *a; 8 | *a = *b; 9 | *b = t; 10 | } 11 | 12 | // function to find the partition position 13 | int partition(int array[], int low, int high) { 14 | 15 | // select the rightmost element as pivot 16 | int pivot = array[high]; 17 | 18 | // pointer for greater element 19 | int i = (low - 1); 20 | 21 | // traverse each element of the array 22 | // compare them with the pivot 23 | for (int j = low; j < high; j++) { 24 | if (array[j] <= pivot) { 25 | 26 | // if element smaller than pivot is found 27 | // swap it with the greater element pointed by i 28 | i++; 29 | 30 | // swap element at i with element at j 31 | swap(&array[i], &array[j]); 32 | } 33 | } 34 | 35 | // swap the pivot element with the greater element at i 36 | swap(&array[i + 1], &array[high]); 37 | 38 | // return the partition point 39 | return (i + 1); 40 | } 41 | 42 | void quickSort(int array[], int low, int high) { 43 | if (low < high) { 44 | 45 | // find the pivot element such that 46 | // elements smaller than pivot are on left of pivot 47 | // elements greater than pivot are on right of pivot 48 | int pi = partition(array, low, high); 49 | 50 | // recursive call on the left of pivot 51 | quickSort(array, low, pi - 1); 52 | 53 | // recursive call on the right of pivot 54 | quickSort(array, pi + 1, high); 55 | } 56 | } 57 | 58 | // function to print array elements 59 | void printArray(int array[], int size) { 60 | for (int i = 0; i < size; ++i) { 61 | printf("%d ", array[i]); 62 | } 63 | printf("\n"); 64 | } 65 | 66 | // main function 67 | int main() { 68 | int data[] = {8, 7, 2, 1, 0, 9, 6}; 69 | 70 | int n = sizeof(data) / sizeof(data[0]); 71 | 72 | printf("Unsorted Array\n"); 73 | printArray(data, n); 74 | 75 | // perform quicksort on data 76 | quickSort(data, 0, n - 1); 77 | 78 | printf("Sorted array in ascending order: \n"); 79 | printArray(data, n); 80 | } 81 | -------------------------------------------------------------------------------- /others/quicksort.txt: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | class GFG { 4 | 5 | // A utility function to swap two elements 6 | static void swap(int[] arr, int i, int j) 7 | { 8 | int temp = arr[i]; 9 | arr[i] = arr[j]; 10 | arr[j] = temp; 11 | } 12 | 13 | /* This function takes last element as pivot, places 14 | the pivot element at its correct position in sorted 15 | array, and places all smaller (smaller than pivot) 16 | to left of pivot and all greater elements to right 17 | of pivot */ 18 | static int partition(int[] arr, int low, int high) 19 | { 20 | 21 | // pivot 22 | int pivot = arr[high]; 23 | 24 | // Index of smaller element and 25 | // indicates the right position 26 | // of pivot found so far 27 | int i = (low - 1); 28 | 29 | for (int j = low; j <= high - 1; j++) { 30 | 31 | // If current element is smaller 32 | // than the pivot 33 | if (arr[j] < pivot) { 34 | 35 | // Increment index of 36 | // smaller element 37 | i++; 38 | swap(arr, i, j); 39 | } 40 | } 41 | swap(arr, i + 1, high); 42 | return (i + 1); 43 | } 44 | 45 | /* The main function that implements QuickSort 46 | arr[] --> Array to be sorted, 47 | low --> Starting index, 48 | high --> Ending index 49 | */ 50 | static void quickSort(int[] arr, int low, int high) 51 | { 52 | if (low < high) { 53 | 54 | // pi is partitioning index, arr[p] 55 | // is now at right place 56 | int pi = partition(arr, low, high); 57 | 58 | // Separately sort elements before 59 | // partition and after partition 60 | quickSort(arr, low, pi - 1); 61 | quickSort(arr, pi + 1, high); 62 | } 63 | } 64 | 65 | // Function to print an array 66 | static void printArray(int[] arr, int size) 67 | { 68 | for (int i = 0; i < size; i++) 69 | System.out.print(arr[i] + " "); 70 | 71 | System.out.println(); 72 | } 73 | 74 | // Driver Code 75 | public static void main(String[] args) 76 | { 77 | int[] arr = { 10, 7, 8, 9, 1, 5 }; 78 | int n = arr.length; 79 | 80 | quickSort(arr, 0, n - 1); 81 | System.out.println("Sorted array: "); 82 | printArray(arr, n); 83 | } 84 | } -------------------------------------------------------------------------------- /python/coinProblem.py: -------------------------------------------------------------------------------- 1 | # Dynamic Programming Python implementation of Coin 2 | # Change problem 3 | def count(S, m, n): 4 | # We need n+1 rows as the table is constructed 5 | # in bottom up manner using the base case 0 value 6 | # case (n = 0) 7 | table = [[0 for x in range(m)] for x in range(n+1)] 8 | 9 | # Fill the entries for 0 value case (n = 0) 10 | for i in range(m): 11 | table[0][i] = 1 12 | 13 | # Fill rest of the table entries in bottom up manner 14 | for i in range(1, n+1): 15 | for j in range(m): 16 | 17 | # Count of solutions including S[j] 18 | x = table[i - S[j]][j] if i-S[j] >= 0 else 0 19 | 20 | # Count of solutions excluding S[j] 21 | y = table[i][j-1] if j >= 1 else 0 22 | 23 | # total count 24 | table[i][j] = x + y 25 | 26 | return table[n][m-1] 27 | 28 | # Driver program to test above function 29 | arr = [1, 2, 3] 30 | m = len(arr) 31 | n = 4 32 | print(count(arr, m, n)) 33 | 34 | # This code is contributed by Bhavya Jain 35 | -------------------------------------------------------------------------------- /python/login_page.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | login_screen=Tk() 3 | login_screen.title("Login") 4 | login_screen.geometry("300x250") 5 | Label(login_screen, text="facebook", fg="blue").pack() 6 | Label(login_screen, text="").pack() 7 | Label(login_screen, text="Username").pack() 8 | username_login_entry = Entry(login_screen, textvariable="username") 9 | username_login_entry.pack() 10 | Label(login_screen, text="").pack() 11 | Label(login_screen, text="Password").pack() 12 | password__login_entry = Entry(login_screen, textvariable="password", show= '*') 13 | password__login_entry.pack() 14 | Label(login_screen, text="").pack() 15 | Button(login_screen, text="Login", width=10, height=1, bg="blue", fg="white").pack() 16 | Button(login_screen, text="Sign Up", width=10, height=1, bg="green", fg="white").pack() 17 | login_screen.mainloop() -------------------------------------------------------------------------------- /python/password genarator.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | 4 | while(1): 5 | length = int(input('\nenter the length of password=')) 6 | 7 | lower = string.ascii_lowercase 8 | upper = string.ascii_uppercase 9 | number = string.digits 10 | symbols = string.punctuation 11 | 12 | all = lower + upper + number + symbols 13 | 14 | temp = random.sample(all,length) 15 | password ="".join(temp) 16 | print(password) 17 | -------------------------------------------------------------------------------- /python/quickSort.py: -------------------------------------------------------------------------------- 1 | # Quick sort in Python 2 | 3 | # function to find the partition position 4 | def partition(array, low, high): 5 | 6 | # choose the rightmost element as pivot 7 | pivot = array[high] 8 | 9 | # pointer for greater element 10 | i = low - 1 11 | 12 | # traverse through all elements 13 | # compare each element with pivot 14 | for j in range(low, high): 15 | if array[j] <= pivot: 16 | # if element smaller than pivot is found 17 | # swap it with the greater element pointed by i 18 | i = i + 1 19 | 20 | # swapping element at i with element at j 21 | (array[i], array[j]) = (array[j], array[i]) 22 | 23 | # swap the pivot element with the greater element specified by i 24 | (array[i + 1], array[high]) = (array[high], array[i + 1]) 25 | 26 | # return the position from where partition is done 27 | return i + 1 28 | 29 | # function to perform quicksort 30 | def quickSort(array, low, high): 31 | if low < high: 32 | 33 | # find pivot element such that 34 | # element smaller than pivot are on the left 35 | # element greater than pivot are on the right 36 | pi = partition(array, low, high) 37 | 38 | # recursive call on the left of pivot 39 | quickSort(array, low, pi - 1) 40 | 41 | # recursive call on the right of pivot 42 | quickSort(array, pi + 1, high) 43 | 44 | 45 | data = [8, 7, 2, 1, 0, 9, 6] 46 | print("Unsorted Array") 47 | print(data) 48 | 49 | size = len(data) 50 | 51 | quickSort(data, 0, size - 1) 52 | 53 | print('Sorted Array in Ascending Order:') 54 | print(data) 55 | --------------------------------------------------------------------------------