This file contains 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-US"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>My test page</title> | |
<style> | |
form { |
This file contains 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.Scanner; | |
public class ArmStrongNumber { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); | |
int n=sc.nextInt(); | |
int result=0; | |
int sum=0; | |
int num=0; | |
int cube=0; |
This file contains 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
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/default | |
error_page 502 /502.html; | |
# redirect all traffic to https | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name _; | |
return 301 https://$host$request_uri; |
This file contains 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
## Version 2021/05/18 | |
# make sure that your dns has a cname set for heimdall | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name heimdall.*; | |
include /config/nginx/ssl.conf; |
This file contains 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 <iostream> | |
void decimalToBinary(int n) | |
{ | |
while (n != 0) | |
{ | |
std::cout << n % 2; | |
n = n / 2; | |
} | |
} |
This file contains 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
def leap_year(year): | |
if year % 4 == 0: | |
if year % 100 == 0: | |
if year % 400 == 0: | |
print("It's a leap year.") | |
else: | |
print("It's not a leap year.") | |
else: | |
print("It's a leap year.") |
This file contains 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
public class Patterns { | |
public static void main(String[] args) { | |
int n = 5; | |
for (int i = 0; i <= n; i++) { | |
for (int space=n-i; space >= 1; space--) { | |
System.out.print(" "); | |
} | |
printNumbers(0, i); | |
} | |
for (int i = n-1; i >= 0; i--) { |
This file contains 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.nio.file.Paths; | |
import java.util.ArrayList; | |
import java.util.Scanner; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ |
This file contains 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
public class SimpleDate { | |
private int day; | |
private int month; | |
private int year; | |
public SimpleDate(int day, int month, int year) { | |
this.day = day; | |
this.month = month; | |
this.year = year; | |
} |