Skip to content

Instantly share code, notes, and snippets.

View fxcosta's full-sized avatar
:octocat:
Focusing

Felix Costa fxcosta

:octocat:
Focusing
View GitHub Profile
@fxcosta
fxcosta / loop_hist.r
Last active May 11, 2016 00:31
Simples script em R que exibe histograma de posições sequenciais de uma determinada massa de dados e uma plotagem usando curva gaussiana e curva de densidade
#!/usr/bin/Rscript
emg <- read.csv("emg_s1.csv", header = FALSE, sep = "|", dec = ",")
View(emg)
attach(emg)
par(mfrow = c(4, 5))
for(data in 1:20) {
position <- paste(c("V", data), collapse = "")
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
import {Sql} from "../providers/Sql";
export class ExamplePage {
constructor(private sql: Sql) {
//sql.query(...);
//...
}
}
@fxcosta
fxcosta / multiple-3rd-party-widgets.js
Created January 7, 2017 03:02 — forked from zenorocha/multiple-3rd-party-widgets.js
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@fxcosta
fxcosta / introrx.md
Created February 26, 2017 19:36 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@fxcosta
fxcosta / simpleFunction.js
Created April 19, 2017 05:56
simple named javascript function
function triple(x) {
return x * 3;
}
triple(30);
// 90
let triple = function (x) {
return x * 3;
}
triple(3); // output: 9
let anotherVariable = triple;
anotherVariable(30); // output: 90
let warrior = {
hp: 100,
strength: 20,
attack: function(target) {
target.hp -= this.strength;
}
}
let enemy = {
hp: 100,
portugueseHello = function () {
return "Olá, ";
}
englishHello = function () {
return "Hello, ";
}
francaisHello = function () {
return "Bonjour, ";