Skip to content

Instantly share code, notes, and snippets.

View ashank96's full-sized avatar
🏠
Working from home

Ashank Bharati ashank96

🏠
Working from home
View GitHub Profile
@ashank96
ashank96 / contributions.txt
Last active March 11, 2022 06:31
Nuclei - Flutter Open Source Contributions
Major Open Source Contributions
Package Published
card_scanner https://pub.dev/packages/card_scanner
touchable https://pub.dev/packages/touchable
smart_form https://pub.dev/packages/smart_form
Package Contributions
Flutter
github.com/flutter/flutter/pull/53650 | 53632
@ashank96
ashank96 / jquery_builder_widget.dart
Last active May 26, 2021 09:58
jquery builder widget in flutter
// ignore: avoid_web_libraries_in_flutter
import 'dart:convert';
import 'dart:html';
import 'dart:js' as js;
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:voucherkit_dashboard/core/core_config.dart';
@ashank96
ashank96 / builder.html
Created May 26, 2021 09:26
html embedding jQuery builder
<!DOCTYPE html>
<html>
<head>
<title>JQueryBuilder</title>
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/jquery.query-builder/2.3.3/css/query-builder.default.min.css"/>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
create (Bob:User {id : 1,name:'Bob'})
create (Peter:User {id : 2,name:'Peter'})
create (Ana:User {id : 3,name:'Ana'})
create (Camila:User {id : 4,name:'Camila'})
create (Roger:User {id : 5,name:'Roger'})
create (Priya:User {id : 6,name:'Priya'})
create (Rob:User {id : 7,name:'Rob'})
create (Richard:User {id : 8,name:'Richard'})
create (Amy:User {id : 9,name:'Amy'})
create (Bob)-[:knows]->(Priya),(Bob)-[:knows]->(Richard),
Match (p:User)-[*k]->(n:User) where p.name = 'Bob' return distinct n
@ashank96
ashank96 / bfs.cpp
Created July 26, 2019 18:54
Adjacency list implementation for BFS kth level friends
#include<iostream>
#include<list>
#include<queue>
using namespace std;
class Graph {
int V;
list < int > * adj;
public:
Graph(int V) {
@ashank96
ashank96 / Algorithm-main.rb
Last active July 26, 2019 18:55
Algorithm:main()
###### Algorithm:main() ######
scan n //scan total number of users from stdin
adj[n][n]={0} //initialise an adjacency matrix of nxn size with 0
while (true)
scan u and v //scan friend pair in form of u and v, i.e. we have an edge from u to v
if u==-1 and v==-1 //loop termination condition
break
adj[u][v]=1
@ashank96
ashank96 / Algorithm-bfs.rb
Last active July 26, 2019 18:57
Algorithm: bfs(adj,visited,source,level,n)
######## Algorithm: bfs(adj,visited,source,level,n) ########
levels[n]={0} //set initial level for all nodes to 0
visited[source]=1 //mark source node as visited
queue.push(source) //push source node into queue
while(queue is not empty) do
u=queue.front() //get the front node of queue
queue.pop() //dequeue the node