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
private void multipartBoundaryMissed() throws IOException { | |
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "tempfile.dmp"); | |
file.createNewFile(); | |
AsyncHttpClient client = new AsyncHttpClient(); | |
RequestParams params = new RequestParams(); | |
params.put("access_token", "AFVVD"); | |
params.put("file", file); |
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
public static final UUID RFCOMM_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); | |
public static BluetoothSocket createSocket(BluetoothDevice device) throws IOException { | |
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD) { | |
return createSocketPostGingerbread(device); | |
} | |
else { | |
return createSocketPreGingerbread(device); | |
} | |
} |
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
private boolean isPointInRange(double latitude, double longitude, List<GeoPoint> range) { | |
int i, j; | |
boolean c = false; | |
int nvert = range.size(); | |
for (i = 0, j = nvert-1; i < nvert; j = i++) { | |
GeoPoint jPoint = range.get(j); | |
GeoPoint iPoint = range.get(i); | |
if ( ((iPoint.Longitude >longitude) != (jPoint.Longitude>longitude)) && | |
(latitude < (jPoint.Latitude-iPoint.Latitude) * (longitude-iPoint.Longitude) / (jPoint.Longitude-iPoint.Longitude) + iPoint.Latitude)) | |
c = !c; |
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
<!-- /usr/share/themes/elementary/metacity-1/metacity-theme-3.xml --> | |
<frame_geometry name="max" has_title="false" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false"> | |
<distance name="left_width" value="0" /> | |
<distance name="right_width" value="0" /> | |
<distance name="left_titlebar_edge" value="0"/> | |
<distance name="right_titlebar_edge" value="0"/> | |
<distance name="title_vertical_pad" value="0"/> | |
<border name="title_border" left="0" right="0" top="0" bottom="0"/> | |
<border name="button_border" left="0" right="0" top="0" bottom="0"/> | |
<distance name="bottom_height" value="0" /> |
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
/* | |
* Copyright (C) 2016 Jeff Gilfelt. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
using System; | |
using System.Net; | |
using System.IO; | |
using Gdk; | |
namespace TileSticher | |
{ | |
class App | |
{ | |
public static int Main (string[] args) |
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
// ==UserScript== | |
// @name Ingress Intel: Notify UI | |
// @namespace https://arantius.com/misc/greasemonkey/ | |
// @description Annotate the Ingress Intel Dashboard with links to control the Ingress Notify app. | |
// @match http://www.ingress.com/intel* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
//const NOTIFY_SERVER = 'http://localhost:8080/' |
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
library(rjson) | |
#convert output from hclust into a nested JSON file | |
HCtoJSON<-function(hc){ | |
labels<-hc$labels | |
merge<-data.frame(hc$merge) | |
for (i in (1:nrow(merge))) { |
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
package com.example.beginner1; | |
import android.os.Handler; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; |
OlderNewer