Skip to content

Instantly share code, notes, and snippets.

Function dot_match(ByVal x0 As Double, ByVal y0 As Double, Polygon As Range) As Boolean
Dim r, j As Integer
Dim c As Boolean
c = False
j = Polygon.Rows.Count
With Polygon
For r = 1 To .Rows.Count
If ((((.Cells(r, 2) <= y0) And (y0 < .Cells(j, 2))) Or ((.Cells(j, 2) <= y0) And (y0 < .Cells(r, 2)))) _
@Modosip
Modosip / Dot in Polygon Java Script
Last active October 29, 2019 09:06
The dot with coordinates X,Y is IN or OUTSIDE the polygon
var x = -40;
var y = -60;
var xp = new Array(-73,-33,7,-33); // Массив X-координат полигона
var yp = new Array(-85,-126,-85,-45); // Массив Y-координат полигона
function inPoly(x,y){
npol = xp.length;
j = npol - 1;
var c = 0;
for (i = 0; i < npol;i++){
if ((((yp[i]<=y) && (y<yp[j])) || ((yp[j]<=y) && (y<yp[i]))) &&
@Modosip
Modosip / gist:c6149679b333e5ed2389a8a3860e09bc
Created September 13, 2019 18:27
New Array from First minus Second #Array #JavaScript #Filter #includes
function gooseFilter (birds) {
//birds - first array
var geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"];
// except value (second array)
return birds.filter(b => !geese.includes(b));
};
//return clear array
https://codepen.io/BretCameron/pen/eXJVva
/*HTML
<h1>This is an example title</h1>
/*CSS
h1 {
mix-blend-mode: color-dodge;
font-family: Candara;
font-size: 5rem;
text-align: center;
@Modosip
Modosip / gist:5f563f89bf0e0cdbc25484b18690af5d
Created April 12, 2019 08:59
Animation with Cropped Images
https://codepen.io/modosip/pen/vMZRXN
/*HTML
<input type="checkbox" />
<br />
<img src="https://source.unsplash.com/random/1920x1080" alt="Random" />
/*CSS
input {
transform: scale(1.5);
margin: 10px 5px;
https://codepen.io/RenanB/pen/GZeBNg
/*HTML
<div class="block">
<img src="https://unsplash.it/1920/1920/?image=1005" data-speed="-1" class="img-parallax">
<h2>Parallax Speed -1</h2>
</div>
<div class="block">
<img src="https://unsplash.it/1920/1920/?image=1067" data-speed="1" class="img-parallax">
<h2>Parallax Speed 1</h2>
</div>
/* HTML
div class="wrapper">
<h1>Scroll Down</h1>
<div class="parallax-img"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia n
/*HTML
<h1>Checklist</h1>
<ul class="complete">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ul class="incomplete">
/* HTML
<div class="img-wrapper">
<img class="inner-img" src="https://source.unsplash.com/random/400x400" />
</div>
<!-- Additional examples -->
<div class="img-wrapper">
<img class="inner-img" src="https://source.unsplash.com/random/401x401" width="400px" height="400px" />
</div>
/*HTML
<div id="document">
<main>
<h1>Everything apart from the footer goes here</h1>
<p>Add more text here, to see how the footer responds!</p>
</main>
<footer>
<h1>The footer goes here</h1>
</footer>
</div>