| enum SemaphoreState { GREEN, YELLOW, RED }; | |
| enum PedestrianState { IDLE, REQUESTED, CROSSING }; | |
| // first semaphore | |
| const int LED_SM1_RED = 4; | |
| const int LED_SM1_YELLOW = 3; | |
| const int LED_SM1_GREEN = 12; | |
| // second semaphore | |
| const int LED_SM2_RED = 7; |
| enum SemaphoreState { GREEN, YELLOW, RED }; | |
| enum PedestrianState { IDLE, REQUESTED, CROSSING }; | |
| // first semaphore | |
| const int LED_SM1_RED = 13; | |
| const int LED_SM1_YELLOW = 12; | |
| const int LED_SM1_GREEN = 11; | |
| // second semaphore | |
| const int LED_SM2_RED = 7; |
| CREATE TABLE IF NOT EXISTS GAMES ( | |
| ID SERIAL PRIMARY KEY, | |
| TITULO VARCHAR(64) NOT NULL UNIQUE, | |
| DESCRICAO VARCHAR(255) | |
| ); | |
| CREATE TABLE IF NOT EXISTS USUARIOS ( | |
| ID SERIAL PRIMARY KEY, | |
| NOME_COMPLETO VARCHAR(128) NOT NULL, | |
| NICKNAME VARCHAR(32) NOT NULL UNIQUE, | |
| EMAIL VARCHAR(150) NOT NULL UNIQUE, |
The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.
You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.
| class QuantityInputFormatter extends TextInputFormatter { | |
| @override | |
| TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { | |
| if (newValue.text.isEmpty) { | |
| return const TextEditingValue( | |
| text: '0', | |
| selection: TextSelection.collapsed(offset: 1), | |
| ); | |
| } |
- Por: Paulo Torrens
- Originalmente portado no facebook em 2014-03-08
#["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]
Se preparem que o texto é longo.
Várias vezes chegam novatos aqui perguntando como começar, e a galera diz "estuda lógica primeiro, depois vai pra linguagem X". Vivo dizendo que é bobagem. Ontem, em particular, falei isso, e vieram várias pessoas por inbox me perguntar porquê (e uma pra me xingar, achando que falei por arrogância).
Pra facilitar, eu vou escrever uma boa explicação de porquê "lógica de programação" é furada, doa a quem doer, e postar na APDA e no fórum da EnergyLabs (para futuras referências, porque esse assunto vai voltar, ctz).
| import 'package:flutter/material.dart'; | |
| import '../home/home_page.dart'; | |
| import 'widgets/bottom_navigator.dart'; | |
| class RootPage extends StatefulWidget { | |
| const RootPage({Key? key}) : super(key: key); | |
| @override | |
| State<RootPage> createState() => _RootPageState(); |
| import { Component, NgZone, OnDestroy, OnInit } from '@angular/core'; | |
| import { Router } from '@angular/router'; | |
| import { Store } from '@ngrx/store'; | |
| import { Subscription } from 'rxjs'; | |
| import { map } from 'rxjs/operators'; | |
| import { DocumentModel } from 'src/app/core/models/document.model'; | |
| import { LifeProofModel } from 'src/app/core/models/life-proof.model'; | |
| import { uploadFaceCompare } from '../../../core/store/actions/face-compare.action'; | |
| import { DocumentsState } from '../../../core/store/states/documents.state'; | |
| import { FaceCompareState } from '../../../core/store/states/face-compare.state'; |
| import 'package:dio/dio.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:google_fonts/google_fonts.dart'; | |
| import 'package:transparent_image/transparent_image.dart'; | |
| import '../shared/const/image_api.dart'; | |
| import '../shared/repositories/get_image.dart'; | |
| import '../widgets/search_bar/search_bar.dart'; | |
| import 'home_controller.dart'; |