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
ORG 0 | |
; MOV R0,#10h | |
; MOV R1,#18h | |
; MOV R2,#4 | |
MOV R0,#10h | |
MOV DPTR,#8000h |
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
3.1. (EMPLOYEES, DEPARTMENTS) Nazw działów (department_name), nazwisk (last_name) oraz płac (salary) pracowników, którzy zarabiają ponad 12000, posortowane od najlepiej do najgorzej zarabiających (6 wyników): | |
a) bez wykorzystania polecenia JOIN | |
b) z wykorzystaniem polecenia JOIN | |
3.2. (EMPLOYEES, DEPARTMENTS, LOCATIONS) Nazwisk pracowników (last_name), nazw ich działów (department_name) i miast (city), w których pracują (106 wyników): | |
a) bez wykorzystania polecenia JOIN | |
b) z wykorzystaniem polecenia JOIN | |
3.3. (DEPARTMENTS, EMPLOYEES) Nazw działów (department_name) i ilości pracowników, którzy w nich pracują (11 wyników). |
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
\documentclass[wide,a4paper,titlepage,12pt]{mwart} | |
\usepackage{polski,graphicx,pdflscape} | |
\usepackage[utf8]{inputenc} | |
\usepackage{listings} | |
\title{Projekt i symulacja działania serwerownii} | |
\author{Jacek Wieczorek\\Marcin Lubimow\\Piotr Pałka} | |
% Title page layout (fold) |
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
/******************************************************************************* | |
* * | |
* ALGORYTM DIJKSTRY wyznaczania najkrotszej sciezki od * | |
* danego wierzcholka do wszystkich pozostalych w grafie skierowanym * | |
* o nieujemnych wagach * | |
* algorytm.org * | |
* (wersja zmodyfikowana przez "Sinus32" w celu * | |
* przystosowania do standardu jêzyka C++) * | |
* * | |
********************************************************************************/ |
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
WR_CMD EQU 0FF2CH | |
WR_DATA EQU 0FF2DH | |
RD_STATUS EQU 0FF2EH | |
RD_DATA EQU 0FF2FH | |
ORG 0 | |
START: | |
call LCD_INIT |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <math.h> | |
int main() { | |
float in, ulamek; | |
uint64_t denominator = 1, numerator, sign; |
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
uint64_t float_to_rational(float a){ | |
uint64_t result, r_denominator = 1, r_numerator, r_sign; | |
float fraction = a - floor(a); | |
while(fraction > 0){ | |
fraction *= 10; | |
fraction = fraction - floor(fraction); | |
r_denominator *= 10; | |
} | |
r_numerator = (int)(a * r_denominator); |
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
jacbar@jacbar:~/aprog/ak_proj$ rspec spec | |
/home/jacbar/aprog/ak_proj/spec/rational_spec.rb:6: [BUG] unknown type 0x22 (0xc given) | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] | |
-- control frame ---------- | |
c:0024 p:---- s:0087 b:0087 l:000086 d:000086 CFUNC :initialize | |
c:0023 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC :new | |
c:0022 p:0017 s:0081 b:0081 l:002108 d:000080 BLOCK /home/jacbar/aprog/ak_proj/spec/rational_spec.rb:6 | |
c:0021 p:---- s:0079 b:0079 l:000078 d:000078 FINISH | |
c:0020 p:---- s:0077 b:0077 l:000076 d:000076 CFUNC :instance_eval |
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
10.times { | |
it "should be equal to float" do | |
a1,b1,a2,b2 = rand(100), rand(100), rand(100), rand(100) | |
a = RTest.new(0, a1, b1) | |
b = RTest.new(0, a2, b2) | |
(a+b).to_f.should == (1.0*a1/b1 + 1.0*a2/b2) | |
end | |
} | |
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
require 'spec_helper' | |
describe "Rational" do | |
it "should create new object" do | |
RTest.new(3).should_not be_equal nil | |
end | |
it "should be equal to inf" do | |
RTest.new(0, 3, 0).to_f.should == 1.0/00 |