Skip to content

Instantly share code, notes, and snippets.

View nootanghimire's full-sized avatar
🌱

Nootan Ghimire nootanghimire

🌱
View GitHub Profile
@nootanghimire
nootanghimire / pull.sh
Last active August 29, 2015 14:04
pull hg repo changeset-by-changeset
#!/bin/bash
i=$(<config-a-bash-b)
while [ $i -lt 195225 ]
do
echo "Executing: hg pull --rev $i"
hg pull --rev $i
i=$[$i+100]
echo "$i" > config-a-bash-b
done
@nootanghimire
nootanghimire / tower-of-hanoi-recursive.c
Created June 24, 2014 17:03
tower-of-hanoi-recursive
/**
* @author Nootan Ghimire <[email protected]>
* @desc Implementation of Solution Tower of hanoi in C. (Recursive implementation)
*/
#include <stdio.h>
/**
* Includes for benchmarking
*/
@nootanghimire
nootanghimire / gauss-elimination.cpp
Created May 28, 2014 18:51
Trying to create a Data Structure AugmentedMatrix and implement it as System of Lineqr Equations solving using Gauss-Elimination Method
/*
*
* @Author : Nootan Ghimire <[email protected]>
*
* Algorithm
*
* Here I try to Write the Algorithm
*
* Step 01 : Start (Yeah)
* Step 02 : Get the Augmented Matrix
@nootanghimire
nootanghimire / bisectionWithAutomatedGuess.cpp
Created May 11, 2014 17:07
Non-linear equation solving using bisection method. (Automated guessing)
/*******************************
* Bisection Method:
* @author nootanghimire
*******************************/
/******************************
*
* TODO: Dynamic function loading and solving..
* : see github/nootanghimire/calc-cpp
* : function: addSpace(char[], *char[])
@nootanghimire
nootanghimire / fullAdder_behaviorial.vl
Last active August 29, 2015 13:59
Some Basic Verilog Learnings
module main;
reg a, b, Cin;
wire S, Cout;
fulladder f1(a,b,Cin,S,Cout);
initial
begin
a=1'b0;b=1'b0;Cin=1'b0;
#40
$display("0 0 0");
$display("Sum: ");
@nootanghimire
nootanghimire / unethical.cpp
Created April 8, 2014 12:22
UnEthical Overloading
#include <iostream>
class ovt {
private:
int num;
public:
ovt(int n = 1):num(n){}
operator int(){
return num;
}
@nootanghimire
nootanghimire / stringCheck.cpp
Created April 7, 2014 17:01
Dynamically Get String without using cin.get()
#include <iostream>
#include <string>
using namespace std;
int main()
{
std::string s;
//s = new char[200];
int counter = 0;
<html>
<head>
<title>Chat and Talk!</title>
<style>
body{
margin:0;
padding:0;
}
.text{
color:blue;
@nootanghimire
nootanghimire / analogclock.cpp
Last active February 5, 2025 09:54
Analog Clock using C(++)
#include <SDL2/SDL.h>
#include <cmath>
#include <ctime>
#include <iostream>
#define S_WIDTH 1024
#define S_HEIGHT 768
@nootanghimire
nootanghimire / script.sh
Created March 3, 2014 06:49
Useful script after Fresh-install OS
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install tasksel
sudo tasksel install lamp-server
sudo apt-get install zsh
sudo apt-get install git