Skip to content

Instantly share code, notes, and snippets.

View quirinpa's full-sized avatar
💭
Evolving

Paulo Andre Azevedo Quirino quirinpa

💭
Evolving
View GitHub Profile
export default function alsoMiddleware() {
return (next) => (action) => {
if (!action.also) return next(action);
const { also, ...rest } = action;
if (typeof also === 'function') {
const alsoRes = also();
const ret = next(rest);
import React, { Component } from 'react';
import TimedMutationsContainer from './TimedMutationsContainer';
function toArray(elementsO) {
if (!elementsO)
return [];
if (Array.isArray(elementsO))
return elementsO;
return [elementsO];
}
import React, { Component } from 'react';
import SimpleTransitions from 'components/SimpleTransitions';
import TimedMutationsContainer from 'components/TimedMutationsContainer';
import styles from './styles';
import { connect } from 'tools/redux';
import Note from './Note';
/* global __DEVELOPMENT__, __CLIENT__, __DEVTOOLS__ */
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
import alsoMiddleware from 'middleware/alsoMiddleware';
import deferMiddleware from 'middleware/deferMiddleware';
import clientMiddlewareCreator from 'middleware/clientMiddlewareCreator';
import waitMiddleware from 'middleware/waitMiddleware';
import { routerStateReducer } from 'redux-react-router';
import * as reducers from 'ducks';
import ApiClient from './ApiClient';

Trabalho Prático de Paradigmas de Programação 07/01/2016 - Relatório

Introdução

Este relatório está organizado por tópicos que julgo servirem para para uma introdução rápida ao algoritmo, e foi construído com o intuito de ser fácil de consultar.

Pouco convencional

um relato de insegurança acerca deste relatório

Três fases

fala brevemente sobre as três fases essenciais do simulador

Mathematica is great to check results while studying linear algebra:

X = {{2, -1}, {3, -2}};
Print["result ", Eigenvalues[X], " ", Eigenvectors[X]]
calcM[\[Lambda]_] := \[Lambda] IdentityMatrix[2] - X;
Print["how to calculate:"];
MatrixForm[aux = calcM[\[Lambda]]]
r = calcM[\[Lambda] /. #] & /@ (e = Solve[(d = Det[aux]) == 0, \[Lambda]]);
Print[d, " ", \[Lambda] /. e, " ", MatrixForm[#] & /@ r]
v = Table[{ToExpression["v" <> ToString[i]]}, {i, 1, Length[X]}]
// very simple SDL snake implementation
#include "SDL/SDL.h"
#include <iostream>
const int squareSize=10;
const int squares=30;
const int hsquares=squares/2;
const int size=squareSize*squares;
#ifndef RK4_H
#define RK4_H
double rk4(double xi, double yi, double h, double df()) {
double k[4];
k[0] = df(xi, yi);
k[1] = df(xi + h/2, yi + h*k[0])/2;
k[2] = df(xi + h/2, yi + h*k[1])/2;
k[3] = df(xi + h, yi + h*k[2]);
return yi + h(k[0]+2*(k[1]+k[2]) + k[3])/6;
}
/* fileb.h - write/read files bit by bit
*
* MIT License
*
* Copyright (c) 2016 Paulo André Azevedo Quirino
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@quirinpa
quirinpa / iv
Last active October 26, 2016 16:09
#!/bin/bash
# iv - a bash image viewer that uses w3mimgdisplay
# Usage: iv [filename]
# Licence: GPL - quirinpa@gmail.com
# Inspired by -
# blog.z3bra.org/2014/01/images-in-terminal.html
# wiki.vifm.info/index.php?title=How_to_preview_images
# Saitoha sensei... Gomen nasai. Ore wa boke desu.