Skip to content

Instantly share code, notes, and snippets.

View brijeshb42's full-sized avatar
🏠
Working from home

Brijesh Bittu brijeshb42

🏠
Working from home
View GitHub Profile
/*
* make sure the input file is in same folder as the program
* output file will be generated in the same folder
*/
#include <stdio.h>
void readFile(char *fil){
FILE *fin, *fout; // fin for input, fout for output files
fin = fopen(fil,"r"); // open input file in read mode
<html>
<head>
<title>Shoe Rental</title>
<script src="index.js"></script>
</head>
<body>
</body>
</html>
@brijeshb42
brijeshb42 / dtmf.m
Created May 7, 2014 14:14
Detection of Key Pressed using DTMF decoding in MATLAB
clc;
nums = ['1' '2' '3';'4' '5' '6'; '7' '8' '9'; '*' '0' '#'];
FREl = [697,770,852,941];
FREu = [1209,1336,1477];
rec = audiorecorder;
display('Press DTMF key...');
recordblocking(rec,5);
// A C / C++ program for Bellman-Ford's single source shortest path algorithm.
// http://www.geeksforgeeks.org/dynamic-programming-set-23-bellman-ford-algorithm/
/* input
10 18
0 1 3
0 2 5
0 4 4
1 4 1
<!DOCTYPE html>
<html>
<head>
<title>Counter</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
#count{
@brijeshb42
brijeshb42 / login.php
Created April 19, 2014 19:40
session
<?php
$e = "";
if(isset($_POST) && isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['password']) && !empty($_POST['password']) && $_POST['password']=='secret'){
session_start();
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = $_POST['password'];
if(isset($_POST['football']) && !empty($_POST['football'])){
$_SESSION['football'] = $_POST['football'];
}
/*
* Cryptography and Network Security Assignment (CNWS)
* Topic : Finite Fields of the Form GF(p) [Galois Field]
* Name : Brijesh Bittu
* Roll : BE/1091/2010
* Branch : ECE
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(int argc, char const *argv[])
{
int sz,sm=0;
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(int argc, char const *argv[])
{
string pin,tpin;
int *seq;
int isum(int a[],int s){
int i,sum=0;
for(i=0;i<s;i++){
sum+=a[i];
}
return sum;
}
double dsum(double a[],int s){
int i;