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
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.0.0' | |
// this is the robojava plugin | |
classpath 'com.kageiit:robojava-plugin:1.+' | |
// this is for cobertura so you have test coverage check | |
classpath("net.saliman:gradle-cobertura-plugin:2.2.5") { |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "21.1.1" | |
defaultConfig { | |
applicationId "com.emfeld.mvptest" | |
minSdkVersion 15 | |
targetSdkVersion 21 |
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
// fill this with the name of your app in gradle settings | |
evaluationDependsOn(':app') | |
ext.androidProject = 'app' | |
apply plugin: 'cobertura' | |
apply plugin: 'com.kageiit.robojava' | |
cobertura { | |
coverageFormats = ['html', 'xml'] | |
coverageIgnoreTrivial = true | |
coverageIgnores = ['org.slf4j.Logger.*'] |
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
""" | |
crawler.py | |
web link crawler | |
Nov 3rd 2012 saturday night insomnia coding session | |
Fauzan Erich Emmerling | |
erich@emfeld.com | |
""" | |
import re | |
from urllib2 import urlopen |
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
""" | |
Dasar pertama dalam mempelajari bahasa program adalah tipe data. | |
Pelajaran ini akan memberi pengetahuan mengenai variable dan tipe data pada python | |
""" | |
#Deklarasi Variable | |
var_none = None | |
#None merupakan pengganti null pada bahasa lain | |
var_integer = 1 | |
var_float = 1.1 |
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
# do not change or move the following lines if you still want to use the box.py auto generator | |
from app import app, db | |
from models import Contact | |
# you can freely change the lines below | |
from flask import render_template | |
from flask import json | |
from flask import session | |
from flask import url_for | |
from flask import redirect |
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
@app.route('/contact/view-all') | |
def contact_view_controller(): | |
#this is the controller to view all data in the model | |
contact_list = Contact.query.all() | |
if contact_list: | |
contact_entries = [contact.dto() for contact in contact_list] | |
else: | |
contact_entries = None |
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
@app.route('/contact/') | |
def contact_add_controller(): | |
#this is the controller to add new model entries | |
return render_template('contact_add.html', title = "Add New Entry") | |
@app.route('/contact/create/',methods=['POST','GET']) | |
def contact_create_data_controller(): | |
# this is the contact data create handler | |
contact_name = request.values.get('contact_name') | |
contact_email = request.values.get('contact_email') |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>My Website</title> | |
<meta name="description" content=""> |
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
# home root controller | |
# @app.route('/') | |
# def index(): | |
# # define your controller here | |
# return render_template('welcome.html') | |
@app.route('/') #Link | |
def home_control(): | |
# add your controller here | |
return render_template('home.html') |
OlderNewer