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
class HomeScreenManager { | |
void Function(String message)? onError; | |
Future<void> trySomething() async { | |
await Future.delayed(const Duration(milliseconds: 200)); | |
onError?.call('Sorry, there was an error.'); | |
} | |
} |
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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
List<String> findUniqueWords(String text) { | |
final uniqueWords = <String>{}; | |
final wordMatch = RegExp( | |
r'([\p{Letter}\u202f\u180B\u180C\u180D\u180E-]+)', | |
unicode: true, | |
); |
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 <regex> | |
using namespace std; | |
class AbstractEmployee | |
{ | |
// Returns true if got promotion | |
virtual bool RequestPromotion() = 0; | |
virtual void Work() = 0; |
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; | |
class Pet{ | |
protected: | |
string Name; | |
string Breed; | |
int Age; | |
Pet(string name, string breed, int age) |
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 <stdlib.h> | |
#include <string.h> | |
FILE* getTextFromFile(char filename[]) { | |
FILE* ptr; | |
ptr = fopen("data.csv", "r"); | |
if (NULL == ptr) { | |
printf("file can't be opened \n"); | |
} |
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
import 'package:final_exam/home_screen/home_screen_manager.dart'; | |
import 'package:get_it/get_it.dart'; | |
final getIt = GetIt.instance; | |
void setupGetIt() { | |
getIt.registerLazySingleton(() => HomeScreenManager()); | |
} |
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
import 'package:flutter/material.dart'; | |
import 'home_screen_manager.dart'; | |
class HomeScreen extends StatefulWidget { | |
const HomeScreen({Key? key}) : super(key: key); | |
@override | |
State<HomeScreen> createState() => _HomeScreenState(); | |
} |
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
import 'package:flutter/material.dart'; | |
class HomeScreen extends StatefulWidget { | |
const HomeScreen({Key? key}) : super(key: key); | |
@override | |
State<HomeScreen> createState() => _HomeScreenState(); | |
} | |
class _HomeScreenState extends State<HomeScreen> { |
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 <regex> | |
using namespace std; | |
class AbstractEmployee | |
{ | |
// Returns true if got promotion | |
virtual bool RequestPromotion() = 0; | |
}; |
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; | |
class Point { | |
int x; | |
int y; | |
public: | |
Point(int X, int Y) { | |
x = X; |
NewerOlder