Skip to content

Instantly share code, notes, and snippets.

View satlavida's full-sized avatar

Satyajeet Nigade satlavida

View GitHub Profile
clc;
clear all;
close all;
img = (imread('deer1.jpg'));
T = input('Input Threshold');
T1 = uint32(0);
T2 = uint32(0);
T1n = 0;
<div class="centered">
<canvas id="sevensegment" height="400px" width="400px"></canvas>
</div>
@satlavida
satlavida / syndrome_generator.m
Created April 17, 2019 16:23
Syndrome Generator for cyclic codes
clc;
close all;
clear;
n = input('Enter n for cyclic code');
k = input('Enter k for cyclic code');
msg = input('Enter message bits of the length n');
N = n-k; %No of shift register%
poly = cyclpoly(n,k,'max');
@satlavida
satlavida / cyclic_hardware.m
Last active April 17, 2019 16:24
Cyclic Encoding using Shift Registers
clc;
close all;
clear;
n = input('Enter n for cyclic code');
k = input('Enter k for cyclic code');
msg = input('Enter message bits of the length n-k');
N = n-k; %No of shift register%
poly = cyclpoly(n,k,'max');
namespace AppProgram
{
class Program
{
void Main()
{
Console.WriteLine("##Test##");
}
}
}
/**
* Tiles
*/
Body {
background: #515151;
min-height:100%;
margin: 0px;
}
.Tile {
@implementation CPTextView : CPView
{
DOMElement FIXME_textArea;
id _delegate;
CPScrollView _scrollView;
CPView _contentView;
JSObject _existingSelectStart;
@satlavida
satlavida / nested.coffee
Created February 5, 2012 14:12
Nested classes in CoffeeScript
class AlertMyFriends
class AlertMyFriends::Show
constructor: ->
alert "Hello Friends"
amf = new AlertMyFriends
al = new amf.Show()
@satlavida
satlavida / gist:1554964
Created January 3, 2012 13:52 — forked from devongovett/gist:1039559
JSONDB implementation
###
# JSONDB - a compressed JSON format
# By Devon Govett
# Originally proposed by Peter Michaux - http://michaux.ca/articles/json-db-a-compressed-json-format
#
# jsondb.pack converts an array of objects with the same keys (i.e. from a database)
# and flattens them into a single array, which is much smaller than the pure json
# representation where the keys are repeated for each item in the array.
# Combine with JSON.stringify to send compressed JSON data over the network.
#
@satlavida
satlavida / chat.rb
Created December 25, 2011 06:19 — forked from rkh/chat.rb
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do