Nice Data Systems

Généralistes en informatique

Publications

An htmx file download extension
Martin Mohnhaupt
Domaine : Informatique

2024

I develop single page web applications using Python and Flask with as little JavaScript as possible. This is why I use the htmx.js (https://htmx.org/) library to add useful functionality to my HTML code.

Since my apps may generate reports (Excel, PDF, etc…), I searched how to do this in a simple way, without destroying my SPA page in case of failure and with no JavaScript.

https://medium.com/@martin.mohnhaupt/an-htmx-file-download-extension-cccfaba5e2e2

HTMX: hx-trigger for a change event in a child element
Martin Mohnhaupt
Domaine : Informatique

2024

Réponse à une question posée sur Stack Overflow :

I use htmx together with the Django forms library. I want the <tr> to act like a form.
I tried to find a way to tell hx-trigger to listen for the change event of the <select>.

How to tell htmx to submit the data as soon as the select was changed?

Background: This is a Relayrace and each leg will be a row in the table.

https://stackoverflow.com/questions/65655484/htmx-hx-trigger-for-a-change-event-in-a-child-element/78358067#78358067

Two ways to build HTML dialogs using HTMX and HyperScript
Martin Mohnhaupt
Domaine : Informatique

2024

We develop web applications mainly using Flask, Python and Bootstrap.

To perform operations on the DOM tree in single page applications, we like to use HTMX and HyperScript and limit the usage of pure JavaScript.

Many articles explain how to build dialogs using for example Bootstrap and launch them via JavaScript. On the other hand, HTML provides a <dialog/> element which is designed to provide a dialog (modal or non-modal) to a user interface.

In this article, We’ll show how to build dialogs using two different methods, both utilizing the native <dialog/> element in conjunction with HTMX and HyperScript to augment the web application user interface, with no explicit JavaScript.

The first method implements and shows a predefined dialog, initiated by a browser action. The second one generates and shows a dialog in the browser, initiated by the server via a an event sent to the browser.

Server initiated dialogs are very useful when, during a server processing operation, more information from the user is needed (e.g. a confirmation).

https://medium.com/@martin.mohnhaupt/two-ways-to-build-html-dialogs-using-htmx-and-hyperscript-5f5eefb13c4c

Wait until a condition is true?
Martin Mohnhaupt
Domaine : Informatique

2013

Réponse à une question posée sur Stack Overflow :

I'm using navigator.geolocation.watchPosition in JavaScript, and I want a way to deal with the possibility that the user might submit a form relying on location before watchPosition has found its location.

Ideally the user would see a 'Waiting for location' message periodically until the location was obtained, then the form would submit.

However, I'm not sure how to implement this in JavaScript given its lack of a wait function.

https://stackoverflow.com/questions/7193238/wait-until-a-condition-is-true/14811679#14811679

Light-induced valence-state switching in BaFCl:La and SrFCl:La
Matsarski, Marie; Lovy, Dominique; Bill, Hans; Mohnhaupt, Martin Klaus
Domaine : Chimie

2003 | Physical review. B, Condensed matter and materials physics, vol. 68, no. 20, 205113

A tetragonal La[2+] center (symmetry C[4v]) was identified in single crystals of BaFCl and SrFCl doped with lanthanum with the aid of electron paramagnetic resonance (EPR)/electron-nuclear double resonance (ENDOR). This center forms a donor-acceptor couple with initially present F(F-) centers.
Switching takes place by illumination of appropriate wavelength. The kinetics of the process was monitored by EPR as La[2+] and the unswitched F center are paramagnetic.
The results of our experimental investigation of this kinetics are presented. A foregoing spectroscopic characterization of the La[2+] center allowed one to identify a d-d (the B[1]-E) transition, a charge-transfer band (for BaFCl at 10 940 cm[-1] and at 17 890 cm[-1], respectively) and to obtain a value of 710 cm[-1] for the spin-orbit coupling constant in the ground state.
In order to narrow the choice of possible acceptor-donor partners a detailed EPR/optical search was further done to identify a number of lattice defects and oxygen centers—in addition to a La-oxygen molecular structure.

https://archive-ouverte.unige.ch/unige:3512

Modèle dendroclimatique établi à partir de chênes du piémont jurassien suisse
Orcel, Alain; Orcel, Christian; Favre, Alain; Mohnhaupt, Martin; Hurni, Jean Pierre
Domaine : Dendrochronologie

1990 | Rapport d’activité. Fonds National Suisse de la Recherche Scientifique, Berne. Requête n° 10-2359.88.

Modèle dendroclimatique établi à partir de chênes du piémont jurassien suisse

https://lrd.ch/publications/

A vibrational study of some 1,2,4-Trioxanes
Mohnhaupt, Martin Klaus;Hagemann, Hans-Rudolf; Perler, Jean-Pascal; Bill, Hans; Boukouvalas, John; Rossier, Jean-Claude; Jefford, Charles
Domaine : Chimie

1988 | Helvetica chimica acta, vol. 71, no. 5, p. 992-999

The vibrational spectra of some 1,2,4-trioxanes present two characteristic bands at 790 and 880 cm-1.
On the basis of 18O-isotopic substitution and comparison with analogous compounds, these bands have been assigned to coupled CO and OO stretching modes of the COO element.

https://archive-ouverte.unige.ch/unige:3079

Efficient conditions for the growth of MoO3 single crystals under oxygen atomsphere
Mohnhaupt, Martin Klaus
Domaine : Chimie

1987 | Crystal research and technology, vol. 22, no. 1, p. 3-7

Single crystals of MoO3 have been grown under an oxygen atmosphere using a horizontal tubular furnace. The temperature and pressure necessary to grow satisfactory crystals in oxygen along [100] and [010] directions are determined.

https://archive-ouverte.unige.ch/unige:3088

Asymmetric induction in Diels-Alder reactions to acrylates derived from chiral sec-alcohols. Preliminary communication.
Von Oppolzer, Wolfgang; Kurth, Mark; Reichlin, Daniel; Chapuis, Christian; Mohnhaupt, Martin Klaus; Moffatt, Frank Sutor
Domaine : Chimie

1981 | Helvetica chimica acta, vol. 64, no. 8, p. 2802-2807

Starting from the enantiomerically pure monoterpenes (+)-pulegone (3), (+)-limonene (7), (−)-β-pinene (9), (+)- and (−)-camphor (13) or (+)-cholestenone (11) the chiral alcohols 4, 5, 6, 8, 10, 12, 14, 15, 16, 17 et 18 were prepared; their acrylates II underwent a TiCl4-promoted Diels-Alder addition to cyclopentadiene (Scheme 3, Table) giving in a predictable manner either the (2R)- or the (2S)-adducts III with 63 to 88% asymmetric induction.

https://archive-ouverte.unige.ch/unige:169144