Começando com Node JS e Express
-
Instalar o Node JS 6.10 ou 6.11: https://nodejs.org/en/
-
Verifique se o Node e o NPM foram instalados corretamente.
Para verificar a versão do NPM:
npm --version
/** | |
* Função para destacar partes de um texto | |
* @param {string} text Texto | |
* @param {string|RegExp} highlight Parte do texto a ser destacada | |
* @param {object} options Propriedades do <span> para as partes destacadas | |
* @return {Array} Array de elementos React | |
*/ | |
function applyHighlight(text, highlight, options = {}) { | |
if (text && highlight) { | |
const regex = highlight instanceof RegExp ? highlight : new RegExp(highlight, "gmi"); |
set normal (set_color normal) | |
set magenta (set_color magenta) | |
set yellow (set_color yellow) | |
set green (set_color green) | |
set red (set_color red) | |
set gray (set_color -o black) | |
# Fish git prompt | |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Layout com Flexbox</title> | |
<style> | |
html, | |
body { |
// Created by Rutger Bresjer on 10/10/2017 | |
// Notes: | |
// - Be sure to enable "Hotspot Configuration" capability for the iOS target | |
// - Make sure the NetworkExtension framework is linked to the target | |
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> | |
@interface IOSWifiManager : NSObject <RCTBridgeModule> |
Instalar o Node JS 6.10 ou 6.11: https://nodejs.org/en/
Verifique se o Node e o NPM foram instalados corretamente.
Para verificar a versão do NPM:
npm --version
/** | |
* Created by douglas on 02/05/16. | |
*/ | |
public final class TooltipGenerator { | |
private Activity activity; | |
private Dialog dialog; | |
private Context context; | |
private List<SimpleTooltip> tooltips = new ArrayList<>(); |
import android.graphics.Bitmap; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
/** | |
* Created by douglas on 29/05/17. | |
* Adapted from http://new-grumpy-mentat.blogspot.com.br/2014/06/java-escpos-image-printing.html | |
*/ |
Para gerar o certificado Lets Encrypt é muito simples, aqui as instruções estão baseadas em um tutorial publicado pela Locaweb. (Web archive)
Primeiro vamos criar um diretório para isso:
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
public class MyActivity extends Activity { | |
public void onCreate(...){ | |
RecyclerView rv = findViewByIdCast(R.id.rv); | |
// 2 is the number of columns | |
rv.setLayoutManager(new GridLayoutManager(this, 2)); | |
// Calculates the width of the "CardView" dynamically. | |
int cardViewWidth = getResources().getDimension(R.dimen.my_cardview_width) + getResources().getDimension(R.dimen.my_cardview_margin) * 2; | |
rv.getViewTreeObserver().addOnGlobalLayoutListener(new OnFlowLayoutListener(rv, cardViewWidth)); | |
} |