Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NumworksCalculator@claudiux] Numworks Calculator Simulator #6498

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NumworksCalculator@claudiux/CHANGELOG.md
1 change: 1 addition & 0 deletions NumworksCalculator@claudiux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### 20241014
* Version 23.2.1 of the simulator.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Numworks Calculator

This applet opens locally the Numworks Calculator Simulator. It use Firefox to do that.

All rights reserved. NumWorks is a registered trademark.

Web site: [https://www.numworks.com/](https://www.numworks.com/)

Numworks project on Github: [https://github.com/numworks](https://github.com/numworks)

**Warning: When you close the simulator window, you lose your work.**
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Applet = imports.ui.applet;
const Util = imports.misc.util;
const GLib = imports.gi.GLib;

const UUID = "NumworksCalculator@claudiux";
const SIM_PATH = GLib.get_home_dir() + "/.local/share/cinnamon/applets/"+UUID+"/simulator/simulator.html";

class NumworksApplet extends Applet.IconApplet {
constructor(metadata, orientation, panel_height, instance_id) {
super(orientation, panel_height, instance_id);

this.instanceId = instance_id;
this.orientation = orientation;

this.setAllowedLayout(Applet.AllowedLayout.BOTH);

this.set_applet_icon_name("numworks");

}

on_applet_clicked(event) {
Util.spawnCommandLineAsync("firefox --private-window "+SIM_PATH);
}

}

function main(metadata, orientation, panel_height, instance_id) {
return new NumworksApplet(metadata, orientation, panel_height, instance_id);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"description": "Numworks Calculator Simulator. All rights reserved. NumWorks is a registered trademark.",
"uuid": "NumworksCalculator@claudiux",
"name": "Numworks Calculator",
"version": "23.2.1",
"max-instances": -1,
"website": "https://github.com/numworks",
"author": "claudiux"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# NUMWORKS CALCULATOR
# This file is put in the public domain.
# claudiux, 2016
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: NumworksCalculator@claudiux 23.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
"issues\n"
"POT-Creation-Date: 2024-10-14 03:47+0200\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. metadata.json->description
msgid ""
"Numworks Calculator Simulator. All rights reserved. NumWorks is a registered "
"trademark."
msgstr ""

#. metadata.json->name
msgid "Numworks Calculator"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# NUMWORKS CALCULATOR
# This file is put in the public domain.
# claudiux, 2016
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: NumworksCalculator@claudiux 23.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
"issues\n"
"POT-Creation-Date: 2024-10-14 03:47+0200\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"

#. metadata.json->description
msgid ""
"Numworks Calculator Simulator. All rights reserved. NumWorks is a registered "
"trademark."
msgstr ""
"Simulateur de Calculatrice Numworks. Tous droits réservés. Numworks est une "
"marque déposée."

#. metadata.json->name
msgid "Numworks Calculator"
msgstr "Calculatrice Numworks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from math import sqrt
def estpremier(n):
if n<2:
return False

if n == 2: # 2 est premier
return True

if n%2 == 0: # un nombre pair autre que 2 n'est pas premier
return False

p = 3
rac_n = sqrt(n) # racine carree positive de n

while p <= rac_n :
if n%p == 0 : # si n est divisible par p, alors il n'est pas premier.
print (n, "est divisible par", p)
return False
p += 2 # p devient le nombre impair suivant

return True


n=int(input("Test de primalite de ? "))
print(estpremier(n))
Loading