Instantly share code, notes, and snippets.

// InfiniteViewPager - An infinitely scrolling view pager.
// Copyright (C) 2014 Angelo Rohit Joseph Pulikotil
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
View UIGradientViewSetup.m
UIGradientView * gradientView = (UIGradientView *)self.view;
// Add a radial gradient overlay.
[gradientView addGradientOverlay:[[RadialGradientOverlay alloc] initWithGradientStops:[[NSArray alloc] initWithObjects:
[[GradientStop alloc] initWithColor:[UIColor greenColor] AndOffset:0],
[[GradientStop alloc] initWithColor:[UIColor yellowColor] AndOffset:100],
// Add a linear gradient overlay.
[gradientView addGradientOverlay:[[LinearGradientOverlay alloc] initWithGradientStops:[[NSArray alloc] initWithObjects:
View heapsortcpp
#include <iostream>
#include <vector>
using namespace std;
void Swap(std::vector<int>& vHeap, std::vector<int>::size_type i, std::vector<int>::size_type j)
if(i == j)