Skip to content

Instantly share code, notes, and snippets.

View harsh-2024's full-sized avatar
🇮🇳
DANGER : Do not see my profile.

Harsh Tripathi harsh-2024

🇮🇳
DANGER : Do not see my profile.
View GitHub Profile
RoundedButton(Colors.cyan,
() => Navigator.pushNamed(context, LoginScreen.id), 'Login'),
RoundedButton(
Colors.blueAccent,
() => Navigator.pushNamed(context, RegistrationScreen.id),
'Register')
],
),
),
);
void getMessages() async {
final msgs = await _fireStore.collection('myMessages').get();
for (var msg in msgs.docChanges) {
print(msg.doc.data());
}
}
void messagesStream() async {
await for (var snapshot
in _fireStore.collection('myMessages').snapshots()) {
for (var message in snapshot.docs) {
print(message.data());
}
}
}
import 'package:flutter/material.dart';
import 'api_networking.dart';
import 'main.dart';
Network network = Network();
void func() {
print(network.countryCapital);
print(network.countryName);
}
@harsh-2024
harsh-2024 / EveryoneLovesToSleep.cpp
Created September 17, 2022 08:14
This is the solution of the third question of the Reload22 Coding Contest
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--){
int n,h,m,done=0;
@harsh-2024
harsh-2024 / LCD_GCD.cpp
Created September 17, 2022 08:16
This is the solution of the first problem given in the Coding Contest of Reload22
#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;
#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;
sudo docker ps
sudo docker inspect <container_name>
sudo docker run --publish 5500:5500 <02_02_begin>
@harsh-2024
harsh-2024 / encryption.dart
Created August 11, 2023 18:28
Encryption handler
void main() {
final plainText = 'laiba123@A';
final key = Key.fromUtf8('kf;WtH}yb/zTo!H=9}DIoS?2{_V&b/md');
final iv = IV.fromLength(16);
final encrypter = Encrypter(AES(key, mode: AESMode.ecb));
final encrypted = encrypter.encrypt(plainText, iv: iv);
final decrypted = encrypter.decrypt(encrypted, iv: iv);
@harsh-2024
harsh-2024 / profile.js
Created August 12, 2023 17:06
Startup profile front end code
import React, { useEffect, useRef, useState } from "react";
import Avatar from "@mui/material/Avatar";
import Axios from "axios";
import { toast } from "react-toastify";
import axios from "axios";
import { useAuth } from "../../../../Utils/Auth";
import { useHistory, useLocation } from "react-router-dom";
import NotesModal from "../../Notes/CreateModal";
import countries from "../../UserMap/countries.json";
import Keywords from "../ProfileComponents/KeywordsBlock";