'faucet.rinkeby.io' says cannot reCAPTCHA. Check your connection and try again - microsoft-edge

I am seeking ether from faucet.rinkeby and I cannot get pass this problem and receive my ether.

Related

How to set max connections in AP configuration of esp8266?

I want to connect only one client at a time with esp8266. Second client trying to connect should disconnect immediately.But I can't find 'max_connection' like parameter in
ap.configuration()
Allowed parameters are essid, password, channel, authmode
Is there a way to achieve this ?
You can use wifi_softap_set_config() with config.max_connections.
From reference

Indy SMTP Server and Telnet

I have been fooling about with the SMTP client and server components in Indy 9 using demos with Delphi 7. Everything works fine. However, when I telnet into the server, the demo shows only the email subject and mail body, the From: and To: fields are not shown.
The code below shows that AMsg is lacking the relevant data.
procedure TForm1.IdSMTPServer1ReceiveMessageParsed(ASender: TIdCommand;
var AMsg: TIdMessage; RCPT: TIdEMailAddressList;
var CustomError: String);
begin
// This is the main event if you have opted to have the idSMTPServer to do your parsing for you.
// The AMessage contains the completed TIdMessage.
// NOTE: Dont forget to add IdMessage to your USES clause!
ToLabel.Caption := AMsg.Recipients.EMailAddresses;
FromLabel.Caption := AMsg.From.Text;
SubjectLabel.Caption := AMsg.Subject;
Memo1.Lines := AMsg.Body;
// Implement your file system here :)
end;
Can anybody suggest a reason?
First of all, a thankyou to Remy for his response.
Second, it seems I can't post images here, yet, but here is a link to images of server-telnet session https://postimg.org/image/f0n9j0kcx/. The telnet session shows the server responses.
Thanks also for reminding me about Wireshark, and the suggestion of using a TIdLog component.
It is tricky to know for sure since you did not show the actual SMTP commands you are sending via Telnet, but you are likely missing required commands/data that TIdSMTP sends. To see the actual SMTP commands/responses that are being exchanged, you can use a packet sniffer like Wireshark, or attach one of Indy's TIdLog... components to the TIdSMTP and/or TIdSMTPServer socket connections.
Any email address that is received via a MAIL FROM command and accepted by the server (see the OnCommandMail event) is passed to the OnReceive... events in the TIdSMTPServerThread(ASender.Thread).From property. The server will not accept a RCPT TO command if an email address has not been accepted from MAIL FROM first. If you do not assign an OnCommandMail handler, the server will accept any email address it receives.
Any email addresses that are received via RCPT TO commands and accepted by the server (see the OnCommandRCPT event) are passed to the OnReceive... events in the RCPT parameter, and also in the TIdSMTPServerThread(ASender.Thread).RCPTList property. The server will not accept a DATA command if at least one email address was not accepted from RCPT TO first. If you do not assign an OnCommandRCPT handler, the server will accept every email address it receives.
In the OnReceiveMessage... events, the provided TIdMessage object is first populated from the raw email data that is sent in the DATA command only. In the case of the OnReceiveMessageParsed event only, any email addresses that were previously accepted via RCPT TO are then merged into the TIdMessage.Recipients property if they do not already exist. However, any email address received in the MAIL FROM command is not merged into the TIdMessage.From property.
So, depending on what email data you are actually sending in the DATA command, the AMsg.From property may or may not be empty. But the AMsg.Recipients property certainly should not be.
Also, something else to keep in mind - TIdSMTPServer is multi-threaded (as most Indy servers are). Its events are fired in the context of worker threads, not the main UI thread. Your code is directly accessing VCL UI controls from outside of the main UI thread, which is not safe and can cause all kinds of problems. You must synchronize with the main UI thread, using either the VCL's TThread.Synchronize() or TThread.Queue() methods, or Indy's TIdSync or TIdNotify classes, or any other thread-safe sync mechanism of your choosing, as long as the synced code runs in the context of the main UI thread only.

How do you "resolve" a GKTurnBasedExchange?

I'm using a GKTurnBasedExchange to send data one way. It's a notification to the other players as certain triggers happen. However, the other players may not even be in the game at that time. The turns have 48 hour timeouts, so in theory if player1 sends said exchange, player3 might not pick it up for a couple of days. That's fine, player 1 doesn't require or expect any response.
But, when player1 tries to save the match data, end the turn or quit the match, I get an error:
Error Domain=GKErrorDomain Code=3 "The requested operation could not
be completed due to an error communicating with the server."
UserInfo=0x19317970 {GKServerStatusCode=5134,
NSUnderlyingError=0x16f15db0 "The operation couldn’t be completed.
status = 5134, Invalid operation for this session because the exchange
was not resolved. All exchanges must be resolved before the current
player can complete this operation.
OK, the bolded text seems pretty self-explanatory except for one little detail: I can't find any reference anywhere to what constitutes a "resolved" exchange. I don't expect a response back to this message. Even if I did, it could take days to receive it. The only option I can see is for the sender to cancel the exchange, which defeats the purpose of sending the exchange in the first place
So, how exactly does one finalize an exchange? What series of steps, besides canceling the exchange, will satisfy game center that the exchange has been "resolved?"
I'm just using:
[theMatch sendExchangeToParticipants:exchangeParticipants
data:exchangeData
localizableMessageKey:#"F1"
arguments:nil
timeout:600
completionHandler:^(GKTurnBasedExchange *exchange, NSError *error)
{
if (error)
{
VLOG(LOWLOG, #"%#", [error description]);
}
}
];
Followed by:
[theMatch saveCurrentTurnWithMatchData:dataCopy completionHandler:^(NSError *error)
{
if (error)
{
VLOG(LOWLOG, #"%#", [error description])
}
}];
The saveCurrentTurnWithMatchData call returns the aforementioned error.
Thanks!
I think I figured this out. Man oh man it's a slog making sense of Apple's documentation.
In the end I didn't make sense of it actually: this is the result of brute force trial and error.
So here's the deal: you can do a lot of things with exchanges, but to actually resolve them you have to call:
saveMergedMatch(matchData: Data, withResolvedExchanges: [GKTurnBasedExchange], completionHandler: ((Error?) -> Void))
There are several catches though.
Only the match's currentParticipant (the player who's turn it is) can call saveMergedMatch successflly.
It will only work for exchanges that are not in .active status.
There are only two ways, as far as I can tell, to programmatically get an exchange out of .active status.
The harder way: all recipients of the exchange have to act on the exchange--itself a murky process, can't help there. If all recipients do respond to it, Game Center itself will handle changing the status of the exchange, I think. Not sure though, because I don't do this. [The only help I can give here is that if you give an exchange a really short timeout when you send it, after the timeout passes Game Center will adjust the exchange's status automatically, and your recipients won't have to do anything.]
The not-much-easier way: the sender and only the sender of the exchange can cancel it, by calling the exchange's method cancel(withLocalizableMessageKey key: String, arguments: [String], completionHandler: ((Error?) -> Void)? = nil). The saving grace of this way is that it doesn't have to be the sender's turn for them to cancel it. This is one of the few times that the current turn-taker doesn't matter. Unfortunately this also has a catch: the exchange can't be cancelled if anyone has already responded to it.
So the upshot is that there is no way for any single player to be guaranteed to be able to resolve an exchange, for two reasons:
The process that moves active exchanges into completed exchanges is only programmatically accessable for the purpose of cancelling the exchange, and only by the player that originated it, and only if no one has responded yet.
The actual process that turns completed exchanges into resolved exchanges can only be triggered by the player in the match's currentParticipant property.
Personally, I can work with this, now that I understand it (I hope) , but without doubt it is quite a pain.
Well, turns out exchanges can't be used. Yet another limitation in Game Kit. For anyone that comes across this thread, I found WWDC 2013 session 506 says:
All participants have to respond for game center to mark the exchange as "completed"
You have to call:
[match saveMergedMatchData:dataCopy
withResolvedExchanges:match.completedExchanges
completionHandler:...];
So, you can't use exchanges for 1-way communications. There has to be a response (or wait for a timeout).
I guess I'll answer to the unasked question of: how to send 1-way communications With notifications.
I think the best API for that is setLocalizableMessageWithKey(key:arguments:) or sendReminderToParticipants(localizableMessageKey:arguments:completionHandler:) on your GKTurnBasedMatch instance.

LuaSocket - TCP 2nd message not sending

I've been searching Google for awhile and there seems to be no offers on fixing this problem I have here.
I am using LuaSocket as a simple way to connect to a external server I created, and I am able to connect to it successfully and send a signal.
However, when I try to send a second message later on, the external server does not seem to be receiving the message, even though I am still connected to the socket.
socket = require("socket")
host, port = ip, port
tcp = assert(socket.tcp())
tcp:settimeout( 0 )
tcp:connect(host, port);
msg = {
["status"]="connect",
["usrName"]=username
}
msg = Json.Encode(msg)
tcp:send(msg); -- This message, the server received this message.
-- Later in my code, I attempt to send another message.
msg = {
["status"]="anotherMessage",
["usrName"]=username
};
msg = Json.Encode(msg)
tcp:send(msg); -- This message is not sending, even though i'm still connected.
You need to show what happens on the other side as it may be simply not reading even though the connection may be open. You also don't say what exactly happens when "message is not sending"; do you get an error? the script finishes but the message is not sent?
There are several things you can try:
Switch to the (default) synchronous send until you get it working; remove tcp:settimeout(0), as your send may simply fail with "timeout" message if the other side is not ready to read the message.
Check the error message from :send call to see if it's timing out or not.
local ok, err = tcp:send(msg)
Use socket.select to check if the other side it ready to accept the message you are sending.
Try adding "\r\n" at the end of your serialized JSON.

How can I apply timeout function to LMAX Disruptor Queue?

To developers/users of LMAX Disruptor http://code.google.com/p/disruptor/ :
My question:
Can anyone suggest an approach to how apply a timeout function to Disruptor e.g. using EventHandler?
Here is one scenario that came up in my line of work:
Outbox - messages sent to the Server over a network
Inbox - ACK messages received from the Server
ACK Handler - marks outbox messages as ACKed
Timeout Handler - marks outbox message as NACKed (much needed, but where can it fit into the Disruptor design?)
Is there anyone who share the same opinion?
Or can anyone point out why it is unnecessary.
I hope the ensuing debate would be brief.
Thank you.
To clarify the timeout-handler would "fire" after a certain period of time when a message could not be delivered?
The way it works with disruptor is you have a ringbuffer for inbound and a ringbuffer for outbound messges... so email comes in, place it into the inbound ring buffer using an appropriate event. then process the message (i.e. decode, analye, log, store) and send it along to another sytem by placing it into the outbound ringbuffer... another handler takes the message and stores it into a database or sends it to another server using smtp... if a error / timeout etc. occurs, your create an event in the inbound ringbuffer signaling the error (NACK) and process this message. does that make sense?!?

Resources