Skip to content

Instantly share code, notes, and snippets.

View NguyenTatNhac's full-sized avatar

Ryker Tyler NguyenTatNhac

View GitHub Profile
declare var AJS: {
I18n: {
getText: (key: string, ...args?: string[]) => string
},
toInit: (initFunc: () => any) => void,
params: {
baseUrl: string
}
};
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) {
@NguyenTatNhac
NguyenTatNhac / docker-compose.yml
Last active December 7, 2021 03:51
The docker-compose for Jira Software on PostgreSQL
version: '3.2'
services:
db:
image: postgres:13.1-alpine
container_name: db
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=jira
volumes:
#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;
}
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;
}
#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>");
#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;
@NguyenTatNhac
NguyenTatNhac / spouse.js
Created November 21, 2023 13:26
Spouse
const CITIZENSHIP_SELECT_ID = 'xi-sel-400';
const APPLICANTS_NUMBER_SEL_ID = 'xi-sel-422';
const FAMILY_MEMBER_SEL_ID = 'xi-sel-427';
const MEMBER_CITIZEN_SEL_ID = 'xi-sel-428';
const selectBookAppointment = () => {
const bookApt = document.querySelector('a[href*="/ams/TerminBuchen/wizardng"]');
if (bookApt) {
bookApt.click();
}