View Chess.c
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 <stdio.h> | |
#include <stdbool.h> | |
struct chess { | |
int row; | |
char column; | |
}; | |
bool isValid(struct chess position) { | |
return position.column >= 'a' && position.column <= 'h' && position.row >=1 && position.row <= 8; |
View HTML.cpp
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 <stdio.h> | |
void printList(char* list[]) { | |
printf("<ol>\n"); | |
int i = 0; | |
while (list[i] != NULL) { | |
printf("<li>%s</li>\n", list[i]); | |
i++; | |
} | |
printf("</ol>"); |
View Cau5.cpp
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
bool between(const struct time* begin, const struct time* examined, const struct time* end) { | |
int bSecond = begin->hour * 60 * 60 + begin->minute * 60 + begin->second; | |
int xSecond = examined->hour * 60 * 60 + examined->minute * 60 + examined->second; | |
int eSecond = end->hour * 60 * 60 + end->minute * 60 + end->second; | |
return xSecond >= bSecond && xSecond <= eSecond; | |
} |
View Cau1.c
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 <stdio.h> | |
int isConsonant(char ch) | |
{ | |
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) | |
{ | |
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U') | |
{ | |
return 0; | |
} |
View docker-compose.yml
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: '3.2' | |
services: | |
db: | |
image: postgres:13.1-alpine | |
container_name: db | |
environment: | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_USER=postgres | |
- POSTGRES_DB=jira | |
volumes: |
View CharReplacement.java
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
package com.example.blogservice; | |
public class CharReplacement { | |
public static void main(String[] args) { | |
String s = "AyxRTXra"; // ABBAAABB | |
System.out.println(convert(s)); | |
} | |
private static String convert(String input) { |
View ajs.js
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
declare var AJS: { | |
I18n: { | |
getText: (key: string, ...args?: string[]) => string | |
}, | |
toInit: (initFunc: () => any) => void, | |
params: { | |
baseUrl: string | |
} | |
}; |