Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(MASS) | |
library(patchwork) | |
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") | |
# generate data with given cor matrix | |
a <- 0.9 | |
s1 <- matrix(c(1,a, | |
a,1), ncol = 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('''<header> | |
ここをもうちょっとシンプルに変えてっと | |
え、なにこのエラー・・・ | |
</header>''') | |
try: | |
uglyCode() | |
except: | |
print('よくあるError') | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html = new THtmlEditor('texto'); | |
$html->setOption('toolbar',[ | |
['style', ['bold', 'italic', 'underline', 'clear']], | |
['font', ['strikethrough', 'superscript', 'subscript']], | |
['fontsize', ['fontsize']], | |
['color', ['color']], | |
['para', ['ul', 'ol', 'paragraph']], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$GruposCliente = GruposCliente::where('cliente_id', '=', $object->id)->getIndexedArray('grupo_cliente_id', 'grupo_cliente_id'); | |
/* | |
Array | |
( | |
[1] => 1 | |
[2] => 2 | |
[4] => 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import math | |
import argparse | |
from PIL import Image | |
def build_frames(gif, animation_seconds): | |
num_frames = math.floor(gif.n_frames) | |
frame_width, frame_height = gif.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tr->addStyle('title', 'Courier', '10', 'B', '#000000', '#dbdbdb'); | |
if ($format == 'pdf') | |
{ | |
$tr->setHeaderCallback( | |
function($tr) | |
{ | |
$pdf = $tr->getNativeWriter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function __construct($param = null) | |
{ | |
parent::__construct(); | |
$this->form = new BootstrapFormBuilder(self::$formName); | |
$this->form->setFormTitle("PEDIDOS - DELIVERY"); | |
$this->limit = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#groups is list of integers in ascending order without gaps | |
def getRow(lists, row): | |
res = [] | |
for l in lists: | |
for i in range(len(l)): | |
if i==row: | |
res.append(l[i]) | |
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
TScript::create('$("[name=\'NOME_CAMPO\']").blur();'); |
NewerOlder