This file contains hidden or 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 arcpy | |
class Toolbox(object): | |
def __init__(self): | |
"""Define the toolbox (the name of the toolbox is the name of the | |
.pyt file).""" | |
self.label = "ToolboxSample" | |
self.alias = "ToolboxSample" |
This file contains hidden or 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
void Button1Click(object sender, EventArgs e) | |
{ | |
string name; | |
name = textBox1.Text; | |
string pigName = ""; | |
makePigLatin(ref pigName, name); | |
label1.Text = pigName; | |
} | |
public void makePigLatin(ref string pigName, string name) |
This file contains hidden or 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 requests | |
urlToGoTo = 'URLOfServiceOnAGOL' | |
r = requests.get(urlToGoTo, allow_redirects=True) | |
with open(r"FileLocation.ZIP", "wb") as f: | |
for chunk in r.iter_content(): | |
f.write(chunk) |
This file contains hidden or 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 | |
L = [0] | |
def nohe(x): | |
global L | |
x = 0 | |
while x in L: | |
x = random.choice(range(1, 361)) | |
L.append(x) | |
return x |
This file contains hidden or 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
<?php | |
ini_set('display_errors',1); | |
error_reporting(E_ALL & ~E_NOTICE); | |
//Attempt to Connect | |
$connection = @mysql_connect ('localhost', 'root', 'nohe'); | |
@mysql_select_db("Noah", $connection); |
This file contains hidden or 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
function mapSelect(){ | |
var mapOptions = ["osm", "national-geographic", "gray", "satellite", "hybrid", "oceans", "streets", "topo"]; | |
num = Math.floor(Math.random() * mapOptions.length); | |
console.log(num) | |
basemap = mapOptions[num]; | |
console.log(basemap) | |
return basemap; | |
}; |
This file contains hidden or 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
function sanitize(encodedString) | |
{ | |
var str = encodedString; | |
var message = str.replace(/%3C/gi, "<"); //This one replaces < with < | |
var message = message.replace(/%3E/gi, ">"); //This one replaces > with > | |
var message = message.replace(/%2F/gi, "⁄"); //This replaces the / sign with &frasl | |
var message = message.replace(/%3B/gi, ";"); //This one allows ; to be decoded | |
var message = message.replace(/</gi, "<"); //This prevents nonencoded < to be used as < | |
var message = message.replace(/>/gi, ">"); //This prevents nonecoded > to be used as > | |
var message = message.replace(/%26/gi, "&"); //This one decodes & to & |
This file contains hidden or 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
function submitReviewDialog() | |
{ | |
// We're done with getting the review | |
hideReviewDialog(); | |
// Submit the comment | |
/*dojo.xhrPost({ | |
url: "proxy.ashx?http://www.arcgis.com/sharing/content/items/" + currentDetailsId + "/addComment", | |
headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, | |
postData: |
NewerOlder