Skip to content

Instantly share code, notes, and snippets.

View Rushi98's full-sized avatar
πŸ™ƒ

Rushikesh Jogdand Rushi98

πŸ™ƒ
View GitHub Profile
graph TD
A([Start]) --> B[/Input initial guess x0, tolerance e, maximum iterations N/]
B --> C[Initialize counter i = 1]
C --> D["Calculate f(x0) and f'(x0)"]
D --> E{"Is f'(x0) = 0?"}
E -- Yes --> F[/Print: Method fails due to zero derivative/]
F --> G([Stop])
E -- No --> H["Calculate x1 = x0 - f(x0) / f'x0"]
H --> I{"Is |x1 - x0| <= e?"}
I -- Yes --> J[/Print: Root is x1/]
// 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