https://fmi.rust-lang.bg/tasks/3
- Копирайте
main.rs
в проекта. - Сменете импортите.
- Дефинирайте метод
pub fn apply(&self, x: f64) -> f64
вPolynomial
. - Сложете
lodepng
към зависимостите вCargo.toml
.
#pragma once | |
#include <initguid.h> | |
#include <windows.h> | |
#include <vector> | |
#include "../sdk/Include/ICTLEDMgr.h" | |
#include "../sdk/Include/CLSID_CCTLEDMgr.h" | |
#include "../sdk/Include/CTIntrfc_DynamicLoad.h" | |
#include "../sdk/Include/CTLEDCommon.h" |
https://fmi.rust-lang.bg/tasks/3
main.rs
в проекта.pub fn apply(&self, x: f64) -> f64
в Polynomial
.lodepng
към зависимостите в Cargo.toml
.module Enumerable | |
def sort_like(template) | |
sort_by.with_index do |element, index| | |
key = block_given? ? yield(element) : element | |
[template.index(key) || template.size + index + 1, key] | |
end | |
end | |
end |
function parse(request) | |
local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP") | |
if not method then | |
_, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP") | |
end | |
local _GET = {} | |
if vars then | |
for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do | |
_GET[k] = v |
RSpec::Support.require_rspec_core 'formatters/base_text_formatter' | |
class RspecFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
RSpec::Core::Formatters.register self, :start, | |
:stop, | |
:example_group_started, | |
:example_group_finished, | |
:example_passed, | |
:example_failed, | |
:example_pending |
#!/usr/bin/env bash | |
apt-get -y update | |
# Install some tools | |
apt-get -y install git vim aspell | |
git config --global credential.helper 'cache --timeout=3600' | |
echo -e "\nexport EDITOR=vim\n" >> /home/vagrant/.bashrc |
require 'v8' | |
V8::C::HandleScope() do | |
template = V8::C::ObjectTemplate.New() | |
context = V8::C::Context.New(nil, template) | |
context.Enter | |
p V8::C::Object.New() | |
end |
create | |
(p1:Person {name: 'Бригадир Цветков', age: 24, gender: 'm'}), | |
(p2:Person {name: 'Букетка Градинарова', age: 26, gender: 'f'}), | |
(p3:Person {name: 'Вовеки Веков Иванов', age: 25, gender: 'm'}), | |
(p4:Person {name: 'Гъдьо Гъдев', age: 22, gender: 'm'}), | |
(p5:Person {name: 'Дар Донков', age: 27, gender: 'm'}), | |
(p6:Person {name: 'Кирка Градинарска', age: 29, gender: 'f'}), | |
(p7:Person {name: 'Кучо Кучев', age: 30, gender: 'm'}), | |
(p8:Person {name: 'Лимон Генов', age: 50, gender: 'm'}), | |
(p9:Person {name: 'Марулка Митева', age: 19, gender: 'f'}), |
data Bt a = Et | Ct a (Bt a) (Bt a) | |
instance Show a => Show (Bt a) where | |
show t = showTree 3 1 t | |
showTree :: (Show a) => Int -> Int -> Bt a -> String | |
showTree dx dy Et = "" | |
showTree dx dy (Ct root Et Et) = show root | |
showTree dx dy (Ct root left right) = centerRoot ++ "\n" ++ emptyLines dy ++ unlines subtreeLines |
v=0 | |
o=- 7518264307715983377 2 IN IP4 127.0.0.1 | |
s=- | |
t=0 0 | |
a=group:BUNDLE audio video | |
a=msid-semantic: WMS CCJALAcas2qVJgyxxWGmq2zKZNLF0XnQq2Gu | |
m=audio 39664 RTP/SAVPF 111 103 104 0 8 106 105 13 126 | |
c=IN IP4 192.168.1.117 | |
a=rtcp:1 IN IP4 0.0.0.0 | |
a=candidate:319969617 1 udp 2113937151 192.168.1.117 39664 typ host generation 0 |