This file contains 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
^(((?![A-Za-z]+$)[0-9A-Za-z]+(\.(?![A-Za-z]+$)[0-9A-Za-z]+)*)|(\".+\")){2,}@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$ |
This file contains 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 xmlns:tools="http://schemas.android.com/tools" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" | |
tools:ignore="ScopedStorage" tools:remove="android:maxSdkVersion"/> | |
<application | |
android:allowBackup="true" |
This file contains 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
$('.capitalize').on('keyup', function(e) { | |
if (e.target.value && e.target.value != "") { | |
$(this).val(e.target.value.toUpperCase()); | |
} | |
}); | |
$('.capitalize-first').on('keyup', function(e) { | |
if (e.target.value && e.target.value != "") { | |
$(this).val(e.target.value.replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase())); | |
} |
This file contains 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
adb shell am clear-debug-app |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script> | |
<script type="text/javascript"> | |
var socket = io.connect('http://localhost:3000/api/v1', { | |
query: new URLSearchParams({token: 'asdad', room: '123'}).toString() |
This file contains 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
class Queue extends Array { | |
enqueue(val) { | |
this.push(val); | |
} | |
dequeue() { | |
return this.shift(); | |
} | |
peek() { |
This file contains 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
private final List<com.google.android.libraries.places.api.model.Place.Field> placeFields = Arrays.asList( | |
com.google.android.libraries.places.api.model.Place.Field.ID, | |
com.google.android.libraries.places.api.model.Place.Field.NAME, | |
com.google.android.libraries.places.api.model.Place.Field.ADDRESS, | |
com.google.android.libraries.places.api.model.Place.Field.LAT_LNG | |
); | |
FindCurrentPlaceRequest request = FindCurrentPlaceRequest.builder(placeFields).build(); | |
Task<FindCurrentPlaceResponse> placeResponse = placesClient.findCurrentPlace(request); |
This file contains 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
{-- | |
Exemplo de CPF 546.471.429-49 | |
Tutorial no link: https://www.devmedia.com.br/validando-o-cpf-em-uma-aplicacao-java/22097 | |
--} | |
module Util.CpfValidator where | |
import Data.Char | |
{-- |
This file contains 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
// promise example | |
function get(url) { | |
// Return a new promise. | |
return new Promise(function(resolve, reject) { | |
// Do the usual XHR stuff | |
var req = new XMLHttpRequest(); | |
req.open('GET', url); | |
req.onload = function() { | |
// This is called even on 404 etc |
NewerOlder