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 <fstream> | |
#define Nmax 40 | |
int n, mask[40]; | |
int next(int mask[]) { | |
int i ; | |
for (i = 0 ; i < n && mask[i]; i ++) |
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 <iostream> | |
using namespace std; | |
int a[10][10], n; | |
void show () { | |
cout << "--------------- \n"; | |
for (int i = 0 ; i < n ; i ++) { |
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 <iostream> | |
#include <fstream> | |
#include <string.h> | |
#define Nmax 101 | |
using namespace std; | |
ifstream f("date.in"); |
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 <iostream> | |
#include <fstream> | |
#include <limits.h> | |
using namespace std; | |
ifstream f("date.in"); | |
int n; | |
int m[10]; |
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
def get_all_borrowed_books(self): | |
if not self.get_all(): | |
raise RepositoryException("No books saved.") | |
cl_book_links = self.get_all() | |
borrowed_books = [] | |
for link in cl_book_links: | |
link_book = link.get_book() | |
books_from_records = convert_bookrecord_to_books(borrowed_books) |
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
/* | |
Progr. C ce primeste ca argumente nume de fisier si pt. fiecare creeaza un thread | |
ce calculeaza dimensiunea lui. La sfarsit se afiseaza maximul dintre dimensiuni. | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
int max = -1; |
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 "product.h" | |
Product::Product() : id(0), name(""), qty(0.0) { } | |
Product::Product(int id, std::string name, long qty): | |
id(id), name(name), qty(qty) { } | |
int Product::getId() { | |
return id; | |
} |
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
#ifndef PRODUCT_H | |
#define PRODUCT_H | |
#include <string> | |
class Product | |
{ | |
private: | |
int id; | |
std::string name; |
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 "mainwindow.h" | |
#include <QApplication> | |
#include <assert.h> | |
#include <string> | |
#include "product.h" | |
void test() { | |
Product product = Product(1, std::string("patrunjel"), 7.0); | |
assert(1 == product.getId()); |
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
1 patrunjel | |
2 noroi | |
3 pisici |
OlderNewer