This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#hangman | |
import random | |
pics=[' ', | |
''' | |
=========|| | |
| || | |
|| | |
|| | |
|| | |
|| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<fstream.h> | |
#include<stdlib.h> | |
int main() | |
{ | |
cout<<"\nPassword generator "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
float res,x=19; | |
res=(x*x)+(18*x)+93; | |
cout<<res<<endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear | |
g++ function.cpp | |
clear | |
./a.out | |
g++ temp.cpp | |
clear | |
./a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<iostream> | |
using namespace std; | |
main() | |
{ | |
int *b,a; | |
void *v; | |
a=1; | |
b=&a; | |
v=&a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() |
NewerOlder