Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
void main(){
runApp(new MaterialApp(
home: new MyApp(),
));
}
class MyApp extends StatefulWidget {
@override
import com.querydsl.core.annotations.QueryProjection;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
@Getter
import React, {Component} from 'react'
import { Container, Header, HeaderContent, Grid, GridColumn } from 'semantic-ui-react'
class Main extends Component {
constructor (props) {
super(props)
this.state = {
hello: 'heeeeeeello',
browser: {height: window.innerHeight, width: window.innerWidth},
headerHeight: 50
}
import React, { Component } from 'react'
import './App.css'
import {
Row,
Col,
ListGroup,
ListGroupItem,
Alert,
InputGroup,
FormLabel,
import React, { Component } from 'react'
import './App.css'
import { Row, Col, ListGroup, ListGroupItem, Alert, InputGroup, FormLabel, FormControl } from 'react-bootstrap'
class App extends Component {
constructor (props) {
super(props)
this.state = {
todos: [
{title: '1', cleared: false},
@barongun
barongun / chart-bar.vue
Created June 13, 2018 09:13
echart 로 라인차트 구현하기
<template>
<e-charts :options="lineOptions"/>
</template>
<script>
import ECharts from 'vue-echarts'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/tooltip'
let vm
export default {
@barongun
barongun / home.dart
Created April 28, 2018 09:22
flutter에서 ListView 이용해보기
import 'package:flutter/material.dart';
class HomeView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: const Text('DAILY DAY'),
@barongun
barongun / index.js
Last active January 15, 2018 13:18
express mongodb
import {Router} from 'express'
import Test from '../model/test'
const router = Router()
router.get('/test1', function (req, res, next) {
Test.find(function (err, tests) {
if (err) return res.status(500).send({error: 'error'})
res.json(tests)
})
})
import React from 'react';
import { View, Text, Button } from 'react-native';
import { StackNavigator } from 'react-navigation';
const HomeScreen = ({navigation}) => (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Home Screen</Text>
<Button
onPress={() => navigation.navigate('Details')}
title="Go to details"
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.insertServerTime = functions.database.ref('/users/{deviceId}/tData/{key}').onWrite(event => {
const originalData = event.data
const serverTime = {time: event.timeStamp}
console.log('update key ->' + event.params.key)
return admin.database().ref('/users/'+event.params.deviceId+'/tData/' + event.params.key).push(serverTime)