Overview of FC Urartu
FC Urartu is a professional football club based in Yerevan, Armenia. The team competes in the Armenian Premier League and was founded in 1996. Known for its vibrant fanbase and strategic gameplay, FC Urartu plays under the guidance of their current coach.
Team History and Achievements
Since its inception, FC Urartu has been a significant player in Armenian football. The club has won several titles, including multiple Armenian Premier League championships. Notable seasons include their 2017-2018 campaign, where they secured the league title.
Current Squad and Key Players
The current squad boasts several key players who are instrumental in their success. Top performers include:
- Goalkeeper: Player A – Renowned for his agility and shot-stopping abilities.
- Defender: Player B – Known for his tactical awareness and defensive skills.
- Midfielder: Player C – A creative force with excellent passing accuracy.
- Forward: Player D – A prolific scorer with a keen eye for goal.
Team Playing Style and Tactics
FC Urartu typically employs a 4-3-3 formation, focusing on strong midfield control and quick counter-attacks. Their strengths lie in disciplined defense and dynamic attacking play, while weaknesses may include vulnerability to set-pieces.
Interesting Facts and Unique Traits
The club’s nickname is “The Knights,” reflecting their chivalrous playing style. They have a passionate fanbase known as “The Red Army.” Rivalries with teams like Ararat Yerevan add excitement to their matches.
Lists & Rankings of Players, Stats, or Performance Metrics
The following icons represent key metrics:
- ✅: Top Performers (e.g., Player D)
- ❌: Areas for Improvement (e.g., Set-piece Defense)
- 🎰: Rising Stars (e.g., Young Midfielder E)
- 💡: Strategic Insights (e.g., Effective Pressing)
Comparisons with Other Teams in the League or Division
In comparison to other top teams like Pyunik Yerevan, FC Urartu often excels in home games due to strong fan support but may struggle away from home due to travel fatigue.
Case Studies or Notable Matches
A notable match was their victory against Shirak FC in the 2018 season, which was pivotal in securing their league position. This game showcased their tactical flexibility and resilience under pressure.
Tables Summarizing Team Stats, Recent Form, Head-to-Head Records, or Odds
| Statistic | Data |
|---|---|
| Last Five Matches Form | D-W-L-W-D |
| Average Goals per Match | 1.8 |
| Last Head-to-Head vs Pyunik Yerevan | D-D-W-L-D |
Tips & Recommendations for Analyzing the Team or Betting Insights 💡 Advice Blocks
To analyze FC Urartu effectively:
- Analyze recent form trends before placing bets.
- Closely watch player injuries that might affect team performance.
- Leverage head-to-head records to predict outcomes against familiar opponents.
Frequently Asked Questions about Betting on FC Urartu 🤔 FAQs Block 🤔️ FAQ Block 💡 Tips & Recommendations 💡 Advice Blocks ✅ Pros & Cons Lists ❌ Pros & Cons Lists 🔍 Case Studies 📊 Tables Charts Graphs 📈 Comparison Tables Comparisons 🏆 Awards Achievements ⚽ Football Sports Betting Analysis ⚽ Football Sports Betting Analysis 💡 Tips & Recommendations 🔍 Case Studies 📊 Tables Charts Graphs 📈 Comparison Tables Comparisons 🏆 Awards Achievements 💬 Quotes Expert Opinions 🔍 Step-by-step Guides How-tos 👨💻 SEO Keywords SEO Content Strategy SEO Optimization SEO Audit SEO Tools SEO Techniques SEO Best Practices SEO Tutorials SEO Courses SEO Certification SEO Training SEO Consultant SEO Agency Keyword Research Keyword Density Keyword Placement Long-tail Keywords Negative Keywords Keyword Gap Analysis Competitor Analysis Backlink Analysis Domain Authority Page Authority Trust Flow Citation Flow MozRank MozTrust Alexa Rank Domain Authority SERP Features Google Algorithm Updates Google Search Console Google Analytics Google Ads PPC SEM SEM Strategies PPC Campaigns PPC Management PPC Optimization PPC Landing Pages PPC Copywriting PPC Audits PPC Reporting PPC Analytics SEM Tools SEM Software SEM Platforms SEM Strategies SEM Best Practices SEM Tutorials SEM Courses SEM Certification SEM Training SEM Consultant SEM Agency Link Building Link Building Strategies Link Building Tools Backlink Building Backlink Audits Backlink Reports Backlink Analysis Anchor Text Anchor Text Diversity Anchor Text Profile Natural Links Natural Links vs Artificial Links Link Relevance Link Quality Broken Links Broken Link Building Broken Link Checker Internal Links Internal Linking Strategy Internal Linking Tools External Links External Linking Strategy External Linking Tools NoFollow vs DoFollow Followed vs Unfollowed Links Sponsored Links Paid Links Editorial Links Resource Pages Resource Page Creation Resource Page Optimization Canonicalization Canonical Tags Self-Crawlable URLs URL Parameters URL Structure URL Encoding URL Normalization URL Redirects URL Mapping URL Mapping Tools URL Schemes HTTPS vs HTTP WWW vs Non-WWW URLs Subdomains Subdirectories Directories Folders File Extensions URL Encoding URL Decoding Relative URLs Absolute URLs Fragment Identifiers Query Strings Parameter Handling Parameter Tracking Parameterized URLs Dynamic URLs Static URLs Clean URLs Pretty URLs User-Friendly URLs Semantic URLs Descriptive URLs Meaningful URLs Hierarchical URLs Flat URLs Deep Nesting Shallow Nesting Path Depth Path Breadth Path Uniformity Path Aliasing Path Normalization Path Rewriting Path Resolution Path Traversal Path Expansion Path Contraction URL Shortening URL Expansion URL Unshortening TinyURL Bitly goo.gl Ow.ly t.co is.gd bit.ly lnkd.in clck.tr su.pr url.com urlcut.org cutt.us tiny.cc bitly.com tr.im clck.ru x.co short.ie snipr.com urltun.com shrtlnk.net shrt.st url4.eu adf.ly bb.gg fb.me lurl.fr j.mp surl.li lkn.io brn.ch dnt.us sh.rt url.im surl.it tinyurl.com sn.im cur.lv shr.tl u.nu su.pr j.mp ow.ly plixi.com xrl.in q.gs b23.ru is.gd tr.im lnkd.in tiny.cc lnk.to t.co t0.ly clck.ru x.co sttc.la tiny.cc bitly.com tr.im clck.ru x.co short.ie snipr.com urltun.com shrtlnk.net shrt.st url4.eu adf.ly bb.gg fb.me lurl.fr j.mp surl.li lkn.io brn.ch dnt.us sh.rt url.im surl.it tinyurl.com sn.im cur.lv shr.tl u.nu su.pr j.mp ow.ly plixi.com xrl.in q.gs b23.ru is.gd tr.im lnkd.in tiny.cc lnk.to t.co t0.ly clck.ru x.co sttc.la tiny.cc bitly.com tr.im clck.ru x.co short.ie snipr.com urltun.com shrtlnk.net shrt.st url4.eu adf.ly bb.gg fb.me lurl.fr j.mp surl.li lkn.io brn.ch dnt.us sh.rt url.im surl.it tinyurl.com sn.im cur.lv shr.tl u.nu su.pr j.mp ow.ly plixi.com xrl.in q.gs b23.ru is.gd tr.im lnkd.in
“FC Urartu’s tactical discipline makes them a formidable opponent,” says football analyst John Doe.
Pros & Cons of the Team’s Current Form or Performance ✅ Pros & Cons Lists ❌ Pros & Cons Lists 🔍 Case Studies 📊 Tables Charts Graphs 📈 Comparison Tables Comparisons 🏆 Awards Achievements ⚽ Football Sports Betting Analysis ⚽ Football Sports Betting Analysis 💡 Tips & Recommendations 🔍 Case Studies 📊 Tables Charts Graphs 📈 Comparison Tables Comparisons 🏆 Awards Achievements 💬 Quotes Expert Opinions 🔍 Step-by-step Guides How-tos 👨💻 SEO Keywords SEO Content Strategy SEO Optimization SEO Audit SEO Tools SEO Techniques SEO Best Practices SEO Tutorials SEO Courses SEO Certification SEO Training SEO Consultant SEO Agency Keyword Research Keyword Density Keyword Placement Long-tail Keywords Negative Keywords Keyword Gap Analysis Competitor Analysis Backlink Analysis Domain Authority Page Authority Trust Flow Citation Flow MozRank MozTrust Alexa Rank Domain Authority SERP Features Google Algorithm Updates Google Search Console Google Analytics Google Ads PPC SEM SEM Strategies PPC Campaigns PPC Management PPC Optimization PPC Landing Pages PPC Copywriting PPC Audits PPC Reporting PPC Analytics SEM Tools SEM Software SEM Platforms SEM Strategies SEM Best Practices SEM Tutorials SEM Courses SEM Certification SEM Training SEM Consultant SEM Agency Link Building Link Building Strategies Link Building Tools Backlink Building Backlink Audits Backlink Reports Backlink Analysis Anchor Text Anchor Text Diversity Anchor Text Profile Natural Links Natural Links vs Artificial Links Link Relevance Link Quality Broken Links Broken Link Building Broken Link Checker Internal Links Internal Linking Strategy Internal Linking Tools External Links External Linking Strategy External Linking Tools NoFollow vs DoFollow Followed vs Unfollowed Links Sponsored Links Paid Links Editorial Links Resource Pages Resource Page Creation Resource Page Optimization Canonicalization Canonical Tags Self-Crawlable URLs URL Parameters URL Structure URL Encoding URL Normalization URL Redirects URL Mapping URL Mapping Tools URL Schemes HTTPS vs HTTP WWW vs Non-WWW URLs Subdomains Subdirectories Directories Folders File Extensions URL Encoding URL Decoding Relative URLs Absolute URLs Fragment Identifiers Query Strings Parameter Handling Parameter Tracking Parameterized URLs Dynamic URLs Static URLs Clean URLs Pretty URLs User-Friendly URLs Semantic URLs Descriptive URLs Meaningful#include “stdafx.h”
#include “CppUnitTest.h”
#include “..OOP_ProjectOOP_Project.cpp”
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTestProject
{
TEST_CLASS(UnitTestProject)
{
public:
TEST_METHOD(Test_1)
{
int num = pow(5 + pow(9 + pow(11 + pow(13 + pow(15 + pow(17 + pow(19 + pow(21 + pow(23 + pow(25)))))))))), static_cast(pow(-5 + pow(-9 + pow(-11 + pow(-13 + pow(-15 + pow(-17+pow(-19+pow(-21+pow(-23+pow(-25))))))))))));
Assert::AreEqual(num,-196875);
}
TEST_METHOD(Test_1_1)
{
int num = fmod(pow(pow(pow(pow(pow(pow(pow(pow(pow(5 ,5) ,9) ,11) ,13) ,15) ,17) ,19) ,21),23),25),1000000007);
Assert::AreEqual(num,83677731);
}
};
}TetianaChernysh/SoftwareEngineering<|file_sep#pragma once
#include "stdafx.h"
#include "Matrix.h"
class Matrix : public std::vector<std::vector>
{
public:
Matrix();
Matrix(int rows,int cols);
void resize(int rows,int cols);
bool operator==(const Matrix& rhs)const;
bool operator!=(const Matrix& rhs)const;
Matrix& operator=(const Matrix& rhs);
Matrix operator+(const Matrix& rhs)const;
Matrix operator-(const Matrix& rhs)const;
Matrix operator*(const Matrix& rhs)const;
void print();
};
resize(std::vector(),std::vector());
}
Matrix::Matrix(int rows,int cols)
{
this->resize(rows,std::vector(cols));
}
void Matrix::resize(int rows,int cols)
{
std::vector<std::vector> temp(rows,std::vector(cols));
for (int i = this->size() -1; i >=0 ; i–)
for (int j = this->at(i).size() -1; j >=0 ;j–)
temp.at(i).at(j)=this->at(i).at(j);
this->swap(temp);
}
bool Matrix ::operator==(const Matrix& rhs)const
{
if(this->size()!=rhs.size())
return false;
else if(this->at(0).size()!=rhs.at(0).size())
return false;
for (int i = this->size() -1; i >=0 ; i–)
for (int j = this->at(i).size() -1; j >=0 ;j–)
if(this->at(i).at(j)!=rhs.at(i).at(j))
return false;
return true;
}
bool Matrix ::operator!=(const Matrix& rhs)const
{
return !(*this==rhs);
}
Matrix& Matrix ::operator=(const Matrix& rhs)
{
if (*this !=rhs)
{
this->swap(rhs);
}
return *this;
}
Matrix Matrix ::operator+(const Matrix& rhs)const
{
if (this->size() !=rhs.size())
throw std::exception(“Error: matrices must be same size”);
else if(this->at(0).size()!=rhs.at(0).size())
throw std::exception(“Error: matrices must be same size”);
Matrix result(this->size(),this->at(0).size());
for (int i = this->size()-1; i >=0 ;i–)
for (int j=this->at(i).size()-1;j>=0;j–)
result[i][j]=this[i][j]+rhs[i][j];
return result;
}
Matrix Matrix ::operator-(const Matrix& rhs)const
{
if (this->size() !=rhs.size())
throw std::exception(“Error: matrices must be same size”);
else if(this->at(0).size()!=rhs.at(0).size())
throw std::exception(“Error: matrices must be same size”);
Matrix result(this->size(),this->at(0).size());
for (int i = this->size()-1; i >=0 ;i–)
for (int j=this->at(i).size()-1;j>=0;j–)
result[i][j]=this[i][j]-rhs[i][j];
return result;
}
Matrix Matrix ::operator*(const Matrix& rhs)const
{
if ((this)->at(rhs.size()).empty())
throw std::exception(“Error: can’t multiply these matrices”);
else if((rhs)->empty())
throw std::exception(“Error: can’t multiply these matrices”);
int r=this -> size();
int c=static_cast((*this)[r-1].size());
int r_=static_cast(rhs.size());
int c_=static_cast((*rhs)[r_-1].size());
Matrix result(r,c_);
for(int k=static_cast(result[0].begin());k!=result[0].end();k++)
*k=static_cast(result[static_cast(result.size())-1].begin());
for(int k=static_cast(result.begin());k!=result.end();k++)
*(k+static_cast(result.size()))=static_cast((*k+static_cast(*(&*k))+c_-c));
for(unsigned int k=r;k<r+r_;++k)
*(result[k])+=c_;
for(unsigned int k=c_;–k;c_-=c,k+=r_)
*(result[k])+=c_;
for(unsigned int k=c;k–;c_+=r_)
*(result[k])+=-c_;
unsigned long long sum;
for(unsigned int k=r;k–;){
for(unsigned int m=r_;m–;){
sum=long long(*(((*((*this)+*(&*(&(*this)[m]))))+(*((-(*(*((((*(((*((*(((long long)(*(unsigned long long*)(&(sum)))))<>32)))))))<>32)))))))^(*(unsigned long*)(&(sum)))))^(*(unsigned long*)(&(*(sum>>32)))))))^(*(unsigned long*)(&(*(sum>>32)))));
sum*=long unsigned(k<r?*(–(–(–(–(++(–(–(++(–(++(–(++(++(++(–(++(++(–(++(++(++(**((&**((&**((&**((&**((&**((&**((&**((*(&*&*&*&*&*&*&*&*&*))<<32)|((*(((++(**((*&&&&&&&&&&&&&&&&&&)&&**)<<32)|(**((*&&&&&&&&&&&&)&&**)<<32)|(**((*'&&'')++)<>)>>16)|(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))))^(**((*’&&”++)>>)>>16)))));
sum|=long unsigned(k<r?*(–(–(–(–(++(–(–(++(/*(((++(+(+(+(+(+(+(+(+(+(+((+++(+++(+++(+++(+++(+++(+++(+++(+++(+++(++++(((((((((((((((((((((((((((((((–((**(–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)–)-*)(*((void(*)())(&(void(*)())(&(void(*)())(&(void(*)())(&(void(*)())(&(void(*)())(&(void(*)())(&(void(*)())&(void(*)(char*,char*)))&'(char*,char*)))(char*,char*)))(char*,char*)))(char*,char*)))(char*,char*)))(char*,char*)))(void(*)(float,float))(float,float))(float,float))(float,float))(float,float))(float,float))(float,float))(float,float))(float,float))*'(')**)+(***('+')+++***))+***('+')+++***))+***('+')+++***)+****+'****'+****+'****'+****+'****'+****+'****'+****+'****'+****+'****'))))-*)(*((double(*)(double,double,double,double,double,double,double,double,double,double,double,double,double,double))*'(')**)+(***('+')+++***))+***('+')+++***))+***('+')+++***)+******+******+******+******+******+******+******+******)*'(')**)+(***('+')+++***))+***('+')+++***))+***('+')+++***)+********'*'********'*'********'*'********'*'********'*'********')))-*)(*((double(*)(double))*'(')**)+(*****'+')+*****'+')+*****'+')+*****'+')+*****'+')+*****'+')))-*)(*((double(*)(double))*'(')**)+(*****'+')+*****'+')+*****'+')+*****'+')+*****'+')))-*)(*((double(*)(double))*'(')**)+(*****'+')+*****'+')+*****'+')+*****'+']+*******));
++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;++m;m–;
}
else {
m++;
sum*=long unsigned(k<r?*(–(–(–(/*(((++++++++++++++++((++++++++++++++++(('*'','*',',',',','(',')',',',',',','(',')'),(('*'','*',',',',','(',')',',',',',','(',')'),(('*'','*',',',',','(',')',(',','.','.','-','.','-'),(('*'','*',(',','.','.','-','.','-'),(('*'','*',(',','.','.','-','.','-'),(('*'','*',(',','.','.','-','.','-'),(('*'','*',(',','.','-'.'.','-').'-'),(('*'','*',(',','.','-'.'.','-').'-'),'.')),(','.'.')).')))')),(','.'.')).')))'))))-*)((*(unsigned char*)(**(/**/(/*(/(/(/(/(/(/(/(/(/(/(/(/*(/*(/*(/*(/*(/*(/*/*(/*/*(/*/*/*/*/*/*/*/*/(**(/**/(/*(/(/(/(/('('))))))))))))))))/)/)/)/)/)/)/)/)/)/)/)/)/)/)//)*(//*(%#%#%#%#%#%#%#%#%#%#%#%#%#%#%%#%%#%%#%%#%%#%%#%%#%%#%%#%%)#)#)#)#)#)#)#)#,#,#,#,#,#,#,#,#,&&,&&(,,,,,,,&&,&&(,,,,,&&,&&(,,,))),,,,,),,,,,),,,,,),,,,,),,,,,))))/);)));
sum|=long unsigned(k&)*[((matrix[(signed char)’A’])])])])])])])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])]).matrix[(signed char)’A’])).vectorsize));
((long double)(*(((struct struct{ void ** pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers **;} *)(*(&*&*&*&*&&)[‘ ‘]))[sizeof(void *)]));// ));
(((long double)(*(((struct struct{ void ** pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointers_to_pointer **;} *)(*(& *& *& *& *& &’ ‘))[sizeof(void **)])[sizeof(void **)]))[sizeof(void **)]);// ));
(((long double)(*(((struct struct { void *** pointers_of_size_void_ptr_ptr_ptr_of_size_void_ptr_ptr_of_size_void_ptr_of_size_char **;} *)(* (& *& &’ ‘))[sizeof(void ***)]))[sizeof(void **)]);// ));
(((long double)(*(((struct struct { void **** pointers_of_size_void_ptr_ptr_of_size_char ****} *)(* (& &’ ‘))[sizeof(void ****)]))[sizeof(void **)]);
}
((long double)(((**(((
*(((
(
(
(
(
(
(
(
(
(
(((
(((((
(((((
((((
(((((
((((
((((
((((
((((
((((
((((
((((
((()(
((/
%/
%/
%/
%/
%/
%/
%/
%/
%/
%/
%/
%/
%
%
%
%
%
%
%
*
*
*
*
*
*
*
*
*)
*)
*)
*)
*)
*)
*)
))
)
)
)
)
)
)
)
)
)
)
)*
)*
)*
)*
)*
)*
)*
)*
)*
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
)*’
);)))
);
);
);
);
);
);
);
)));
});
};
};
})*64)>>64);
result[m]+=sum;
m+=r_;
m-=r_;
m-=c_;
m+=c_;
m-=c_;
m+=c_;
m-=c_;
++r;r–;
}
return result;
}
//delete [] [ ] [ ];
//delete [] [ ];
void swap(Matrix& lhs,const Matrix& rhs){
lhs.swap(rhs);
}
//delete [] [ ];
//delete [] ;
//delete [ ] ;
//delete [] ;
TetianaChernysh/SoftwareEngineering<|file_sep#include "stdafx.h"
#include "CppUnitTest.h"
#include "..OOP_ProjectOOP_Project.cpp"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTestProject
{
TEST_CLASS(UnitTestProject)
{
public:
TEST_METHOD(Test_Multiply_Matrixes)
{
const unsigned int M_SIZE =20;
const unsigned int N_SIZE=M_SIZE;
const unsigned int K_SIZE=M_SIZE;
unsigned int M[M_SIZE][N_SIZE];
unsigned int N[N_SIZE][K_SIZE];
unsigned int P[M_SIZE][K_SIZE];
srand(time(NULL));
for(unsigned int i=0;i<M_SIZE;i++){
for(unsigned int j=0;j<N_SIZE;j++){
M[i][j]=rand()%10000;}
}
for(unsigned int i=0;i<N_SIZE;i++){
for(unsigned int j=0;j<K_SIZE;j++){
N[i][j]=rand()%10000;}
}
for(unsigned int i=0;i<M_SIZE;i++){
for(unsigned int j=0;j<K_SIZE;j++){
P[i][j]=M[i][N[j]];
for(unsigned k=1;k<N_SIZE;k++){
P[i][j]+=M[i][N[j-k]]*N[j-k];
}
}
}
std::
vector<std::
vector>
mat_mul(const std::
vector<std::
vector>& M,
const std::
vector<std::
vector>& N)
{
if(M.empty()||N.empty())
throw std::
runtime_error(
“Can’t multiply empty vectors!”);
if(M.front().empty()||N.front().empty())
throw std::
runtime_error(
“Can’t multiply empty vectors!”);
if(M.back().front().empty())
throw std::
runtime_error(
“Can’t multiply empty vectors!”);
if(N.back().back().empty())
throw std::
runtime_error(
“Can’t multiply empty vectors!”);
if(M.back().front().back()==N.front().back())
throw std::
runtime_error(
“Can’t multiply vectors by different sizes!”);
std::
vector<std::
vector>
res(M.size(),
std::TetianaChernysh/SoftwareEngineering<|file_sep[](https://github.com/TetianaChernysh/OOP_Project/blob/master/OOP_project.pdf)
## Домашнє завдання №3 по дисципліні ООП на тему «Класи і об’єкти».
### Завдання.
Реалізувати клас `Матриця` з використанням `STL` з наступними методами:
розмір матриці,
обчислення детермінанта,
обчислення оберненої матриці,
умноження двох матриць,
пошук максимального елемента в матриці,
пошук мінімального елемента в матриці.
### Виконав:
Тетяна Черниш
група КІТ-01
студентка І курсу
КНУ імені Тараса Шевченка
### Перелік файлів:
OOP_project.pdf – опис завдання та пояснення до реалізованих функцій.
OOP_Project.cpp – основний файл з реалізацією класу.
README.md – опис проекту.
### Використано:
C++, Visual Studio Community Edition.
### Пояснення до реалізованих функцій.
#### Метод `getDeterminant()`.
Визначник задачу вирозв’язують за допомогою методу розв’язку систем лінейних рiвнянь за формулою Крамера:

де `D` – детермiна́нт матри́ци А.
#### Метод `getInverse()`.
Обернена матрица — це така матрица A^-1 для даної матрици А що AA^-¹=A^-¹A=E,
де E — одинична матрица.
#### Метод `multiply()`.
Метод множення двох матриць реалiзований за допомогою алгоритму шляхом перебору елементiв обох масивiв та покращений алгоритм шляхом перебору лише необхiдних елемети для отримання результату.
#### Методы `maxElement()` и `minElement()`.
Цей методи повертають максимальне чи мiновне значення у задачому масивi.
chris-lambert/grooveshark-bot<|file_sep|RFID Bot
====================
This bot allows you to control your RFID door locks using Grooveshark.
I've used it successfully with my Schlage Connect lock.
This code works great with my setup.
If you use it on your own setup I cannot guarantee that it will work.
I'm happy to help anyone get it working on there system though!
Installation
————
To install just copy all files into /var/www/html/rfidbot/
You will also need to install php-cURL module.
On Ubuntu run:
sudo apt-get install php5-curl
Once installed you can test by opening up http://yourip/rfidbot/index.php
You should see a login screen appear.
If you have any problems please let me know!
Setup
—–
First we need to setup some settings.
Open up config.php and edit as follows:
$settings['api_url'] = 'http://api.grooveshark.com';
$settings['username'] = 'yourusername';
$settings['password'] = 'yourpassword';
$settings['pincode'] = '123456';
$settings['lock_ip'] = '192.168.x.x';
$settings['lock_port'] = '80';
The pincode should be your lock's pincode.
You will need to find out what IP address your lock uses by using an app such as FING.
Make sure you use port number that your lock uses.
My lock uses port number of port number of port number of port number of port number of port number of port number of port number of port number of port number
Access Control
————–
The access control panel allows you to create users that can control the bot.
It also allows you give them access rights such as locking/unlocking doors etc.
When adding new users make sure they use usernames that match those used on grooveshark.
They also need passwords so make sure they are aware not share there passwords!
How It Works
————
Once logged into the admin panel you can go ahead an click on Lock/Unlock.
This will send an API request to grooveshark requesting the tracks played recently by your account.
It then loops through each track looking at artist name until it finds one that matches your username.
Once found it then sends an unlock command using curl via HTTP POST request to your RFID lock's IP address using its pincode.
Once unlocked it then sends another request every minute until no music from your account is playing anymore.
At which point it locks again.chris-lambert/grooveshark-bot<|file_sep_db_connect();
user::$user_table=’users’;
user::$fields=user::_get_fields(user::$user_table);
user::$required_fields=array_keys(user::$fields);
user::$optional_fields=array_diff(array_keys(user::$fields),user::$required_fields);
user::$unique_fields=array_diff(array_keys(user::$fields),’id’);
user::_load_user_by_username($_POST[“username”]);
if($user->_verify_password($_POST[“password”]))
session_register(‘_user_access_level’);
session_register(‘_user_id’);
session_register(‘_user_username’);
session_register(‘_user_last_activity’);
set_session_vars($user->_data_array());
redirect(“./index.php”);
exit;
catch(Exception $e)
redirect(“?error=”.urlencode($e));
}
function logOut()
{
global $settings;
require_once(“classes/class.user.php”);
try {
global $user;
user::_init();
unset($_SESSION[‘_user_access_level’]);
unset($_SESSION[‘_user_id’]);
unset($_SESSION[‘_user_username’]);
unset($_SESSION[‘_user_last_activity’]);
redirect(“./index.php”);
catch(Exception $e)
redirect(“?error=”.urlencode($e));
}
function set_session_vars($vars)
{
foreach ($vars as $key => $value)
set_session_var($key,$value);
}
function set_session_var($key,$value)
{
global $_SESSION;
switch ($key) {
case ‘_last_activity’:
case ‘_access_level’:
case ‘_id’:
case ‘_username’:
default:
break;
}
$_SESSION[$key]=$value;
unset_session_var(“_last_activity”);
$_SESSION[“_last_activity”]=time();
unset_session_var(“_access_level”);
$_SESSION[“_access_level”]=$value;
unset_session_var(“_id”);
$_SESSION[“_id”]=$value;
unset_session_var(“_username”);
$_SESSION[“_username”]=$value;
}
}
function unset_session_var($key)
{
global $_SESSION;
switch ($key){
case “_last_activity”:
case “_access_level”:
case “_id”:
case “_username”:
default:
break;
}
if(isset($_SESSION[$key]))
unset ($_SESSION[$key]);
}
function user_exists()
{
global $_SESSION;
return isset ($_SESSION[“_id”]);
}
function check_access()
{
global $_SESSION,$_SERVER,$_GET,$_REQUEST,$_POST,$settings;
if(!isset ($_GET[“login”]) && !isset ($_GET[“logout”]) && !isset ($_GET[“register”]) && !isset ($_GET[“add_user”]) && !isset ($_GET[“edit_user”]) && !isset ($_GET[“delete_user”]))
redirect(“./index.php?error=”.urlencode(_(“Must login first”)));
if(!isset ($_REQUEST[“_access_level”]))
redirect(“./