Skip to content

Instantly share code, notes, and snippets.

View harshraj22's full-sized avatar
✌️
😋 Integrating Continiously

Harsh Raj harshraj22

✌️
😋 Integrating Continiously
View GitHub Profile
@harshraj22
harshraj22 / update_repo.md
Last active March 21, 2020 07:00
A file depicting how to update your repo from other repo

git add upstream https://github.com/harshraj22/Practice_plan.git
(add upstream branch, as you created local git repo now, it isn't expected to have an upstream)

git fetch upstream
(fetch all changes from upstream to local repo)

git rebase upstream/master
(rebase your current branch from master of upstream, you can also use git merge --allow-unrelated-histories upstream/master if you prefer merge commit)

git remote rm origin

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Parsec</title>
<!-- Stylesheets -->
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<link href="css/responsive.css" rel="stylesheet" />
<link href="css/devfolio.css" rel="stylesheet" />
#include<bits/stdc++.h>
using namespace std;
int gcd(int a,int b);
int main(){
int test=1;
while(test--){
int i,k=0,n;
bool possible = true;
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef trie<string,null_type,
trie_string_access_traits<>,pat_trie_tag,
trie_prefix_search_node_update>

This is regarding CSE-HUB.

I think using Django in place of php will be more helpful. Arguments in favour are:
  • csrf_token takes care of all vulnerabilities (sql_injections and all others that we might have not implemented)
  • No need to have additional securities like .htaccess as Django maps urls to views and not to directory structures.
  • Most of the form verifications is taken care on django side, so no need to add lots of checks to ensure correct data is inserted
  • Easy integration with useful python modules
  • Has its own database and server, so works on all devices ( reduces issues like this is not working on my device ) and provides easy installation
  • We might integrate it with socets to enable realtime chat as well.
  • Easy integration with openId (lots of video tutorials about the same)

Branch Policy :

  • develop All development goes on in this branch. If you're making a contribution, you are supposed to make a pull request to develop.
  • master This contains the stable code. After significant features/bugfixes are accumulated on development, we move it to master.

Set up the project :

  • Fork the current repo to your remote system
    • This is called your remote branch.
  • Clone the forked repo to your local machine https://github.com/<your user name>/contest.git
    • This is your local branch.
  • run git remote add upstream https://github.com/harshraj22/contest.git .
@harshraj22
harshraj22 / ideaList.md
Last active November 15, 2019 08:38
Contains beta-phase ideas for serving text based adventure game online
  • for each node (id) store the data in database
  • when queried, use the relevant column
  • use php logic to change id

: may use proc_open php function

Click me{: .btn}

md = 1000000007
def equal(s):
lent = len(s)
prev = [1 for __ in range(lent+1)]
another = [0 for __ in range(lent)]
another[0] = int(s[0])
for i in range(1,lent):
another[i] = ((another[i-1]-1)*10+(int(s[i])+1))
# another[i]=(md + another[i])
@harshraj22
harshraj22 / hai3.py
Created August 8, 2019 03:58
print('hai3')
import numpy as np
md = 998244353
for _ in range(int(input().strip())):
n,m,k = map(int,input().strip().split())
g = [[] for x in range(n)]
# print(g)
for __ in range(m):
a,b = map(int,input().strip().split())
a -= 1
b -= 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int base = 1000000000;
const int base_digits = 9;
struct bigint {
vector<int> a;
int sign;