Sekai 🌐 🗺

Sekai (世界) is the kanji for “the world”. That’s a great word because of the scale that it designates.

Exponential Function Series Definition

An alternative definition of the exponential function through infinite series

Motivation My previous post about the definition of the exponential function has provided no connection between a well-known characterization (or an alternative definition) of the exponential function: $$\exp(s) = \lim_{n\to\infty} \sum_{k=1}^n \frac{s^k}{k!}.$$ The term to be summed is simpler than the one in the binomial expansion of $(1 + s / n)^n$. Solution We want this sum to be as small as possible as $n \to \infty$. $$\sum_{k=2}^n \left( 1 - \frac{n \cdot \dots \cdot (n + 1 - k)} {\underbrace{n \cdot \dots \cdot n}_{n^k}} \right) \, \frac{x^k}{k! [Read More]

Start Oracle From Git Bash

Goal To run Oracle SQL in Git Bash. Assumption You have sqlplus added to your PATH. export PATH=${PATH}:/c/oraclexe/app/oracle/product/11.2.0/server/bin/ Problem The option /nolog doesn’t work as expected. $ sqlplus /nolog SQL*Plus: Release Production on Mer. Juin 7 09:43:47 2023 Copyright (c) 1982, 2014, Oracle. All rights reserved. … When SQL*Plus starts, and after CONNECT commands, the site profile (e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile (e.g. login.sql in the working directory) are run. [Read More]

Closer Look into ArrayList Iterator

Background Given an ArrayList of Integers from 0 (inclusive) to 10 (exclusive) with step size 1. We use a while-loop and an Iterator<Integer> to check if this ArrayList hasNext() element, before we remove() the current element. Problem The code below throws an IllegalStateException. import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class UnderstandArrayListIterator { public static void main(String[] args) { List<Integer> a = new ArrayList<>(); for (int i = 0; i < 10; i++) { a. [Read More]

Notes du Jour

Plus importante que les techno

Dans le classique schéma pour la gestion du projet, on met le besoin du client d’abord. C’est important de l’entendre avant de commencer le traf. Sinon, on risque de perdre des heures (ou pire des jours) sur une chose que le client ne valide pas. Avant d’y mettre l’effort, il est bon de lui montrer idée générale et de lui demander un avis, afin d’éviter de lui délivrer un produit qu’il ne veut pas. [Read More]

Passed Codingame Java Certification Test

A note to some forgotten methods

String regex replace using capture groups

Since Java SE 9, java.util.regex.Matcher’s replaceAll() method supports lambda expressions.

// import java.util.regex.*;
String varName = "random_string";
Pattern pattern = Pattern.compile("_([a-z])");
Matcher matcher = pattern.matcher(varName);
String result = matcher.replaceAll(m ->;

Source: Arvind Kumar Avinash’s answer on Stack Overflow

Check characters properties using Character’s static methods

The Character class provides some static predicates like

  • isAlphabetic(char c)
  • isDigit(char c)
  • isLowerCase(char c)

Source: Java Character isAlphabetic() Method on Javapoint

Fixed Archetype Error for This Site

Background In Customized Archetype for This Site, I was using {{ slicestr .Name 11 | humanize | title }} in the title attribute in my site’s archetypes/, so that the first 11 characters (YYYY-MM-DD-) would be taken out if I type this command. $ hugo new post/$(date -I)-<MY_POST_TITLE>.md In practice, <MY_POST_TITLE> can be replaced to any title, like my-post-title. Problem I wanted to create my IntelliJ cheatsheet, so I typed this command. [Read More]

Exploration of My First IntelliJ Project

We’ll try to stay in the project root if possible. Find all non-hidden files to know the file structure. $ find -path './.*' -prune -o -type f -print ./Algo-init.iml ./out/production/Algo-init/fr/eql/ai114/algo/init/demo/_1_HelloWorld.class ./src/fr/eql/ai114/algo/init/demo/ -prune returns true for the chosen path and prevents find from descending. -o means OR, so the paths matching -prune won’t pass through -o. -type f selects files, not folders. By default, AND is used to connect different conditions. [Read More]