Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
package br.com.triadworks.rponte.util; | |
import java.text.Normalizer; | |
public class StringUtils { | |
/** | |
* Remove toda a acentuação da string substituindo por caracteres simples sem acento. | |
*/ | |
public static String unaccent(String src) { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
/** | |
* Pretend type-case doesn't exist in Scala. We know nothing about `A` and `B`, | |
* so there's only thing we can do here: apply `f` to `a` and return the result. | |
*/ | |
def foo[A, B](a: A)(f: A => B): B = ??? | |
/** | |
* Now with type-case. Since the implementation can look at the type of `a` we | |
* have no idea what it might be doing. | |
*/ |
package models.error | |
import org.scalactic._ | |
import scala.concurrent.{ExecutionContext, Future} | |
import org.scalactic.Accumulation._ | |
import scala.util.Success | |
trait Error |
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
1) Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query |
import { Link } from 'react-router-dom' | |
import { Badge, Col, Menu } from 'antd' | |
const StyledBadge = styled(Badge)` | |
.ant-badge-count { | |
background-color: #7ECBBF; | |
color: white; | |
box-shadow: 0 0 0 1px #d9d9d9 inset; | |
} | |
` |
package org.bykn.refmap | |
import cats.data.State | |
import cats.effect.Sync | |
import cats.effect.concurrent.Ref | |
import java.util.concurrent.ConcurrentHashMap | |
import cats.implicits._ | |
/** |