Skip to content

Instantly share code, notes, and snippets.

Questão 0

A diferença entre problemas decidíveis e problemas indecidíveis

Os problemas indedicíveis não possuem um algoritmo, logo, não tem parada garantida pois pode existir um número infinito de estados dado uma entrada.. Já os problemas decidíveis possuem algoritmo.

De que forma problemas computacionais em geral, podem ser vistos como problemas de Linguagem

A relação entre problemas decidíveis e problemas indecidíveis com a teoria das linguagens formais

<div class="dialog-content">
<div id="modal-services">
<h2>Configure o serviço</h2>
<form id="service-form">
<div class="form-group">
<label>Nome</label>
<input class="form-control" type="text" name="name" ng-model="service.name" placeholder="Sem nome"/>
<div class="error mt" ng-if="dialogCtrl.errors.name"><span class="text-danger" ng-repeat="error in dialogCtrl.errors.name">{{error}}<br/></span></div>
</div>
<div class="form-group">
@senhorinha
senhorinha / ng-dialog.less
Created July 17, 2017 20:40
Exemplo de tema custom
// ========================================================================
// Component: ngdialog.less
// ========================================================================
.ngdialog {
z-index: 9001 !important;
&.ngdialog-theme-default {
.ngdialog-content {
background-color: #fff;
FUNCTION_BLOCK driver
VAR_INPUT
x : REAL;
y : REAL;
angle : REAL;
END_VAR
VAR_OUTPUT
volante : REAL;
@senhorinha
senhorinha / facebook_errors.md
Last active October 18, 2016 02:25
Erros que podem acontecer durante a postagem

Koala::Facebook::AuthenticationError

The access token could not be decrypted

Resumo

type OAuthException, code: 190, message: The access token could not be decrypted [HTTP 400]

Motivo

Ocorre quando há alterações no token e o Facebook não consegue decifra-lo. Para reproduzi-lo é necessário adicionar caracteres no token ou alterar algum existente.

Como resolver

Entrar novamente. Relogin.

@senhorinha
senhorinha / temperature_sensor.cc
Created June 27, 2016 18:12
Temperature sensor
#include <machine.h>
#include <alarm.h>
#include <utility/ostream.h>
#include <i2c.h>
#include <gpio.h>
#include <cpu.h>
#include <machine/cortex_m/emote3_gptm.h>
using namespace EPOS;
@senhorinha
senhorinha / temperature_and_humidity_sensor.cc
Created June 27, 2016 18:12
Temperature and humidity sensor
#include <machine.h>
#include <alarm.h>
#include <utility/ostream.h>
#include <i2c.h>
#include <gpio.h>
#include <cpu.h>
#include <machine/cortex_m/emote3_gptm.h>
using namespace EPOS;
@senhorinha
senhorinha / metrics
Created June 20, 2016 17:19
Metrics of cassandra
{
"results": [
[
"A0numeric0"
],
[
"A1numeric0"
],
[
"A2numeric0"
@senhorinha
senhorinha / register_owner.rb
Created June 19, 2016 13:27
O que tu prefere
def register_owner
uuid = qr_code_params[:uuid]
qr_code = QrCode.find_by(uuid: uuid)
if(qr_code)
if(qr_code.user)
render json: QrCodeAlreadyHasAnOwnerError.new(uuid), status: :conflict
else
@current_user.qr_codes << qr_code
render json: qr_code, status: :created
end