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
// User has 2 tabs open: Page 1 and Page 2, both in the same domain | |
// , subdomain and protocotol | |
// Page1: https://subdomain.domain.com | |
... | |
var data = { | |
a: 5, | |
// Local storage won't be triggered unless the value is different, | |
// so we add a random identifier. | |
id: Math.floor((Math.random()*1000)+1) |
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
#! python2 | |
# //coding: utf-8 | |
# coding=utf-8 | |
# -*- coding: utf-8 -*- | |
# vim: set fileencoding=utf-8 : | |
a = u'1a' | |
a = a.decode('utf-8').encode('cp1251') | |
print a |
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
##https://github.com/apple/coremltools/blob/master/examples/APIExamples.md | |
import coremltools | |
import numpy as np | |
import PIL.Image | |
# load a model whose input type is "Image" | |
model = coremltools.models.MLModel('path/to/the/saved/model.mlmodel') | |
Height = 20 # use the correct input image height | |
Width = 60 # use the correct input image width |
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
iOS Maps Frameworks | |
Google Maps SDK for iOS | |
https://developers.google.com/maps/documentation/ios/ | |
New to the market. Good choice if you wanted to do Android development (Google Maps SDK for Android). | |
Requires API key. API keys are not readily available. Submitted application for API key. Response can be found at: |
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
Copyright 2018 Matthew Scholefield | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |
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.deviant.security.shield; | |
public final class BuildConfig { | |
public static final String BUILD_TYPE = "debug"; | |
public static final boolean DEBUG; | |
public static final String FLAVOR = ""; | |
public static final String PACKAGE_NAME = "com.deviant.security.shield"; | |
public static final int VERSION_CODE = 4; | |
public static final String VERSION_NAME = "2.2"; |
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
<?php | |
$infile = 'austria.csv'; | |
$outfile = 'austria.ips'; | |
$fp = fopen($outfile,'w'); | |
$handle = fopen($infile, "r"); | |
if ($handle) | |
{ | |
while (($line = fgets($handle)) !== false) { | |
$line = trim($line); |
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 to_tree(source: list): | |
i = 0 | |
result = dict() | |
node = result | |
while i < len(source): | |
parent = source[i][0] | |
child = source[i][1] | |
if parent is None: | |
result.update({child: {}}) | |
i += 1 |
OlderNewer