This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Задача #1 | |
# Есть кусочно заданная линейная функция. Функция задаётся точками (x,y), которые соединяются прямыми. | |
# Необходимо получать значение этой функции при определённом значении x. | |
# Так же оценить сложность алгоритма вычисления значения функции в нотации О-большое. | |
# Реализация на любом удобном языке, без использования библиотек. | |
# | |
# Эта кусочно линейная функция заданная двумя точками | |
# Точки с одинаковым х переписывают друг друга | |
# Входящие точки: x=0,y=100 и x=10,y=122 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import webbrowser | |
# import subprocess | |
# from subprocess import Popen,CREATE_NEW_CONSOLE | |
import lxml.etree # python -m pip install lxml | |
import tkinter as tk | |
import tkinter.filedialog as fd | |
from tkinter import messagebox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I just changed someone else's function to fit my needs, but I don't remember where I got the code from. | |
FUNCTION float_to_str (pnum IN NUMBER, | |
pdot IN NUMBER := 2, | |
ost_mode IN NUMBER := NULL, | |
postfix IN VARCHAR2 := '') | |
RETURN VARCHAR2 | |
IS | |
dot NUMBER; | |
num NUMBER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE Procedure get_rows_from_first_table | |
IS | |
cursor c_clob is | |
select raw_content from first_table; | |
raw_content CLOB; | |
procedure read_lines | |
(p_clob in out nocopy CLOB) is | |
offset number := 1; | |
amount number := 32767; | |
len number := dbms_lob.getlength(p_clob); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const Singleton = (function() { | |
// var _instance; | |
// function init() { | |
// var privateProperty = "private " + Math.floor(Math.random() * 100); | |
// function privateMethod() { | |
// console.log(privateProperty); | |
// } | |
// return { | |
// publicProperty: "public " + Math.floor(Math.random() * 100), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getZeroesOfFactorial = function (n) { | |
var number_of_2 = 0; | |
var number_of_5 = 0; | |
var number_of_zeroes_of_factorial = 0; | |
for (var i = 2; i <= n; i++) { | |
var currentValue = i; | |
console.log(i); | |
while (currentValue >= 5) { | |
if (currentValue % 5 == 0) { |