Compare commits

...

10 Commits

7 changed files with 94 additions and 0 deletions

Binary file not shown.

5
tech/FreeRTOS.wiki Normal file
View File

@ -0,0 +1,5 @@
= FreeRTOS =
The free Real time operating system

20
tech/PHP.wiki Normal file
View File

@ -0,0 +1,20 @@
= PHP =
Php is an older, dynamically typed language for making web applications
== Tips and tricks ==
=== Get the address of the connecting party ===
`$_SERVER['REMOTE_ADDR']`
That will show the proxy IP if they are using a proxy. To try and bypass that,
we can try
`$_SERVER['HTTP_X_FORWARDED_FOR']`
== Syntax ==
* All varaibles begin with a dollar sign ($)
* if statement syntax is the same as c-likes

View File

@ -3,6 +3,7 @@
== Conceptual ==
* [[error_handling]]
* [[names_in_code]]
== Libraries ==

View File

@ -60,4 +60,8 @@ Also see [[Ham]]
* [[SPI]]
== Software ==
* [[FreeRTOS]]
[[index]]

View File

@ -84,3 +84,46 @@ This method will output the _probability of a given outward direction_
Something like `probability of happening = f(incoming direction, point, outgoing direction)`.
This is known as the _Bidirectional reflectance distribution function (BRDF)_.
What about materials that reflect some light allow some right through
(transmitted).
Properties of a transparent material
* Helmholtz-reciprocity
* direction of the ray of light can be reveresd
* This means the odds of the light bouncing from A to B are the same as the
odds of boucing B to A
* Positivity
* It is impossible for an exit direction to have a negative probability
* Energy conservation
* An object may reflect OR absorb incoming light, but no more light can come
out than the incoming amount
== Rendering equation ==
Sum of all light reflections and absorbtions at a point
Note that an object can emit light itself. It also receives light from
different directions, which it will either reflect or absorb. Therefore
`Light exiting = Emitted light + reflected incoming light`
AKA
{{{
Light output(x, vector w) = Light emitted(x, vector w)
+ Integral of (Light incoming to x from vector w * BRFD(vector w, x vector w
prime) cos theta dw
}}}
Problems with above
* The exitant radiance of a point x depends on the incoming radiance of every
other point, which also depends on x
* We cannot solve this integral in closed form
* The integral is infinite dimensional
* It is singular
We simply dont know enough to even start

21
tech/names_in_code.wiki Normal file
View File

@ -0,0 +1,21 @@
= Names in Code =
Standards and conventions for naming stuff, in code
1) Dont abbreviate names
* Abbreviation relies on context. Context you may not have re-reading your
code
2) Dont put types in variable names
* Thats a Windows.h C99 moment
3) Add units to variables unless the type tells you
* IE a delay function takes a paramater _delaySeconds_, not just _delay_.
* If you have a unit like `chronos::timespan`, however, you dont need that
4) Dont put types in your types
* IE AbstractX, BaseX, etc...
* If you need to to this, maybe try renaming the child class instead to be
more specific
5) Refactor if you find yourself naming code "utils" or "helper"
* 99% of the time those utils can be broken into their own classes
* This is true even if you have a 'utils' type function just for Cookies,
Math, etc