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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
{ | |
"window.zoomLevel": 1, | |
"git.enableSmartCommit": true, | |
"workbench.colorTheme": "Monokai Darker", | |
"vim.useCtrlKeys": false, | |
"workbench.panel.location": "bottom", | |
"python.pythonPath": "/usr/bin/python3" , | |
"python.linting.pylintArgs": [ | |
"--errors-only" | |
], |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(Windows) Launch", | |
"type": "cppvsdbg", | |
"request": "launch", | |
"program": "${fileDirname}/${fileBasenameNoExtension}.exe", | |
"args": [], |
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
{ | |
"Tripura": [ | |
"Dhalai", | |
"Gomati", | |
"Khowai", | |
"North Tripura", | |
"Sepahijala", | |
"South Tripura", | |
"Unakoti", | |
"West Tripura" |
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 ; | |
// Nth number of FIBONACCI SEQUENCE | |
// Bruteforce = 2^n , O(1) space | |
// Top down = O(N) Time , O(N) space | |
// Bottom up = O(N) Time , O(1) Space | |
// Math Solution = O(1) Time and Space | |
int totalCalls = 0 ; |
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 cost[100][100] , n ; | |
int getMin(int dist[] , bool visited[]){ | |
int key = 0 ; | |
int min = INT_MAX ; | |
for(int i=0;i < n ; i++){ | |
if(!visited[i] && dist[i]<min){ |
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
int solve(int arr[] , int n ){ | |
int maxReachable , jumps , stepsPossible ; | |
maxReachable = arr[0] ; | |
jumps = 1 ; | |
stepsPossible = arr[0] ; | |
for(int i = 1 ; i<n ; i++){ | |
if(i==n-1) return jumps ; | |
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 'package:touchable/touchable.dart'; | |
class MyCoolPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
color: Colors.white, | |
//wrap CustomPaint with CanvasTouchDetector | |
child: CanvasTouchDetector( |
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 'package:provider/provider.dart'; | |
import 'package:touchable/touchable.dart'; | |
class MyCoolPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container(child: MyWidget()); | |
} | |
} |
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 'package:provider/provider.dart'; | |
import 'package:simple_animations/simple_animations.dart'; | |
enum ErrorAnimationProp { offset } | |
class ShakingErrorText extends StatelessWidget { | |
final ShakingErrorController controller; | |
final int timesToShake; | |
final MultiTween<ErrorAnimationProp> _tween; |