This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 1: Define backup drive path | |
drivePath="/mnt/backupbox" | |
if [[ ! -d "$drivePath" ]]; then | |
echo "❌ Backup drive not found at: $drivePath" | |
echo "Please plug it in and make sure it's mounted." | |
exit 1 | |
fi | |
echo -e "\n✅ Backup drive detected at: $drivePath" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
char charArr[100]; | |
printf("Enter a string: "); | |
scanf("%s", charArr); | |
int count; | |
count = 0; | |
while(charArr[count] != '\0') { | |
printf("%c", charArr[count]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main () { | |
printf("How many numbers do you have? "); | |
int k; | |
scanf("%d", &k); | |
printf("You entered %d numbers\n", k); | |
float userInputs[k]; | |
float sum; | |
for(int i=0; i<k; i++) { | |
printf("Enter element no %d : ", i+1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ca.shubbar; | |
import java.util.*; | |
public class Theatre { | |
private final String theatreName; | |
private List<Seat> seats = new ArrayList<>(); | |
public Theatre(String theatreName, int numRows, int seatsPerRow) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ca.shubbar; | |
import java.util.*; | |
public class Theatre { | |
private final String theatreName; | |
private List<Seat> seats = new ArrayList<>(); | |
public Theatre(String theatreName, int numRows, int seatsPerRow) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ca.shubbar.generics; | |
import java.util.ArrayList; | |
/** | |
* | |
* @author Mustafa Shubbar <codingbox@outlook.com> | |
*/ | |
public class GenericsInSports { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A class to demostrate the inner class implementation | |
* InnerClass -> this example | |
* Local -> inside a block, such as if statements or methods | |
* Annonymouse -> | |
* ### THIS CLASS CONTAINS A DRIVER MAIN METHOD ### | |
*/ | |
package InnerClasses; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ca.shubbar; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.ListIterator; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String args[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ca.shubbar; | |
import java.util.Arrays; | |
public class Main { | |
public static void main(String args[]) { | |
int[] arr = {1, 2, 3, 4, 5, 6, 7}; | |
System.out.println(Arrays.toString(arr)); | |
reverse(arr); |
NewerOlder