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
import { NotificationElement } from "@vaadin/vaadin-notification"; | |
import { render, TemplateResult } from "lit"; | |
import { isTemplateResult } from "lit/directive-helpers"; | |
export const showNotification = ( | |
contents: string | TemplateResult | |
): NotificationElement => { | |
if (isTemplateResult(contents)) { | |
return _showNotification((root: HTMLElement) => { | |
render(contents, root); |
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
import { showNotification } from '@vaadin/flow-frontend/a-notification'; | |
import '@vaadin/vaadin-button'; | |
import '@vaadin/vaadin-text-field'; | |
import { css, customElement, html, LitElement } from 'lit-element'; | |
@customElement('hello-world-view') | |
export class HelloWorldView extends LitElement { | |
name: string = ''; | |
static get styles() { |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import time | |
import tm1637 | |
import RPi.GPIO as IO | |
import threading | |
import pygame |
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
canScrollElementVertically = (el, direction) => { | |
if (direction > 0) { | |
// Down | |
return ((el.scrollTop + el.offsetHeight) < el.scrollHeight); | |
} else { | |
// Up | |
return (el.scrollTop > 0); | |
} | |
}; |
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
findMissingImports = (element) => { | |
if (element.tagName.indexOf('-') != -1 && !customElements.get(element.tagName.toLowerCase())) { | |
console.error("Element "+element.tagName+" is not upgraded"); | |
} | |
Array.from(element.children).forEach(e => findMissingImports(e)); | |
if (element.shadowRoot) { | |
Array.from(element.shadowRoot.children).forEach(e => findMissingImports(e)); | |
} | |
} |
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
package com.vaadin.template.orders.app; | |
import org.springframework.beans.factory.BeanFactoryUtils; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.context.annotation.Configuration; | |
import com.vaadin.ui.Component; | |
import com.vaadin.ui.declarative.Design; | |
import com.vaadin.ui.declarative.Design.DefaultComponentFactory; |
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
Vaadin Contribution Agreement | |
This Vaadin Contribution Agreement (hereinafter "Agreement") is entered by and between Vaadin Ltd, a limited liability company duly incorporated and organized under the laws of Finland having its principal office at Ruukinkatu 2-4, 20540, Turku, Finland (hereinafter "Vaadin"), and any individual or entity that has executed this Agreement as identified in the signature page of this Agreement (hereinafter "You"), and is made as of the date signed on the signature page of this Agreement (hereinafter "Effective Date"). | |
WHEREAS, Vaadin Ltd manages the Vaadin Project; | |
WHEREAS, You wish to contribute certain intellectual property defined hereunder to Vaadin and for the use of the Project; | |
NOW, THEREFORE, in consideration of the mutual covenants set forth herein and intending to be legally bound, You accept and hereby agree to the following terms and conditions pursuant to which You are willing to submit Your present and future Contributions to Vaadin: |
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
From cc81debbf5ca6b0979dbb2104b2ac60f6492c86c Mon Sep 17 00:00:00 2001 | |
From: Artur Signell <artur@vaadin.com> | |
Date: Wed, 29 Jul 2015 18:16:22 +0300 | |
Subject: [PATCH] Use two-step write so Tomcat correctly reports a dead | |
connection | |
Change-Id: Ief2a1111926eefcb131d082b453081c705103e86 | |
--- | |
.../org/atmosphere/cpr/AtmosphereResponse.java | 26 ++++++++++++++++++++-- | |
1 file changed, 24 insertions(+), 2 deletions(-) |
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
@Push(transport = Transport.LONG_POLLING) | |
public class PushWithoutThreads extends DelayedUI { | |
@WebServlet(value = "/*", asyncSupported = true) | |
@VaadinServletConfiguration(productionMode = false, ui = Vaadin7helloworldUI.class) | |
public static class Servlet extends VaadinServlet { | |
} | |
private VerticalLayout layout; |
NewerOlder