duplicates = multiple editions
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
using UnityEngine; | |
using UnityEditor; | |
public class AutoSnap : EditorWindow | |
{ | |
private Vector3 prevPosition; | |
private bool doSnap = true; | |
private float snapValue = 1; | |
[MenuItem( "Edit/Auto Snap %_l" )] |
bool CheckForLongPress() { | |
if (Input.touches[0].phase == TouchPhase.Began) { // If the user puts her finger on screen... | |
_timePressed = Time.time - _timeLastPress; | |
} | |
if (Input.touches[0].phase == TouchPhase.Ended) { // If the user raises her finger from screen | |
_timeLastPress = Time.time; | |
if (_timePressed > WaitingSeconds/2f) { // Is the time pressed greater than our time delay threshold? | |
return true; | |
} |
using System; | |
using UnityEngine; | |
using System.Collections; | |
public class AssetBundleSample : MonoBehaviour { | |
public GUIText guitext; | |
// Use this for initialization | |
void Start () { |
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
using System.Net; | |
public string GetHtmlFromUri(string resource) | |
{ | |
string html = string.Empty; | |
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(resource); | |
try | |
{ | |
using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse()) | |
{ | |
bool isSuccess = (int)resp.StatusCode < 299 && (int)resp.StatusCode >= 200; |
If you want to set the key, but not want to share the key to the public, you need this.
apiKey.txt
file in Builds
folderbrowser = request.user_agent.browser | |
version = request.user_agent.version and int(request.user_agent.version.split('.')[0]) | |
platform = request.user_agent.platform | |
uas = request.user_agent.string | |
if browser and version: | |
if (browser == 'msie' and version < 9) \ | |
or (browser == 'firefox' and version < 4) \ | |
or (platform == 'android' and browser == 'safari' and version < 534) \ | |
or (platform == 'iphone' and browser == 'safari' and version < 7000) \ |