Skip to content

Instantly share code, notes, and snippets.

View Rushi98's full-sized avatar
🙃

Rushikesh Jogdand Rushi98

🙃
View GitHub Profile
// BINARY SEARCH TREE
#include<stdio.h>
#include<stdlib.h>
#include <stdbool.h> // bool
struct node
{
int ele;
#include <stdio.h>
char s[] = {
9,
48,
10,
125,
59,
10,
10,
#include <stdio.h>
char s[] = {
'\t',
'0',
'\n',
'}',
';',
'\n',
'\n',

Note that if you're using version 1.9.0 or earlier please refer to the legacy documentation.

REST Assured is a Java DSL for simplifying testing of REST based services built on top of HTTP Builder. It supports POST, GET, PUT, DELETE, OPTIONS, PATCH and HEAD requests and can be used to validate and verify the response of these requests.

Contents

  1. Static imports
  2. Examples
    1. JSON Example
    2. JSON Schema Validation
  3. XML Example
rsync \
--verbose \
--human-readable \
--itemize-changes \
--recursive \
--archive \
/Users/rushikesh/Documents \
/Volumes/New\ Volume/backup/
/**
* Note: The returned array must be malloced, assume caller calls free().
*/
int* grayCode(int n, int* returnSize) {
int size = 1 << n; // 2 ^ n
int *sequence = (int *) calloc(size, sizeof(int));
sequence[0] = 0;
@Rushi98
Rushi98 / how-to-merge-pdfs.txt
Created October 7, 2018 15:28
How to merge pdfs
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<output.pdf> <list-of-input.pdf>
@Rushi98
Rushi98 / CORS Filter.md
Created June 27, 2018 07:14 — forked from wildoctopus/CORS Filter
How to fix the CORS issue on backend side , java Springboot App (Handling Simple CORS requests)

//Contents from https://spring.io/understanding/CORS

In the simplest scenario, cross-origin communications starts with a client making a GET, POST, or HEAD request against a resource on the server. In this scenario, the content type of a POST request is limited to application/x-www-form-urlencoded, multipart/form-data, or text/plain. The request includes an Origin header that indicates the origin of the client code.

The server will consider the request's Origin and either allow or disallow the request. If the server allows the request, then it will respond with the requested resource and an Access-Control-Allow-Origin header in the response. This header will indicate to the client which client origins will be allowed to access the resource. Assuming that the Access-Control-Allow-Origin header matches the request's Origin, the browser will allow the request.

On the other hand, if Access-Control-Allow-Origin is missing in the response or if it doesn't match the request's Origin, the browser will disallow th

@Rushi98
Rushi98 / wf.md
Last active August 26, 2017 19:12
  1. Don't make changes to master branch.

  2. When you see a new issue you can solve, add a comment on it to the issue. Let's say the issue number is N.

  3. Do

git checkout master
@Rushi98
Rushi98 / gist:53cc6d218abe33076bc30d628a716bb7
Created May 10, 2017 14:51
Nautilus Build Error Log - 1
Creating directory “/home/rushi/.cache/gnome-builder/flatpak/repos/Nautilus/flatpak:org.gnome.Platform-x86_64-master”
Creating directory “/home/rushi/.cache/gnome-builder/flatpak/staging/Nautilus/flatpak:org.gnome.Platform-x86_64-master”
Emptying app dir '/home/rushi/.cache/gnome-builder/flatpak/staging/Nautilus/flatpak:org.gnome.Platform-x86_64-master'
Downloading sources
Downloading https://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2
|/-\|/-\|/-Cloning git repo https://anongit.freedesktop.org/git/exempi.git
Cloning into bare repository 'https_anongit.freedesktop.org_git_exempi.git.clone_tmp'...
Cloning git repo https://git.gnome.org/browse/tracker
Cloning into bare repository 'https_git.gnome.org_browse_tracker.clone_tmp'...
Cloning git repo https://git.gnome.org/browse/gnome-desktop