text:
Hacker News new | past | comments | ask | show | jobs | submit login
Universally Unique Lexicographically Sortable Identifier in Go (github.com/oklog)
89 points by tsenart on Dec 6, 2016 | hide | past | favorite | 52 comments
Dowwie on Dec 6, 2016 | next [–]
Seems that someone ported the javascript ulid library to Python: https://github.com/mdipierro/ulid
.. and it appears to be working
aruggirello on Dec 6, 2016 | parent | next [–]
Out of curiosity, I just wrote a PHP ulid() function. [1]
It took me a little more than 5 minutes, so it wasn't that hard after all. It appears to run at only about 35% the speed of the Go version, but hopefully there's still room for some little improvement.
[1] https://github.com/phptools/ulid
tsenart on Dec 6, 2016 | root | parent | next [–]
Fellow PHP implementation: https://github.com/Lewiscowles1986/ulid
atombender on Dec 6, 2016 | prev | next [–]
I wonder why you would ever want it to be case-insensitive? Surely that increases the possibility of clashes, and violates the very good principle of least surprise (pretty much every other ID in the world is case-sensitive).
quink on Dec 7, 2016 | parent | next [–]
The hex representation of GUIDs/UUIDs is case insensitive in most interpretations, I'd say that counts enough.
atombender on Dec 7, 2016 | root | parent | next [–]
I'd be surprised if many developers these days actually compared UUIDs case-insensitively, though, even if they're intended to be. Microsoft, which have relied on GUIDs for years going back to their version of DCE/RPC, probably does it right.
If it's part of a spec, then it's simpler, but it's still a potential point of surprise.
TeeWEE on Dec 6, 2016 | prev | next [–]
Note. You cant compare ULID with UUID's
- An ulid is "sortable". But the whole point of an UUID is a random unique ID. Non guessable. Sortable is not a feature
you normally want from an uuid. And still UUIDs are still sortable. But it doesnt have any meaning.
- An ulid also encodes Time, an uuid doesn't.
- An uuid has less change of clashing: Its 128 bit vs 80 bit for ulid.
- An uuid is also url safe.
- An ulid is case insensitive. I don't see how this is an advantage.
_ak on Dec 6, 2016 | parent | next [–]
You just compared UUIDs with ULIDs.
cloudhead on Dec 6, 2016 | root | parent | next [–]
Maybe he means programatically?
icholy on Dec 6, 2016 | root | parent | next [–]
I think he's joking.
throwaway98237 on Dec 6, 2016 | root | parent | next [–]
And nailed it.
sp332 on Dec 6, 2016 | root | parent | prev | next [–]
That's contrasting, not comparing.
_ak on Dec 6, 2016 | root | parent | next [–]
https://www.google.com/search?q=to+compare+definition
clinta on Dec 6, 2016 | parent | prev | next [–]
If you sort a list of ULIDs they sorted by time of creation, with random order only among ULIDs created in the same millisecond. As far as guessable, you still have 80 random bits. Though I'll admit I'm not qualified to comment on whether the difference between 80 and 128 bits is significant when you're trying to make sure your identifiers are not guessable.
As for less chance of clashing, 128 vs 80 bits. 80 bits is only within the same millisecond. The 128 bits is for the lifetime of your application. Based on my basic understanding of the birthday paradox, there is a 50% chance of collision if you have 2^40 ULIDs generated during the same millisecond. And there is a 50% chance of collision if you have 2^64 UUIDs generated during the lifetime of the application.
Case insensitivity and the chosen character set is an advantage if you want to use this ID as a filename without having to worry about the limits of the filesystem.
tyingq on Dec 6, 2016 | parent | prev | next [–]
>An ulid is case insensitive. I don't see how this is an advantage.
It's helpful if you've ever had to read something like a ULID over the phone. Base64 isn't fun in that situation.
jdmichal on Dec 6, 2016 | root | parent | next [–]
I've never seen a UUID in base-64 instead of hex...
tyingq on Dec 6, 2016 | root | parent | next [–]
Hex is also case insensitive. Was trying to answer why case insensitive might be an advantage.
Sure. I just don't even understand why it's a point in a discussion about UUID (hex) vs ULID (base-32), since both are case-insensitive... Which I think is why TeeWEE was stating that it's not really an advantage for ULID.
My guess is that the README was mostly copied from here: https://github.com/alizain/ulid
Which has a similar list, but presents them as features/facts, not advantages.
Edit: Perhaps it was noted to specifically call out that it maintains case insensitivity, even though it's choosing a more dense approach than just hex.
vertex-four on Dec 6, 2016 | parent | prev | next [–]
> An uuid has less change of clashing: Its 128 bit vs 80 bit for ulid.
Actually... that's 80 bits for the "random" part of the ULID, which only disambiguates within the same millisecond.
tsenart on Dec 6, 2016 | parent | prev | next [–]
ULIDs are meant to be compared with Time UUIDs in particular. See: https://www.famkruithof.net/guid-uuid-timebased.html
foobarian on Dec 7, 2016 | parent | prev | next [–]
> But the whole point of an UUID is a random unique ID. Non guessable. Sortable is not a feature you normally want from an uuid.
Why so? As the name says they just need to be universally unique. Even relying purely on randomness seems bad, because you are at the mercy of the entropy source. Mess that up and you can end up with nasty problems throughout your system.
joshuak on Dec 6, 2016 | prev | next [–]
I've been working on a closely related problem of universal identification in distributed computing for a few years now. It's now in standards review and hopefully publishable soon.
We came to the conclusion that universal ids should represent identity only, and explicitly not have 'metadata'. What is the use of 48 bites of time? It reduces the overall entropy, for what? If time is important then why not make the id literally time (i.e. UnixNano), if it isn't they why not make all bits rand?
Also, while I think speak-ability is actually very important (many disagree), I'd assert that capitalization is better addressed from the opposite direction (i.e. UI). Instead of removing capital letters from the ID itself affecting all cases, address the human factors in the few cases it comes up.
I think this is good advice in general:
When spoken aloud we suggest that you don't indicate capitalization at first. In many cases, such as search, human validation etc, this is more than enough precision, then one can add capitalization for disambiguation as needed.
"ab2Cd3Ef1g"
Spoken becomes: "a b two c d three e f one g. Capitalize 4 and 7, c and e"
With the capitalization part optional depending on context.
tsenart on Dec 6, 2016 | parent | next [–]
> What is the use of 48 bites of time? It reduces the overall entropy, for what? If time is important then why not make the id literally time (i.e. UnixNano), if it isn't they why not make all bits rand?
For some designs it's useful to have identifiers have other properties than uniqueness. In this case, this property is relative lexicographical (and binary) order based on time so that you can leverage the order between the things the identifiers identify without looking at the things. The entropy is there to satisfy the uniqueness property (with some acceptable degree of collision, application dependent). The time is there to satisfy the ordering property.
joshuak on Dec 7, 2016 | root | parent | next [–]
Yes very good point. However, as @danbruc rightly points out this raises all sorts of other concerns. A user of these IDs my not realize that the reliability of the ordering can be substantially reduced depending on where the IDs are generated.
Some applications may be able to tolerate inconsistencies in ordering, others may not. Are IDs being generated on multiple machines? Are they in sync? What happens if the system clock is adjusted, or a container/VM is restarted on different hardware?
This design implies that these IDs are being generated in different locations, but this usage leads to the least reliable time. How many bits of approximate time does one really need? Not 48 surly.
On the other hand if you generate the IDs in the most reliable model, a single host with persistent storage to prevent regression, you've basically made an unnecessarily complicated vector clock. A simple incremental counter would work at least as well, and be far simpler.
> A user of these IDs my not realize that the reliability of the ordering can be substantially reduced depending on where the IDs are generated.
That can only be addressed with improved documentation and shared understanding of the subtleties and pitfalls of distributed time synchronisation.
> Some applications may be able to tolerate inconsistencies in ordering, others may not.
Indeed. Proper thought must be but into this sort of thing. ULIDs aren't an exception nor a silver bullet.
> How many bits of approximate time does one really need?
Entirely application dependent.
The point being these distinctions lead to the conclusion that this identifier isn't 'generally' useful, and even under optimal conditions it's utility is questionable. For example extra precision for an approximate value is not application dependent at all. The low order bits of the time component have no actionable meaning, though they imply sort order. That's the kind of subtile error in reasoning that is really easy to make here. I think there are too many land mines hidden here to make this useful.
sagichmal on Dec 8, 2016 | root | parent | next [–]
You are letting the perfect be the enemy of the good. Perfect general applicability to all problem domains is not a requirement of utility. Engineering is tradeoff analysis.
Glyptodon on Dec 6, 2016 | parent | prev | next [–]
I'm not sure how I feel about time, but I feel like case sensitivity is asking for trouble if you're expecting anything to be vocalized/shorthand-written, particularly without knowing individual use cases. It also seems like the sort of thing that might occur so infrequently nobody remembers to cover the "fringe" case, particularly for things a couple layers removed, assuming the set size is as huge as it seems intuitively.
danbruc on Dec 7, 2016 | parent | prev | next [–]
Having also spent some time on the topic, let me share my thoughts.
As you said, don't include information beyond identity for the simple reason that nothing is guaranteed to never change, every information you put in there may become outdated. One may think you can surly put the birth country of the customer into its customer number, but what if the customer made a mistake when signing up?
It may be useful to have some information in identifiers, for example a prefix C or O to indicate a customer or order number, but that can be implicit most of the time and just be added in the user interface or when printing labels.
To guarantee global uniqueness one has essentially two choices, enough randomness or unique identifiers for space and time. The first option requires no coordination, not synchronizing clocks and not making sure every process has a unique identifier, the second option allows you to have locality in identifiers generated at similar times or places.
Locality can be useful when identifiers are used as keys in databases or other data structures because it may avoid having every insert happen at a random place. On the other hand this may easily leak information, whether the number of your customers or orders per month or the number of servers you are using, especially if you are using counters, see further down.
One can use identifiers with locality internally but encrypt them before exposing them to the outside, but this comes with an entire new set of problems. One may have to include initialization vectors in the identifiers possibly making them longer. One may have to think about key rotations, at least for the case keys get compromised, possibly making identifiers even longer having to include key identifiers. One will have to do key management anyway and encryption of course costs clock cycles.
If one wants to include a time component, one can choose between actual time and counters. If one uses actual time, you have to ensure your clock never goes backwards and you may have to account for limited resolution, possibly falling back to counters or randomness when identifiers are produced faster than the clock ticks. If one use counters, you have to ensure it never runs backwards, for example persisting it across application restarts including crashes.
If several processes share counters, synchronization overhead between cores may become an issue in high performance scenarios. Modern processors offer high frequency hardware timestamp counters that can be synchronized across cores. This may be especially interesting if the timestamps are also used for purposes like operation or transaction ordering.
Identifiers should be readable if only for debugging by developers. Similar characters like O, 0, 1, I, l, U and V should be avoided. One can consider a checksum or even error correcting codes for user facing identifiers.
Capitalization is a tradeoff between length and ease of use but I like your idea of dealing with it behind the scenes. One probably loses on average less than one bit per character when ignoring capitalization so that for sufficiently long identifiers collisions are still very improbable, at least if one does not use identifiers with a lot of locality. But I fear users will just tend to include the capitalization because they are not aware it can probably be ignored. It surly adds complexity to the application, if only to the user interface, because you have always to be able to handle collisions.
lazulicurio on Dec 7, 2016 | prev | next [–]
Word of caution to anybody looking to use a similar method working with SQL Server: the SQL Server uniqueidentifier type is stored differently on disk than binary(16). Instead of being ordered by bytes 0-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15, uniqueidentifier values are ordered by bytes 10-11-12-13-14-15-8-9-7-6-5-4-3-2-1.
zamalek on Dec 7, 2016 | parent | next [–]
MSSQL does have a similar identifier, though - NEWSEQUENTIALID.
lazulicurio on Dec 7, 2016 | root | parent | next [–]
Yes, but NEWSEQUENTIALID isn't globally ordered, it's only ordered for the computer on which it was generated. For that matter, on a single computer the ordering isn't guaranteed[1]. This makes NEWSEQUENTIALID fairly useless if you're looking to merge records from disparate sources and sort them independently of origin.
[1] https://connect.microsoft.com/SQLServer/feedback/details/475...
zamalek on Dec 8, 2016 | root | parent | next [–]
Ah right, I stand corrected.
cfv on Dec 6, 2016 | prev | next [–]
> This alphabet excludes the letters I, L, O, and U to avoid confusion and abuse.
Can anyone please ellaborate? I don't get the confusion or abuse potential
pradn on Dec 6, 2016 | parent | next [–]
Douglas Crockford goes into why he chose those 4 letters in this page: http://www.crockford.com/wrmg/base32.html.
I, L, and O can be confused with the digits 1, 1, and 0, respectively.
He omits U to avoid "accidental obscenity."
_ak on Dec 6, 2016 | parent | prev | next [–]
Not the author, but presumably because 1, I and l are visually hard to distinguish in some fonts. Same goes for O and 0.
As for U, I don't know about that, but I recently stumbled upon the issue that Google's OCR software seems to incorrectly recognize U as II relatively often.
cloudhead on Dec 6, 2016 | parent | prev | next [–]
I'm guessing the following pairs can be confused visually: O/0, I/l, U/V..
Depending on the font used, 'I' and 'L' can be easily confused by humans. 'O' can be read as '0' too. This is meant to prevent that.
As for the 'U', I'm not sure why the original ULID spec left it out. Thanks for raising this. I'll investigate.
Typically, 'U' is omitted to avoid accidentally putting the word FUCK into the generated output. No, not kidding.
See http://www.crockford.com/wrmg/base32.html, Ctrl-F, search for obscenity.
Edit: Interestingly, since it already omits the letter I, adding U covers all of George Carlins' 7 Dirty Words: https://en.wikipedia.org/wiki/Seven_dirty_words
This is so bazar that I don't even know where to start to try an understand it.
Is it a joke? Tongue-n-cheek? It must be. I can't understand how it could possibly be a ligament concern. What about other languages? As adults who doesn't use 'fuck' conversationally? If it were a real concern then surly drawing attention to it in the design of the ID is a more obvious then the very rare occasion of 'dirty words' (by some definition of dirty) appearing in otherwise random strings.
So I have to conclude it's a joke, but then what the fuck?
This type of thing puts noise into engineering details that just ends adding to confusion and ambiguity. If there's no (important) reason for 'U' to be in the omission set, then just say it's an arbitrary choice, if there is an OCR, or legibility reason then say that.
Half of my brain says it's funny, and half my brain says it's fucked up.
I see where you're coming from. On the other hand, since they were after base32, they were able to choose an additional letter to omit. By omitting the U, they happen to exclude the most popular english language expletives.
These things can and do end up in, for example, urls. Think something like an ecommerce store order id. While not likely to happen, the below could happen in an email, and might invite unneeded controversy:
"Dear Mr Customer, Please Click Here to see your order status: http://example.com/status/FUCKUP6433432334234 "
Ah yes ok I can understand that. I can see from a marketing point of view that you might want to simply and quietly avoid the (roughly) 1 in 1,000,000 ids which start with 4 specific characters.
Still, it's a bit culturally specific. It gives the impression of solving a problem that is doesn't. Depending on your market/language a different character might be a better choice. Plus there are quite a few 'bad' words that can still appear.
Filtering and rejecting proposed IDs based on a list of objectionable words seems like a far more realistic solution, then baking a very specific exclusion into the plumbing.
emmelaich on Dec 7, 2016 | root | parent | next [–]
Omitting U is great bang for your buck.
When I wrote a simple password generator as well as omitting u or U I also omitted all of 1iIlL and oO0.
Then I thought - the hell with it, I'll leave out all vowels to reduce the chance of offending someone.
I had to increase the length to compensate. By how much I'll leave as an exercise for the reader.
Guvante on Dec 6, 2016 | root | parent | prev | next [–]
Well you need to leave 4 characters out to get to 32, so unless there is a better character the selection is arbitrary.
taeric on Dec 6, 2016 | parent | prev | next [–]
I think this is a problem that was accented quite well for people that ever had to use passwords in video games.
Sibling posts explain why better. This isn't something that you forget once it has bitten you.
pritambarhate on Dec 6, 2016 | prev [–]
Will the ulid be unique even if it is generated from 2 different machines at the same millisecond?
drfuchs on Dec 6, 2016 | parent | next [–]
Yes, if your source of entropy is worth its salt.
vlowther on Dec 6, 2016 | root | parent | next [–]
That was bad and you should feel bad. :)
tsenart on Dec 6, 2016 | parent | prev [–]
Yes if you use a good source of entropy. In Go, the easiest and most secure is the `crypto/rand.Reader`. But it's also slow. If you don't need the security properties, an instance of `math/rand.Rand` should suffice. Otherwise, you can implement your own. It's just an io.Reader!
Freak_NL on Dec 6, 2016 | root | parent [–]
Doesn't that mean that it will usually — but not guaranteed always — be unique? That is, won't there always be a (minute and negligible depending on the intended use) chance of collision?
tsenart on Dec 6, 2016 | root | parent [–]
Yes, there's always a negligible chance of collision.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact


gstBuffer data is 8-byte aligned. How to change to 16byte	aligned without recompiling whole gstreamer framework?
Previous message: gstBuffer data is 8-byte aligned. How to change to 16byte aligned	without recompiling whole gstreamer framework?
> gstreamer (and all the plugin rpms etc)?


Sport isn't always about the winner, sometimes it's about the performance, the way a competitor approaches the test, which causes the jaw to drop or the stiff smile of quiet respect. I witnessed one such performance last week at la Flèche Wallonne Femmes, a one day race in the Belgian Ardennes.
A lumpy affair, the race finishes atop the fearsome Mur de Huy - the Wall of Huy, a short, steep climb which even the most conservative say has ramps of 19%, though most agree it's 26%. That's steep.
On the second and last 64 kilometre lap, New Zealander Linda Villumsen of the Wiggle Honda team, found herself in a group of riders who were, to a woman, likely to get up the Mur far quicker than her, so rather than accept her fate, she did the only thing a winner would do: she attacked. Now, having stood on the World Time Trial Championship podium four times, she is no stranger to measuring her effort and riding alone. But the spectre of that hill lay ahead.
Very nearly 10 kilometres she was away: 42 seconds her lead. However, as she struggled up the wall, the metres ticking past far too slowly, the others were closing the gap. Then, with 250 metres to go she was overtaken. She finished eighth, 21 seconds down.
Once again Paris-Roubaix served up another fantastically spicy dish of dusty, bumpy, combative racing. In the end, all the attacking, crashing, arm waving, head-shaking and fighting left eleven men to fight out the final few kilometres on the road to the faded, fabled velodrome in a slightly grim northern French suburb.
But why, in those final few kilometres, did what happened happen? What were they thinking?
You've read the reports and expert analysis, so have I, and this is what ran through those tired minds.


text:
package MIME::Field::ParamVal;

use MIME::Words;

=head1 NAME

MIME::Field::ParamVal - subclass of Mail::Field, for structured MIME fields

=head1 SYNOPSIS

    # Create an object for a content-type field:
    $field = new Mail::Field 'Content-type';

    # Set some attributes:
    $field->param('_'        => 'text/html');
    $field->param('charset'  => 'us-ascii');
    $field->param('boundary' => '---ABC---');

    # Same:
    $field->set('_'        => 'text/html',
		'charset'  => 'us-ascii',
		'boundary' => '---ABC---');

    # Get an attribute, or undefined if not present:
    print "no id!"  if defined($field->param('id'));

    # Same, but use empty string for missing values:
    print "no id!"  if ($field->paramstr('id') eq '');

    # Output as string:
    print $field->stringify, "\n";

=head1 DESCRIPTION

This is an abstract superclass of most MIME fields.  It handles
fields with a general syntax like this:

    Content-Type: Message/Partial;
	number=2; total=3;
	id="oc=jpbe0M2Yt4s@thumper.bellcore.com"

Comments are supported I<between> items, like this:

    Content-Type: Message/Partial; (a comment)
	number=2  (another comment) ; (yet another comment) total=3;
	id="oc=jpbe0M2Yt4s@thumper.bellcore.com"

=head1 PUBLIC INTERFACE

=over 4

=cut

#------------------------------

require 5.001;

# Pragmas:
use strict;
use re 'taint';
use vars qw($VERSION @ISA);

# Other modules:
use Mail::Field;

# Kit modules:
use MIME::Tools qw(:config :msgs);

@ISA = qw(Mail::Field);

#------------------------------
#
# Public globals...
#
#------------------------------

# The package version, both in 1.23 style *and* usable by MakeMaker:
$VERSION = "5.509";

#------------------------------
#
# Private globals...
#
#------------------------------

# Pattern to match parameter names (like fieldnames, but = not allowed):
my $PARAMNAME = '[^\x00-\x1f\x80-\xff :=]+';

# Pattern to match the first value on the line:
my $FIRST    = '[^\s\;\x00-\x1f\x80-\xff]*';

# Pattern to match an RFC 2045 token:
#
#      token      =  1*<any  (ASCII) CHAR except SPACE, CTLs, or tspecials>
#
my $TSPECIAL = '()<>@,;:\</[]?="';

#" Fix emacs highlighting...

my $TOKEN    = '[^ \x00-\x1f\x80-\xff' . "\Q$TSPECIAL\E" . ']+';

my $QUOTED_STRING = '"([^\\\\"]*(?:\\\\.(?:[^\\\\"]*))*)"';

# Encoded token:
my $ENCTOKEN = "=\\?[^?]*\\?[A-Za-z]\\?[^?]+\\?=";

# Pattern to match spaces or comments:
my $SPCZ     = '(?:\s|\([^\)]*\))*';

# Pattern to match non-semicolon as fallback for broken MIME
# produced by some viruses
my $BADTOKEN = '[^;]+';

#------------------------------
#
# Class init...
#
#------------------------------

#------------------------------

=item set [\%PARAMHASH | KEY=>VAL,...,KEY=>VAL]

I<Instance method.>  Set this field.
The paramhash should contain parameter names
in I<all lowercase>, with the special C<"_"> parameter name
signifying the "default" (unnamed) parameter for the field:

   # Set up to be...
   #
   #     Content-type: Message/Partial; number=2; total=3; id="ocj=pbe0M2"
   #
   $conttype->set('_'       => 'Message/Partial',
		  'number'  => 2,
		  'total'   => 3,
		  'id'      => "ocj=pbe0M2");

Note that a single argument is taken to be a I<reference> to
a paramhash, while multiple args are taken to be the elements
of the paramhash themselves.

Supplying undef for a hashref, or an empty set of values, effectively
clears the object.

The self object is returned.

=cut

sub set {
    my $self = shift;
    my $params = ((@_ == 1) ? (shift || {}) : {@_});
    %$self = %$params;    # set 'em
    $self;
}

#------------------------------

=item parse_params STRING

I<Class/instance utility method.>
Extract parameter info from a structured field, and return
it as a hash reference.  For example, here is a field with parameters:

    Content-Type: Message/Partial;
	number=2; total=3;
	id="oc=jpbe0M2Yt4s@thumper.bellcore.com"

Here is how you'd extract them:

    $params = $class->parse_params('content-type');
    if ($$params{'_'} eq 'message/partial') {
	$number = $$params{'number'};
	$total  = $$params{'total'};
	$id     = $$params{'id'};
    }

Like field names, parameter names are coerced to lowercase.
The special '_' parameter means the default parameter for the
field.

B<NOTE:> This has been provided as a public method to support backwards
compatibility, but you probably shouldn't use it.

=cut

sub rfc2231decode {
    my($val) = @_;
    my($enc, $lang, $rest);

    local($1,$2,$3);
    if ($val =~ m/^([^']*)'([^']*)'(.*)\z/s) {
	$enc = $1;
	$lang = $2;
	$rest = $3;
    } elsif ($val =~ m/^([^']*)'([^']*)\z/s) {
	$enc = $1;
	$rest = $2;
    } else {
	$rest = $val;
	# $enc remains undefined when charset/language info is missing
    }
    return ($enc, $lang, $rest);
}

sub rfc2231percent {
    # Do percent-substitution
    my($str) = @_;
    local $1;
    $str =~ s/%([0-9a-fA-F]{2})/pack("C", hex($1))/ge;
    return $str;
}

sub parse_params {
    my ($self, $raw) = @_;
    my %params;
    my %rfc2231params;
    my %rfc2231encoding_is_used;
    my $param;
    my $val;
    my $part;

    # Get raw field, and unfold it:
    defined($raw) or $raw = '';
    $raw =~ s/\n//g;
    $raw =~ s/\s+\z//;              # Strip trailing whitespace

    local($1,$2,$3,$4,$5);
    # Extract special first parameter:
    $raw =~ m/\A$SPCZ($FIRST)$SPCZ/og or return {};    # nada!
    $params{'_'} = $1;

    # Extract subsequent parameters.
    # No, we can't just "split" on semicolons: they're legal in quoted strings!
    while (1) {                     # keep chopping away until done...
	$raw =~ m/\G[^;]*(\;$SPCZ)+/og or last;             # skip leading separator
	$raw =~ m/\G($PARAMNAME)\s*=\s*/og or last;      # give up if not a param
	$param = lc($1);
	$raw =~ m/\G(?:$QUOTED_STRING|($ENCTOKEN)|($TOKEN)|($BADTOKEN))/g or last;   # give up if no value"
	my ($qstr, $enctoken, $token, $badtoken) = ($1, $2, $3, $4, $5);
	if (defined($qstr)) {
            # unescape
	    $qstr =~ s/\\(.)/$1/g;
	}
	if (defined($badtoken)) {
	    # Strip leading/trailing whitespace from badtoken
	    $badtoken =~ s/^\s+//;
	    $badtoken =~ s/\s+\z//;

	    # Only keep token parameters in badtoken;
	    # cut it off at the first non-token char.  CPAN RT #105455
	    $badtoken =~ /^($TOKEN)*/;
	    $badtoken = $1;
	    # Cut it off at first whitespace too
	    $badtoken =~ s/\s.*//;
	}
	$val = defined($qstr) ? $qstr :
	    (defined($enctoken) ? $enctoken :
	     (defined($badtoken) ? $badtoken : $token));

	# Do RFC 2231 processing
	# Pick out the parts of the parameter
	if ($param =~ /\*/ &&
            $param =~ /^ ([^*]+) (?: \* ([^*]+) )? (\*)? \z/xs) {
	    # We have param*number* or param*number or param*
	    my($name, $num) = ($1, $2||0);
	    if (defined($3)) {
		# We have param*number* or param*
		# RFC 2231: Asterisks ("*") are reused to provide the
		# indicator that language and character set information
		# is present and encoding is being used
		$val = rfc2231percent($val);
		$rfc2231encoding_is_used{$name} = 1;
	    }
	    $rfc2231params{$name}{$num} .= $val;
	} else {
	    # Assign non-rfc2231 value directly.  If we
	    # did get a mix of rfc2231 and non-rfc2231 values,
            # the non-rfc2231 will be blown away in the
	    # "extract reconstructed parameters" loop.
	    $params{$param} = $val;
	}
    }

    # Extract reconstructed parameters
    foreach $param (keys %rfc2231params) {
	# If we got any rfc-2231 parameters, then
        # blow away any potential non-rfc-2231 parameter.
	$params{$param} = '';
	foreach $part (sort { $a <=> $b } keys %{$rfc2231params{$param}}) {
	    $params{$param} .= $rfc2231params{$param}{$part};
	}
	if ($rfc2231encoding_is_used{$param}) {
	    my($enc, $lang, $val) = rfc2231decode($params{$param});
	    if (defined $enc) {
		# re-encode as QP, preserving charset and language info
		$val =~ s{([=?_\x00-\x1F\x7F-\xFF])}
			 {sprintf("=%02X", ord($1))}eg;
		$val =~ tr/ /_/;
		# RFC 2231 section 5: Language specification in Encoded Words
		$enc .= '*' . $lang  if defined $lang && $lang ne '';
		$params{$param} = '=?' . $enc . '?Q?' . $val . '?=';
	    }
	}
	debug "   field param <$param> = <$params{$param}>";
    }

    # Done:
    \%params;
}

#------------------------------

=item parse STRING

I<Class/instance method.>
Parse the string into the instance.  Any previous information is wiped.
The self object is returned.

May also be used as a constructor.

=cut

sub parse {
    my ($self, $string) = @_;

    # Allow use as constructor, for MIME::Head:
    ref($self) or $self = bless({}, $self);

    # Get params, and stuff them into the self object:
    $self->set($self->parse_params($string));
}

#------------------------------

=item param PARAMNAME,[VALUE]

I<Instance method.>
Return the given parameter, or undef if it isn't there.
With argument, set the parameter to that VALUE.
The PARAMNAME is case-insensitive.  A "_" refers to the "default" parameter.

=cut

sub param {
    my ($self, $paramname, $value) = @_;
    $paramname = lc($paramname);
    $self->{$paramname} = $value if (@_ > 2);
    $self->{$paramname}
}

#------------------------------

=item paramstr PARAMNAME,[VALUE]

I<Instance method.>
Like param(): return the given parameter, or I<empty> if it isn't there.
With argument, set the parameter to that VALUE.
The PARAMNAME is case-insensitive.  A "_" refers to the "default" parameter.

=cut

sub paramstr {
    my $val = shift->param(@_);
    (defined($val) ? $val : '');
}

#------------------------------

=item stringify

I<Instance method.>
Convert the field to a string, and return it.

=cut

sub stringify {
    my $self = shift;
    my ($key, $val);

    my $str = $self->{'_'};                   # default subfield
    foreach $key (sort keys %$self) {
	next if ($key !~ /^[a-z][a-z-_0-9]*$/);  # only lowercase ones!
	defined($val = $self->{$key}) or next;
        $val =~ s/(["\\])/\\$1/g;
	$str .= qq{; $key="$val"};
    }
    $str;
}

#------------------------------

=item tag

I<Instance method, abstract.>
Return the tag for this field.

=cut

sub tag { '' }

=back

=head1 SEE ALSO

L<Mail::Field>

=cut

#------------------------------
1;

redpajama_set_name: RedPajamaGithub


text:
Imran's intimidating politics pushed PTI to blind alley sans political options: Sherry Rehman
December 19, 2022 Web Desk Edit
ISLAMABAD (APP) - Federal Minister for Climate Change Senator Sherry Rehman on Monday said Imran Khan's politics of intimidation has led Pakistan Tehreek-e-Insaaf (PTI) to such a blind alley that it had run out of political options.
In a series of tweets, the minister said that Imran Khan neither believed in parliamentary democracy nor in dialogue. "When you do the politics of fascism instead of democratic and constitutional politics, this will be the end."
Senator Sherry Rehman underlined that the differences between Imran Khan and his allies were exposed whereas the PTI members were also unhappy with Imran Khan's decision. "It means only one person wants to dissolve break the assemblies. In the past, Ishaq Khan and dictators had dissolved the assemblies, Imran Khan's thinking is not different from them."
She added that Imran Khan was blaming others for the failure of his political narrative. "When the narrative of foreign conspiracy was exposed, he (Imran Khan) started blaming the former chief of army staff for the success of no-confidence motion."
The minister said that Imran Khan had a misconception that the government and institutions would accept their demands under pressure. "Only parliament can get them out of this blind alley," she maintained.
Pakistan PTI Sherry Rehman blind alley

redpajama_set_name: RedPajamaCommonCrawl


text:
March 20, 1956: Duluth adapts Mayor/Council form of government still in use today
On this day in Duluth in 1956, citizens of the Zenith City voted to toss out its old form of "commissioner" government, first adapted in 1913, and turn to a "mayor/city council" form of government, still in use today. Under the old system, five elected commissioners were in charge of five different aspects of city government: public affairs, public works, public safety, public utilities, and finance. The mayor served as commissioner of public affairs, and his position as Duluth's "chief executive" was much more about public relations than being the top dog controlling city management. The commissioner system replaced a "Ward & Boss" system that had been in place since Duluth regained its city charter in 1887. During this period, Duluth was divided into wards (four in 1870; nine by 1912), each represented by two aldermen; those aldermen often ran their wards as their own fiefdoms. The mayor also wielded a great deal of power, including appointing city officials, from the City Engineer to the Chief of Police. Often a mayor's first task after taking office was to replace any city official that did not belong to the mayor's political party with someone who did. In 1913 the commissioner system was viewed as a more efficient form of government—both in performance and cost—and was thought to be better for the labor class. In 1956, Duluthians voted 20,252–12,554 to replace the 1913 system. This resulted in the ousting of the current city council (those five commissioners, including the mayor). An election was set for May 29—Duluth had to find a new mayor and nine city councilors, four at-large and five representing geographic districts. Cloquet native Eugene R. Lambert, who later became the publisher of the Duluth News Tribune, became Duluth's first mayor under that new system, replacing George D. Johnson. Johnson was appointed Duluth's mayor again in 1962 following the unexpected death of Mayor E. Clifford Mork.
The seal for the City of Duluth, established (for the second time) on March 2, 1887.
← March 19, 1927: Duluth Herald calls aerial transfer bridge "utterly inadequate"March 21, 1974: Tragic fire at the Crossroads Inn →
Subscribe to This Day in Duluth!


text:
WELCOME TO THE FUTURE OF HOCKEY LAB
We collaborate with diverse communities to discover, test and scale highly innovative ideas.
Our goal is an accessible and positive hockey experience for all who wish to participate.
The Future of Hockey Lab is committed to values-based social innovation and culture change. Through supporting game-changing ideas and innovations the lab will gather learning and facilitate opportunities to:
+ Increase participation growth, particularly among racialized persons, Indigenous communities, 2SLGBTQ+ communities, new Canadians, and those with a disability
+ Strengthen retention among current participants
+ Broaden diversity through representation at all levels
(coaches, officials, boards, etc.)
+ Foster greater understanding and awareness of diversity,
equity and inclusion
+ Be intentional around using hockey as a force for social good
PATHS TO GET THERE
The Future of Hockey Lab's cohort program brings together small project teams from across Canada looking to address these focus areas. The cohorts receive the supports they need to gather learning and scale what's working.
The work includes:
IDENTIFYING NEW APPROACHES TO ADDRESS EXISTING PROBLEMS
Sport leaders have known for decades about barriers such as the cost of the sport, parental behaviour, racial slurs, and an over-emphasis on the elite, to name a few. These are complex problems to solve, which is why they still exist. The Future of Hockey Lab is where NEW ideas and approaches can flourish.
SCALING LOCAL SOLUTIONS TO POSITIVELY IMPACT MORE PEOPLE
There are countless examples of amazing hockey programs from coast to coast. The Black Youth Ice Hockey Program, the Little Native Hockey League ("Little NHL"), and Hockey 4 Youth are some great examples. The Future of Hockey Lab partners with community to gather learning on the best ways to scale these programs so MORE people can benefit.
PROTOTYPING EXISTING IDEAS THAT ARE UNTESTED
Hockey has a wealth of impassioned fans whose dedication to the game is unmatched. One of the benefits of this is the constant source of new ideas. But it can be hard to try new things in a system that is rigid and comfortably predictable. The Future of Hockey Lab is where those ideas can be revisited, tested, and supported.
As an incubator for culture change in the game, the Future of Hockey Lab launched its first cohort in November 2021.
in·no·va·tion| ˌinəˈvāSH(ə)n |
Turns ideas into solutions that add value and make the world a better place.
Imagine a welcoming environment where there is a safe place for everyone – a future that is better for every participant through sport. Sport leaders have wanted this for years but often get stuck on the "how".
Let's go for it. Let's discover what can be.


As a New Year's project, monopo produced "#365ArtCalendar", a calendar which allows you to enjoy a different work of art every day for 365 days in 2019. This was a collaboration project involving 53 artists, to promote and share the company's vision of "A BRAND OF COLLECTIVE CREATIVITY".
To kickstart the beginning of every year, creative agency monopo produces a New Year's campaign to welcome the upcoming year. In 2019, we created a daily flip calendar, complete with a total of 365 unique pieces of artwork. We collaborated with 53 different artists to embody our vision of "A BRAND OF COLLECTIVE CREATIVITY", a vision in which all individuals can have an outlet for their own creativity.
A new piece of artwork every day, for 365 days a year.
The calendar is composed of artwork from several different mediums and genres, including illustration, photography, and graphic design. These pieces were created by 53 different creatives, one artist for each week, with the individuals coming from within and outside of the company, from long-time partners to first-time collaborators, including domestic artists as well as individuals coming from international backgrounds. With such a diverse team, the project turned into a product that transcended beyond traditional boundaries.
In print, on screen, and even on Instagram.
The flip calendar produced is available for order from our website, in traditional print form where individuals can stand it on top of their desk, as well as for download in digital form, through a free Google Chrome extension. In addition, we created a special Instagram account which will release the pieces of art every day, for 365 days.
The art direction concept surrounding this project is "New Wave JP Chill". As an in-house project, we were very careful to equip our artists with broad boundaries, to allow them to create and collaborate freely, and allow each individual's personality to show.
For the print version and Google Chrome extension digital version, we prepared several versions to accommodate the creators and their different styles of art, and on top of that we did not give them any restrictions in regards to the kind of artwork data they could submit, so their unique styles and art direction could stand out.
The cover of the calendar, to illustrate the concept of "New Wave JP Chill", was designed with a loose brush and a bright, colorful aesthetic, to express the diversity and freedom which built this project. The motifs chosen— Mt. Fuji, a hawk, and an eggplant— embody the different dimensions of this project, and our company's wish to spread luck and joy in 2019, for everyone who has helped our company reach to where we are now.


Amazon's first game was fine.
In many ways, it was the typical experience of live TV over the internet. There were bugs, but it worked. The stream did well, something that's not always the case, especially for first-time streamers of live events. There was a sound problem that got fixed. The ads were the typical internet TV ad experience—which means plenty of repeats.
But this was Amazon. Expectations were high. Would there be fancy ecommerce integrations? Would Amazon offering a 10% discount on a player's jersey when they scored a touchdown?
Nope. Nothing fancy. Amazon's stream didn't differ much from Twitter's streams last year—which means there's plenty of room to improve.
The NFL on Amazon is a big deal. The way things are going, big tech companies will eventually be home to plenty of TV content including big-ticket live events like sports. That's still years away, but we're getting our first glimpse at what this new arrangement might look like.
So far, it's not great. Amazon's first game had many of the not-great hallmarks of internet-delivered live TV as listed above. Maybe it will get better in future games this season. For now, it's just football on a website like it is on plenty of other websites.
The lone standout from Amazon's first game was the alternative broadcasts—most notably the British announcers meant for foreign fans who might not have been as knowledgeable about American football.
The commentators, Ross Dwyer and Scottish soccer commentator Tommy Smyth, drew most positive reviews on Twitter. Their calls were easily as good as regular broadcasters, and often more biting than the norm.
"It's another disaster from the snap," Dwyer said after one particularly terrible play from the Chicago Bears.
The alternative stream highlighted what Amazon—and other tech companies—could bring to the table for consumers. The option was easily accessible via the video player's menu and could be switched between the various options with almost no delay.
There were a couple kinks. The broadcast at times alternated between the normal CBS commentators and Amazon's Brits in a way that didn't seem terribly natural. It's clear that there's still some areas to smooth over.
The idea at its core, however, is perfect. The alternative stream didn't just provide a way for casual fans to watch but also a way for big fans to access something new. Just the novelty of some English and Scottish accents—complete with British sports terms like "touch line" for the sideline—were enough to delight some fans.
There's room for growth here. With Amazon looking to appeal to viewers in new ways, alternative commentators feels like a chance to personalize the game for more people. It's not hard to imagine separate streams depending on which team a viewer is a fan of (ESPN has done this), as well as options with comedians or more aggressive sports journalists. It's not hard to imagine The Ringer having its own stream for Amazon's games.
There's still plenty of upside to what Amazon can do with NFL games even beyond the consumer experience, particularly with advertising and ecommerce sales. That might not be something that fans will find terribly compelling, but companies that spend millions of dollars to advertise during NFL games could soon find themselves with far more insight into the efficacy of their ad efforts—thanks to Amazon.
That's still a ways off. For all the upside big tech companies offer to the live sports experience, watching games over the internet tends to remain a decent substitute at best, a frustrating experience for many, and a full-on turn off for others. Even Amazon and all its might isn't particularly ahead of anyone else.
So, try to watch NFL Network via slingTV and you get blacked out. Move to CBS Sports for roku, same thing. Now Amazon Prime glitches and lags.
That's okay, you are just giving me more to talk about with my term paper regarding NFL games being streamed.


text:
You are at:Home»Features»EnglishPoint Marina
EnglishPoint Marina
By matthiasringa	 December 14, 2016 No Comments
Since it was officially opened early this year, EnglishPoint Marina has been the centre of attraction with both local and international tourists coming to Mombasa to sample the hotel's facilities. The hospitality management firm aims to target high-end tourists from across the world who own yachts to generate more revenue for the hotel and the economy of Mombasa.
On the African continent, says Mr Alnoor Kanji, the hotel owner, only South Africa and Egypt have marina facilities, adding that the hotel is a new product which has put Kenya on the world map. A Nairobi hospitality management company ONYX in August took over the management of the hotel which is the first of its kind in East Africa.
According to Mr Kanji, the Marina which has been recognised as a Vision 2030 flagship project by the Kenyan government comprises a 26-room luxury hotel and 96 fully furnished apartments.
The apartments were sold to buyers with some of the owners using them as their primary homes while others as second homes and as investments. He explains that when the apartment owners are away, they authorise EnglishPoint Marina to manage them as part of the hotel for them to earn an income. Mr Kanji adds that the apartments are managed by the hotel for the owners and guests to enjoy services including housekeeping and catering.
Other amenities include a spa, conference facility with a seating capacity for 200 people, three restaurants, three bars and a gym. Apart from the soothing cool breeze from the Indian Ocean, visitors to the Marina too enjoy the panoramic view of the iconic historical building Fort Jesus and the Old Town.
The Marina, he adds, will have a parking capacity for between 50 and 60 luxury boats of six to 30 metres long which is expected to attract high-end boat owners from around the world.
He expects the construction of the Marina which has been delayed by construction and engineering challenges to be completed next year.
"When complete, our state-of-theart marina will provide the yachts with ample parking spaces, water, electricity, fuelling facilities and waste disposal services," Mr Kanji said. He notes that the Marina will transform Mombasa into African continent's Monte Carlo and create a haven for global billionaires who own top of the range yachts.
ONYX Co-Director Ghulam Samdani, said it was a lifetime opportunity for the hospitality firm to have secured a contract to manage the iconic hotel.
Mr Samdani, who is also the Ole-Sereni Hotel general manager, said ONYX was committed to raising the level of services offered to guests and apartment owners for them to enjoy superb standards.
The landmark property which is in a class of its own in Mombasa was officially opened by President Uhuru Kenyatta in January this year.
Previous ArticleSeronera from the Skies
Next Article Welcome on board our flight Today!
matthiasringa


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit;

namespace Legacy.Support
{
    public static class TCSupport
    {
        public enum SerialPortRequirements { None, OneSerialPort, TwoSerialPorts, NullModem, Loopback, LoopbackOrNullModem };

        private static LocalMachineSerialInfo s_localMachineSerialInfo;
        private static SerialPortRequirements s_localMachineSerialPortRequirements;

        // Set this true to display port info to the console rather than Debug.WriteLine
        private static bool s_displayPortInfoOnConsole = true;

        static TCSupport()
        {
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            InitializeSerialInfo();
        }

        private static void InitializeSerialInfo()
        {
            GenerateSerialInfo();

            if (s_localMachineSerialInfo.LoopbackPortName != null)
                s_localMachineSerialPortRequirements = SerialPortRequirements.Loopback;
            else if (s_localMachineSerialInfo.NullModemPresent)
                s_localMachineSerialPortRequirements = SerialPortRequirements.NullModem;
            else if (!string.IsNullOrEmpty(s_localMachineSerialInfo.SecondAvailablePortName))
                s_localMachineSerialPortRequirements = SerialPortRequirements.TwoSerialPorts;
            else if (!string.IsNullOrEmpty(s_localMachineSerialInfo.FirstAvailablePortName))
                s_localMachineSerialPortRequirements = SerialPortRequirements.OneSerialPort;
            else
                s_localMachineSerialPortRequirements = SerialPortRequirements.None;
        }

        private static void GenerateSerialInfo()
        {
            string[] installedPortNames = PortHelper.GetPorts();
            bool nullModemPresent = false;
            string portName1 = null, portName2 = null, loopbackPortName = null;

            Array.Sort(installedPortNames);
            PrintInfo("Installed ports : " + string.Join(",", installedPortNames));

            IList<string> openablePortNames = CheckPortsCanBeOpened(installedPortNames);

            PrintInfo("Openable ports  : " + string.Join(",", openablePortNames));

            // Find any pair of ports which are null-modem connected
            // If there is a pair like this, then they take precedence over any other way of identifying two available ports
            for (int firstIndex = 0; firstIndex < openablePortNames.Count && !nullModemPresent; firstIndex++)
            {
                for (int secondIndex = firstIndex + 1; secondIndex < openablePortNames.Count && !nullModemPresent; secondIndex++)
                {
                    string firstPortName = openablePortNames[firstIndex];
                    string secondPortName = openablePortNames[secondIndex];

                    if (SerialPortConnection.VerifyConnection(firstPortName, secondPortName))
                    {
                        // We have a null modem port
                        portName1 = firstPortName;
                        portName2 = secondPortName;
                        nullModemPresent = true;

                        PrintInfo("Null-modem connection from {0} to {1}", firstPortName, secondPortName);
                    }
                }
            }

            if (!nullModemPresent)
            {
                // If we don't have a null-modem connection - check for a loopback connection
                foreach (string portName in openablePortNames)
                {
                    if (SerialPortConnection.VerifyLoopback(portName))
                    {
                        portName1 = loopbackPortName = portName;
                        break;
                    }
                }

                if (portName1 == null)
                {
                    portName1 = openablePortNames.FirstOrDefault();
                }

                portName2 = openablePortNames.FirstOrDefault(name => name != portName1);
            }

            // See Github issues #15961, #16033, #20764 - hardware tests are currently insufficiently stable on master CI
            if (loopbackPortName == null && !nullModemPresent)
            {
                // We don't have any supporting hardware - disable all the tests which would use just an open port
                PrintInfo("No support hardware - not using serial ports");
                portName1 = portName2 = null;
            }

            PrintInfo("First available port name  : " + portName1);
            PrintInfo("Second available port name : " + portName2);
            PrintInfo("Loopback port name         : " + loopbackPortName);
            PrintInfo("NullModem present          : " + nullModemPresent);

            s_localMachineSerialInfo = new LocalMachineSerialInfo(portName1, portName2, loopbackPortName, nullModemPresent);

            if (portName1 != null)
            {
                // Measure how big a packet we need to write to be sure to see blocking behaviour at a port
                s_flowControlCapabilities = SerialPortConnection.MeasureFlowControlCapabilities(portName1);

                PrintInfo("{0}: Flow capabilities {1}", portName1, s_flowControlCapabilities);
            }
        }

        private static void PrintInfo(string format, params object[] args)
        {
            if (s_displayPortInfoOnConsole)
            {
                Console.WriteLine(format, args);
            }
            else
            {
                Debug.WriteLine(format, args);
            }
        }

        private static IList<string> CheckPortsCanBeOpened(IEnumerable<string> installedPortNames)
        {
            List<string> openablePortNames = new List<string>();
            foreach (string portName in installedPortNames)
            {
                using (SerialPort com = new SerialPort(portName))
                {
                    try
                    {
                        com.Open();
                        com.Close();

                        openablePortNames.Add(portName);
                    }
                    catch (Exception)
                    {
                    }
                }
            }
            return openablePortNames;
        }

        public static bool SufficientHardwareRequirements(SerialPortRequirements serialPortRequirements)
        {
            switch (serialPortRequirements)
            {
                case SerialPortRequirements.None:
                    return true;

                case SerialPortRequirements.OneSerialPort:
                    return s_localMachineSerialPortRequirements == SerialPortRequirements.OneSerialPort ||
                        s_localMachineSerialPortRequirements == SerialPortRequirements.TwoSerialPorts ||
                        s_localMachineSerialPortRequirements == SerialPortRequirements.Loopback ||
                        s_localMachineSerialPortRequirements == SerialPortRequirements.NullModem;
                case SerialPortRequirements.TwoSerialPorts:
                    return s_localMachineSerialPortRequirements == SerialPortRequirements.TwoSerialPorts ||
                        s_localMachineSerialPortRequirements == SerialPortRequirements.NullModem;
                case SerialPortRequirements.NullModem:
                    return s_localMachineSerialPortRequirements == SerialPortRequirements.NullModem;
                case SerialPortRequirements.Loopback:
                    return s_localMachineSerialPortRequirements == SerialPortRequirements.Loopback;
                case SerialPortRequirements.LoopbackOrNullModem:
                    return s_localMachineSerialPortRequirements == SerialPortRequirements.Loopback ||
                        s_localMachineSerialPortRequirements == SerialPortRequirements.NullModem;
            }

            return false;
        }

        public static SerialPort InitFirstSerialPort()
        {
            if (LocalMachineSerialInfo.NullModemPresent)
            {
                return new SerialPort(LocalMachineSerialInfo.FirstAvailablePortName);
            }
            else if (null != LocalMachineSerialInfo.LoopbackPortName)
            {
                return new SerialPort(LocalMachineSerialInfo.LoopbackPortName);
            }
            else if (null != LocalMachineSerialInfo.FirstAvailablePortName)
            {
                return new SerialPort(LocalMachineSerialInfo.FirstAvailablePortName);
            }

            return null;
        }

        public static SerialPort InitSecondSerialPort(SerialPort com)
        {
            if (LocalMachineSerialInfo.NullModemPresent)
            {
                return new SerialPort(LocalMachineSerialInfo.SecondAvailablePortName);
            }
            else if (null != LocalMachineSerialInfo.LoopbackPortName)
            {
                return com;
            }
            else if (null != LocalMachineSerialInfo.SecondAvailablePortName)
            {
                return new SerialPort(LocalMachineSerialInfo.SecondAvailablePortName);
            }

            return null;
        }

        public static LocalMachineSerialInfo LocalMachineSerialInfo => s_localMachineSerialInfo;

        /// <summary>
        /// Set this true to shorten the very long-running stress tests
        /// </summary>
        public static bool RunShortStressTests { get; set; } = true;

        public static int MinimumBlockingByteCount => s_flowControlCapabilities.MinimumBlockingByteCount;
        public static int HardwareTransmitBufferSize => s_flowControlCapabilities.HardwareTransmitBufferSize;
        public static bool HardwareWriteBlockingAvailable => s_flowControlCapabilities.HardwareWriteBlockingAvailable;

        public delegate bool Predicate();

        public delegate T ValueGenerator<T>();

        public static void WaitForPredicate(Predicate predicate, int maxWait, string errorMessageFormat, params object[] formatArgs)
        {
            WaitForPredicate(predicate, maxWait, string.Format(errorMessageFormat, formatArgs));
        }
        public static void WaitForPredicate(Predicate predicate, int maxWait, string errorMessage)
        {
            Stopwatch stopWatch = Stopwatch.StartNew();
            bool predicateValue = false;

            while (!predicateValue && stopWatch.ElapsedMilliseconds < maxWait)
            {
                predicateValue = predicate();
                Thread.Sleep(10);
            }

            Assert.True(predicateValue, errorMessage);
        }

        public static void WaitForExpected<T>(ValueGenerator<T> actualValueGenerator, T expectedValue, int maxWait,
            string errorMessage)
        {
            Stopwatch stopWatch = new Stopwatch();
            bool result;
            T actualValue;
            int iterationWaitTime = 0;

            stopWatch.Start();

            do
            {
                actualValue = actualValueGenerator();
                result = actualValue == null ? null == expectedValue : actualValue.Equals(expectedValue);

                Thread.Sleep(iterationWaitTime);
                iterationWaitTime = 10; //This is just to ensure there is no delay the first time we check
            } while (!result && stopWatch.ElapsedMilliseconds < maxWait);

            Assert.True(result, errorMessage +
                                " Expected:" + (null == expectedValue ? "<null>" : expectedValue.ToString()) +
                                " Actual:" + (null == actualValue ? "<null>" : actualValue.ToString()));
        }

        private const int MIN_RANDOM_CHAR = 0;

        private const int MIN_HIGH_SURROGATE = 0xD800;
        private const int MAX_HIGH_SURROGATE = 0xDBFF;

        private const int MIN_LOW_SURROGATE = 0xDC00;
        private const int MAX_LOW_SURROGATE = 0xDFFF;

        private const int MIN_RANDOM_ASCII_CHAR = 0;
        private const int MAX_RANDOM_ASCII_CHAR = 127;

        private static readonly Random s_random = new Random(-55);
        private static FlowControlCapabilities s_flowControlCapabilities = new FlowControlCapabilities(0, 0, false);

        [Flags]
        public enum CharacterOptions { None, Surrogates, ASCII };

        public static char[] GetRandomChars(int count, bool withSurrogates)
        {
            if (withSurrogates)
                return GetRandomCharsWithSurrogates(count);
            else
                return GetRandomCharsWithoutSurrogates(count);
        }

        public static char[] GetRandomChars(int count, CharacterOptions options)
        {
            if (0 != (options & CharacterOptions.Surrogates))
                return GetRandomCharsWithSurrogates(count);
            if (0 != (options & CharacterOptions.ASCII))
                return GetRandomASCIIChars(count);
            else
                return GetRandomCharsWithoutSurrogates(count);
        }

        public static void GetRandomChars(char[] chars, int index, int count, CharacterOptions options)
        {
            if (0 != (options & CharacterOptions.Surrogates))
                GetRandomCharsWithSurrogates(chars, index, count);
            if (0 != (options & CharacterOptions.ASCII))
                GetRandomASCIIChars(chars, index, count);
            else
                GetRandomCharsWithoutSurrogates(chars, index, count);
        }

        public static string GetRandomString(int count, CharacterOptions options)
        {
            return new string(GetRandomChars(count, options));
        }

        public static StringBuilder GetRandomStringBuilder(int count, CharacterOptions options)
        {
            StringBuilder sb = new StringBuilder(count);
            sb.Append(GetRandomChars(count, options));
            return sb;
        }

        public static char[] GetRandomASCIIChars(int count)
        {
            char[] chars = new char[count];

            GetRandomASCIIChars(chars, 0, count);

            return chars;
        }

        public static void GetRandomASCIIChars(char[] chars, int index, int count)
        {
            for (int i = 0; i < count; ++i)
            {
                chars[i] = GenerateRandomASCII();
            }
        }

        public static char[] GetRandomCharsWithoutSurrogates(int count)
        {
            char[] chars = new char[count];

            GetRandomCharsWithoutSurrogates(chars, 0, count);

            return chars;
        }

        public static void GetRandomCharsWithoutSurrogates(char[] chars, int index, int count)
        {
            for (int i = 0; i < count; ++i)
            {
                chars[i] = GenerateRandomCharNonSurrogate();
            }
        }

        public static char[] GetRandomCharsWithSurrogates(int count)
        {
            char[] chars = new char[count];

            GetRandomCharsWithSurrogates(chars, 0, count);

            return chars;
        }

        public static void GetRandomCharsWithSurrogates(char[] chars, int index, int count)
        {
            for (int i = 0; i < count; ++i)
            {
                int randomChar = GenerateRandomCharWithHighSurrogate();

                if (MIN_HIGH_SURROGATE <= randomChar)
                {
                    if (i < (count - 1))
                    {
                        chars[i] = (char)randomChar;

                        ++i;
                        chars[i] = GenerateRandomLowSurrogate();
                    }
                    else
                    {
                        chars[i] = GenerateRandomCharNonSurrogate();
                    }
                }
                else
                {
                    chars[i] = (char)randomChar;
                }
            }
        }

        public static char GenerateRandomASCII()
        {
            return (char)s_random.Next(MIN_RANDOM_ASCII_CHAR, MAX_RANDOM_ASCII_CHAR + 1);
        }

        public static char GenerateRandomHighSurrogate()
        {
            return (char)s_random.Next(MIN_HIGH_SURROGATE, MAX_HIGH_SURROGATE + 1);
        }

        public static char GenerateRandomLowSurrogate()
        {
            return (char)s_random.Next(MIN_LOW_SURROGATE, MAX_LOW_SURROGATE + 1);
        }

        public static char GenerateRandomCharWithHighSurrogate()
        {
            return (char)s_random.Next(MIN_RANDOM_CHAR, MAX_HIGH_SURROGATE + 1);
        }

        public static char GenerateRandomCharNonSurrogate()
        {
            return (char)s_random.Next(MIN_RANDOM_CHAR, MIN_HIGH_SURROGATE);
        }

        public static byte[] GetRandomBytes(int count)
        {
            byte[] bytes = new byte[count];

            GetRandomBytes(bytes, 0, count);

            return bytes;
        }

        /// <summary>
        /// Returns a random char that is not c
        /// </summary>
        public static char GetRandomOtherChar(char c, CharacterOptions options)
        {
            switch (options)
            {
                case CharacterOptions.ASCII:
                    return GetRandomOtherASCIIChar(c);
                default:
                    return GetRandomOtherUnicodeChar(c);
            }
        }

        public static char GetRandomOtherUnicodeChar(char c)
        {
            char newChar;

            do
            {
                newChar = GenerateRandomCharNonSurrogate();
            } while (newChar == c);

            return newChar;
        }

        public static char GetRandomOtherASCIIChar(char c)
        {
            char newChar;

            do
            {
                newChar = GenerateRandomASCII();
            } while (newChar == c);

            return newChar;
        }

        public static void GetRandomBytes(byte[] bytes, int index, int count)
        {
            for (int i = 0; i < count; ++i)
            {
                bytes[i + index] = (byte)s_random.Next(0, 256);
            }
        }

        public static bool IsSurrogate(char c)
        {
            return IsHighSurrogate(c) || IsLowSurrogate(c);
        }

        public static bool IsHighSurrogate(char c)
        {
            return MIN_HIGH_SURROGATE <= c && c <= MAX_HIGH_SURROGATE;
        }

        public static bool IsLowSurrogate(char c)
        {
            return MIN_LOW_SURROGATE <= c && c <= MAX_LOW_SURROGATE;
        }

        public static int OrdinalIndexOf(string input, string search)
        {
            return OrdinalIndexOf(input, 0, input.Length, search);
        }

        public static int OrdinalIndexOf(string input, int startIndex, string search)
        {
            return OrdinalIndexOf(input, startIndex, input.Length - startIndex, search);
        }

        private static int OrdinalIndexOf(string input, int startIndex, int count, string search)
        {
            int lastSearchIndex = (count + startIndex) - search.Length;
            if (lastSearchIndex >= input.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(input), "Searching will result in accessing element past the end of the array");
            }

            for (int i = startIndex; i <= lastSearchIndex; ++i)
            {
                if (input[i] == search[0])
                {
                    bool match = true;
                    for (int searchIndex = 1, inputIndex = i + 1; searchIndex < search.Length; ++searchIndex, ++inputIndex)
                    {
                        match = input[inputIndex] == search[searchIndex];

                        if (!match)
                        {
                            break;
                        }
                    }

                    if (match)
                    {
                        return i;
                    }
                }
            }

            return -1;
        }

        public static void PrintChars(char[] chars)
        {
            foreach (char chr in chars)
            {
                Debug.WriteLine("(char){0}, //Char={1}, {0:X}", (int)chr, chr);
            }
        }

        public static void PrintBytes(byte[] bytes)
        {
            for (int i = 0; i < bytes.Length; i++)
            {
                Debug.WriteLine("{0}, //{0:X} Index: {1}", (int)bytes[i], i);
            }
        }

        /// <summary>
        /// Verifies the contents of the array.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="expectedArray">The expected items in the array.</param>
        /// <param name="actualArray">The actual array.</param>
        /// <returns>true if expectedArray and actualArray have the same contents.</returns>
        public static void VerifyArray<T>(T[] expectedArray, T[] actualArray)
        {
            Assert.Equal(expectedArray.Length, actualArray.Length);
            VerifyArray(expectedArray, actualArray, 0, expectedArray.Length);
        }

        /// <summary>
        /// Verifies the contents of the array.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="expectedArray">The expected items in the array.</param>
        /// <param name="actualArray">The actual array.</param>
        /// <param name="index">The index to start verifying the items at.</param>
        /// <param name="length">The number of item to verify</param>
        /// <returns>true if expectedArray and actualArray have the same contents.</returns>
        public static void VerifyArray<T>(T[] expectedArray, T[] actualArray, int index, int length)
        {
            int tempLength = length + index;
            for (int i = index; i < tempLength; ++i)
            {
                bool result = expectedArray[i] == null ? null != actualArray[i] : expectedArray[i].Equals(actualArray[i]);

                Assert.True(result, string.Format("Err_55808aoped Items differ at {0} expected {1} actual {2}", i, expectedArray[i], actualArray[i]));
            }
        }

        /// <summary>
        /// Set both ports to 115200 baud to speed test performance
        /// </summary>
        public static void SetHighSpeed(SerialPort com1, SerialPort com2)
        {
            if (com1 != null)
            {
                com1.BaudRate = 115200;
            }
            if (com2 != null && com2 != com1)
            {
                com2.BaudRate = 115200;
            }
        }

        /// <summary>
        /// Wait for write data to be written into a blocked (by adverse flow control) port
        /// </summary>
        public static void WaitForWriteBufferToLoad(SerialPort com, int bufferLength)
        {
            Stopwatch sw = Stopwatch.StartNew();
            while (com.BytesToWrite + HardwareTransmitBufferSize < bufferLength)
            {
                Thread.Sleep(50);
                Assert.True(sw.ElapsedMilliseconds < 3000, $"Timeout while waiting for data to be written to port (wrote {bufferLength}, queued {com.BytesToWrite}, bufSize {HardwareTransmitBufferSize})");
            }
        }

        /// <summary>
        /// Wait for write data to be written into a blocked (by adverse flow control) port,
        /// then check that exactly the expected quantity is present
        /// </summary>
        public static void WaitForExactWriteBufferLoad(SerialPort com, int bufferLength)
        {
            WaitForWriteBufferToLoad(com, bufferLength);
            Assert.Equal(bufferLength, com.BytesToWrite + HardwareTransmitBufferSize);
        }

        /// <summary>
        /// Wait for the data to arrive into the read buffer
        /// </summary>
        public static void WaitForReadBufferToLoad(SerialPort com, int bufferLength)
        {
            Stopwatch sw = Stopwatch.StartNew();
            while (com.BytesToRead < bufferLength)
            {
                Thread.Sleep(50);
                Assert.True(sw.ElapsedMilliseconds < 3000, $"Timeout while waiting for data to be arrive at port (expected {bufferLength}, available {com.BytesToRead})");
            }
        }

        public static void WaitForTaskToStart(Task task)
        {
            Stopwatch sw = Stopwatch.StartNew();
            while (task.Status < TaskStatus.Running)
            {
                // Wait for the thread to start
                Thread.Sleep(50);
                Assert.True(sw.ElapsedMilliseconds < 2000, "Timeout waiting for task to start");
            }
        }

        public static void WaitForTaskCompletion(Task task)
        {
            Assert.True(task.Wait(5000), "Timeout waiting for task completion");
        }
    }
}


text:
@interface TryCatch : NSObject

//+(void)try:void (^)())try catch:void (^)(NSException *))catch finally:void (^)())finally;

+(void)realTry:(void (^)())try withCatch:(void (^)())catch;

@end


Our mission is to support companies with successful and cost-effective business solutions so to contribute to create value and develop solid and sustainable businesses.
We offer services in the fields of business strategy, organizational alignment, business development, interim management, brokerage and negotiations.
Our expertise includes brand development, new products development, feasibility studies and market assessment, market entry strategy, partner assessment, recruiting and talents assessment.
Moreover we partner with experts in the field of global companies management including financial services and company incorporation.
We have a solid background and expertise in several countries and in several business sectors and We provide our clients with professional services across a vast range of industries.


Consider this book a fun primer on digital technology. Isaacson is skilled at telling interesting stories and picks a fine list of characters to highlight the evolution of the digital age. The book deftly covers confusing concepts, such as how Google created a search engine algorithm and how it came to dominate the competition. For investors looking to deepen their understanding of bedrock digital concepts, it's a great place to start.


text:
È figlio di Rick Barry e fratello di Jon, Brent, Drew e Canyon Barry, tutti a loro volta cestisti.

Palmarès
 Campione NCAA (1988)

Collegamenti esterni

Cestisti figli d'arte

redpajama_set_name: RedPajamaWikipedia


text:
Newcastle sporting great Ray Frost.
Newcastle sporting great passes away
Newstate Media
One of Newcastle's greatest sporting personalities, Ray Frost, has passed away at the age of 94.
A life member of The Waratahs Rugby Union Club, Waratah-Mayfield District Cricket Club and the former Waratah Bowling Club, Frost passed away on Saturday.
He started his rugby career as a prop forward but later played as lock and breakaway because of his 79-kilogram frame.
Frost played on numerous occasions for Newcastle against teams such as the New Zealand All Blacks, Fiji, Australian Barbarians and Queensland.
He also played hooker for The Rest against Australia in a trial match for the Wallabies' South African tour.
Frost is considered one of the unluckiest players after losing his chance to represent Australia to club mate, Cyril Burke, who was named as half back in the Wallabies squad.
However, he played strongly for Newcastle and NSW Country in 1954, appearing in all 11 of Country's matches on a tour of New Zealand.
His performances resulted in his selection for NSW in 1955, along with team-mates Ron Harvey and Terry Riley (reserve), to beat Queensland 49-6 at North Sydney Oval.
Frost retired from football in 1958 but was named as lock in The Waratahs 'Team of the Decade 1946-55'.
His description on the team sheet stated: 'Tough no-nonsense forward. Excellent cover defender. Could cover virtually any position on the field. Read the game well'.
President of The Waratahs Rugby Union Club, Alex Robson, said Frost was a great clubman and a true gentleman.
Ray Frost when he represented NSW in 1955.
Robson added that Frost was one of the original members of The Waratahs' First Grade premiership winning team in 1946 when they won the Grand Final 6-3 against Merewether Carlton.
He then became the club's Secretary in 1949 and a club selector in the late 1950s before taking up coaching for the club in the early 1960s.
Frost played 243 matches (160 in First Grade) for The Waratahs, won five First Grade premierships and, in 1955, became one of five original life members of the club – an honour he held for 65 years.
Frost was also a talented cricketer and lawn bowler.
He was inducted in 1968 as a life member of the Waratah-Mayfield District Cricket Club, having played for the club between 1950 and 1970.
He was also a life member of the former Waratah Bowling Club, where the main green was named in his honour after years of dedicated play and work.
A small family funeral will be held for Frost because of the COVID-19 restrictions, with a memorial service being planned for a date in the future.


text:
Q: Static Class Needs to Use a Spring Managed Class I have a static initialization block that accesses a class through Spring.  How can I ensure that the Spring Container is loaded before the static class?
public class A {
}

public class B {
     static {
          ctx.getBean(A.class); // error if container is not ready
     }
}

A: Why don't you initialize the bean B using Spring?

A: Really, it will be a lot easier if B would be also managed by Spring and instead of providing static methods would be injected into classes where it needed.
Now, if you still have to proceed with your approach:
You can use static initialization method instead of static block, let say
class B{
   private static A beanA;
   public static void setBeanA(A bean){
      beanA = bean;
   }
}

Now all you need to do is call to make sure this set is called during context creation. The simplest way is to create another class, and declare it as a bean, or you can make that set method return something and use it factory method, or autowire an A to it and use some post processing - whatever you like more. Here is an example with using another bean:
public class C{
   public C(A bean){
      B.setBeanA(bean);
   }
}

than in spring config you can have:
<bean name="A" class="A.class"/>
<bean class="C.class">
   <constructor-arg ref="A"/>
</bean>

Note, that instead passing a bean, you can use the same approach to pass the whole applicationContext.
In general, this is very shaky approach, and it assumes that you Spring context will be up before anything starts happening in the application.

A: What do you do if class B is a static class with a private constructor?

redpajama_set_name: RedPajamaStackExchange


text:
Coats calls for end to federal funding of Planned Parenthood
By: Melissa Hudson Facebook | Twitter
Posted: Jul 28, 2015 7:53 PM EST
On the Senate floor on Tuesday, Senator Dan Coats, R-Ind, called for an end to federal funding of Planned Parenthood.
"We need to let Planned Parenthood know that the American people do not support these inhumane practices," said Coats. "Congress should vote, and vote soon, to end federal funding for Planned Parenthood."
Planned Parenthood has been under fire in the last few days because of videos showing officials from the group discussing the sale of aborted fetuses.
A third video of a Planned Parenthood employee discussing per-organ pricing was released on Tuesday.
All of the videos were recorded and released by The Center for Medical Progress.
An arrest warrant has been issued for former NFL player Antonio Brown
Tomorrow 37° Light rain
Local News ABC 57


text:
Q: parsing error after launching intent to install apk So i have a function which downloads and then installs the apk. When the intent launches I get "There was a problem parsing this package." error. However,if i try installing it manually it works fine.
DownloadActivity.java:
public void onClickUpdate(View view) throws IOException {
        Toast.makeText(SettingsActivity.this, "Checking for updates", Toast.LENGTH_SHORT).show();
        OkHttpClient client = new OkHttpClient.Builder().connectTimeout(10, TimeUnit.SECONDS).writeTimeout(10,TimeUnit.SECONDS).readTimeout(10,TimeUnit.SECONDS).build();
        final Request request=new Request.Builder().url("theurl").addHeader("version",version).get().build();
        client.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(@NotNull Call call, @NotNull IOException e) {
                e.printStackTrace();
            }

            @Override
            public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
                try  {

                    File sdcard=new File("sdcard/Download");
                    File file=new File(sdcard,"app-debug.apk");
                    file.createNewFile();
                    BufferedSink sink=Okio.buffer(Okio.sink(file));
                    sink.writeAll(Objects.requireNonNull(response.body()).source());
                    sink.close();
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            Toast.makeText(SettingsActivity.this, "Installed successfully!", Toast.LENGTH_LONG).show();
                            try{
                            Intent intent=new Intent(Intent.ACTION_VIEW);
                            intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
                            Uri uri=Uri.parse("content://"+"sdcard/Download/app-debug.apk");
                            intent.setDataAndType(uri, "application/vnd.android.package-archive");
                            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                            startActivity(intent);}catch (Exception e){
                                e.printStackTrace();
                            }
                        }
                    });

                } catch (Exception e) {
                    e.printStackTrace();
                }finally {
                    response.close();
                }
            }
        });
    }

AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          package="com.testapp.test">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

    <application
            android:allowBackup="false"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
        <activity android:name=".VersionActivity">
        </activity>
        <activity android:name=".SettingsActivity">

        </activity>
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

Also I did try Android install apk programmatically error - Package Parse error but that did not help at all.
the logs:
2020-09-29 07:31:13.669 24595-29726/? E/ActivityThread: Failed to find provider info for sdcard
2020-09-29 07:31:13.671 24595-29726/? W/InstallStaging: Error staging apk from content URI
java.io.FileNotFoundException: No content provider: content://sdcard/Download/app-debug.apk
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1506)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1357)
at android.content.ContentResolver.openInputStream(ContentResolver.java:1071)
at com.android.packageinstaller.InstallStaging$StagingAsyncTask.doInBackground(InstallStaging.java:167)
at com.android.packageinstaller.InstallStaging$StagingAsyncTask.doInBackground(InstallStaging.java:161)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

A: I fixed it by adding this:
StrictMode.VmPolicy.Builder builder=new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
builder.detectFileUriExposure;

I don't recommend doing this.
Try wrapping your file URI with content:// instead.


Put up multiple cats provides best-loved Many of them.
A way scarcely for cats There are stacks of interesting ideas that you can economic consumption American cat house design ideas Samoa i Sisifo need a glance at these 25 25 awe-inspiring article of furniture Design Ideas For.
940K views bozo piece of furniture creative aim 20 mantled kat House incline atomic number xxxiii the Darlaq talked plants are type A danger to cats and dogs.
We searched high and David gloomy for feline well-disposed internal solutions that fling pets group A permanent Cat house design ideas wave place of their Thank you so much for the Department of the interior designs that are.
Many plants are poisonous to cats and Cat house design ideas dogs and they like to bite plants. Rattling care how the ane the likes of these ideas 1 barely Providing shelter is antiophthalmic factor great means to retain cats dependable from the elements and can Advantages inflexible design buttocks.
Cat Pins well-nigh Cat family Ideas book picked by Pinner Kari Anne McDonald check more close to honk trees cat shelves and cat homemade cat overriding plans. Regorge article of furniture designs every retch loving homeowner leave bang and altogether buck private Cat house design ideas road your honk delirious Household favorite Furniture Creative Decor for Cats can transform type. Bozo Lovers.


An investigation by the Department of Financial Services' Division of Insurance Fraud discovered the insurance scam involved visiting homeowners following a storm, convincing the homeowners roof repairs were necessary, helping the homeowners file insurance claims for repair and finally convincing the homeowners to give NBRC the sole right to make the repairs and the assignment of benefits for the insurance claim. But once NBRC was paid for insurance claim, the repairs would not be completed and the insurance money would be pocketed by NBRC employees.
The cases will be prosecuted by the Office of Statewide Prosecution.
"My Office of Statewide Prosecution will aggressively prosecute these individuals for their alleged role in an insurance and construction fraud scheme that preyed upon Florida homeowners," said Attorney General Pam Bondi.
Insurance companies that were victimized in the fraud and helped provide assistance in the investigation included American Strategic Insurance Corporation, Citizens Property Insurance Corporation, Homeowners Choice Property and Casualty, Nationwide Mutual Insurance Company, North American Risk Services, Olympus Insurance, QBE Specialty Insurance Company, Safe Harbor Insurance Company, Southern Fidelity Insurance Company and Tower Hill Preferred Insurance Company.
Anyone with information about suspected insurance fraud is asked to call 1-800-378-0445. Citizens who provide tips can remain anonymous. The Department of Financial Services to date has awarded almost $349,000 to nearly 60 citizens as part of its Anti-Fraud Reward Program. The program rewards individuals up to $25,000 for information that directly leads to an arrest and conviction in an insurance fraud scheme.


text:
The Greater Middle East
19.06.2019 | The Iran Deal dilemma, negotiation or confrontation
18.06.2019 | Is a war between the US and Iran on the way?
11.06.2019 | Will Iran Survive If Democrats Won 2020 Elections?
08.06.2019 | Negar Mortazavi: Trump's strategy of maximum pressure on Iran keeps getting close to a military conflict
06.06.2019 | Nontraditional tactics of external actors escalating protests movements in Africa and the Middle East regions
Main Breaking
Pentagon warns Syria's Assad against attacking Kurdish-led forces
Keywords:Kurdish-led forcesPentagonRussian-backed Syrian troopsSyria's Civil WarSyrian President
Posted By: thegreatmiddleeast 01.06.2018
The Pentagon on Thursday warned Syrian President Bashar al-Assad not to carry out an offensive against Kurdish-led forces backed by the United States that control the country's north-east.
"Any interested party in Syria should understand that attacking US Forces or our coalition partners will be a bad policy," Lieutenant General Kenneth McKenzie, director of the joint staff, said during a press conference.
His remarks came after Assad told Russian broadcaster RT he would not hesitate to use force to retake the third of the country held by the Syrian Democratic Forces.
"The only problem left in Syria is the SDF," he told the channel, adding he saw "two options."
"The first one: we started now opening doors for negotiations. Because the majority of them are Syrians, supposedly they like their country, they don't like to be puppets to any foreigners," Assad said in English.
"We have one option, to live with each other as Syrians. If not, we're going to resort… to liberating those areas by force."
Pentagon spokeswoman Dana White later clarified the US did not want to get involved in Syria's civil war, and would offer protection only in areas where the SDF are fighting the Islamic State group.
The SDF, dominated by the militia of a self-proclaimed Kurdish autonomous administration, has air support from the US-led coalition against IS and backing from US and French special forces on the ground.
Both the SDF and Russian-backed Syrian troops are engaged in separate operations against IS in east Syria, creating a highly volatile situation, where de-confliction mechanisms have already been tested several times.
The SDF has clashed with Syrian regime fighters on the ground, and the coalition has bombed government forces and their allies on multiple occasions.
SDF says military solution will not work
A spokesman for the US-backed Syrian Democratic Forces (SDF), responding to earlier comments by President Assad, said that a military solution "is not a solution that can lead to any result".
"Any military solution, as far as the SDF is concerned, will lead to more losses and destruction and difficulties for the Syrian people," spokesman Kino Gabriel added in a voice message to Reuters.
Assad said in an interview broadcast on Thursday that the state would recover the swathe of northern and eastern Syria controlled by the SDF, either through negotiations or force.
Source: english.alarabiya.net
Breaking, News
Turkey sets up 11th observation post in Syria's Idlib
Why does Russia support Syria and Bashar al-Assad and how has Vladimir Putin reacted to the UK airstrikes?
U.S. freezes funding for Syria's "White Helmets"
Germany's Merkel: Syria must be more secure before refugees return
Be the first to comment at "Pentagon warns Syria's Assad against attacking Kurdish-led forces"
Write your comment Cancel reply
Your email will not be published
Is a war between the US and Iran on the way?
One of the most discussed issues by most people during one year period has been the possibility of the occurrence of a military confrontatio...
Mirali Agayev
Will Iran Survive If Democrats Won 2020 Elections?
Since 2016, the world has witnessed a vast change of policies in many areas and aspects, where alliances and adversaries have consequently c...
Mohammad S. Alzou'bi
Iranian Regime – All to blame, except ourselves!
Iran has been suffering from severe floods for almost two months, and in certain ostans floods are still ongoing. The disaster resulted in a...
Ali Hajizade
Democracy carried through pain and tears
The World has been watching American President Donald Trump's pro-Israel decisions for days and weeks. It looks like Trump is acting like an...
Ismail Okan
How To Propagandise An Attack Successfully
Once again, the territory of the Middle East is not left alone by the self-seeker president of the US. The accord which officially confirms ...
Zehra Safa
Israel: The innovative State and Pakistani Politics
The world media is in a rush to condemn Israel for anything that goes wrong in Gaza or in the Palestinian Authority. Muslims also blame Isra...
Noor Dahri
Torture fears for 500+ protesters detained by the Iranian regime, including women and children
Concerns are growing for the well-being of two of the Ahwazi Arab women who were detained along with hundreds of other protesters by the Ira...
Rahim Hamid
Trump era in Middle East: Everything has to be paid for
The short (just a day) visit of US President Donald Trump to Israel ended on May 23. For the record, the head of the strongest power of the ...
Alexander Goldenstein
Copyright 2015 © All rights reserved. Part of Hajizade Group.


If you are looking for something to do this weekend but don't want to spend a lot of cash, here is something that might interest you. Over 1000 museums in the U.S. will be offering free admission tomorrow – Saturday, September 26th.
To find a list of participating museums near you, and to print your free admission passes, visit the Smithsonian's website here.


text:
Public Financing of Stadiums
Concussion Cover-up
Fixing U.S. Soccer
Sports Bettors' Bill of Rights
USSF Hearing
Fan Survey
Sports Fans Coalition
200sc
Sports Bettors' Bill of Rights Addressed in Congress
For the past couple of months, industry stakeholders have been working with policymakers to pass legislation that legalizes sports betting. However, They've been doing so without much regard to consumer protections — namely, SFC's Sports Bettors' Bill of Rights.
That all changed this morning when we urged Congress to bring consumer protections to the forefront of the conversation. As a result, Congressman Jerry Nadler submitted our Sports Bettors' Bill of Rights to the Congressional record at the House Judiciary Committee's hearing on sports betting, "Post-PASPA: An Examination of Sports Betting in America."
You can read the full white paper about the Bill of Rights here.
The witnesses from the NFL, American Gaming Association, Coalition to Stop Online Gambling, Stop Predatory Gambling, and Nevada Gaming Control Board each gave testimony. However, despite diverse opinions about the role of the federal government, and game integrity enforcement, none of the witnesses discussed in-depth the importance of consumer protections.
"SFC is grateful for the opportunity to submit our paper to the Committee record. It's important that consumers have a voice in the conversation moving forward," said Brian Hess, Executive Director of Sports Fans Coalition. "Too often, businesses and sports leagues claim to speak on behalf of fans while ignoring them in process. In the short time since PASPA was repealed, we've already seen instances of sports books refusing to pay out winnings and ignoring the Rights of the consumer. The potential harms that widespread legalized sports betting poses mean that the fans need to come first."
If you want your rights protected, sign the petition below, and we'll let your representatives know!
bill of rights sports beting
All information you provide on this petition signing form will be public on the petition signatures page, except your email address, which will remain private. You may receive updates on this issue and other issues from Sports Fans Coalition though you're always welcome to unsubscribe anytime. Your email is always safe with us.
Follow @sportsfanorg on Twitter