findByFirstName(String firstName);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/heroku-spring-boot-postgresql/src/main/java/io/github/web/heroku/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.heroku;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/heroku-spring-boot-postgresql/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=${JDBC_DATABASE_URL}
2 | spring.datasource.driverClassName=org.postgresql.Driver
3 | spring.datasource.maxActive=10
4 | spring.datasource.maxIdle=5
5 | spring.datasource.minIdle=2
6 | spring.datasource.initialSize=5
7 | spring.datasource.removeAbandoned=true
8 |
9 | spring.jpa.hibernate.ddl-auto=update
10 |
--------------------------------------------------------------------------------
/heroku-spring-boot-postgresql/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Heroku
5 |
6 |
7 | Hello Heroku!
8 |
9 |
10 |
--------------------------------------------------------------------------------
/html/basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Page title
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | This is text in bold and italics .
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/html/frameset.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/html/headings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | This is heading 1
7 | This is heading 2
8 | This is heading 3
9 | This is heading 4
10 | This is heading 5
11 | This is heading 6
12 |
13 | This paragraph one.
14 | This paragraph two.
15 | Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla.
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/html/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 | Hello World!
10 |
11 |
12 |
--------------------------------------------------------------------------------
/html/iframe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | iframe
6 |
7 |
8 |
9 | This is an example of page with iframe:
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/html/image.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Image
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/html/lists.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Go to class
7 | Make the exercises
8 | Study
9 | Pass
10 |
11 |
12 |
13 | Go to class
14 | Make the exercises
15 | Study
16 | Pass
17 |
18 |
19 |
20 | Coffee
21 | Black hot drink
22 | Milk
23 | White cold drink
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/html/table.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Table
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Famous Monster
14 | Birth Year
15 |
16 |
17 |
18 |
19 | King Kong
20 | 1933
21 |
22 |
23 | Dracula
24 | 1897
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ionic-hello-world/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 2
9 |
10 | # We recommend you to keep these unchanged
11 | end_of_line = lf
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [*.md]
17 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/ionic-hello-world/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .sourcemaps/
17 | .sass-cache/
18 | .tmp/
19 | .versions/
20 | coverage/
21 | dist/
22 | node_modules/
23 | tmp/
24 | temp/
25 | hooks/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | www/
31 | $RECYCLE.BIN/
32 |
33 | .DS_Store
34 | Thumbs.db
35 | UserInterfaceState.xcuserstate
36 |
--------------------------------------------------------------------------------
/ionic-hello-world/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ionic-hello-world",
3 | "app_id": "f448394e",
4 | "type": "ionic-angular",
5 | "integrations": {
6 | "cordova": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/ionic-hello-world/resources/README.md:
--------------------------------------------------------------------------------
1 | These are Cordova resources. You can replace icon.png and splash.png and run
2 | `ionic cordova resources` to generate custom icons and splash screens for your
3 | app. See `ionic cordova resources --help` for details.
4 |
5 | Cordova reference documentation:
6 |
7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
9 |
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-1024.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-Landscape@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape@~ipadpro.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/ionic-hello-world/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/splash.png
--------------------------------------------------------------------------------
/ionic-hello-world/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Platform } from 'ionic-angular';
3 | import { StatusBar } from '@ionic-native/status-bar';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 |
6 | import { HomePage } from '../pages/home/home';
7 | @Component({
8 | templateUrl: 'app.html'
9 | })
10 | export class MyApp {
11 | rootPage:any = HomePage;
12 |
13 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
14 | platform.ready().then(() => {
15 | // Okay, so the platform is ready and our plugins are available.
16 | // Here you can do any higher level native things you might need.
17 | statusBar.styleDefault();
18 | splashScreen.hide();
19 | });
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 |
3 |
4 | // App Global Sass
5 | // --------------------------------------------------
6 | // Put style rules here that you want to apply globally. These
7 | // styles are for the entire app and not just one component.
8 | // Additionally, this file can be also used as an entry point
9 | // to import other Sass files to be included in the output CSS.
10 | //
11 | // Shared Sass variables, which can be used to adjust Ionic's
12 | // default Sass variables, belong in "theme/variables.scss".
13 | //
14 | // To declare rules for a specific mode, create a child rule
15 | // for the .md, .ios, or .wp mode classes. The mode class is
16 | // automatically applied to the element in the app.
17 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app.module';
4 |
5 | platformBrowserDynamic().bootstrapModule(AppModule);
6 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/ionic-hello-world/src/assets/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/src/assets/imgs/logo.png
--------------------------------------------------------------------------------
/ionic-hello-world/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/ionic-hello-world/src/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Ionic Blank
5 |
6 |
7 |
8 |
9 |
10 | The world is your oyster.
11 |
12 | If you get lost, the docs will be your guide.
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | page-home {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/ionic-hello-world/src/pages/home/home.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 |
4 | @Component({
5 | selector: 'page-home',
6 | templateUrl: 'home.html'
7 | })
8 | export class HomePage {
9 |
10 | constructor(public navCtrl: NavController) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/ionic-hello-world/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5"
15 | },
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules",
21 | "src/**/*.spec.ts",
22 | "src/**/__tests__/*.ts"
23 | ],
24 | "compileOnSave": false,
25 | "atom": {
26 | "rewriteTsconfig": false
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ionic-hello-world/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/ionic-tabs/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 2
9 |
10 | # We recommend you to keep these unchanged
11 | end_of_line = lf
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [*.md]
17 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/ionic-tabs/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .sourcemaps/
17 | .sass-cache/
18 | .tmp/
19 | .versions/
20 | coverage/
21 | dist/
22 | node_modules/
23 | tmp/
24 | temp/
25 | hooks/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | www/
31 | $RECYCLE.BIN/
32 |
33 | .DS_Store
34 | Thumbs.db
35 | UserInterfaceState.xcuserstate
36 |
--------------------------------------------------------------------------------
/ionic-tabs/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ionic-tabs",
3 | "app_id": "",
4 | "type": "ionic-angular",
5 | "integrations": {}
6 | }
7 |
--------------------------------------------------------------------------------
/ionic-tabs/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Platform } from 'ionic-angular';
3 | import { StatusBar } from '@ionic-native/status-bar';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 |
6 | import { TabsPage } from '../pages/tabs/tabs';
7 |
8 | @Component({
9 | templateUrl: 'app.html'
10 | })
11 | export class MyApp {
12 | rootPage:any = TabsPage;
13 |
14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
15 | platform.ready().then(() => {
16 | // Okay, so the platform is ready and our plugins are available.
17 | // Here you can do any higher level native things you might need.
18 | statusBar.styleDefault();
19 | splashScreen.hide();
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/ionic-tabs/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ionic-tabs/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 |
3 |
4 | // App Global Sass
5 | // --------------------------------------------------
6 | // Put style rules here that you want to apply globally. These
7 | // styles are for the entire app and not just one component.
8 | // Additionally, this file can be also used as an entry point
9 | // to import other Sass files to be included in the output CSS.
10 | //
11 | // Shared Sass variables, which can be used to adjust Ionic's
12 | // default Sass variables, belong in "theme/variables.scss".
13 | //
14 | // To declare rules for a specific mode, create a child rule
15 | // for the .md, .ios, or .wp mode classes. The mode class is
16 | // automatically applied to the element in the app.
17 |
--------------------------------------------------------------------------------
/ionic-tabs/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app.module';
4 |
5 | platformBrowserDynamic().bootstrapModule(AppModule);
6 |
--------------------------------------------------------------------------------
/ionic-tabs/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-tabs/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/ionic-tabs/src/assets/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-tabs/src/assets/imgs/logo.png
--------------------------------------------------------------------------------
/ionic-tabs/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/about/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 |
9 |
10 | Light
11 | Default
12 | Secondary
13 | Danger
14 | Dark
15 |
16 |
17 |
18 | Username
19 |
20 |
21 |
22 | Password
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/about/about.scss:
--------------------------------------------------------------------------------
1 | page-about {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/about/about.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 |
4 | @Component({
5 | selector: 'page-about',
6 | templateUrl: 'about.html'
7 | })
8 | export class AboutPage {
9 |
10 | constructor(public navCtrl: NavController) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/contact/contact.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Contact
5 |
6 |
7 |
8 |
9 |
10 |
11 | Follow us on Twitter
12 |
13 |
14 | @ionicframework
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/contact/contact.scss:
--------------------------------------------------------------------------------
1 | page-contact {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/contact/contact.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 |
4 | @Component({
5 | selector: 'page-contact',
6 | templateUrl: 'contact.html'
7 | })
8 | export class ContactPage {
9 |
10 | constructor(public navCtrl: NavController) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Home
4 |
5 |
6 |
7 |
8 | Welcome to Ionic!
9 |
10 | This starter project comes with simple tabs-based layout for apps
11 | that are going to primarily use a Tabbed UI.
12 |
13 |
14 | Take a look at the src/pages/
directory to add or change tabs,
15 | update any existing page or create new pages.
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | page-home {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/home/home.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 |
4 | @Component({
5 | selector: 'page-home',
6 | templateUrl: 'home.html'
7 | })
8 | export class HomePage {
9 |
10 | constructor(public navCtrl: NavController) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/tabs/tabs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ionic-tabs/src/pages/tabs/tabs.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | import { AboutPage } from '../about/about';
4 | import { ContactPage } from '../contact/contact';
5 | import { HomePage } from '../home/home';
6 |
7 | @Component({
8 | templateUrl: 'tabs.html'
9 | })
10 | export class TabsPage {
11 |
12 | tab1Root = HomePage;
13 | tab2Root = AboutPage;
14 | tab3Root = ContactPage;
15 |
16 | constructor() {
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ionic-tabs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5"
15 | },
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules",
21 | "src/**/*.spec.ts",
22 | "src/**/__tests__/*.ts"
23 | ],
24 | "compileOnSave": false,
25 | "atom": {
26 | "rewriteTsconfig": false
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ionic-tabs/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/javascript/ajax.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | XMLHttpRequest example
6 | AJAX request
7 |
8 |
9 |
10 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/javascript/arrays.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/javascript/comparator.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/javascript/exceptions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/javascript/functions01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/javascript/functions02.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/javascript/functions03.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/javascript/info.txt:
--------------------------------------------------------------------------------
1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
--------------------------------------------------------------------------------
/javascript/js01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Say hello
5 |
6 |
7 |
--------------------------------------------------------------------------------
/javascript/js02.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 | Say hello
15 |
16 |
17 |
--------------------------------------------------------------------------------
/javascript/js03.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Say hello
8 |
9 |
10 |
--------------------------------------------------------------------------------
/javascript/obj01.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Read first name
18 | Read last name
19 | Get full name
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/javascript/obj02.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/javascript/obj03.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/javascript/obj04.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/javascript/obj05.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/javascript/obj06.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/javascript/obj07.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/javascript/obj08.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/javascript/obj09.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
20 |
21 |
22 | Person
23 | Modify
24 |
25 |
26 |
--------------------------------------------------------------------------------
/javascript/obj10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
21 |
22 |
23 | Full name
24 | Modify method
25 | Delete method
26 | Person
27 |
28 |
29 |
--------------------------------------------------------------------------------
/javascript/obj11.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/javascript/obj12.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/javascript/obj13.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/javascript/script.js:
--------------------------------------------------------------------------------
1 | function hello() {
2 | alert('Hello World');
3 | }
4 |
--------------------------------------------------------------------------------
/javascript/this.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/javascript/validate-form.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Validate form
6 |
7 |
8 |
21 |
22 |
23 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/jquery/cookies.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
20 |
21 |
22 | Using cookies...
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/jquery/jquery02.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
20 |
21 |
22 |
23 | Start Animation
24 | HELLO
25 |
26 |
27 |
--------------------------------------------------------------------------------
/jquery/jquery06.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
13 |
14 |
15 |
16 |
17 |
Let jQuery AJAX Change This Text
18 | Get External Content
19 |
20 |
21 |
--------------------------------------------------------------------------------
/jquery/jquery07.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
18 |
19 |
20 |
21 |
22 |
Let jQuery AJAX Change This Text
23 | Get External Content
24 |
25 |
26 |
--------------------------------------------------------------------------------
/jquery/lore.html:
--------------------------------------------------------------------------------
1 | Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per
--------------------------------------------------------------------------------
/jquery/site-content-page2.html:
--------------------------------------------------------------------------------
1 | Page 2
2 | Lorem ipsum ad his scripta blandit partiendo, eum fastidii
3 | accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
4 | suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis
5 | reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt
6 | incorrupte definitionem, vis mutat affert percipit cu, eirmod
7 | consectetuer signiferumque eu per. In usu latine equidem dolores. Quo
8 | no falli viris intellegam, ut fugit veritus placerat per.
9 |
--------------------------------------------------------------------------------
/jquery/site-layout.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/jquery/site-page1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/jquery/site-page2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/jquery/site.css:
--------------------------------------------------------------------------------
1 | .container {
2 | width: 900px;
3 | margin: 0 auto;
4 | }
5 |
6 | .header {
7 | float: left;
8 | width: 100%;
9 | background-color: black;
10 | color: white;
11 | text-align: center;
12 | }
13 |
14 | .content {
15 | float: left;
16 | width: 100%;
17 | position: relative;
18 | }
19 |
20 | .nav {
21 | width: 100px;
22 | position: absolute;
23 | top: 0;
24 | bottom: 0;
25 | left: 0;
26 | background-color: #eeeeee;
27 | }
28 |
29 | .main {
30 | margin-left: 100px;
31 | float: left;
32 | }
33 |
34 | .footer {
35 | clear: both;
36 | background-color: black;
37 | color: white;
38 | text-align: center;
39 | }
40 |
--------------------------------------------------------------------------------
/jquery/w3jquery.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/jquery/w3jquery.gif
--------------------------------------------------------------------------------
/junit-selenium/src/test/java/io/github/web/selenium/FirefoxTest.java:
--------------------------------------------------------------------------------
1 | package io.github.web.selenium;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertTrue;
4 |
5 | import org.junit.jupiter.api.Test;
6 | import org.junit.jupiter.api.extension.ExtendWith;
7 | import org.openqa.selenium.firefox.FirefoxDriver;
8 |
9 | import io.github.bonigarcia.SeleniumExtension;
10 |
11 | @ExtendWith(SeleniumExtension.class)
12 | public class FirefoxTest {
13 |
14 | @Test
15 | void testFirefox(FirefoxDriver driver) {
16 | driver.get("https://bonigarcia.github.io/selenium-jupiter/");
17 | assertTrue(
18 | driver.getTitle().contains("JUnit 5 extension for Selenium"));
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/mongodb/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | io.github.web
5 | mongodb
6 | 1.0.0
7 |
8 |
9 | UTF-8
10 | 1.8
11 |
12 |
13 |
14 |
15 | org.mongodb
16 | mongo-java-driver
17 | 3.6.3
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/nodejs-hello-world/app.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var app = express();
3 |
4 | app.get('/', function(req, res) {
5 | res.send('Hello World!');
6 | });
7 |
8 | app.listen(3000, function() {
9 | console.log('Example app listening on port 3000!');
10 | });
11 |
--------------------------------------------------------------------------------
/nodejs-hello-world/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nodejs-hello-world",
3 | "version": "1.0.0",
4 | "description": "Node.js simplest app ever",
5 | "license": "Apache-2.0",
6 | "repository": {
7 | "type": "git",
8 | "url": "git+https://github.com/bonigarcia/web-programming-examples.git"
9 | },
10 | "dependencies": {
11 | "express": "^4.15.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/rest-webservices/src/main/java/io/github/web/rest/client/retrofit/TeamsClient.java:
--------------------------------------------------------------------------------
1 | package io.github.web.rest.client.retrofit;
2 |
3 | import java.util.List;
4 |
5 | import io.github.web.rest.service.Team;
6 | import retrofit2.Call;
7 | import retrofit2.http.Body;
8 | import retrofit2.http.GET;
9 | import retrofit2.http.POST;
10 | import retrofit2.http.Path;
11 | import retrofit2.http.Query;
12 |
13 | public interface TeamsClient {
14 |
15 | @GET("/teams")
16 | Call> getTeams();
17 |
18 | @GET("/team/{index}")
19 | Call getTeamByPath(@Path("index") int index);
20 |
21 | @GET("/team")
22 | Call getTeamByQuery(@Query("index") int index);
23 |
24 | @POST("/teams")
25 | Call addTeam(@Body Team team);
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rest-webservices/src/main/java/io/github/web/rest/service/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.rest.service;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/rest-webservices/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/rest-webservices/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GET
5 |
6 | POST
7 |
8 |
9 |
--------------------------------------------------------------------------------
/rest-webservices/src/main/resources/static/jquery-client-get.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
17 |
18 |
19 |
Team:
20 |
Players:
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/spring-boot-hello-world/src/main/java/io/github/web/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-hello-world/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-boot-hello-world/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-boot-hello-world/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spring boot - hello world
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
--------------------------------------------------------------------------------
/spring-data-h2/src/main/java/io/github/web/data/h2/CustomerRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.h2;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.Query;
6 | import org.springframework.data.repository.CrudRepository;
7 |
8 | public interface CustomerRepository extends CrudRepository {
9 |
10 | List findByLastName(String lastName);
11 |
12 | List findByFirstName(String firstName);
13 |
14 | @Query(value = "SELECT * FROM CUSTOMER", nativeQuery = true)
15 | List selectAll();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-data-h2/src/main/java/io/github/web/data/h2/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.h2;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-data-h2/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | # Uncomment this line to store H2 in local file system and allow other simultaneous connections
2 | # spring.datasource.url=jdbc:h2:~/test;AUTO_SERVER=TRUE
3 |
4 | # Uncomment this line to keep the DDL
5 | # spring.jpa.hibernate.ddl-auto=update
6 |
--------------------------------------------------------------------------------
/spring-data-h2/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-data-mongodb/src/main/java/io/github/web/data/mongodb/CustomerRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.mongodb;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.repository.CrudRepository;
6 |
7 | public interface CustomerRepository extends CrudRepository {
8 |
9 | List findByLastName(String lastName);
10 |
11 | List findByFirstName(String firstName);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/spring-data-mongodb/src/main/java/io/github/web/data/mongodb/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.mongodb;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-data-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.data.mongodb.host=localhost
2 | spring.data.mongodb.port=27017
--------------------------------------------------------------------------------
/spring-data-mongodb/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-data-mysql/src/main/java/io/github/web/data/mysql/CustomerRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.mysql;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.Query;
6 | import org.springframework.data.repository.CrudRepository;
7 |
8 | public interface CustomerRepository extends CrudRepository {
9 |
10 | List findByLastName(String lastName);
11 |
12 | List findByFirstName(String firstName);
13 |
14 | @Query(value = "SELECT * FROM CUSTOMER", nativeQuery = true)
15 | List selectAll();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-data-mysql/src/main/java/io/github/web/data/mysql/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.data.mysql;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-data-mysql/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost/test
2 | spring.datasource.username=root
3 | spring.datasource.password=
4 | spring.datasource.driverClassName=com.mysql.jdbc.Driver
5 |
6 | spring.jpa.hibernate.ddl-auto=create-drop
--------------------------------------------------------------------------------
/spring-data-mysql/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-hello-world/src/main/java/io/github/web/springmvc/MyController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.springmvc;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class MyController {
9 |
10 | @RequestMapping("/")
11 | public ModelAndView greeting() {
12 | ModelAndView model = new ModelAndView("hello_world");
13 | model.addObject("name", "World");
14 | return model;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/spring-mvc-hello-world/src/main/java/io/github/web/springmvc/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.springmvc;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-mvc-hello-world/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-mvc-hello-world/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-hello-world/src/main/resources/templates/hello_world.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spring MVC with Thymeleaf
5 |
6 | Hello !
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/java/io/github/web/thymeleaf/LinkController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class LinkController {
9 |
10 | @RequestMapping("/")
11 | public ModelAndView processHome() {
12 | ModelAndView model = new ModelAndView("home_page");
13 | return model;
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/templates/home_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home page
5 | Text controller
6 | If controller
7 | Iteration controller
8 |
9 |
10 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/templates/if_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Conditional page
5 | Paragraph #1 is visible!
6 | Paragraph #2 is also visible!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/templates/loop_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Iteration page
5 |
8 |
9 | Colors in table:
10 |
11 |
12 |
13 | Color
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-basic/src/main/resources/templates/text_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text page
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/java/io/github/web/thymeleaf/MyForm.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | public class MyForm {
4 |
5 | private String info1;
6 | private String info2;
7 |
8 | // Getters, setters, and toString()
9 |
10 | public String getInfo1() {
11 | return info1;
12 | }
13 |
14 | public void setInfo1(String info1) {
15 | this.info1 = info1;
16 | }
17 |
18 | public String getInfo2() {
19 | return info2;
20 | }
21 |
22 | public void setInfo2(String info2) {
23 | this.info2 = info2;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | return "MyForm [info1=" + info1 + ", info2=" + info2 + "]";
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/resources/templates/home_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home page
5 |
6 | Form 1
7 |
12 |
13 | Form 2
14 |
20 |
21 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-forms/src/main/resources/templates/result_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Result page
5 |
6 |
7 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-i18n/src/main/java/io/github/web/i18n/MyController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.i18n;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class MyController {
9 |
10 | @RequestMapping("/i18n")
11 | public ModelAndView i18n() {
12 | return new ModelAndView("i18n_page");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-i18n/src/main/resources/messages_en.properties:
--------------------------------------------------------------------------------
1 | welcome=Welcome to my web!
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-i18n/src/main/resources/messages_es.properties:
--------------------------------------------------------------------------------
1 | welcome=Bienvenido a mi web!
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-i18n/src/main/resources/messages_fr.properties:
--------------------------------------------------------------------------------
1 | welcome=Bienvenue sur mon site web!
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-i18n/src/main/resources/templates/i18n_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-layout/src/main/java/io/github/web/thymeleaf/MyController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class MyController {
9 |
10 | @RequestMapping(value = "/page1")
11 | public ModelAndView layout1() {
12 | return new ModelAndView("page1");
13 | }
14 |
15 | @RequestMapping(value = "/page2")
16 | public ModelAndView layout2() {
17 | return new ModelAndView("page2");
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-layout/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-layout/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-layout/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/java/io/github/web/thymeleaf/User.java:
--------------------------------------------------------------------------------
1 | package io.github.web.thymeleaf;
2 |
3 | import org.springframework.context.annotation.Scope;
4 | import org.springframework.context.annotation.ScopedProxyMode;
5 | import org.springframework.stereotype.Component;
6 | import org.springframework.web.context.WebApplicationContext;
7 |
8 | @Component
9 | @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
10 | public class User {
11 |
12 | private String info;
13 |
14 | public void setInfo(String info) {
15 | this.info = info;
16 | }
17 |
18 | public String getInfo() {
19 | return info;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/resources/templates/data_session.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/resources/templates/home_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home page
5 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-mvc-thymeleaf-session/src/main/resources/templates/info_session.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Info has been stored. Click
5 | here to show it.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/java/io/github/web/security/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/java/io/github/web/security/UserRepository.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.data.repository.CrudRepository;
4 |
5 | public interface UserRepository extends CrudRepository {
6 |
7 | User findByUser(String user);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 |
8 | Hello
9 |
10 |
13 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Access to protected pages clicking
5 | here !
6 |
7 |
8 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Login form
5 |
6 |
7 | Invalid credentials
8 | Logged out
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-security-aa-advanced/src/main/resources/templates/root.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Admin
5 |
6 |
7 | Administration page
8 | Back to home
9 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/java/io/github/web/security/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 |
8 | Hello
9 |
10 |
13 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Access to protected pages clicking
5 | here !
6 |
7 |
8 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Login form
5 |
6 |
7 | Invalid credentials
8 | Logged out
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-security-aa-medium/src/main/resources/templates/root.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Admin
5 |
6 |
7 | Administration page
8 | Back to home
9 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/java/io/github/web/security/MyController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class MyController {
9 |
10 | @RequestMapping("/")
11 | public ModelAndView index() {
12 | return new ModelAndView("index");
13 | }
14 |
15 | @RequestMapping("/login")
16 | public ModelAndView login() {
17 | return new ModelAndView("login");
18 | }
19 |
20 | @RequestMapping("/home")
21 | public ModelAndView home() {
22 | return new ModelAndView("home");
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/java/io/github/web/security/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 | Hello Spring Security!
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Access to protected pages clicking
5 | here !
6 |
7 |
8 |
--------------------------------------------------------------------------------
/spring-security-aa-simple/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Login form
5 |
6 |
7 | Invalid credentials
8 | Logged out
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/java/io/github/web/security/MyController.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.servlet.ModelAndView;
6 |
7 | @Controller
8 | public class MyController {
9 |
10 | @RequestMapping("/")
11 | public ModelAndView index() {
12 | return new ModelAndView("index");
13 | }
14 |
15 | @RequestMapping("/login")
16 | public ModelAndView login() {
17 | return new ModelAndView("login");
18 | }
19 |
20 | @RequestMapping("/home")
21 | public ModelAndView home() {
22 | return new ModelAndView("home");
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/java/io/github/web/security/MySpringBootApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.security;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MySpringBootApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MySpringBootApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port = 8443
2 | server.ssl.key-store = classpath:keystore.jks
3 | server.ssl.key-store-password = password
4 | server.ssl.key-password = secret
5 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/spring-security-https/src/main/resources/keystore.jks
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 | Hello Spring Security!
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Access to protected pages clicking
5 | here !
6 |
7 |
8 |
--------------------------------------------------------------------------------
/spring-security-https/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Login form
5 |
6 |
7 | Invalid credentials
8 | Logged out
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-test/src/main/java/io/github/web/springtest/MyComponent.java:
--------------------------------------------------------------------------------
1 | package io.github.web.springtest;
2 |
3 | import org.springframework.stereotype.Component;
4 |
5 | @Component
6 | public class MyComponent {
7 |
8 | public String sayHello() {
9 | return "Hello world";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spring-test/src/main/java/io/github/web/springtest/SpringTestDemoApp.java:
--------------------------------------------------------------------------------
1 | package io.github.web.springtest;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SpringTestDemoApp {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SpringTestDemoApp.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-test/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-test/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spring Boot Test - Page 1
5 |
6 |
7 |
8 | Home page
9 | Go to another page.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-test/src/main/resources/static/other.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spring Boot Test - Page 2
5 |
6 |
7 |
8 | Other page
9 | Hello!
10 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-test/src/test/java/io/github/web/springtest/SpringJupiterTest.java:
--------------------------------------------------------------------------------
1 | package io.github.web.springtest;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 |
5 | import org.junit.jupiter.api.Test;
6 | import org.junit.jupiter.api.extension.ExtendWith;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.boot.test.context.SpringBootTest;
9 | import org.springframework.test.context.junit.jupiter.SpringExtension;
10 |
11 | @ExtendWith(SpringExtension.class)
12 | @SpringBootTest
13 | public class SpringJupiterTest {
14 |
15 | @Autowired
16 | MyComponent myComponent;
17 |
18 | @Test
19 | void test() {
20 | String hello = myComponent.sayHello();
21 | assertEquals(hello, "Hello world");
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/typescript/class1.ts:
--------------------------------------------------------------------------------
1 | class Person {
2 | private firstName = "";
3 | private lastName = "";
4 |
5 | constructor(firstName, lastName) {
6 | this.firstName = firstName;
7 | this.lastName = lastName;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/typescript/class2.ts:
--------------------------------------------------------------------------------
1 | class Person {
2 | constructor(private firstName, private lastName) {
3 | }
4 | }
5 |
--------------------------------------------------------------------------------
/typescript/decorator.ts:
--------------------------------------------------------------------------------
1 | function Student(config) {
2 | return function (target) {
3 | Object.defineProperty(target.prototype, 'course', {value: () => config.course})
4 | }
5 | }
6 |
7 | @Student({
8 | course: "angular3"
9 | })
10 | class Person {
11 | constructor(private firstName, private lastName) {
12 | }
13 |
14 | public name() {
15 | return `${this.firstName} ${this.lastName}`;
16 | }
17 |
18 | protected whoAreYou() {
19 | return `Hi i'm ${this.name()}`;
20 | }
21 | }
22 |
23 | let john = new Person("John", "Doe");
24 | console.log(john.whoAreYou());
25 |
--------------------------------------------------------------------------------
/typescript/export.ts:
--------------------------------------------------------------------------------
1 | // export.ts
2 |
3 | function square(x) {
4 | return Math.pow(x,2)
5 | }
6 |
7 | function cow() {
8 | console.log("Mooooo!!!")
9 | }
10 |
11 | export {square, cow};
12 |
--------------------------------------------------------------------------------
/typescript/export2.ts:
--------------------------------------------------------------------------------
1 | // export2.ts
2 |
3 | export default function square(x) {
4 | return Math.pow(x,2)
5 | }
6 |
--------------------------------------------------------------------------------
/typescript/hello.ts:
--------------------------------------------------------------------------------
1 | console.log("Hello world");
2 |
--------------------------------------------------------------------------------
/typescript/import.ts:
--------------------------------------------------------------------------------
1 | // import.ts
2 |
3 | import {square, cow} from './export';
4 | console.log(square(2));
5 | cow();
6 |
7 | import {square as sqr} from './utils';
8 | sqr(2);
9 |
10 | import * as utils from './utils';
11 | console.log(utils.square(2));
12 | utils.cow();
13 |
14 |
--------------------------------------------------------------------------------
/typescript/import2.ts:
--------------------------------------------------------------------------------
1 | // import2.ts
2 |
3 | import square from './export';
4 |
--------------------------------------------------------------------------------
/typescript/interfaces.ts:
--------------------------------------------------------------------------------
1 | interface Human {
2 | firstName: string;
3 | lastName: string;
4 | name?: Function;
5 | isLate?(time: Date): Function;
6 | }
7 |
8 | class Person implements Human {
9 | constructor(public firstName, public lastName) {
10 | }
11 |
12 | public name() {
13 | return `${this.firstName} ${this.lastName}`;
14 | }
15 |
16 | protected whoAreYou() {
17 | return `Hi i'm ${this.name()}`;
18 | }
19 | }
20 |
21 | let john = new Student("John", "Doe");
22 | console.log(john.whoAreYou());
23 |
--------------------------------------------------------------------------------
/typescript/types.ts:
--------------------------------------------------------------------------------
1 | // Basic types
2 | let decimal: number = 6;
3 | let done: boolean = false;
4 | let color: string = "blue";
5 |
6 | // Arrays
7 | let list: number[] = [1, 2, 3];
8 | let list: Array = [1, 2, 3];
9 |
10 | // Functions
11 | let fun: Function = () => console.log("Hello");
12 |
13 | // Expected return types
14 | function returnNumber(): number {
15 | return 1;
16 | }
17 |
18 | // Void
19 | function returnNothing(): void {
20 | console.log("Moo");
21 | }
22 |
23 | // Enums
24 | enum Direction {
25 | Up,
26 | Down,
27 | Left,
28 | Right
29 | }
30 |
31 | let go: Direction;
32 | go = Direction.Up;
33 |
34 | // Class
35 | let person: Person;
36 | let people: Person[];
37 |
38 | // Any
39 | let notsure: any = 1;
40 |
--------------------------------------------------------------------------------