Skip to content

Instantly share code, notes, and snippets.

View main.dart
import 'package:flutter/material.dart';
void main(){
runApp(new MaterialApp(
home: new MyApp(),
));
}
class MyApp extends StatefulWidget {
@override
View Agent.java
import com.querydsl.core.annotations.QueryProjection;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
@Getter
View Main.js
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
}
View App.js
import React, { Component } from 'react'
import './App.css'
import {
Row,
Col,
ListGroup,
ListGroupItem,
Alert,
InputGroup,
FormLabel,
View App.js
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 Jun 13, 2018
echart 로 라인차트 구현하기
View chart-bar.vue
<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 Apr 28, 2018
flutter에서 ListView 이용해보기
View home.dart
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 Jan 15, 2018
express mongodb
View index.js
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)
})
})
View App.js
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"
View index.js
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)
You can’t perform that action at this time.