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
//this technique provides a way to efficiently store subsets of a set of natural numbers upto N. | |
//When N should be the number of bits any type can store | |
//for example a 32-bit integer will be able to store subsets for a set of natural numbers upto N | |
//Reference: https://www.youtube.com/watch?v=685x-rzOIlY&list=PLb3g_Z8nEv1icFNrtZqByO1CrWVHLlO5g&index=3 | |
//One thing to note is that this piece of code handles the edge cases of trying to add an element which already exists | |
// or trying to remove an element which does not exist | |
#include<iostream> | |
using namespace std; | |
class Subset { |
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
1. Download Anaconda (https://repo.anaconda.com/archive/Anaconda3-2020.11-Windows-x86_64.exe) | |
2. Open anaconda prompt | |
3. Run the following commands in anaconda prompt | |
1. conda create -n venv python=3.7.4 anaconda | |
2. conda config --append channels conda-forge | |
3. conda install --yes --file requirements.txt | |
4. conda install -c conda-forge opencv=3.4.1 | |
5. pip install imutils | |
(check if above package is installed or not using conda list) | |
6. python main.py |
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
Board.find({}) | |
.populate({ | |
path: 'pins', | |
model: 'Pin' | |
}) | |
.exec(function(err,boards){ | |
var dates=[]; | |
boards.forEach(function(board){ | |
dates=[]; | |
board.pins.forEach(function(pin){ |
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<stdio.h> | |
void swap(int* x,int* y) | |
{ | |
int t; | |
t=*x; | |
*x=*y; | |
*y=t; | |
} | |
int partition(int* a,int start,int end) | |
{ |
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
/******************************************************* | |
This program was created by the CodeWizardAVR V3.29 | |
Automatic Program Generator | |
© Copyright 1998-2016 Pavel Haiduc, HP InfoTech s.r.l. | |
http://www.hpinfotech.com | |
Project : | |
Version : | |
Date : 20-01-2018 | |
Author : |