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
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';
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);

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;
/* 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
#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;
}
@quirinpa
quirinpa / LICENCE
Last active October 3, 2022 08:51
efficient AVL? help me improve it! - WIP
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for