Skip to content

Instantly share code, notes, and snippets.

View digital-carver's full-sized avatar

SundaraRaman R digital-carver

View GitHub Profile
@digital-carver
digital-carver / CPANSyntaxHighlight.user.js
Last active March 5, 2019 08:03
A Greasemonkey script to enable syntax highlighting when viewing module sources on CPAN
// ==UserScript==
// @name CPANSyntaxHighlight
// @namespace abiteasier.in
// @description Enable syntax highlighting when viewing the source on CPAN
// @include http://cpansearch.perl.org/src/*
// @version 0.9
// @require http://yandex.st/highlightjs/7.3/highlight.min.js
// @resource syntaxHighlightCSS http://yandex.st/highlightjs/7.3/styles/github.min.css
// @grant GM_addStyle
// @grant GM_getResourceText
@digital-carver
digital-carver / AfraidOfEven.cpp
Created October 21, 2010 13:19
Assume an arithmetic progression (AP) is taken and each member is divided by powers of 2 until it becomes odd. Take such a sequence as input, and find the original arithmetic progression. (Max. 50 elements in input sequence, error checking knowingly left
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int MAX_32_SIGNED = 2147483647;
class AfraidOfEven
{