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
to determine the intersection point of 3 planes in R^3: | |
if the 3 planes are specified using 4-component vectors a,b,c (a * v = 0 if the homogeneous vector v is on plane a, etc) | |
build the 4x4 matrix | |
( | |
x y z w | |
a^T | |
b^T |
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
bool hasCycle( Element *head ) { | |
Element *guard = head; | |
Element *current = head; | |
bool updateGuard = false; | |
while( current ) { | |
current = current->next; | |
if( current == guard ) { | |
return true; | |
} | |
if( updateGuard ) { |
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
void drawEighthOfCircle( int radius ) { | |
int y = radius; | |
int x = 0; | |
// invariant: radius^2 <= x^2 + y^2 < (radius+1)^2 | |
int maxLength = (radius+1)*(radius+1); | |
while( x <= y ) { | |
setPixel( x, y ); | |
x++; |
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
to determine the intersection line of two planes | |
planes A, B given by R^4 vectors, so that A*x = 0 if x on A, x homogeneous in R^4. | |
det( A, B, *, * ) is the solution space of all intersection vectors in R^4. | |
det( A, B, (0 0 0 1), * ) is the solution space of the direction vector d. extract it by pulling it into a R^4 vector d = (* 0). | |
det( A, B, *, d ) is the solution space of a point on the line. extract it by pulling it into a R^4 vector s. |
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
// ---- | |
// Sass (v3.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
feature-info { | |
shadowing: feature-exists(global-variable-shadowing); | |
} | |
$var: red; |
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
// ---- | |
// Sass (v3.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
feature-info { | |
shadowing: feature-exists(global-variable-shadowing); | |
} | |
$var: red; |
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 first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
<table class="mytable"> | |
<tfoot> | |
<tr> | |
<td class="mytd"> | |
Hello | |
</td> | |
</tr> | |
</tfoot> | |
</table> |
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
<table class="mytable"> | |
<tfoot> | |
<tr> | |
<td class="mytd"> | |
Hello | |
</td> | |
</tr> | |
</tfoot> | |
</table> |
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
<table class="mytable"> | |
<tfoot> | |
<tr> | |
<td class="mytd"> | |
Hello | |
</td> | |
</tr> | |
</tfoot> | |
</table> |
OlderNewer