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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Array random and max</title> | |
</head> | |
<body> | |
<h1>Array elements are</h1> | |
<div id="random"></div> | |
<h2>Maximum number is</h2> | |
<div id="max"></div> |
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
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
class Pattern | |
{ | |
public static void main (String[] args) throws java.lang.Exception | |
{ | |
boolean switchChar = false, reachedHeight = false; | |
int height = 9, noOfSpaces = (height - 1)/2, noOfChars = 1, i, j = 0; |
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
/*The population of a country in a particular year can be calculated by: | |
p*(1+r/100) at the end of year 2000, where p is the initial population and r is the | |
growth rate. | |
Write a program by using a class to find the population of the country at the end of each year from 2001 to 2007. The Class has the following specifications: | |
Class name — Population | |
Data Members — float p,r |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Coming soon</title> | |
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.4/TweenMax.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.downCount/1.0.0/jquery.downCount.min.js"></script> |
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
#!/usr/bin/env bash | |
# Author: M. Dutt ([email protected]) | |
# Date: 28/10/2023 | |
# Purpose: Backup all specified direcories. | |
# License: This shell script is released under GPL v2. | |
# | |
######################## | |
# REQUIREMENTS | |
######################## |
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
#!/usr/bin/env bash | |
# Author: M. Dutt ([email protected]) | |
# Date: 19/11/2023 | |
# Purpose: Clamav hourly scan. | |
# | |
# chmod +x /path/to/script/clamscan_hourly.sh | |
# | |
# 01 * * * * /path/to/script/clamscan_hourly.sh | |
# |
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
#!/usr/bin/env bash | |
# Author: M. Dutt ([email protected]) | |
# Date: 19/11/2023 | |
# Purpose: Clamav daily scan. | |
# | |
# chmod +x /path/to/script/clamscan_daily.sh | |
# | |
# 01 * * * * /path/to/script/clamscan_daily.sh | |
# |
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
# Author: M. Dutt ([email protected]) | |
# Date: 20/11/2023 | |
# Purpose: Correct file and directory permissions of Laravel project. | |
# | |
Change the owner and group of your Laravel project. | |
sudo chown -R developer:www-data /var/www/project | |
OR | |
sudo chown -R developer:apache /var/www/project |
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
# Author: M. Dutt ([email protected]) | |
# Date: 27/11/2023 | |
# Purpose: Laravel command to update the application (git pull and composer install) using Laravel scheduler. | |
# | |
# Running The Scheduler | |
# The schedule:run Artisan command will evaluate all of your scheduled tasks and determine if they need to run based on the server's current time. | |
# Create a cron job in your server | |
# * * * * * cd /path/to/project && php artisan schedule:run >> storage/logs/cron.log 2>&1 | |
# | |
# Directory structure |
OlderNewer