Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import { css } from 'glamor';
import { DateRangePicker } from 'react-dates';
const CustomDateRangePicker = () => (
<div className={styles.wrapper}>
<DateRangePicker />
</div>
);
import React from 'react';
import styled from 'styled-components';
import { DateRangePicker } from 'react-dates';
const Wrapper = styled.div`
.DateRangePickerInput {
border: none;
background: none;
}
.CalendarDay {
import React from 'react';
import { DateRangePicker } from 'react-dates';
const CustomDateRangePicker = () => (
<div>
<DateRangePicker />
</div>
);
export default CustomDateRangePicker;
<div itemscope itemtype="http://schema.org/Organization">
<span itemprop="name">DBlinks - Agência Digital</span>
Contact Details:
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">Rua Rui Barbosa, 710</span>
<span itemprop="postalCode">89900-000</span>
<span itemprop="addressLocality">São Miguel do Oeste, Santa Catarina</span>
<span itemprop="addressCountry">BR</span>
</div>
public class Test {
public static void main(String[] args) {
InvoiceBuilder builder = new InvoiceBuilder();
Invoice invoice = builder
.withCompany("company")
.withItem(new Item("item 1", 100.0))
.withItem(new Item("item 2", 150.0))
.withItem(new Item("item 3", 250.0))
public class InvoiceBuilder {
private String company;
private Calendar date;
private double grossAmount;
private double taxes;
public List<Item> itens = new ArrayList<Item>();
public String observations;
public InvoiceBuilder withCompany(String company) {
public class Test {
public static void main(String[] args) {
List<Item> itens = // get the itens
double grossAmount = 0;
for(Item item : itens) {
grossAmount += item.getAmount();
}
double taxes = grossAmount * 0.05;
public class Invoice {
private String company;
private Calendar date;
private double grossAmount;
private double taxes;
public List<Item> itens;
public String observations;
public Invoice(String company, Calendar date,
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="templates" tagdir="/WEB-INF/tags/templates" %>
<templates:app>
<jsp:body>
hello world
</jsp:body>
</templates:app>
<%@ tag language="java" description="Application template" pageEncoding="UTF-8" %>
<%@ taglib prefix="templates" tagdir="/WEB-INF/tags/templates" %>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags/" %>
<%@ attribute name="css" fragment="true" %>
<%@ attribute name="js" fragment="true" %>
<!DOCTYPE html>
<html>