This resource has been moved to https://dev.harshkapadia.me
This file contains hidden or 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
| static int speedUp=[](){ | |
| std::ios::sync_with_stdio(false); | |
| cin.tie(nullptr); | |
| cout.tie(nullptr); | |
| return 0; | |
| }(); | |
| class Solution { | |
| public: | |
| int ladderLength(string beginWord, string endWord, vector<string>& wordList) { |
This file contains hidden or 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; | |
| #define V 7 | |
| #define pb push_back | |
| unordered_map<int,vector<int>> adj; | |
| void DFS(int u,vector<int>& disc,vector<int>& low,stack<int>& mystack,vector<bool>& presentInStack) | |
| { | |
| static int time = 0; |
This file contains hidden or 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; | |
| struct edge{ | |
| int src,dst,wt; | |
| }; | |
| int V,E; | |
| void bellmanFord(vector<edge>& Edges) | |
| { |
This file contains hidden or 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 mysql.connector | |
| from mysql.connector import errorcode | |
| config = { | |
| 'user': 'root', | |
| 'password': '', | |
| 'host': 'localhost', | |
| 'database': 'acme' | |
| } |
This file contains hidden or 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 <iostream> | |
| #include<bits/stdc++.h> | |
| using namespace std; | |
| bool comparator(string first,string second) | |
| { | |
| string one = first+second; | |
| string two = second+first; | |
| int i=0; |
This file contains hidden or 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
| /** Set the View visibility to VISIBLE and eventually animate the View alpha till 100% */ | |
| fun View.visible(animate: Boolean = true) { | |
| if (animate) { | |
| animate().alpha(1f).setDuration(300).setListener(object : AnimatorListenerAdapter() { | |
| override fun onAnimationStart(animation: Animator) { | |
| super.onAnimationStart(animation) | |
| visibility = View.VISIBLE | |
| } | |
| }) | |
| } else { |
This file contains hidden or 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
| // Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I) | |
| if(!!window.React || | |
| !!document.querySelector('[data-reactroot], [data-reactid]') || | |
| Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer'))) | |
| ) | |
| console.log('React.js'); | |
| if(!!document.querySelector('script[id=__NEXT_DATA__]')) | |
| console.log('Next.js'); |
This file contains hidden or 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
| From theme | |
| <style name="SearchToolbar" parent="Theme.AppCompat.Light.NoActionBar"> | |
| //toolbar back arrow color | |
| <item name="android:textColorSecondary">@android:color/white</item> | |
| //toolbar title color | |
| <item name="android:textColorPrimary">@android:color/white</item> | |
| </style> | |
| Also we can do it from java code: |
NewerOlder