This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GDAL_WARPTEST.cpp : Defines the entry point for the console application. | |
#include "stdafx.h" | |
#include "gdal_priv.h" | |
#include <iostream> | |
using namespace std; | |
//#include "cpl_conv.h" // for CPLMalloc() | |
//#include <stdio.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector<string> argArraytest; | |
argArraytest.push_back(""); | |
argArraytest.push_back("-of"); | |
argArraytest.push_back("GTiff"); | |
argArraytest.push_back("C:\\Users\\Will\\Desktop\\Lena.bmp"); | |
argArraytest.push_back("C:\\Users\\Will\\Desktop\\Lena_IS_NOW_A_GTIFF_BITCH.tif"); | |
vector<char*> argumentPointers( argArraytest.size() ); | |
for ( size_t i = 0; i < argArraytest.size(); i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import random | |
def mkfrag(N): | |
body = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(N)) | |
return "#" + body + "#" | |
if __name__ == '__main__': | |
nfrags = input('how many frags? ') | |
fraglength = input('frag length: ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "./squared.rb" | |
require "./sort.rb" | |
require "./filter.rb" | |
require "./group.rb" | |
require "./adder.rb" | |
require "test/unit" | |
class TestSquared < Test::Unit::TestCase | |
def test_squared | |
for i in (0..10) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace.views.MyWizard = Backbone.Views.extend({ | |
initialize: function() { | |
_.bindAll(this, 'render', 'wizardMethod'); | |
} | |
render: function() { | |
this.wizardMethod(); | |
return this; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
I've run into an architectural challenge. I'm hoping some second opinions will help me organize this logic. | |
My sites naked and www domains serve as entrypoints to numerous subdomains through which users interact with the site. | |
=end | |
models/region.rb | |
class Region < ActiveRecord::Base | |
... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Locale | |
# must provide session and request options | |
def self.new(options = {}) | |
initialize_region(options) || NullLocale.new | |
end | |
# return the region object associated with this Locale | |
def region_name | |
@region.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import difflib | |
import datetime | |
import os | |
import shutil | |
# where log is written | |
logFilename = 'log.txt' | |
# where torrents are located | |
torrentSource = 'C:\Users\Tchow\Downloads' | |
# where torrents need to go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiber' | |
# Call create to get a new fiber | |
class ReaderProcessor | |
def self.create(notifier) | |
Fiber.new do | |
while notifier.no_data_yet do | |
puts "Reader has no data yet" | |
Fiber.yield | |
end |
OlderNewer