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
// https://www.youtube.com/watch?v=wN0x9eZLix4 | |
#include <iostream> | |
#include <regex> | |
using namespace std; | |
class AbstractEmployee | |
{ | |
// Returns true if got promotion |
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> | |
#define SIZE 15 | |
void printBoard(char board[SIZE][SIZE]) | |
{ | |
printf(" "); | |
for (int i = 0; i < SIZE; i++) { | |
printf("%d ", (i + 1) % 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
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
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()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override |
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(MyAmazingApp()); | |
} | |
class MyAmazingApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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 'dart:async'; | |
void main() { | |
runApp(MyApp()); | |
runDart(); | |
} | |
Timer? myTimer; |
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 Password { | |
Password(String password) | |
: assert(password.length > 8), | |
_password = password; | |
String _password; | |
set value(String newPassword) { | |
if (_isTooShort(newPassword)) { | |
throw Exception('Too short!!!'); |
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:class_coding/queue.dart'; | |
import 'package:test/test.dart'; | |
void main() { | |
group('List Queue:', () { | |
test('isEmpty works', () { | |
final myQueue = MyQueue<int>(); | |
expect(myQueue.isEmpty, true); | |
myQueue.enqueue(1); | |
expect(myQueue.isEmpty, false); |
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
void main() { | |
const number = 3; | |
if (number == 0) { | |
print('zero'); | |
} else if (number == 1) { | |
print('one'); | |
} | |
// if 0 then print 'zero' | |
// if 1 then print 'one' |
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
void main() { | |
popExample(); | |
removeLastExample(); | |
removeAfterExample(); | |
} | |
void popExample() { | |
var list = LinkedList<int>(); | |
list.push(3); | |
list.push(2); |