Kolorwanie:
Status:
123456789101112131415161718192021
#include "stdafx.h"
#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <cmath>
#include <list>
using namespace std;
struct kula
{
	double r;
	kula(){ r = 1; }
	kula(double q){ r = q; }
	operator double()
	{
		return r;
	}
};
class Gen
{

Kolorwanie:
Status:
123456789101112131415161718192021
a = input(" Podaj a: "); 
b = input(" Podaj b: "); 
c = input(" Podaj c: ");


delta = b*b-(4*a*c);1
if(delta<0) then disp("brak delty");
else if(delta==0) then
    x0 = -b/(2*a);
    disp("delta = 0");
    disp(x0,"x0 = ");
    x=linspace(x0-3,x0+3,10);
    
    else 
       disp(delta,"delta = ");
       x1 = (-b-sqrt(delta))/(2*a);
       x2 = (-b+sqrt(delta))/(2*a);
       disp (x1,"x1 = ");
       disp (x2,"x2 = 3");
       x=linspace(x1-3,x2+3,15);

Kolorwanie:
Status:
123456789101112131415161718192021
 #include <iostream>
    #include <string>
    #include<fstream>
     
     
    using namespace std;
     
    class punkt
    {
      float t[2];
     
    public:
       
     
      float& operator[](int i)
      {
        if(i <0 && i !=1) throw string("Blad indeksowania");
        return t[i];
      }
      const float& operator[](int i) const

qweqwe

Kolorwanie:
Status:
123456789101112131415161718192021
#include <iostream>
#include "mpi.h"
#include <ctime>
#include <stdlib.h>

using namespace std;

double max(const double &a, const double &b) {
    return (a>b)?a:b;
}



int main(int argc, char **argv)
{

    int size, rank, maxRank, maxAll;
    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    MPI_Comm_size(MPI_COMM_WORLD, &size);

Kolorwanie:
Status:
123456789101112131415161718192021
// LABORATORIUM 1 - ZADANIE 1
#include <mpi.h>
#include <iostream>
 
using namespace std;
 
int main (int argc, char * argv[])
{
int size;
int rank;
int wartosc;
 
MPI_Init (&argc, &argv); // inicjalizacja MPI
 
MPI_Comm_size (MPI_COMM_WORLD, &size); // pobiera do size ilosc wszystkich procesow
MPI_Comm_rank (MPI_COMM_WORLD, &rank); // pobiera do rank ilosc aktualnego procesu
if (rank == 0) // dla procesu zerowego
{
	cout << "Podaj wartosc do pobrania  ";
cin >> wartosc;

Kolorwanie:
Status:
123456789101112131415161718192021
a = input(" Podaj a: "); 
b = input(" Podaj b: "); 
c = input(" Podaj c: ");


delta = b*b-(4*a*c);1
if(delta<0) then disp("brak delty");
else if(delta==0) then
    x0 = -b/(2*a);
    disp("delta = 0");
    disp(x0,"x0 = ");
    x=linspace(x0-3,x0+3,10);
    
    else 
       disp(delta,"delta = ");
       x1 = (-b-sqrt(delta))/(2*a);
       x2 = (-b+sqrt(delta))/(2*a);
       disp (x1,"x1 = ");
       disp (x2,"x2 = 3");
       x=linspace(x1-3,x2+3,15);

bazyk

Kolorwanie:
Status:
123456789101112131415161718192021
Wszystkie zadania jakie do tej pory znalazłem do kolosa II.

KOLOKWIUM: KONTRAHENT:
1. CREATE OR REPLACE VIEW AKTORKI AS select * from aktorzy where plec='k';
2. dodanie Aktorki jest nie możliwe ponieważ nie mamy takich uprawnień
tu jak coś zapytanie
insert into AKTORKI values('MALY','MALUTKI','K',sysdate,sysdate-30,'PL','T'); 

3. create table KONTRAHENT 
(PESEL varchar(11) constraint kon_pes_pk PRIMARY KEY , 
ADRES VARCHAR2(100), 
WIEK numeric(2), 
WSPOLPRACA_OD date,
DZIAŁ numeric(2) constraint kon_dzi_ref references dziely(ID_DZIALU));
alter table KONTRAHENT add constraint kon_pes_ch check (length(pesel)=11);
4. insert into KONTRAHENT values('12345678901','dom',21,sysdate,10); 
insert into KONTRAHENT   values('12345678901','mieszkanie',29,sysdate-2,20);

5.  insert into PRACOWNICY values (1101,'KRÓL','PREZES',8901,sysdate-100,null,4000,2000,null,10); 
alter table PRACOWNICY modify(NAZWISKO constraint pra_naz_un UNIQUE);

rejestratordzwieku1234

Kolorwanie:
Status:
function varargout = Lab5(varargin)
% LAB5 M-file for Lab5.fig
%      LAB5, by itself, creates a new LAB5 or raises the existing
%      singleton*.
%
%      H = LAB5 returns the handle to a new LAB5 or the handle to
%      the existing singleton*.
%
%      LAB5('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in LAB5.M with the given input arguments.
%
%      LAB5('Property','Value',...) creates a new LAB5 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Lab5_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Lab5_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Lab5

% Last Modified by GUIDE v2.5 18-Nov-2014 14:23:45

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Lab5_OpeningFcn, ...
                   'gui_OutputFcn',  @Lab5_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before Lab5 is made visible.
function Lab5_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Lab5 (see VARARGIN)

% Choose default command line output for Lab5
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Lab5 wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = Lab5_OutputFcn(hObject, eventdata, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;



% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
global ls;
ls=10;
global fs ;
fs = 8000;
global kanaly ;
kanaly = 1;
global bity;
bity = 8;
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called



% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
global dzwiek;
global ls;
global fs;
global kanaly;
global bity;
dzwiek = wavrecord(ls * fs, fs, kanaly, bity);
axes(handles.axes1);
plot(dzwiek);
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
global dzwiek;
global fs;
axes(handles.axes1);
plot(dzwiek);
wavplay(dzwiek,fs);
plot(t,x,t1,x1,'o');
plot(t,x,t1,x1);

% hObject    handle to pushbutton7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
f=10;
fs=1000;
ts=1/fs;
t=-1:ts:1;
x=sin(2*pi*f*t);
axes(handles.axes1);
plot(t,x);

% hObject    handle to pushbutton8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
fs =1000;
ts = 1/fs;
t=0:ts:10;
A=[100,20,3,2,1];
f=[10,50,150,200,480]';
fi=[0,-0.3,0.35,0.81,-0.5]';
x = A*sin(2*pi*f*t+fi*ones(1,length(t)));

axes(handles.axes1);
plot(t,x);

wavplay(x);
% hObject    handle to pushbutton9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
fs =50;
ts = 1/fs;
t=0:ts:10;
A=[100,20,3,2,1];
f=[10,50,150,200,480]';
fi=[0,-0.3,0.35,0.81,-0.5]';
x = A*sin(2*pi*f*t+fi*ones(1,length(t)));

axes(handles.axes1);
plot(t,x);

wavplay(x);
% hObject    handle to pushbutton10 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)






Kolorwanie:
Status:
123
http://ifotos.pl/zobacz/Beztytulu_wrpphre.jpg
http://ifotos.pl/zobacz/Beztytulu_wrpphrs.jpg

Całka Gaussa

Kolorwanie:
Status:
123456789101112131415161718192021
#include <iostream>
#include <cmath>
using namespace std;


double f(double x, double y)
{
  return x;
}


double metKubGaussa()
{
  unsigned n = 1;
  double Jak, calka, sum;
  double x[3] = {0,2,0}; 
  double y[3] = {0,0,2};
  double ksi[3] = {1.0/3,0,0};
  double eta[3] = {1.0/3,0,0};
  double w[3] = {1,0,0};


Copyrights 2014-2018 © Wklejaj.pl Wszelkie prawa zastrzeżone.