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
#!/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; | |
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() |
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
#!/usr/bin/env python | |
import time | |
import os | |
class clicker: | |
x='' | |
y='' | |
delay='' | |
n='' |
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> | |
#define SIZE(n) (n+8-(n%8))/8 | |
main() | |
{ | |
int upper,temp,i; | |
printf("Enter the largest number in list "); | |
scanf("%d",&upper); | |
upper+=1; | |
unsigned char list[SIZE(upper)]; | |
for(temp=0;temp<SIZE(upper);temp++) |
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<stdlib.h> | |
#define SIZE(n) (n+8-(n%8))/8 | |
#define PRESENT 1 | |
#define ABSENT 0 | |
#define POS(n) n/8 | |
struct number | |
{ | |
unsigned char num0:1; | |
unsigned char num1:1; |
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> | |
main() | |
{ | |
char string[10],i,*fp=fopen("file","r"); | |
while(fscanf(fp,"%s",string)!=EOF && printf(" ")) | |
for(i=strlen(string);i>=0;printf("%c",string[i--])); | |
} |
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
<html> | |
<title>Upload</title> | |
<?php | |
session_start(); | |
$target=$_POST['directory']; | |
if($target[strlen($target)-1]!='/') | |
$target=$target.'/'; | |
$count=0; | |
foreach ($_FILES['file']['name'] as $filename) | |
{ |
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> | |
#define CUBE(n) n*n*n | |
int armstrong(int n); | |
int prime(int n); | |
int main() | |
{ | |
int n,i; | |
printf("\nEnter number "); | |
scanf("%d",&n); | |
if(armstrong(n)) |