Algo Vision

Description
Computer Vision - Algorithm
for commercial questions @mlenginer
We recommend to visit

?? O'zbekistondagi N1 Akkaunt Savdo Kanali!

‼️ Eslatma: Kanalimizga Joylanayotgan Akkauntlarning Barchasi Turnirda Yutilgan!

? Kanalga Joylangan Xar Bir Akkauntga "SENATOR" Shaxsan O'zi Javob Beradi!

✍️Admin: @deSENATOR_AKKS ✅ Org ‼

©️SENATOR PUBGM

Last updated 1 year, 4 months ago

Kun davomida eng sara va so'nggi yangiliklar tafsiloti bilan YO'L-YO'LAKAY tanishtirib boramiz.

Voqea va hodisaga guvoh bo‘ldingizmi, voqealikni bizga yuboring: @yyuzbot

Reklama bo‘yicha: @zorzorads

Instagram sahifamiz: https://bit.ly/3wlZDZH

Last updated 3 weeks, 1 day ago

SENATOR RASMIY KANALI.✅??

- ?YouTube: youtube.com//senatorpubgm

? O'zbekistondagi eng ishonchli va eng arzon narxlarda UC sotib olmoqchi bo'lsangiz bizga bog'laning:? @SenatorsMarket

Last updated 1 year, 6 months ago

4 weeks ago
4 weeks ago

Bu haqida Xudo xohlasa shu hafta stream utkazamiz!!!.
Binary Pow in Action

1 month, 1 week ago

Vector ni e'lon qilishda {} - figurali qavslar ishlatilgan.
Vector ustiga bosib kursak bu oddiy generic (template) sinf.
unda quyidagicha kod bor

/** * @brief Builds a %vector from an initializer list. * @param \_\_l An initializer\_list. * @param \_\_a An allocator. * * Create a %vector consisting of copies of the elements in the * initializer\_list @a \_\_l. * * This will call the element type's copy constructor N times * (where N is @a \_\_l.size()) and do no memory reallocation. */ \_GLIBCXX20\_CONSTEXPR vector(initializer\_list<value\_type> \_\_l, const allocator\_type& \_\_a = allocator\_type()) : \_Base(\_\_a) { \_M\_range\_initialize(\_\_l.begin(), \_\_l.end(), random\_access\_iterator\_tag()); }

Bunda vectorni {} ichidagi malumotlar bilan tuldirish konstruktori berilgan.
To'gri bu kod juda galati bulishi mumkin. Buni tushinish uchun shunchaki documentationi ochsa yetarli edi.
Umumiy qilsak vector ichida ikkita element bor {n va 0}
Kiruvchi malumotimiz n lekin bu uzunlik emas shuning uchun algoritm kiruvchi qiymatga boglanmagan
count_if esa n qanday bulishidan qatiy nazar doimo ikkita amal bajaradi.
yane amallar soni har doim const-o'zgarmas bu esa algoritmlar tilida O(1) deyiladi.

3 months ago

SOLID
Open/Closed Principle
The Open/Closed Principle states that:
Code should be open for extension — new functionality can be added.
Code should be closed for modification — existing code should not be changed.

This ensures code stability and easier maintenance. Instead of changing old code, we add new code.
Below is an example that violates the Open/Closed Principle (OCP). In this example, every time a new type of message is added, the existing code must be modified, which makes it less maintainable and more prone to bugs.

The second example shows a correct implementation of the Open/Closed Principle. Instead of modifying existing code, new behavior is added by extending the base class. This approach makes the code more flexible and easier to maintain.
Remember to write clean and readable code

```
#include
#include

// Function that violates OCP by using if-else for each message type
class MessageHandler {
public:
void handle(const std::string& type, const std::string& message) {
if (type == "text") {
std::cout << "Handling text message: " << message << '\n';
} else if (type == "error") {
std::cerr << "Handling error message: " << message << '\n';
} else {
std::cout << "Unknown message type: " << message << '\n';
}
}
};

int main() {
MessageHandler handler;
handler.handle("text", "Hello, World!");
handler.handle("error", "Something went wrong.");
handler.handle("info", "New message type!"); // Adding new types requires modifying the method
return 0;
}
```

```
#include
#include
#include
#include

// Base class that defines the interface
class MessageHandler {
public:
virtual ~MessageHandler() = default;
virtual void handle(const std::string& message) const = 0;
};

// Handler for text messages
class TextMessageHandler : public MessageHandler {
public:
void handle(const std::string& message) const override {
std::cout << "Handling text message: " << message << '\n';
}
};

// Handler for error messages
class ErrorMessageHandler : public MessageHandler {
public:
void handle(const std::string& message) const override {
std::cerr << "Handling error message: " << message << '\n';
}
};

int main() {
std::vector> handlers;
handlers.emplace_back(std::make_shared());
handlers.emplace_back(std::make_shared());

for (const auto& handler : handlers) { handler\->handle("Hello, World!"); // No need to change the existing code } return 0;

}
```

3 months, 1 week ago

#include #include #include class Quiz { private: std::vector> questions; int score = 0; public: Quiz() { questions = { {"What is 2 + 2?", "4"}, {"What…

3 months, 1 week ago
3 months, 1 week ago

```
#include
#include
#include

class Quiz {
private:
std::vector> questions;
int score = 0;

public:
Quiz() {
questions = {
{"What is 2 + 2?", "4"},
{"What is the capital of France?", "Paris"},
{"Who wrote '1984'?", "George Orwell"}
};
}

void runQuiz() { for (const auto& [question, answer] : questions) { std::cout << question << " "; std::string userAnswer; std::getline(std::cin, userAnswer); if (userAnswer == answer) { score++; } } std::cout << "You scored " << score << " out of " << questions.size() << "!\n"; }

};

int main() {
Quiz quiz;
quiz.runQuiz();
return 0;
}
```

4 months, 1 week ago
4 months, 2 weeks ago

Yandex Cup dan yarim finalga kimlar chiqdi?
? - yarim finaldaman.
? - keyingi yil Insha Allah.
Reaksiya qoldiring.

6 months, 1 week ago

?? Happy Independence Day, Uzbekistan!

Today, on September 1st, we celebrate the 33rd anniversary of our country's independence! This day reminds us of the importance of freedom, unity, and the pursuit of prosperity. We take pride in our rich cultural heritage, hardworking people, and the progress Uzbekistan continues to make as it secures its rightful place on the global stage.

Wishing all my fellow citizens peace, prosperity, and continued success! May our nation thrive, and may each of us contribute to its bright future.

Happy Independence Day, Uzbekistan! ??

We recommend to visit

?? O'zbekistondagi N1 Akkaunt Savdo Kanali!

‼️ Eslatma: Kanalimizga Joylanayotgan Akkauntlarning Barchasi Turnirda Yutilgan!

? Kanalga Joylangan Xar Bir Akkauntga "SENATOR" Shaxsan O'zi Javob Beradi!

✍️Admin: @deSENATOR_AKKS ✅ Org ‼

©️SENATOR PUBGM

Last updated 1 year, 4 months ago

Kun davomida eng sara va so'nggi yangiliklar tafsiloti bilan YO'L-YO'LAKAY tanishtirib boramiz.

Voqea va hodisaga guvoh bo‘ldingizmi, voqealikni bizga yuboring: @yyuzbot

Reklama bo‘yicha: @zorzorads

Instagram sahifamiz: https://bit.ly/3wlZDZH

Last updated 3 weeks, 1 day ago

SENATOR RASMIY KANALI.✅??

- ?YouTube: youtube.com//senatorpubgm

? O'zbekistondagi eng ishonchli va eng arzon narxlarda UC sotib olmoqchi bo'lsangiz bizga bog'laning:? @SenatorsMarket

Last updated 1 year, 6 months ago