How to Create an Icon (.ico)
-
Create an icon.

-
Prepare seven PNG images of sizes
16,24,32,48,64,128, and256.
-
Create an icon using the
convertcommand.
convert *.png favicon.ico
Create an icon.

Prepare seven PNG images of sizes 16, 24, 32, 48, 64, 128, and 256.

Create an icon using the convert command.
convert *.png favicon.ico
mkdir test-electron-app
cd test-electron-app
npm init -y
npm i --save-dev electron
const { app, BrowserWindow } = require("electron")
const path = require("path")
function createWindow() {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, "preload.js")
}
})
win.loadFile("index.html")
}
app.whenReady().then(() => {
createWindow()
app.on("activate", () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit()
}
})
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body style="background: white;">
<h1>Hello World!</h1>
<p>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</body>
</html>
Replace the scripts section.
"scripts": {
"start": "electron ."
}
npm start
Plotting lines with Chart.js
This is a program that returns 3 as an example.
First, write the source code in C.
// three.c
#include <ruby.h>
static VALUE int_three(void){
return INT2NUM(3);
}
void Init_three(void){
rb_define_singleton_method(rb_cInteger, "three", int_three, 0);
}
Create a script to create a Makefile.
# extcof.rb
require 'mkmf'
create_makfile "three"
Make
$ make
Write a Ruby script to call the created program.
# main.rb
require "./three"
p Integer.three
Run
$ ruby main.rb
3
// gcd.c
int gcd(int a, int b){
return !b ? a : gcd(b, a % b);
}
// gcd.h
#ifndef TEST_H
#define TEST_H
int gcd(int a, int b);
#endif
#include <stdio.h>
#include "gcd.h"
int main(void){
printf("%d\n", gcd(24, 36));
}
gcc gcd.c -shared -o gcd.dll
gcc main.c -lgcd -L.
I tried creating realistic terrain in Unity.
Created based on satellite imagery and elevation data from the Geospatial Information Authority of Japan.

Next, I'd like to create Kyushu.
Last time, I tried soldering the etched PCB.
However, the circuit was wrong, so I remade the board.
-29dc812c795e6f4b2607fd71972b50f0.webp)
-874554613e61e77da9e4727d38fc1856.webp)
I made a printed circuit board for developing a homemade measuring instrument.
Print on plain paper with a laser printer, then place the printout on a copper board, wet it with water, and press the paper firmly. Next, apply a small amount of acetone and, from above a clear file, rub the toner onto the copper board with your fingernail to transfer it with acetone. The first time, I used too much acetone and failed. It's just right when it's soaked throughout. I used 100% acetone nail polish remover.
-212129d90014b791bd3ed984f6924d7a.webp)
Wash and rub with water to remove the paper.
Pour the etching solution into a suitable container and warm the solution to body temperature using a freezer bag filled with hot water for etching. Around 40 to 45℃ seems to be good, but I didn't use a thermometer as it would rust, so I just estimated. Visually confirm that the copper in the unmasked areas has dissolved, then stop etching.
-ff4ba222c43dea2ac8091396141720b3.webp)
Dissolve the parts masked with toner or permanent marker using acetone. This leaves only the copper in the masked areas, creating the circuit.
-783f089692af11e938b10fb9b942a75b.webp)
I drilled holes and soldered to make a small circuit. It was easier to solder by applying it as if laying it on top of the copper.
-ce5853d1c67cfa52d0dff6bf0e0c2f0e.webp)