Continuaremos evoluindo o projeto da Mini Loja.
Agora você deverá adicionar:
- Tratamento de erros com try/catch
- Uso de Map() como estrutura de dados no projeto
Objetivo: aplicar os conceitos vistos em aula construindo um pequeno gerenciador de catálogo e carrinho de compras em JavaScript. O projeto integra uso de tipos, coerções, arrays, matrizes, funções, Math, buscas e transformações.
Escopo mínimo
id, nome, preco (number) e estoque (number).find/findIndex), e filtrar por faixa de preço (filter).| <?php | |
| /** @noinspection ? */ | |
| // PhpUndefinedGotoLabelInspection Undefined goto label | |
| // PhpUndefinedVariableInspection Undefined variable | |
| // PhpUndefinedMethodInspection Undefined method | |
| // PhpUndefinedNamespaceInspection Undefined namespace | |
| // PhpUndefinedClassInspection Undefined class | |
| // PhpUndefinedFunctionInspection Undefined function |
| { | |
| // Desabilita a Telemetria | |
| "telemetry.enableTelemetry": false, | |
| "redhat.telemetry.enabled": false, | |
| // Configurações dos arquivos | |
| "files.autoSave": "onFocusChange", | |
| "files.encoding": "utf8", | |
| "files.insertFinalNewline": true, | |
| "files.restoreUndoStack": true, |
| # if using bash | |
| echo 'export WORKRDIR="$HOME/my/workdir"' >> ~/.bashrc | |
| # if using zsh | |
| echo 'export WORKRDIR="$HOME/my/workdir"' >> ~/.zshrc | |
| # download script | |
| sudo curl https://bit.ly/3G9oEZk --output /bin/script | |
| # permission |
| document | |
| .querySelectorAll('button[aria-label^="Aceitar o convite de"]') | |
| .forEach((btn, i) => setTimeout(() => btn.click(), i + 500)); |
| name: 15-minute-schedule | |
| on: | |
| schedule: | |
| - cron: '*/15 * * * *' | |
| jobs: | |
| cron: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Call your API route | |
| run: | |
| <?php | |
| // File: app/Console/Commands/ServeCommand.php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Symfony\Component\Console\Input\InputOption; | |
| class ServeCommand extends Command { |
| <?php | |
| if(!function_exists('config_path')) | |
| { | |
| /** | |
| * Return the path to config files | |
| * @param null $path | |
| * @return string | |
| */ | |
| function config_path($path=null) |