If you want to set the key, but not want to share the key to the public, you need this.
- put it on ARCamera, and give it the first priority in components
- put your key as
apiKey.txt
file inBuilds
folder
#!/usr/bin/env python | |
""" | |
Updates documents in a safe manner and catches expected errors. | |
""" | |
import pymongo | |
import time | |
# Previous code; left here for reference. |
import pymongo | |
import sys | |
c = pymongo.MongoClient(host=["mongodb://localhost:27017", | |
"mongodb://localhost:27018", | |
"mongodb://localhost:27019"], | |
replicaSet="m101", | |
w=1, | |
j=True) |
ps -ef | grep mongod |
#!/usr/bin/env python | |
import pymongo | |
import gridfs | |
# establish a connection to the database | |
connection = pymongo.MongoClient() | |
#get a handle to the test database | |
db = connection.test |
<div id="offcanvas_side_nav" class="uk-offcanvas"> | |
<div class="uk-offcanvas-bar uk-offcanvas-bar-flip"> | |
<div class="uk-offcanvas-bar"> | |
<ul class="uk-nav uk-nav-offcanvas uk-nav-parent-icon" data-uk-nav> | |
<li class="uk-nav-header"> | |
<a class="button_link_like" | |
id="turn_off_offcanvas" |
# Example of combining Flask-Security and Flask-Admin. | |
# by Steve Saporta | |
# April 15, 2014 | |
# | |
# Uses Flask-Security to control access to the application, with "admin" and "end-user" roles. | |
# Uses Flask-Admin to provide an admin UI for the lists of users and roles. | |
# SQLAlchemy ORM, Flask-Mail and WTForms are used in supporting roles, as well. | |
from flask import Flask, render_template | |
from flask.ext.sqlalchemy import SQLAlchemy |
browser = 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) \ |
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
folderusing 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; |
/* | |
* 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 |