Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathieuancelin/poitiers-2016
https://github.com/mathieuancelin/poitiers-2016
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mathieuancelin/poitiers-2016
- Owner: mathieuancelin
- Created: 2016-01-07T08:19:41.000Z (almost 9 years ago)
- Default Branch: gh-pages
- Last Pushed: 2016-01-08T12:01:50.000Z (almost 9 years ago)
- Last Synced: 2023-03-11T09:56:44.371Z (over 1 year ago)
- Language: HTML
- Size: 11.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Java Web
## Slides
* [Introduction au web](./slides/intro-web.pdf)
* [Java EE 7](./slides/JavaEE7.pdf)
* [Play 1](./slides/play1.pdf)## FooBarQix
Vous trouverez [ici](http://mathieuancelin.github.io/poitiers-2016/foobarqix.html) le challenge FooBarQix
Voici une solution possible au problème en ES5 ([JSBin](https://jsbin.com/vacoticuge/edit?html,js,console,output))
```javascript
for (var i = 1; i <= 100; i++) {
var result = '';
var str = i + '';
if (i % 3 === 0) result += 'Foo';
if (i % 5 === 0) result += 'Bar';
if (i % 7 === 0) result += 'Qix';
for (var j = 0; j < str.length; j++) {
if (str[j] === '3') result += 'Foo';
if (str[j] === '5') result += 'Bar';
if (str[j] === '7') result += 'Qix';
}
var printableResult = result.length === 0 ? i : result;
console.log(i + ' \u21D2 ' + printableResult);
}
```ou encore en jouant avec ES6
```javascript
const chars = ['', '', '', 'Foo', '', 'Bar', '', 'Qix', '', ''];
Array(100).fill().map((_, i) => i + 1).forEach(i => {
let result = '';
if (i % 3 === 0) result += 'Foo';
if (i % 5 === 0) result += 'Bar';
if (i % 7 === 0) result += 'Qix';
result += [].map.call(`${i}`, c => chars[c]).join('');
const printableResult = result.length === 0 ? i : result;
console.log(`${i} \u21D2 ${printableResult}`);
});
```## TP
Voici un [exemple](./todo-template.html) de l'application à créer
* [Enoncé pour Todo List en Java EE](./tp/todo-javaee7.html)
* [Enoncé pour la Todo List avec Play Framework](./tp/todo-play1.html)