This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from https://stackoverflow.com/a/59624240/1698509 | |
| from hl7apy import parser | |
| from hl7apy.core import Group, Component, Field, Message, Segment | |
| class hl7_debug(): | |
| indent = " " | |
| indent_seg = " " | |
| indent_fld = " " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_pdf_with_js_script(self, src_url): | |
| script = """ | |
| var url = arguments[0]; | |
| var callback = arguments[arguments.length - 1]; | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', url, true); | |
| xhr.responseType = \"arraybuffer\"; | |
| xhr.onload = function() { | |
| var arrayBuffer = xhr.response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt install tofrodos | |
| sudo ln -s /usr/bin/fromdos /usr/bin/unix2dos | |
| sudo ln -s /usr/bin/todos /usr/bin/dos2unix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # option a) | |
| __import__("IPython").embed() | |
| # option b) | |
| import ipdb; ipdb.set_trace() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const options = { year: "numeric", month: "long", day: "numeric" }; | |
| const date = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z | |
| console.log(date.toLocaleDateString("pt-br", options)) | |
| // 31 de dezembro de 2020 | |
| console.log(date.toLocaleDateString("pt-br", { ...options, month: 'numeric'})) | |
| // 31/12/2020 | |
| const regex = /^([0-9]{4})[-](0[1-9]|1[0-2])[-](0[0-9]|1[0-9]|2[0-9]|3[0-1])/gm | |
| const dateRx = new Date(2020, 11, 31) // 2020-12-31T03:00:00.000Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # no matter if the element is inner a iframe, or if you dont find it by id or class | |
| # get the element by absolute position | |
| def get_elment_by_position(x,y): | |
| element = driver.execute_script(""" | |
| return document.elementFromPoint(arguments[0], arguments[1]); | |
| """, x, y) | |
| return element | |
| def get_text_editor(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@574da23c398f:~/sonar-test/sonar-scanning-examples-master# sonar-scanner -D sonar.login=598a78d43fe32cd5acbf262871ed516f9e631c44 | |
| INFO: Scanner configuration file: /opt/sonarscanner/sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties | |
| INFO: Project root configuration file: NONE | |
| INFO: SonarQube Scanner 3.2.0.1227 | |
| INFO: Java 1.8.0_121 Oracle Corporation (64-bit) | |
| INFO: Linux 4.10.0-38-generic amd64 | |
| INFO: User cache: /root/.sonar/cache | |
| ERROR: SonarQube server [http://localhost:9000] can not be reached | |
| INFO: ------------------------------------------------------------------------ | |
| INFO: EXECUTION FAILURE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest"> | |
| <application | |
| <activity | |
| android:name=".MainActivity" | |
| android:screenOrientation="portrait"> | |
| <!-- | |
| android:screenOrientation serve para travar a orientação da tela | |
| --> | |
| </application> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %quote com \cite alinhado a direita para o overleaf | |
| \def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em | |
| \hbox{}\nobreak\hfil#1% | |
| \parfillskip=0pt \finalhyphendemerits=0 \endgraf}} | |
| \newsavebox\mybox | |
| \newenvironment{aquote}[1] | |
| {\savebox\mybox{#1}\begin{citacao}} | |
| {\signed{\usebox\mybox}\end{citacao}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \usepackage[brazilian,hyperpageref]{backref} % Paginas com as citações na bibl | |
| % --- | |
| % Configurações do pacote backref | |
| % Usado sem a opção hyperpageref de backref | |
| \renewcommand{\backrefpagesname}{Citado na(s) página(s):~} | |
| % Texto padrão antes do número das páginas | |
| \renewcommand{\backref}{} | |
| % Define os textos da citação | |
| \renewcommand*{\backrefalt}[4]{ |