Skip to content

Instantly share code, notes, and snippets.

View mrprofessor's full-sized avatar
🌓
To the moon!

Rudra Kar mrprofessor

🌓
To the moon!
View GitHub Profile
/** Divide : Partition the array A[low....high] into two sub-arrays
* A[low....j-1] and A[j+1...high] such that each element
* of A[low....j-1] is less than or equal to A[j], which
* in turn is is less than or equal to A[j+1...high]. Compute
* the index j as part of this partitioning procedure.
* Conquer : Sort the two sub-arrays A[low....j-1] and A[j+1....high]
* by recursive calls to quicksort
**/
#include<stdio.h>
/*Work easy...!!...Play hard*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct nodeh
{
char str[50];
struct nodeh *next;
};
struct nodev
#include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node *left;
struct node *right;
};
struct list
/*Work easy...!!...Play hard*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
{
int data;
struct node *next;
};
grammar org.xtext.example.demo.Demo with org.eclipse.xtext.common.Terminals
generate demo "http://www.xtext.org/example/demo/Demo"
Model :
(elements+=Type)*;
Type:
DataType //| Statement | Condition
;
@mrprofessor
mrprofessor / RunAProxyOnAmazonEC2VPC.md
Created July 28, 2017 07:43 — forked from webinista/RunAProxyOnAmazonEC2VPC.md
Create a proxy server on an Amazon EC2 (VPC) instance

This will create a proxy server in whatever your availability zone your VPC is in. For me, that's us-east-1b. For you, that may be something different. Steps 10+ should more or less work regardless of your provider since those steps cover the setup and configuration of TinyProxy.

  1. Click the Launch Instance button.
  2. Choose Ubuntu Server 14.04 LTS (HVM), SSD Volume Type. This isn't strictly necessary. If you choose another OS, check its documentation for how to install new packages.
  3. On the Choose an Instance Type screen, select t2.micro. It's Free Tier eligible.
  4. Click the Next: ... buttons until you reach the Configure Security Group screen.
    • You may wish to reduce the amount of storage on the Add Storage screen. This is optional.
    • You may wish to add a tag on the Tag Instance screen. This is also optional.
  5. On the Configure Security Group screen:
  • Select Create a new security group.
@mrprofessor
mrprofessor / gist:6c4beb78c32b7dfd3fd7149f89e991cf
Created August 18, 2017 10:24 — forked from snowman-repos/gist:3820705
JavaScript: Input with Disappearing Background Image
<form name="searchform" id="search-form">
<div>
<b>Search</b>
<input type="text" name="txtInput" title="Enter the terms you wish to search for." />
<input type="submit" value="GO!" class="submit" style="cursor: pointer;" />
</div>
</form>
<script type="text/javascript" language="javascript">
(function() {
@mrprofessor
mrprofessor / index.html
Created September 6, 2017 13:45
React single page aplication
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected]/dist/react.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js">
</script>
<script src="https://npmcdn.com/[email protected]/umd/ReactRouter.min.js"></script>
let arr = [
{
id: 1,
parent: null,
name: "a"
},
{
id: 2,
" vim:fdm=marker
" Vim Color File
" Name: onedark.vim
" Maintainer: https://github.com/joshdick/onedark.vim/
" License: The MIT License (MIT)
" Based On: https://github.com/MaxSt/FlatColor/
" A companion [vim-airline](https://github.com/bling/vim-airline) theme is available at: https://github.com/joshdick/airline-onedark.vim
" Color Reference {{{