Links in references broken - latex

I am using \bibliographystyle{unsrt} and have some issues after printing the references.
Firstly, some of the links go outside the defined range:
Here is how the entry from the .bib file looks like:
#misc{noauthor_representational_2021,
title = {Representational {State} {Transfer}. {Verfügbar} von: https://de.wikipedia.org/wiki/{Representational}\_State\_Transfer\#{Einheitliche}\_Schnittstelle. {Abruf} 01/08/2021},
copyright = {Creative Commons Attribution-ShareAlike License},
url = {https://de.wikipedia.org/w/index.php?title=Representational_State_Transfer&oldid=214173929},
abstract = {Representational State Transfer (abgekürzt REST) ist ein Paradigma für die Softwarearchitektur von verteilten Systemen, insbesondere für Webservices. REST ist eine Abstraktion der Struktur und des Verhaltens des World Wide Web. REST hat das Ziel, einen Architekturstil zu schaffen, der den Anforderungen des modernen Web besser genügt. Dabei unterscheidet sich REST vor allem in der Forderung nach einer einheitlichen Schnittstelle (siehe Abschnitt Prinzipien) von anderen Architekturstilen.
Der Zweck von REST liegt schwerpunktmäßig auf der Maschine-zu-Maschine-Kommunikation. REST stellt eine einfache Alternative zu ähnlichen Verfahren wie SOAP und WSDL und dem verwandten Verfahren RPC dar. Anders als bei vielen verwandten Architekturen kodiert REST keine Methodeninformation in den URI, da der URI Ort und Namen der Ressource angibt, nicht aber die Funktionalität, die der Web-Dienst zu der Ressource anbietet. Der Vorteil von REST liegt darin, dass im WWW bereits ein Großteil der für REST nötigen Infrastruktur (z. B. Web- und Application-Server, HTTP-fähige Clients, HTML- und XML-Parser, Sicherheitsmechanismen) vorhanden ist, und viele Web-Dienste per se REST-konform sind. Eine Ressource kann dabei über verschiedene Medientypen dargestellt werden, auch Repräsentation der Ressource genannt.
So ist ein Online-Dienst, der lediglich unveränderte Seiteninhalte nach dem Internetstandard HTTP anbietet, bereits REST-konform. Dynamisch erzeugte Seiten folgen diesem Paradigma jedoch oft nicht. So bieten beispielsweise Nachrichtenseiten sich ständig ändernde Informationen mit sowohl unterschiedlichem Format als auch Inhalt an, die nur schwer automatisch verarbeitet werden können. Bliebe das Format unverändert, so wäre eine wichtige REST-Eigenschaft erfüllt. So wäre eine Webseite, auf der ständig die aktuelle Uhrzeit in immer demselben Format abrufbar ist, REST-konform.
Die Bezeichnung „Representational State Transfer“ soll den Übergang vom aktuellen Zustand zum nächsten Zustand (state) einer Applikation verbildlichen. Dieser Zustandsübergang erfolgt durch den Transfer der Daten, die den nächsten Zustand repräsentieren.},
language = {de},
urldate = {2021-08-01},
journal = {Wikipedia},
month = jul,
year = {2021},
note = {Page Version ID: 214173929},
file = {Snapshot:/Users/username/Zotero/storage/2D7HXXHG/index.html:text/html},
}
I have a couple of links like this within the references and I am not sure how I can fix them. I tried a couple of things like \sloppy, \setlength{\emergencystretch}{8em}, etc., but didnt seem to fix the issue. Also my links are defined within the title of the reference, would it be possible to make them work when they are on more than one line? Currently they are all clickable, but in most cases the link is broken.

Instead of manually trying to escape all the special characters in your urls, use the \url{..} macro to typeset them. You can get it by e.g. loading the url or hyperref package.
\documentclass{article}
\usepackage{hyperref}
\begin{filecontents*}[overwrite]{\jobname.bib}
#misc{noauthor_representational_2021,
title = {Representational {State} {Transfer}. {Verfügbar} von: \url{https://de.wikipedia.org/wiki/Representational_State_Transfer#Einheitliche_Schnittstelle}. {Abruf} 01/08/2021},
copyright = {Creative Commons Attribution-ShareAlike License},
url = {https://de.wikipedia.org/w/index.php?title=Representational_State_Transfer&oldid=214173929},
abstract = {Representational State Transfer (abgekürzt REST) ist ein Paradigma für die Softwarearchitektur von verteilten Systemen, insbesondere für Webservices. REST ist eine Abstraktion der Struktur und des Verhaltens des World Wide Web. REST hat das Ziel, einen Architekturstil zu schaffen, der den Anforderungen des modernen Web besser genügt. Dabei unterscheidet sich REST vor allem in der Forderung nach einer einheitlichen Schnittstelle (siehe Abschnitt Prinzipien) von anderen Architekturstilen.
Der Zweck von REST liegt schwerpunktmäßig auf der Maschine-zu-Maschine-Kommunikation. REST stellt eine einfache Alternative zu ähnlichen Verfahren wie SOAP und WSDL und dem verwandten Verfahren RPC dar. Anders als bei vielen verwandten Architekturen kodiert REST keine Methodeninformation in den URI, da der URI Ort und Namen der Ressource angibt, nicht aber die Funktionalität, die der Web-Dienst zu der Ressource anbietet. Der Vorteil von REST liegt darin, dass im WWW bereits ein Großteil der für REST nötigen Infrastruktur (z. B. Web- und Application-Server, HTTP-fähige Clients, HTML- und XML-Parser, Sicherheitsmechanismen) vorhanden ist, und viele Web-Dienste per se REST-konform sind. Eine Ressource kann dabei über verschiedene Medientypen dargestellt werden, auch Repräsentation der Ressource genannt.
So ist ein Online-Dienst, der lediglich unveränderte Seiteninhalte nach dem Internetstandard HTTP anbietet, bereits REST-konform. Dynamisch erzeugte Seiten folgen diesem Paradigma jedoch oft nicht. So bieten beispielsweise Nachrichtenseiten sich ständig ändernde Informationen mit sowohl unterschiedlichem Format als auch Inhalt an, die nur schwer automatisch verarbeitet werden können. Bliebe das Format unverändert, so wäre eine wichtige REST-Eigenschaft erfüllt. So wäre eine Webseite, auf der ständig die aktuelle Uhrzeit in immer demselben Format abrufbar ist, REST-konform.
Die Bezeichnung „Representational State Transfer“ soll den Übergang vom aktuellen Zustand zum nächsten Zustand (state) einer Applikation verbildlichen. Dieser Zustandsübergang erfolgt durch den Transfer der Daten, die den nächsten Zustand repräsentieren.},
language = {de},
urldate = {2021-08-01},
journal = {Wikipedia},
month = jul,
year = {2021},
note = {Page Version ID: 214173929},
file = {Snapshot:/Users/username/Zotero/storage/2D7HXXHG/index.html:text/html},
}
\end{filecontents*}
\begin{document}
\cite{*}
\bibliographystyle{unsrt}
\bibliography{\jobname}
\end{document}

Related

xpath of WMTSGetCapabilities

I'm trying to import this XML
https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml
into google spreadsheets using the IMPORTXML function . using XPATH I would like
to extract from
...
<Layer>
<ows:Title>Städte und Agglomerationen BeSA</ows:Title>
<ows:Abstract>Die Liste der Beitragsberechtigten Städte und Agglomerationen bildet ab, welche Gemeinden im Rahmen des Programms Agglomerationsverkehr für Beiträge des Bundes beitragsberechtigt sind (gemäss Anhang 4 der Verordnung über die Verwendung der zweckgebundenen Mineralölsteuer und weiterer für den Strassenverkehr zweckgebundener Mittel ([MinVV]). Die Grundlage für die Liste bildet die Definition des «Raums mit städtischem Charakter» des Bundesamts für Statistik BFS (2012). Dabei wurde die Beitragsberechtigung für alle Gemeinden erhalten, die aufgrund der Agglomerationsdefinition von 2000 beitragsberechtigt waren. Die Anzahl Gürtelgemeinden wurde gegenüber der Definition des BFS von 2012 durch die Anwendung statistischer Kriterien reduziert. Überdies wurden die Gemeinden Sarnen und Appenzell als Kantonshauptorte in die Liste der Beitragsberechtigten Städte und Agglomerationen aufgenommen. Mit Arrondierungen und Lückenfüllungen wurden noch kleine Bereinigungen durchgeführt.</ows:Abstract>
<ows:WGS84BoundingBox>
<ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
<ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:Identifier>ch.are.agglomerationsverkehr</ows:Identifier>
<ows:Metadata xlink:href="https://www.geocat.ch/geonetwork/srv/ger/md.viewer#/full_view/f4b72bb8-aff0-4eab-b1e8-48e698c0e8fb"/>
<Style>
<ows:Title>Städte und Agglomerationen BeSA</ows:Title>
<ows:Identifier>ch.are.agglomerationsverkehr</ows:Identifier>
<LegendURL format="image/png" xlink:href="https://api3.geo.admin.ch/static/images/legends/ch.are.agglomerationsverkehr_de.png"/>
</Style>
<Format>image/png</Format>
<Dimension>
<ows:Identifier>Time</ows:Identifier>
<Default>current</Default>
<Value>current</Value>
</Dimension>
<TileMatrixSetLink>
<TileMatrixSet>2056_25</TileMatrixSet>
</TileMatrixSetLink>
<ResourceURL format="image/png" resourceType="tile" template="https://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationsverkehr/default/{Time}/2056/{TileMatrix}/{TileCol}/{TileRow}.png"/>
</Layer>
...
I would like to filter all
<ows:Identifier>
whcih follow after <ows:Title>
eg
ows:Identifierch.are.agglomerationsverkehr</ows:Identifier>
from the document
Was not successfull at all with any tries like
//Contents/Layer/ows:WGS84BoundingBox/ows:Identifier
any clues?
You're running into a namespace problem, and it's not clear to me whether IMPORTXML gives you a way to register namespaces. If not, a workaround is necessary:
//*[local-name() = 'Contents']/*[local-name() = 'Layer']/*[local-name() = 'Identifier']

Streaming with Tweepy: converting unicode characters to letters

The tweets I capture when streaming with Tweepy come in Unicode special characters and I need them to be letters. I have found many solutions on the site but none of them seemed to work or even to apply to my case, since I’m collecting tweets in real time. Can anyone help?
Here’s my code:
from urllib3.exceptions import ProtocolError
from tweepy import Stream
from tweepy.auth import OAuthHandler
from tweepy.streaming import StreamListener
import time
ckey = 'your code here'
csecret = 'your code here'
atoken = 'your code here'
asecret = 'your code here'
class listener(StreamListener):
def on_data(self, data):
while True:
try:
#print (data)
tweet = data.split(',"text":"')[1].split('","')[0]
tweet2 = data.split(',"screen_name":"')[1].split('","location')[0]
print (tweet2,tweet)
saveFile = open ('test.csv','a')
saveFile.write('#')
saveFile.write(tweet2)
saveFile.write(';')
saveFile.write(tweet)
saveFile.write('\n')
saveFile.close()
return True
except ProtocolError:
continue
except BaseException as e:
print ('Failed on data', str(e))
break
def on_error(self, status):
print (status)
auth = OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)
twitterStream = Stream(auth, listener())
twitterStream.filter(track=['keyword'])
Here's my output for the keyword "fluminense":
adrianabpadilha Impressionante como mesmo com poucas op\u00e7\u00f5es para o banco o Burro s\u00f3 me sobe o Wisney e o Higor! Pq n\u00e3o levar o Pato\u2026 https:\/\/t.co\/lO4CJJsaaP
Miguel_Aalmeida RT #pulligffc: O Fluminense em dia de jogo olha pra mim e faz isso
TRANQUILINHO3 Time fdpt \ud83d\ude20
LeleoCasttroo #jrmenini #FFvinho Palmeiras e Fluminense ainda tiveram a base como fonte de renda, atl\u00e9tico n\u00e3o revela um jogador\u2026 https:\/\/t.co\/ZF8awS6pDt
SouzaArthur6 #CezarSabia #andreisilvasoar #ndrzej87 #futebol_info C\u00e9zar, existe um tempo certo de testagem, q se d\u00e1 no 5\u00b0 da doe\u2026 https:\/\/t.co\/zmBlBzafdo
Thomasrodrigue_ #renatojr_07 \u00c9 o mesmo exemplo da final da ta\u00e7a rio, a \u00fanica coisa que muda \u00e9 que na final n\u00e3o tinha jogador contam\u2026 https:\/\/t.co\/3Q2nCBw9XS
As you can see, some characters like "ç" and "õ" are shown as "/u00e7" and "\u00f5" respectively.
Thank you!
This occurs because of the encoding character problem You can decode the string using unicode_escape encoding
for example
s = r'\u00e7'
print s
\u00e7 #output
print s.decode('unicode-escape')
ç #output

ids of comments have changed

We are requesting comments from YouTube API. Up until earlier today everything worked as expected.
https://www.googleapis.com/youtube/v3/commentThreads
https://developers.google.com/youtube/v3/docs/commentThreads/list
But since a few hours ago it seems like all ids of comments have changed. If we request the same data, new ids for the same comments are returned.
Example of the returned value yesterday:
{
"snippet" : {
"updatedAt" : "2017-12-02T15:25:18.000Z",
"publishedAt" : "2017-12-02T15:25:18.000Z",
"likeCount" : 0,
"viewerRating" : "none",
"canRate" : true,
"textOriginal" : "Wer cool wenn ihr das auch bei der linie 9 nach königsforst machen könnt",
"textDisplay" : "Wer cool wenn ihr das auch bei der linie 9 nach königsforst machen könnt",
"videoId" : "HM9HTudhtI8",
"authorChannelId" : {
"value" : "UC65X_3QoSnkPiKSnuCX1Eqg"
},
"authorChannelUrl" : "http://www.youtube.com/channel/UC65X_3QoSnkPiKSnuCX1Eqg",
"authorProfileImageUrl" : "https://yt3.ggpht.com/-pC2fJDx46os/AAAAAAAAAAI/AAAAAAAAAAA/koDhQIPnvF0/s28-c-k-no-mo-rj-c0xffffff/photo.jpg",
"authorDisplayName" : "Dani stayler 04"
},
"id" : "z22ocjgrmmvvujbloacdp43bypow13uddt5ygnzglfxw03c010c",
"etag" : "\"7991kDR-QPaa9r0pePmDjBEa2h8/LT00v-6zSoJQnYNF--QlclbxuFM\"",
"kind" : "youtube#comment"
}
example of the same comment now:
{
"snippet" : {
"updatedAt" : "2017-12-02T15:25:18.000Z",
"publishedAt" : "2017-12-02T15:25:18.000Z",
"likeCount" : 0,
"viewerRating" : "none",
"canRate" : true,
"textOriginal" : "Wer cool wenn ihr das auch bei der linie 9 nach königsforst machen könnt",
"textDisplay" : "Wer cool wenn ihr das auch bei der linie 9 nach königsforst machen könnt",
"videoId" : "HM9HTudhtI8",
"authorChannelId" : {
"value" : "UC65X_3QoSnkPiKSnuCX1Eqg"
},
"authorChannelUrl" : "http://www.youtube.com/channel/UC65X_3QoSnkPiKSnuCX1Eqg",
"authorProfileImageUrl" : "https://yt3.ggpht.com/-pC2fJDx46os/AAAAAAAAAAI/AAAAAAAAAAA/koDhQIPnvF0/s28-c-k-no-mo-rj-c0xffffff/photo.jpg",
"authorDisplayName" : "Dani stayler 04"
},
"id" : "Ugz-rTgR6SnJfMn9kV94AaABAg",
"etag" : "\"7991kDR-QPaa9r0pePmDjBEa2h8/OgzbWigUN6XJyrzDu4RuZWYN-0k\"",
"kind" : "youtube#comment"
}
Does anybody else have this problem? Is this by design? Did YouTube change something and we missed an announcement?

List of Authorisation errors with Firebase login

What I need is a complete list of FirebaseAuthentication codes for all the different login errors and also a list of all those errors. So far I have found some by trial and error but can't take the risk I have missed some.
I am using the Firebase simple login to log in with email/password, facebook, twitter and also anonymous logins. Obviously with this many login methods there are lots of ways the user can fail to login correctly (incorrect email format, didn't enter a password etc). Currently I am using this code:
... authenticateWithDictionary method
completion:^(NSError * error, id<PUser> user) {
if (!error) {
[self loginButtonPressed:Nil];
}
else {
[UIView alertWithTitle:bErrorTitle withError:error];
}
The only issue with this is I end my getting errors raised which read like this:
**(Error Code: EMAIL_TAKEN) The specified email address is already in use.**
This is fine to let me know what has gone wrong in testing but once the app goes live I will want individual messages to
a) look tidier
b) let the user know why they have got this error
So far through trial and error I have figured out the following:
error code
-5 INVALID EMAIL - empty or incorrect format
-6 INVALID PASSWORD
-9 EMAIL TAKEN
Once I have a complete list I am going to use a switch statement to get them all being dealt with correctly
Does anyone know the comprehensive list of error codes and errors so that I can take them all into account without having to think through all the options which might mean I miss one
You can find all firebase auth errors codes and explanations under FIRAuthErrorCode enum in FirebaseAuth.framework
/*
Indicates a validation error with the custom token.
*/
FIRAuthErrorCodeInvalidCustomToken = 17000,
/*
Indicates the service account and the API key belong to different projects.
*/
FIRAuthErrorCodeCustomTokenMismatch = 17002,
/*
Indicates the IDP token or requestUri is invalid.
*/
FIRAuthErrorCodeInvalidCredential = 17004,
/*
Indicates the user's account is disabled on the server.
*/
FIRAuthErrorCodeUserDisabled = 17005,
/*
Indicates the administrator disabled sign in with the specified identity provider.
*/
FIRAuthErrorCodeOperationNotAllowed = 17006,
/*
Indicates the email used to attempt a sign up is already in use.
*/
FIRAuthErrorCodeEmailAlreadyInUse = 17007,
/*
Indicates the email is invalid.
*/
FIRAuthErrorCodeInvalidEmail = 17008,
/*
Indicates the user attempted sign in with a wrong password.
*/
FIRAuthErrorCodeWrongPassword = 17009,
/*
Indicates that too many requests were made to a server method.
*/
FIRAuthErrorCodeTooManyRequests = 17010,
/*
Indicates the user account was not found.
*/
FIRAuthErrorCodeUserNotFound = 17011,
/*
Indicates account linking is required.
*/
FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012,
/*
Same enum as #c FIRAuthErrorCodeAccountExistsWithDifferentCredential ,
but with incorrect spelling. Only exists for backwards compatiblity.
*/
FIRAuthErrrorCodeAccountExistsWithDifferentCredential = 17012,
/*
Indicates the user has attemped to change email or password more than 5 minutes after
signing in.
*/
FIRAuthErrorCodeRequiresRecentLogin = 17014,
/*
Indicates an attempt to link a provider to which the account is already linked.
*/
FIRAuthErrorCodeProviderAlreadyLinked = 17015,
/*
Indicates an attempt to unlink a provider that is not linked.
*/
FIRAuthErrorCodeNoSuchProvider = 17016,
/*
Indicates user's saved auth credential is invalid, the user needs to sign in again.
*/
FIRAuthErrorCodeInvalidUserToken = 17017,
/*
Indicates a network error occurred (such as a timeout, interrupted connection, or
unreachable host). These types of errors are often recoverable with a retry. The #c
NSUnderlyingError field in the #c NSError.userInfo dictionary will contain the error
encountered.
*/
FIRAuthErrorCodeNetworkError = 17020,
/*
Indicates the saved token has expired, for example, the user may have changed account
password on another device. The user needs to sign in again on the device that made this
request.
*/
FIRAuthErrorCodeUserTokenExpired = 17021,
/*
Indicates an invalid API key was supplied in the request.
*/
FIRAuthErrorCodeInvalidAPIKey = 17023,
/*
Indicates that an attempt was made to reauthenticate with a user which is not the current
user.
*/
FIRAuthErrorCodeUserMismatch = 17024,
/*
Indicates an attempt to link with a credential that has already been linked with a
different Firebase account
*/
FIRAuthErrorCodeCredentialAlreadyInUse = 17025,
/*
Indicates an attempt to set a password that is considered too weak.
*/
FIRAuthErrorCodeWeakPassword = 17026,
/*
Indicates the App is not authorized to use Firebase Authentication with the
provided API Key.
*/
FIRAuthErrorCodeAppNotAuthorized = 17028,
/*
Indicates the OOB code is expired.
*/
FIRAuthErrorCodeExpiredActionCode = 17029,
/*
Indicates the OOB code is invalid.
*/
FIRAuthErrorCodeInvalidActionCode = 17030,
/*
Indicates that there are invalid parameters in the payload during a "send password reset
* email" attempt.
*/
FIRAuthErrorCodeInvalidMessagePayload = 17031,
/*
Indicates that the sender email is invalid during a "send password reset email" attempt.
*/
FIRAuthErrorCodeInvalidSender = 17032,
/*
Indicates that the recipient email is invalid.
*/
FIRAuthErrorCodeInvalidRecipientEmail = 17033,
/*
Indicates an error occurred while attempting to access the keychain.
*/
FIRAuthErrorCodeKeychainError = 17995,
/*
Indicates an internal error occurred.
*/
FIRAuthErrorCodeInternalError = 17999,
Localize Firebase error messages in PT-BR
https://gist.github.com/Albejr/a38cdeac247ef177986c99629680afb4
catchError(err => {
const errorCode = err.code;
let errorMessage = this.VerifyErroCode(errorCode);
if (errorMessage == null) {
errorMessage = err.message;
}
console.log(errorMessage);
})
VerifyErroCode(errorCode: string): string {
// fonte: https://firebase.google.com/docs/reference/js/firebase.auth.Auth
// fonte: https://firebase.google.com/docs/auth/admin/errors?hl=pt-br
switch (errorCode) {
case 'auth/app-deleted':
return 'O banco de dados não foi localizado.';
case 'auth/expired-action-code':
return 'O código da ação o ou link expirou.';
case 'auth/invalid-action-code':
return 'O código da ação é inválido. Isso pode acontecer se o código estiver malformado ou já tiver sido usado.';
case 'auth/user-disabled':
return 'O usuário correspondente à credencial fornecida foi desativado.';
case 'auth/user-not-found':
return 'O usuário não correponde à nenhuma credencial.';
case 'auth/weak-password':
return 'A senha é muito fraca.';
case 'auth/email-already-in-use':
return 'Já existi uma conta com o endereço de email fornecido.';
case 'auth/invalid-email':
return 'O endereço de e-mail não é válido.';
case 'auth/operation-not-allowed':
return 'O tipo de conta correspondente à esta credencial, ainda não encontra-se ativada.';
case 'auth/account-exists-with-different-credential':
return 'E-mail já associado a outra conta.';
case 'auth/auth-domain-config-required':
return 'A configuração para autenticação não foi fornecida.';
case 'auth/credential-already-in-use':
return 'Já existe uma conta para esta credencial.';
case 'auth/operation-not-supported-in-this-environment':
return 'Esta operação não é suportada no ambiente que está sendo executada. Verifique se deve ser http ou https.';
case 'auth/timeout':
return 'Excedido o tempo de resposta. O domínio pode não estar autorizado para realizar operações.';
case 'auth/missing-android-pkg-name':
return 'Deve ser fornecido um nome de pacote para instalação do aplicativo Android.';
case 'auth/missing-continue-uri':
return 'A próxima URL deve ser fornecida na solicitação.';
case 'auth/missing-ios-bundle-id':
return 'Deve ser fornecido um nome de pacote para instalação do aplicativo iOS.';
case 'auth/invalid-continue-uri':
return 'A próxima URL fornecida na solicitação é inválida.';
case 'auth/unauthorized-continue-uri':
return 'O domínio da próxima URL não está na lista de autorizações.';
case 'auth/invalid-dynamic-link-domain':
return 'O domínio de link dinâmico fornecido, não está autorizado ou configurado no projeto atual.';
case 'auth/argument-error':
return 'Verifique a configuração de link para o aplicativo.';
case 'auth/invalid-persistence-type':
return 'O tipo especificado para a persistência dos dados é inválido.';
case 'auth/unsupported-persistence-type':
return 'O ambiente atual não suportar o tipo especificado para persistência dos dados.';
case 'auth/invalid-credential':
return 'A credencial expirou ou está mal formada.';
case 'auth/wrong-password':
return 'Senha incorreta.';
case 'auth/invalid-verification-code':
return 'O código de verificação da credencial não é válido.';
case 'auth/invalid-verification-id':
return 'O ID de verificação da credencial não é válido.';
case 'auth/custom-token-mismatch':
return 'O token está diferente do padrão solicitado.';
case 'auth/invalid-custom-token':
return 'O token fornecido não é válido.';
case 'auth/captcha-check-failed':
return 'O token de resposta do reCAPTCHA não é válido, expirou ou o domínio não é permitido.';
case 'auth/invalid-phone-number':
return 'O número de telefone está em um formato inválido (padrão E.164).';
case 'auth/missing-phone-number':
return 'O número de telefone é requerido.';
case 'auth/quota-exceeded':
return 'A cota de SMS foi excedida.';
case 'auth/cancelled-popup-request':
return 'Somente uma solicitação de janela pop-up é permitida de uma só vez.';
case 'auth/popup-blocked':
return 'A janela pop-up foi bloqueado pelo navegador.';
case 'auth/popup-closed-by-user':
return 'A janela pop-up foi fechada pelo usuário sem concluir o login no provedor.';
case 'auth/unauthorized-domain':
return 'O domínio do aplicativo não está autorizado para realizar operações.';
case 'auth/invalid-user-token':
return 'O usuário atual não foi identificado.';
case 'auth/user-token-expired':
return 'O token do usuário atual expirou.';
case 'auth/null-user':
return 'O usuário atual é nulo.';
case 'auth/app-not-authorized':
return 'Aplicação não autorizada para autenticar com a chave informada.';
case 'auth/invalid-api-key':
return 'A chave da API fornecida é inválida.';
case 'auth/network-request-failed':
return 'Falha de conexão com a rede.';
case 'auth/requires-recent-login':
return 'O último horário de acesso do usuário não atende ao limite de segurança.';
case 'auth/too-many-requests':
return 'As solicitações foram bloqueadas devido a atividades incomuns. Tente novamente depois que algum tempo.';
case 'auth/web-storage-unsupported':
return 'O navegador não suporta armazenamento ou se o usuário desativou este recurso.';
case 'auth/invalid-claims':
return 'Os atributos de cadastro personalizado são inválidos.';
case 'auth/claims-too-large':
return 'O tamanho da requisição excede o tamanho máximo permitido de 1 Megabyte.';
case 'auth/id-token-expired':
return 'O token informado expirou.';
case 'auth/id-token-revoked':
return 'O token informado perdeu a validade.';
case 'auth/invalid-argument':
return 'Um argumento inválido foi fornecido a um método.';
case 'auth/invalid-creation-time':
return 'O horário da criação precisa ser uma data UTC válida.';
case 'auth/invalid-disabled-field':
return 'A propriedade para usuário desabilitado é inválida.';
case 'auth/invalid-display-name':
return 'O nome do usuário é inválido.';
case 'auth/invalid-email-verified':
return 'O e-mail é inválido.';
case 'auth/invalid-hash-algorithm':
return 'O algoritmo de HASH não é uma criptografia compatível.';
case 'auth/invalid-hash-block-size':
return 'O tamanho do bloco de HASH não é válido.';
case 'auth/invalid-hash-derived-key-length':
return 'O tamanho da chave derivada do HASH não é válido.';
case 'auth/invalid-hash-key':
return 'A chave de HASH precisa ter um buffer de byte válido.';
case 'auth/invalid-hash-memory-cost':
return 'O custo da memória HASH não é válido.';
case 'auth/invalid-hash-parallelization':
return 'O carregamento em paralelo do HASH não é válido.';
case 'auth/invalid-hash-rounds':
return 'O arredondamento de HASH não é válido.';
case 'auth/invalid-hash-salt-separator':
return 'O campo do separador de SALT do algoritmo de geração de HASH precisa ser um buffer de byte válido.';
case 'auth/invalid-id-token':
return 'O código do token informado não é válido.';
case 'auth/invalid-last-sign-in-time':
return 'O último horário de login precisa ser uma data UTC válida.';
case 'auth/invalid-page-token':
return 'A próxima URL fornecida na solicitação é inválida.';
case 'auth/invalid-password':
return 'A senha é inválida, precisa ter pelo menos 6 caracteres.';
case 'auth/invalid-password-hash':
return 'O HASH da senha não é válida.';
case 'auth/invalid-password-salt':
return 'O SALT da senha não é válido.';
case 'auth/invalid-photo-url':
return 'A URL da foto de usuário é inválido.';
case 'auth/invalid-provider-id':
return 'O identificador de provedor não é compatível.';
case 'auth/invalid-session-cookie-duration':
return 'A duração do COOKIE da sessão precisa ser um número válido em milissegundos, entre 5 minutos e 2 semanas.';
case 'auth/invalid-uid':
return 'O identificador fornecido deve ter no máximo 128 caracteres.';
case 'auth/invalid-user-import':
return 'O registro do usuário a ser importado não é válido.';
case 'auth/invalid-provider-data':
return 'O provedor de dados não é válido.';
case 'auth/maximum-user-count-exceeded':
return 'O número máximo permitido de usuários a serem importados foi excedido.';
case 'auth/missing-hash-algorithm':
return 'É necessário fornecer o algoritmo de geração de HASH e seus parâmetros para importar usuários.';
case 'auth/missing-uid':
return 'Um identificador é necessário para a operação atual.';
case 'auth/reserved-claims':
return 'Uma ou mais propriedades personalizadas fornecidas usaram palavras reservadas.';
case 'auth/session-cookie-revoked':
return 'O COOKIE da sessão perdeu a validade.';
case 'auth/uid-alread-exists':
return 'O indentificador fornecido já está em uso.';
case 'auth/email-already-exists':
return 'O e-mail fornecido já está em uso.';
case 'auth/phone-number-already-exists':
return 'O telefone fornecido já está em uso.';
case 'auth/project-not-found':
return 'Nenhum projeto foi encontrado.';
case 'auth/insufficient-permission':
return 'A credencial utilizada não tem permissão para acessar o recurso solicitado.';
case 'auth/internal-error':
return 'O servidor de autenticação encontrou um erro inesperado ao tentar processar a solicitação.';
default:
return null;
}
}
IOS Auth errors are:
Name: Hash; RawValue(code):
- AccountExistsWithDifferentCredential: 10; 17012
- InvalidEmail: 6; 17008
- NetworkError: 15; 17020
- UserDisabled: 3; 17005
- UserMismatch: 18; 17024
- UserNotFound: 9; 17011
- WeakPassword: 20; 17026
- InternalError: 23; 17999
- InvalidAPIKey: 17; 17023
- KeychainError: 22; 17995
- WrongPassword: 7; 17009
- NoSuchProvider: 13; 17016
- TooManyRequests: 8; 17010
- AppNotAuthorized: 21; 17028
- InvalidUserToken: 14; 17017
- UserTokenExpired: 16; 17021
- EmailAlreadyInUse: 5; 17007
- InvalidCredential: 2; 17004
- InvalidCustomToken: 0; 17000
- CustomTokenMismatch: 1; 17002
- OperationNotAllowed: 4; 17006
- RequiresRecentLogin: 11; 17014
- ProviderAlreadyLinked: 12; 17015
- CredentialAlreadyInUse: 19; 17025
Here's the full list of error codes from the Firebase website:
https://www.firebase.com/docs/web/guide/user-auth.html#section-full-error

Grayed listing environment with LaTeX

Form this LaTeX-workshop, I found I could make this listing style.
http://img441.imageshack.us/img441/2739/screenshot20100717at112.png
by defining a new environment.
\definecolor{mittelgrau}{gray}{0.85}%
\lstdefinestyle{StyleCommand}{%
style=StyleListingBasic, backgroundcolor=\color{mittelgrau}, prebreak=\mbox{\textbackslash{}}%
}
\lstnewenvironment{bevel}[1][1] {\lstset{style=StyleCommand,linewidth=#1\linewidth}} {}%
Running the code, I get this error message.
ERROR: Package Listings Error: Couldn't load requested style.
What might be wrong?
I missed the \lstdefinestyle, and after some modification, I could make it work.
\documentclass{article}
\usepackage{color} % Farben
\usepackage{listings} % für Listings
% Listingdefinitionen
\lstdefinestyle{StyleListingBasic}{%
basicstyle=\ttfamily, % Schriftstil
frame=single, % einfacher Rahmen
framesep=1pt, % Abstand des Rahmens
framerule=0.8pt, % Linienstaerke des Rahmens
rulecolor=\color{mittelgrau}, % Farbe der Rahmenlinie
breaklines=true, % automatischen Umbruch aktivieren
breakindent=0pt % Einrueckung nach Umbruch
}
\definecolor{mittelgrau}{gray}{0.85}%
\lstdefinestyle{StyleCommand}{%
style=StyleListingBasic, backgroundcolor=\color{mittelgrau}, prebreak=\mbox{\textbackslash{}}%
}
\lstnewenvironment{Befehl}[1][1] {\lstset{style=StyleCommand,linewidth=#1\linewidth}} {}%
\begin{document}
\begin{Befehl}
./robots-gui-helper
\end{Befehl}%
\end{document}

Resources