Skip to content

Instantly share code, notes, and snippets.

View 22shubh22's full-sized avatar
🏠
Working from home

Shubham Goyal 22shubh22

🏠
Working from home
View GitHub Profile
* Buses will be hardcoded.
-> Initiallly centered of Ambikapur Buses.
* Center is not the a route, but different buses running within route.
Initially let's hardcode that. So, can b eupdated later.
Bus:[
Company name,
#0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:572
E/flutter (16228): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:161
E/flutter (16228): <asynchronous suspension>
E/flutter (16228): #2 MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:334
E/flutter (16228): #3 MethodChannelDocumentReference.updateData
package:cloud_firestore_platform_interface/…/method_channel/method_channel_document_reference.dart:41
E/flutter (16228): #4 DocumentReference.updateData
@override
Stream<List<Order>> orders(String id) {
return ordersCollection.snapshots().map((snapshot) {
return snapshot.documents.where((element) => element.data['ordererId']==id)
.map((doc) => Order.fromEntity(OrderEntity.fromSnapshot(doc)))
.toList();
});
}
E/flutter (25109): #4 new List.from (dart:core-patch/array_patch.dart:50:19)
E/flutter (25109): #5 new List.of (dart:core-patch/array_patch.dart:68:17)
E/flutter (25109): #6 Iterable.toList (dart:core/iterable.dart:404:12)
E/flutter (25109): #7 FirebaseOrdersRepository.orders.<anonymous closure>
package:disperse/…/src/firebase_orders_repository.dart:26
E/flutter (25109): #8 _MapStream._handleData (dart:async/stream_pipe.dart:219:31)
E/flutter (25109): #9 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:157:13)
E/flutter (25109): #10 _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (25109): #11 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (25109): #12 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
Future<String> signUp({String email, String password}) async {
try {
AuthResult result = await _firebaseAuth.createUserWithEmailAndPassword(
email: email,
password: password,
);
return result.user.uid;
} catch (e) {
print(e);
}
@22shubh22
22shubh22 / main.rs
Created April 21, 2020 16:32
Rotation of Object around it's centre
use tetra::graphics::{self, Color, Texture};
use tetra::input::{self, Key};
use tetra::math::Vec2;
use tetra::window;
use tetra::{Context, ContextBuilder, State};
const WINDOW_WIDTH: f32 = 640.0;
const WINDOW_HEIGHT: f32 = 480.0;
const ANGLE: f32 = 0.1;
impl Solution {
pub fn first(t : i32 , n: i32) -> i32 {
2*(n-t) - 1
}
pub fn second(t : i32) -> i32 {
2*t - 3
}
pub fn convert(s: String, num_rows: i32) -> String {
let mut ans = String::new();
let indexCounter = 0;
@22shubh22
22shubh22 / GSoCReport.mk
Created August 20, 2019 02:09
Final Report GSoC 2019: Generating QR Code in LibreOffice
description
//Please do not run the program, but draw the memory picture to determine the output.
void Unknown(int *p, int num);
void HardToFollow(int *p, int q, int *num);
void Unknown(int *p, int num) {
int *q;
q = &num;