Skip to content

Instantly share code, notes, and snippets.

View rajeevs1992's full-sized avatar

Rajeev Sreedharan rajeevs1992

View GitHub Profile
@rajeevs1992
rajeevs1992 / JsonExtensions.cs
Created November 9, 2020 09:59
Case insensitive JSON reading in C#
public static class JsonExtensions
{
public static JToken GetPropertyFromPath(this JToken token, string path)
{
if (token == null)
{
return null;
}
string[] pathParts = path.Split(".");
JToken current = token;
#hangman
import random
pics=[' ',
'''
=========||
| ||
||
||
||
||
#include<fstream.h>
#include<stdlib.h>
int main()
{
cout<<"\nPassword generator ";
#include<stdio.h>
#include<string.h>
#include<iostream.h>
#include<process.h>
#include<conio.h>
void search(int n);
void print(char temp[50],int i,int n);
char str[50][50];
int main()
{
#include<iostream>
#include<fstream>
#include<stdio.h>
using namespace std;
int main()
{
char exp[50],x[10];
cout<<"\nEnter the function ";
gets(exp);
cout<<"\nEnter the value of x ";
#!/bin/bash
#Author :Rajeev S
#Date :8/18/2011 2341hrs
#print mac id of a computer
import re
import os
os.system("clear")
ifconfigOutput=os.popen("ifconfig").read()
t='[a-z0-9]'
MACpattern=(t*2+':')*5+t*2
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
float res,x=19;
res=(x*x)+(18*x)+93;
cout<<res<<endl;
}
clear
g++ function.cpp
clear
./a.out
g++ temp.cpp
clear
./a.out
#include<stdio.h>
#include<iostream>
using namespace std;
main()
{
int *b,a;
void *v;
a=1;
b=&a;
v=&a;
#include<msp430.h>
void init_adc()
{
ADC10CTL0|=ADC10ON|SREF_0|ADC10SHT_2;
ADC10CTL1|=INCH_4|SHS_0|ADC10DIV_0|ADC10SSEL_0|CONSEQ_0;
ADC10AE0=BIT4;
ADC10CTL0|=ENC;
}
void start()