Skip to content

Instantly share code, notes, and snippets.

View manjotsidhu's full-sized avatar
💭
I may be slow to respond.

Manjot Singh Sidhu manjotsidhu

💭
I may be slow to respond.
View GitHub Profile
@manjotsidhu
manjotsidhu / main.dart
Last active August 3, 2021 17:41
CV Flutter Scroll to Key Test
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@manjotsidhu
manjotsidhu / main.dart
Last active July 28, 2021 04:51
Flutter Wrap Issue
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@manjotsidhu
manjotsidhu / README.md
Last active March 11, 2021 12:00
CV Question Bank System Ideas

Discussion Snippets

Question Bank looks like a great idea but how you are looking to group them ? I would prefer to be grouped according to chapter and tagged for associated target section. In this way, while reading the chapters from difficulty level 0 to 2 (top-down), the question bank will include the ones which were also targeted to the previous sections and randomizes the questions to test the thorough revision of the chapter.

We should focus on collection of questions first and then we can eventually build up the system later on. We can collect questions in a sophisticated data structure in some kind of database to make this happen. Another task would be adding already deployed quizzes to that database. The database can be made up of JSON, YML or even using online tools like Google Sheets, Google Form etc.

Question Bank

@manjotsidhu
manjotsidhu / main.dart
Last active November 30, 2020 18:11
Test
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Timer',
theme: new ThemeData(
primaryColor: Colors.grey.shade800,
@manjotsidhu
manjotsidhu / pbrp_testers.json
Last active November 19, 2020 15:10
PBRP Testers
{
"phoenixin": [
"Himanshu Raj",
"AtomicX",
"vnxpotato",
"Justin vikky",
"zZeRoZzAnDoNeZz",
"Arun G",
"Rishad Appat"
],
@manjotsidhu
manjotsidhu / translate.py
Created July 18, 2020 09:50
PBRP Translation script
#
# Python Script for Translating
# pip install googletrans
#
import re
from googletrans import Translator
translate_lang = None
translator = Translator()
@manjotsidhu
manjotsidhu / index.test.js
Created March 17, 2020 10:47
TypeScript isFibonacci function unit testing using Jest
import isFibonacci from "./index"
var fibSeries: number[] = [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181]
test('Test fibonnaci series from 0 to 4181', () => {
for (var i = 0; i < fibSeries.length; i++) {
expect(isFibonacci(fibSeries[i])).toBe(true)
}
})
@manjotsidhu
manjotsidhu / index.ts
Created March 17, 2020 09:26
TypeScript code to check if the given number is present in the Fibonacci series
function isPerfectSquare(n: number) : boolean {
return n > 0 && Math.sqrt(n) % 1 === 0;
}
function isFibonacci(input: number) : boolean {
return isPerfectSquare(5*input*input + 4) || isPerfectSquare(5*input*input - 4)
}
console.log(isFibonacci(4))
console.log(isFibonacci(8))
J9 timer(UTC) ThreadID TP id Type TraceEntry
17:56:32.421549800 *0x143b700 mt.3 Entry >java/lang/String.<clinit>()V bytecode static method
17:56:32.427768924 0x143b700 mt.0 Entry >java/lang/String.equals(Ljava/lang/Object;)Z bytecode method, this = 0xe0001138
17:56:32.427770916 0x143b700 mt.6 Exit <java/lang/String.equals(Ljava/lang/Object;)Z bytecode method
17:56:32.428596613 0x143b700 mt.0 Entry >java/lang/String.equals(Ljava/lang/Object;)Z bytecode method, this = 0xe0001390
17:56:32.428612549 0x143b700 mt.0 Entry >java/lang/String.lengthInternal()I bytecode method, this = 0xe0001390
17:56:32.428621513 0x143b700 mt.6 Exit <java/lang/String.lengthInternal()I bytecode method
17:56:32.428622509 0x143b700 mt.0 Entry >java/lang/String.lengthInternal()I bytecode method, this = 0xe0001138
17:56:32.4286
@manjotsidhu
manjotsidhu / log.fmt
Created September 1, 2018 13:12
Sample IBM trace log
Trace Summary
Service Level :
JRE 1.8.0 Linux amd64-64 (build 1.8.0_181-b13)
JVM Start-up Params :
-Xoptionsfile=/home/manjotsidhu/openjdk8/jre/lib/amd64/compressedrefs/options.default
-Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword=org/apache/harmony/luni/util/ModifiedMap$Entry,noLockword=java/util/Hashtable$Entry,noLockword=java/lang/invoke/MethodType,noLockword=java/lang/invoke/MethodHandle,noLockword=java/lang/invoke/CollectHandle,noLockword=java/lang/invoke/ConstructorHandle,noLockword=java/lang/invoke/ConvertHandle,noLockword=java/lang/invoke/ArgumentConversionHandle,noLockword=java/lang/invoke/AsTypeHandle,noLockword=java/lang/invoke/ExplicitCastHandle,noLockword=java/lang/invoke/FilterReturnHandle,noLockword=java/lang/invoke/DirectHandle,noLockword=java/lang/invoke/ReceiverBoundHandle,noLockword=java/lang/invoke/DynamicInvokerHandle,noLockword=java/lang/invoke/FieldHandle,noLockword=java/lang/invo