Skip to content

Instantly share code, notes, and snippets.

View tanaytoshniwal's full-sized avatar
🕉️

Tanay Toshniwal tanaytoshniwal

🕉️
View GitHub Profile
@tanaytoshniwal
tanaytoshniwal / linkedlist.cpp
Created August 18, 2019 20:37
Linked List CPP
#include <bits/stdc++.h>
using namespace std;
typedef struct Node Node;
struct Node{
int data;
Node* next;
};
@tanaytoshniwal
tanaytoshniwal / linkedlist_insert.cpp
Created August 18, 2019 20:21
Linked List Insert Function
Node* insert(Node* head, int data){
Node *node = (struct Node*)malloc(sizeof(struct Node*));
node->data = data;
node->next = NULL;
if(head == NULL){
head = node;
return head;
}
Node* temp = head;
while(temp->next!=NULL){
@tanaytoshniwal
tanaytoshniwal / linkedlist_print.cpp
Last active August 18, 2019 20:05
Linked List Printing Function
void print(Node* head){
if(head==NULL){
return;
}
Node* temp = head;
while(temp != NULL){
cout << temp->data << " ";
temp = temp->next;
}
}
@tanaytoshniwal
tanaytoshniwal / linkedlist_main.cpp
Created August 18, 2019 20:01
Linked List Main Function
int main(){
Node *head = NULL;
int n;
cin >> n;
while(n--){
int t;
cin >> t;
head = insert(head, t);
}
@tanaytoshniwal
tanaytoshniwal / node.cpp
Last active August 18, 2019 20:01
Struct to represent a Node in a Linked List
typedef struct Node Node;
struct Node{
int data;
Node* next;
};

Webarch Recruitment 2019 Task - App Dev

Second Years

  • The task is to build an android application that fetches data from any REST API. You can find few public api's here. Get the data in JSON format from the API and display parsed information in the application. User must be able to refresh the page to get latest feeds. (If there are links in the JSON data, then user must be able to open that link in a browser from the application)

Bonus Task: Make the application show the previously fetched data when device is offline.

First Years

  • Build an application that plays a video only on device shake and add a shake sensitivity controller to control the sensitivity of the shake listener.
@tanaytoshniwal
tanaytoshniwal / unhide.bat
Created December 21, 2017 07:34
unhide the hidden files and folders with a password that are hidden using attrib command
:: setting echo off
@echo off
:: setting password variable ad taking input
set /p "password="
:: checking the input with our password(unlock in this case)
if not "%password%" == "unlock" (exit)
:: unhiding files and folders using attrib command with attributes -h -r -s
else (T:&attrib -h -r -s File.txt)
@tanaytoshniwal
tanaytoshniwal / hide.bat
Last active December 21, 2017 07:29
Hide selected files and folders from batch file
:: move to desired local drive(D in this case) and the location of file or folder using "cd" command
D:&
:: use attrib command with attributes +h +r and +s followed by the name of file(with extension) or folder
attrib +h +r +s File.txt
:: if you want to hide more files and folders use "&" followed by another attrib command same as mentioned above