This file contains hidden or 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> | |
<html lang="en" ng-app="TodolistApp"> | |
<head> | |
<title>Todolist app</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> | |
</head> | |
<body> | |
<script> |
This file contains hidden or 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 Tkinter | |
import tkMessageBox | |
total = 0 | |
EasyBox1 = Tkinter.Tk() | |
EasyBox1.geometry("250x200") | |
EasyBox1.title("Quesion 1") | |
EasyBox2 = Tkinter.Tk() | |
EasyBox2.geometry("250x200") |
This file contains hidden or 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 flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/<path:path>') | |
def send_files(path): | |
return send_from_directory('static', path) | |
if __name__ == "__main__": | |
app.run() |
This file contains hidden or 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
<html> | |
<head> | |
<title>Example page</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular-resource.min.js"></script> | |
</head> | |
<body ng-app="ExampleApp"> | |
<div ng-controller="ExampleController as exampleCtrl"> | |
<h2>Users</h2> | |
<p>Here's a list of users and their email providers.</p> |
This file contains hidden or 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
describe("ExampleController", function () { | |
var exampleCtrl, $httpBackend, $filter; | |
beforeEach(module('myapp')); | |
beforeEach(inject(function ($controller, _$httpBackend_, _$filter_, _Users_) { | |
$filter = _$filter_; | |
$httpBackend = _$httpBackend_; | |
// respond with some mocked data | |
$httpBackend.whenGET(/...\/users/).respond([{ username: "foo", email: "[email protected]" }, { username: "bar", email: "[email protected]" }]); | |
exampleCtrl = $controller('ExampleController', { Users: _Users_ }); |
This file contains hidden or 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
angular.module('VociTrainer', ['ngRoute']) | |
.config(['$routeProvider', '$locationProvider', | |
function ($routeProvider, $locationProvider) { | |
$routeProvider | |
.when('/home', { | |
templateUrl: 'views/home/home.html', | |
controller: 'HomeCtrl', | |
controllerAs: 'home' | |
}) | |
.when('/impressum', { |
This file contains hidden or 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
''' Simple script for throwing a dice over and over until all numbers appeared at least once. ''' | |
from __future__ import division | |
import random | |
import time | |
n = 10**5 | |
r = random.SystemRandom() | |
def number_of_dice_throws(): | |
count = 0 |
This file contains hidden or 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
# install flask | |
sudo pip3 install flask | |
# run script | |
python3 server.py |
This file contains hidden or 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 ch.kleemans.demoapp; | |
import org.springframework.web.bind.annotation.CrossOrigin; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestParam; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class HelloController { |
This file contains hidden or 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 {Component, OnInit} from '@angular/core'; | |
import {HttpClient} from "@angular/common/http"; | |
@Component({ | |
selector: 'app-root', | |
template: 'Called API and got: "{{greeting}}"' | |
}) | |
export class AppComponent implements OnInit { | |
public greeting: string; |