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
@mixin use-mobile-bottom-bar($value) { | |
.bottom-navigation-buttons-container { | |
display: if($value, block, none); | |
} | |
.navigation-buttons-container { | |
display: if($value, none, block); | |
} | |
} |
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
original_image = imread('butterfly.jpg'); | |
[n m c] = size(original_image); | |
assert(c == 3); | |
angles = linspace(0, 20 * pi, 1000); | |
for i=1:length(angles) | |
radius = 200; | |
c = 0.5 + sin(angles(i)) / 2; | |
[x y] = meshgrid(1:m, 1:n); |
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
class xxx { | |
Collector<SafeHtml, SafeHtmlBuilder, SafeHtml> safeHtmlCollector = | |
Collector.of( | |
SafeHtmlBuilder::new, | |
(BiConsumer<SafeHtmlBuilder, SafeHtml>) SafeHtmlBuilder::append, | |
(builder1, builder2) -> builder1.append(builder2.toSafeHtml()), | |
SafeHtmlBuilder::toSafeHtml); | |
} |
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
<canvas id="myCanvas" width="500" height="500"></canvas> |
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
SpecialPlane horPlane = new SpecialPlane(0,0.2, new PVector(253, 184, 19)); | |
SpecialPlane parPlane = new SpecialPlane(1, 0.5, new PVector(246, 139, 31)); | |
SpecialPlane obPlane = new SpecialPlane(0.5, 0.3, new PVector(241, 112, 34)); | |
VPlane vertPlane = new VPlane(-0.4, new PVector(238, 246, 108)); | |
boolean[] visible = {true, true, true, true, true}; // which parts of the cone are visible | |
float rotY = 0, rotX = 0; | |
PVector[][] ps = generatePoints(100); | |
void setup() { |
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
#include <iostream> | |
#include <cassert> | |
using namespace std; | |
struct node { | |
int value; | |
node* left; | |
node* right; | |
node *parent; |
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
#include <iostream> | |
#include <stack> | |
#include <algorithm> | |
using namespace std; | |
struct node { | |
int value; | |
node* left; | |
node* right; |
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
# 1) for m in 0..n compute g_s(z_m) = mex{g(Z_i_1) xor ... xor g(z_i_j) : 0 <= i_1 < .. < i_j < m, j <=s} | |
import itertools | |
import operator | |
n = 8 | |
s = 3 # s = d - 2 | |
def pack(idxs, n): | |
return [int(i in idxs) for i in xrange(n)] |
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
template <typename T> | |
using minheap = priority_queue<T, vector<T>, greater>; | |
vector<int> kwaymerge(vector<vector<int>>& vs) { | |
int k = vs.size(); | |
vector<int> readcount(k, 0); | |
vector<int> res; | |
vector<pair<int, int>> vec; | |
for (int i = 0; i < k; i++) { | |
if (vs[i].size() > 0){ |
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
% Generate the points | |
clf | |
subplot(2,1,1); | |
axis equal | |
mu1 = [5 4]'; | |
sigma1 = [2 -0.8; -0.8 1]; | |
mu2 = [0 1]'; | |
sigma2 = [1 -0.06;-0.06 0.5]; | |
chol(sigma1); | |
chol(sigma2); % verifica definida positiva |
NewerOlder