used to calculate the great circle distance between two points on the earth (specified in decimal degrees)
- Miles: 3956
- Kilometers: 6371
0 = Success | |
1 = Operation not permitted | |
2 = No such file or directory | |
3 = No such process | |
4 = Interrupted system call | |
5 = Input/output error | |
6 = No such device or address | |
7 = Argument list too long | |
8 = Exec format error |
When a user interacts with a UI element the various listeners are called in a top down order. (For example: OnTouch -> OnFocusChange -> OnClick.) If a listener has been defined (with setOn...Listener) and it consumes this event: the lower priority listeners will not be called. By its nature the first time you touch an EditText it receives focus with OnFocusChangeListener so that the user can type. The action is consumed here therefor OnClick is not called. Each successive touch doesn't change the focus so the event trickles down to the OnClickListener. | |
Basically, you have three choices: | |
Set the focusable attribute to false in your XML: | |
android:focusable="false" | |
Now the OnClickListener will fire every time it is clicked. But this makes the EditText useless since the user can no longer enter any text... | |
Implement an OnFocusChangeListener along with the OnClickListener: |
-module(encode_uri_rfc3986). | |
-author('Renato Albano <renatoalbano@gmail.com>'). | |
-export([encode/1]). | |
%% Taken from <http://erlangexamples.com/>, | |
%% from <http://github.com/CapnKernul/httparadise> | |
%% and <http://www.erlang.org/doc/man/edoc_lib.html> | |
encode([C | Cs]) when C >= $a, C =< $z -> |
// Usage: | |
// blacklist | |
String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
// your share intent | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
// ... anything else you want to add | |
// invoke custom chooser |
package main | |
import ( | |
"fmt" | |
"net/url" | |
"reflect" | |
"strconv" | |
) | |
type Person struct { |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
(A Russian translation of this article can be found here, contributed by Timur Demin.)
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
{"1585790": 3.4166666666666665, "2484454": 4.05531914893617, "756299": 3.1350397175639895, "1654988": 4.204081632653061, "1509115": 3.8620689655172415, "2544239": 4.081632653061225, "2628112": 4.261363636363637, "106251": 3.627906976744186, "1908123": 3.1584158415841586, "956405": 3.815165876777251, "1677102": 2.625, "1816136": 3.5789473684210527, "608713": 3.129032258064516, "1380944": 3.543859649122807, "1057084": 3.524534686971235, "321898": 3.2653061224489797, "2262698": 3.675324675324675, "2548609": 3.0258620689655173, "1565111": 3.5835189309576836, "1745025": 3.7710843373493974, "680501": 3.8565400843881856, "1711213": 3.5025641025641026, "850822": 3.8, "377801": 3.8860759493670884, "1527866": 3.9789156626506026, "1347752": 3.975609756097561, "9064": 4.11214953271028, "614622": 4.03030303030303, "2051622": 3.512987012987013, "1742509": 3.6, "2457665": 4.072847682119205, "1410167": 3.590909090909091, "1557557": 3.1462072958888245, "608569": 3.796116504854369, "2206438": 3.4651162790697674, "2405827": 4.7 |