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
function is_url(url_str) { | |
// Regular Expression for URL validation created by Diego Perini | |
//from https://gist.github.com/dperini/729294 | |
// Author: Daniel L. Lacerda | |
// Created: 2018/09/21 | |
// Updated: - | |
// License: MIT | |
let isValidURL = new RegExp( |
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 | |
// Author: Daniel L. Lacerda | |
// Created: 2018/10/05 | |
// Updated: - | |
// License: MIT | |
/* | |
* Reads the first bytes of the image file and checks its signature are true|false for that file extension | |
* | |
* @param actual $file | |
* @param string $fileExtension |
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 | |
/* | |
* Reads some part of the bytes of an audio|video file and checks if its signature are true|false for that file extension | |
* | |
* @param actual $file | |
* @param string $fileExtension | |
* @return boolean | |
**/ | |
function check_AVfile_signature($file, $fileExtension) { | |
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
~*~ | |
/@\ ∧ ∧ / ̄ ̄ ̄ ̄ ̄ | |
/%;@\ (,ºyº)< Boas Festas! Miau! | |
o/@,%\o ⊂ ;⊃ \_____ | |
/%;`@,\ ~|/ \ | |
'^^^H^^^` L J |
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
// Daniel Shiffman | |
// http://codingtra.in | |
// http://patreon.com/codingtrain | |
//Videos | |
//Part 1: | |
//https://www.youtube.com/watch?v=OJxEcs0w_kE | |
//Part 2: | |
//https://www.youtube.com/watch?v=QQx_NmCIuCY | |
//This code is part 2 video of the challenge. |
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
String neko = "ネコ"; // neko (even it is only showing boxes on IDE) | |
void setup() { | |
size(400, 300); | |
textSize(18); | |
fill(0); | |
textFont(createFont("NSimSun", 30)); | |
float x_offset = textWidth(neko)/2; | |
text(neko, (width/2)-x_offset, height/2); //show text in the middle of the screen | |
} |
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
//@author u/thudly | |
//https://www.reddit.com/r/processing/comments/da6l10/munchers_and_poopers_a_very_inefficient_3d_noise/ | |
//modified by Volfegan | |
int n = 12; | |
int wCount = 6 * n; // number of walkers. should be a multiple of 6 | |
Walker[] walkers = new Walker[wCount]; | |
boolean showFrameRate = true; | |
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
//visual output: https://twitter.com/VolfeganGeist/status/1205621889416208384 | |
//reference code for some of the effects used: https://twitter.com/ky0ju_art/status/1175391601121611776 | |
//attempt to recreate: https://twitter.com/Borrachas/status/1204855395006763009 | |
float a, b, c=0, x, y, d, r=600*2, h=600/2, s=40; | |
void setup() { | |
size(600, 600); | |
} | |
void draw() { | |
background(#EFF2D0); | |
for (x=0; x<=r; x+=s*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
//reference code for solution of perfect Spiral: | |
//https://gist.github.com/chandeeland/b69156115e2b5842d83ca9eb3b2bbf2e | |
//failed trial:: https://gist.github.com/volfegan/e55decad6814e63fb450379c9bf13a61 | |
//attempt to recreate: https://twitter.com/Borrachas/status/1204855395006763009 | |
float a, b, x, y, d, h=600/2, r, s, shrink=0.94; | |
void setup() { | |
size(600, 600); | |
} | |
void draw() { | |
background(#EFF2D0); |
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
//based on https://www.openprocessing.org/sketch/816944 | |
//somewhat inspired by https://codepen.io/al-ro/pen/BaaBage?editors=1010 | |
//resources http://mathworld.wolfram.com/HeartCurve.html | |
ArrayList<Node> arrayNodes = new ArrayList<Node>(); | |
float scaleDiv = 50; //scale the size of the heart | |
void setup() { | |
size(720, 720); | |
colorMode(HSB, 100); | |
strokeWeight(2); | |
translate(width/2, height/2); |
OlderNewer