Skip to content

Instantly share code, notes, and snippets.

View View.php
<?php
/**
* View rendering logic.
*
* @author Pawel Wiaderny <pawel.wiaderny@gmail.com>
*/
class View
{
/**
View checkpoint_beat_TheForce.glsl
void main() {
vec2 pos = uv(); // origin is in center
// who remembers SOH CAH TOA ?
// tan, given an angle will return the ratio
// so if we only have the ratio of position
// we use atan to get the angle
float angle = atan(pos.y/abs(pos.x+0.01));
// we take the absolute value of x and add a small number to avoid
View Changed Paths
x86_64-linux tests.nixos-functions.nixos-test
@rvasilevsk
rvasilevsk / php_errors.php
Created Jul 5, 2020
[php errors] #php #err
View php_errors.php
error_reporting(E_ALL);
ini_set('display_errors', 1);
View AdjustablePillsInflator.java
public void inflate(Context context,
double maxAvailableWidthScaleFactor,
LinearLayout containerView,
int selectOptionInflaterLayout,
int optionTextViewId,
List<String> pillTitles,
View.OnClickListener optionSelectionListener) {
List<LinearLayout> layouts = new ArrayList<>();
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
View otsus_thresholding.py
image = cv2.imread('book_page_1_cropped.jpg', 0)
ret, th = cv2.threshold(gray,
0, # threshold value, ignored when using cv2.THRESH_OTSU
255, # maximum value assigned to pixel values exceeding the threshold
cv2.THRESH_BINARY + cv2.THRESH_OTSU)
@upsharma8
upsharma8 / ReadingWritingFiles.ipynb
Created Jul 5, 2020
Created on Skills Network Labs
View ReadingWritingFiles.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Steps
0 -> [1,2]
2 -> [3,4]
(currentNode, currentPath, paths)
0, "", []
-> {1,2}
-> (1, 0, [])
-> XXXXXX paths = [01]
-> (2, 0, [01])
-> {3,4}
@mattbis
mattbis / one-liners
Created Jul 5, 2020
my-twitter-like-github-one-liners
View one-liners
99% of services and apps are terrible.
You can’t perform that action at this time.