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
package hello | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"path/filepath" | |
"time" |
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
package com.arcgis.apps.testextent; | |
import android.graphics.Color; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.ScaleGestureDetector; | |
import android.view.View; |
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
package com.ashleyandalexander.esri.addafeature; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import com.esri.android.map.MapView; | |
import com.esri.android.map.ags.ArcGISFeatureLayer; | |
import com.esri.core.geodatabase.GeodatabaseEditError; | |
import com.esri.core.geodatabase.GeodatabaseFeature; |
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
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Geodatabase; | |
namespace NewAppend | |
{ | |
class Program |
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
def calculateHammingDistance(): | |
closestWord = None | |
prevWordDistance = None | |
TestWord = "work" | |
DictWords = ["four", "That", "Thin", "Test", "This", "NINJA"] | |
for word in DictWords: | |
if (len(TestWord) == len(word)): | |
wordDist = distance(TestWord, word) | |
if (prevWordDistance == None or prevWordDistance > wordDist): | |
prevWordDistance = wordDist |
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 alexMath(object): | |
"""Demonstaration of how the computer calculates the square roots of | |
numbers. Shows all iterations of what it calculates for example on | |
how it works. | |
Based off of the Babylonian Method located here: | |
https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method""" | |
@staticmethod | |
def __privSqrtFunc(number, sigdigs): |
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
public static void HttpUploadFile(string url, string file, string paramName, string contentType, NameValueCollection nvc) | |
{ | |
Console.WriteLine(string.Format("Uploading {0} to {1}", file, url)); | |
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x"); | |
byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n"); | |
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url); | |
wr.ContentType = "multipart/form-data; boundary=" + boundary; | |
wr.Method = "POST"; | |
wr.KeepAlive = true; |
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 random, unittest | |
def generateMagicKey(): | |
magicKey = {} | |
list1 = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
list2 = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
while len(list2) > 0: | |
z = random.randint(0, len(list2)-1) | |
y = random.randint(0, len(list2)-1) | |
a, b = list1[z], list2[y] |
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 urllib | |
import urllib2 | |
import json | |
class ArcGISOnline(object): | |
def __init__(self, Username, Password): | |
self.username = Username | |
self.password = Password | |
self.__token = self.generateToken(self.username, self.password)['token'] |
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
// | |
// main.cpp | |
// Lesson9-1 | |
// | |
// Created by Alexander Nohe on 8/4/15. | |
// Copyright (c) 2015 Alexander Nohe. All rights reserved. | |
// | |
#include <iostream> | |
#include <fstream> |
NewerOlder