Skip to content

Instantly share code, notes, and snippets.

@rohman
rohman / sample_popup_yes_no.py
Last active December 4, 2019 10:08
make popup yes no with kivy
import kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.uix.popup import Popup
from kivy.properties import StringProperty
Builder.load_string('''
<ConfirmPopup>:
import kivy
from kivy.app import App
from kivy.uix.scatter import Scatter
from kivy.uix.image import Image
from os.path import join
class ScatterDemo(App):
def build(self):
scatter = Scatter()
@rohman
rohman / sample_rest_with_kivy.py
Created April 3, 2013 11:52
Sample Rest With Kivy
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.network.urlrequest import UrlRequest
class Example(FloatLayout):
def __init__(self, **kwargs):
super(Example, self).__init__(**kwargs)
@rohman
rohman / web.xml
Last active December 16, 2015 00:49
Ulang Spring Mvc web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:id/web/rohman/ulangspringservice/config/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
@rohman
rohman / dispatcher-servlet.xml
Created April 9, 2013 23:27
Ulang Spring mvc
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
@rohman
rohman / Tamu.java
Created April 9, 2013 23:28
Ulang Spring Mvc
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspring.model;
/**
*
* @author syahril
*/
@rohman
rohman / TamuController.java
Last active December 16, 2015 00:49
Ulang Spring mvc
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspring.controller;
import id.web.rohman.ulangspringservice.model.Tamu;
import id.web.rohman.ulangspringservice.service.api.TamuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@rohman
rohman / TamuService.java
Last active December 16, 2015 00:49
Ulang Spring Mvc
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspring.service.api;
import id.web.rohman.ulangspring.model.Tamu;
import java.util.List;
/**
@rohman
rohman / TamuServiceImpl.java
Last active December 16, 2015 00:49
Ulang Spring mvc
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspring.service.impl;
import id.web.rohman.ulangspring.model.Tamu;
import id.web.rohman.ulangspring.service.api.TamuService;
import java.util.ArrayList;
import java.util.List;
@rohman
rohman / list.html
Created April 9, 2013 23:32
Ulang Spring Mvc
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>List Tamu</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>