Skip to content

Instantly share code, notes, and snippets.

View Code-Blender-7's full-sized avatar
🧾
Busy with exam

FoxtBird Code-Blender-7

🧾
Busy with exam
View GitHub Profile
@Code-Blender-7
Code-Blender-7 / timeConverter1.js
Created January 2, 2023 03:20
Converting minutes to hours, minutes using JavaScript
function timeConverter1(totalMinutes) {
const hours = Math.trunc(totalMinutes / 60);
const minutes = totalMinutes % 60;
return { hours, minutes };
}
// {hours: 3, minutes: 20}
console.log(timeConverter1(200));
@Code-Blender-7
Code-Blender-7 / app.py
Last active January 2, 2023 03:20
Changing themes from the menu bar in PyQt5 GUI
# -*- coding: utf-8 -*-
# @Author: Climax
# @Date: 2022-08-08 10:30:23
# @Last Modified by: Climax
# @Last Modified time: 2022-08-08 14:20:54
import sys
from PyQt5.QtWidgets import (QMainWindow, QApplication, QToolBar, QAction)
@Code-Blender-7
Code-Blender-7 / index.html
Last active July 27, 2022 08:26
Creating a JS script that can restructure values of restcountries.com API effectively
<!DOCTYLE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo for extracting info from restcountries v3.1</title>
<script defer src="script.js"></script>
</head>
<body style="background-color:grey"> <!-- changed the background because some nations have their flags in white -->