Skip to content

xaliphostes/course-stress-inv-3

Repository files navigation

Courses on stress inversion

Provide 4 ways of programming stress inversion:

  • using JavaScript and procedural programming (~80 lines of code)
  • using Python, procedural programming and object oriented programming (150-200 lines of code)
  • using TypeScript, object oriented and procedural programming (~330 lines of code)
  • in the browser using index.html

Folder inversion contains the same classes as in invert-class.py, but split the code into multiple files, and introduces the notion of data factory.

Installation

Running

In Python

Directly from PyCharm by selecting either invert-function.py or invert-class.py.

In JavaScript (using node)

node invert.js

In TypeScript (using deno).

deno run invert.ts

Deno will ask you the permission to read the two files from your folder, and will display:

⚠️  Deno requests read access to "matelles-joints.txt".
├ Requested by `Deno.readFileSync()` API.
├ Run again with --allow-read to bypass this prompt.
└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions) >

To bypass this prompt, prefer to use --allow-read:

deno run --allow-read invert.ts 

Running in the browser

The index.html file embeds JavaScript code to represent the cost domain, including both the code and data from Les Matelles.


Simply click here to display the cost domain.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published