View extracting_widget.dart
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
RoundedButton(Colors.cyan, | |
() => Navigator.pushNamed(context, LoginScreen.id), 'Login'), | |
RoundedButton( | |
Colors.blueAccent, | |
() => Navigator.pushNamed(context, RegistrationScreen.id), | |
'Register') | |
], | |
), | |
), | |
); |
View getting data.dart
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 getMessages() async { | |
final msgs = await _fireStore.collection('myMessages').get(); | |
for (var msg in msgs.docChanges) { | |
print(msg.doc.data()); | |
} | |
} |
View gettingStreamsData.dart
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 messagesStream() async { | |
await for (var snapshot | |
in _fireStore.collection('myMessages').snapshots()) { | |
for (var message in snapshot.docs) { | |
print(message.data()); | |
} | |
} | |
} |
View displayData.dart
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 'api_networking.dart'; | |
import 'main.dart'; | |
Network network = Network(); | |
void func() { | |
print(network.countryCapital); | |
print(network.countryName); | |
} |
View EveryoneLovesToSleep.cpp
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 <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
int t; | |
cin >> t; | |
while(t--){ | |
int n,h,m,done=0; |
View LCD_GCD.cpp
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 <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int t; cin>>t; | |
while(t--) { | |
long long n; cin>>n; | |
long long ans = 0; | |
// pairs in which lcm/gcd=1 | |
ans+=n; |
View Rotate_array.cpp
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 <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
void rev(int A[],int s, int e) | |
{ | |
int i = s; | |
int j = e; |
View Docker commands
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
sudo docker ps | |
sudo docker inspect <container_name> | |
sudo docker run --publish 5500:5500 <02_02_begin> |