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 os | |
import requests | |
import math | |
import zipfile | |
from optparse import OptionParser | |
# map server constants | |
MAP_SERVER_ADDRESS = '[YourMapServer]' | |
MAP_SERVER_USERNAME = '' |
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 hashlib | |
import re | |
import unittest | |
from abc import abstractmethod | |
class ObjectUnifier: | |
_token_list = [] |
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 java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Command line argument parser class for parsing command lines like | |
* program.jar -i input.txt -o output.txt --verbose. | |
*/ | |
public class CommandLineParser { | |
/** |
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 com.google.zxing.common.BitMatrix; | |
import javafx.scene.image.Image; | |
import javafx.scene.image.ImageView; | |
import javafx.scene.image.PixelWriter; | |
import javafx.scene.image.WritableImage; | |
import javafx.scene.paint.Color; | |
/** | |
* Helper class for converting a com.google.zxing.common.BitMatrix into an Image object instance in JavaFX. | |
*/ |
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 | |
define('GPIO_HIGH', 1); | |
define('GPIO_LOW', 0); | |
function gpio_exec($cmd) | |
{ | |
$output = array(); | |
$return = 0; | |
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
// to use the JwtAuthenticator in a CakePHP application you first have load the corresponding | |
// authenticator in your Application::getAuthenticationService(...) | |
$service->loadAuthenticator('Authentication.Jwt', [ | |
'returnPayload' => false | |
]); | |
// The parameter 'returnPayload' is set to true by default - If you want your visitor using the JWT run trough a full authentication | |
// process, you should set it to false. |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
short date_compress(int day, int month, int year) { | |
short d = ((((year % 100) << 4) + month) << 5) + day; | |
return d; | |
} | |
int* date_decompress(int cdate) { |
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 java.util.HashMap; | |
import java.util.Map; | |
import javafx.scene.control.TreeItem; | |
import javafx.scene.control.TreeView; | |
public class ExpansionState { | |
private TreeView treeView; | |
private Map<Integer, Object> expansionGraph; |
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 | |
// database credentials | |
define('DB_HOST', ''); | |
define('DB_USER', ''); | |
define('DB_PASW', ''); | |
define('DB_DATA', ''); | |
define('DB_PREF', ''); | |
// several constants |
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 // ... ; | |
import org.osmdroid.views.overlay.Overlay; | |
final class CurrentLocationOverlay extends Overlay implements LocationListener { | |
private MapView mapView; | |
private LocationManager locationManager; | |
private boolean followLocation = true; | |
private String locationProvider; |
NewerOlder