Skip to content

Instantly share code, notes, and snippets.

View kshitij86's full-sized avatar

Kshitij Kotasthane kshitij86

  • IIT Delhi
  • Delhi
View GitHub Profile
@kshitij86
kshitij86 / vectorInt.cpp
Last active August 19, 2023 16:46
Implementation of a vector of integers in C++
#include<bits/stdc++.h>
using namespace std;
class VectorInt{
private:
int lastPtr; //points to the last available posi;
//the number of elements that can be accomodates; maximum capacity
int capacity;
int size; //the number of elements already in the vector; initially zero
int *vectorIntPtr;
@kshitij86
kshitij86 / rn-mlh-summary.md
Last active November 28, 2020 05:08
A summary of my contributions to react-native during MLH Fellowship for Fall 2020.

RNTester Dark Mode

Implement dark mode for RNTester.

dark mode-android dark mode-iOS-1

Existing implementation:

In RNTesterAppShared.js, this code subscribes to Appearance and listens for theme changes and sets it accordingly,

@kshitij86
kshitij86 / player.js
Created July 26, 2020 18:03 — forked from klikstermkd/player.js
Compare two ways of getting previous state from a React component, when setting its new state.
class Player extends React.Component {
constructor() {
super()
this.state = { score: 0 }
}
increaseScore() {
// 1. Get previous state from this.state
this.setState({ score: this.state.score + 1 })
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@kshitij86
kshitij86 / ListActivity.java
Created February 3, 2020 00:53
Reference activity with the location provider client and listView.
package com.fynd.listview;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
@kshitij86
kshitij86 / cousera_project_notebook.ipynb
Last active June 12, 2019 07:47
New gist that contains code and Markdown as per course structure for review by peers.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.