Index

SchoolNotes

  1. CS225
    1. Introduction
    2. Lesson 1
    3. Lesson 2
    4. Lesson 3
    5. Lesson 4
  2. CS251
    1. The Beginning
  3. CS180
    1. Introduction
    2. Midterm Revision
    3. Finals Revision
    4. CS251
    5. Memory
    6. ELF Format
    7. History of Computers
    8. Stuff to Research
    9. Quiz To-Do
    10. OS Architectures
    11. Week 3
    12. Week 4
    13. Week 5
    14. Week 6 (Threads)
    15. Week 7 (Scheduling)
    16. Week 8 (Thread Scheduling)
    17. Week 9 (Memory Management)

OLD SHIT

  1. CS225 (OLD ONE IGNORE THIS)
    1. OOP
      1. Inheritance
      2. R-Value References
    2. Misc Notes
    3. Size/Offsets of Structs/Classes
    4. Week 4
  2. CS200 (IGNORE THIS TOO)
    1. Introduction
    2. Scan Conversion
    3. Quiz 01
  3. GAM200 (YEAH, IGNORE THIS TOO)
    1. Notes

Misc Notes

Misc Notes



ONLY Misc Notes are written here!

http://stackoverflow.com/questions/7127759/branch-on-operator (Ternary operator efficiency)
http://stackoverflow.com/questions/9476974/why-should-we-use-a-friend-function-to-define-the-comparison-operator (Why we should use friend for comparison)
union is default public accessible
destruction is reverse of construction

void foo(float x, float y)
{
    int p = (int) x;
    int * p1 = reinterpret_cast<int*>(&x);
    int * p2 = reinterpret_cast<int*>(&y);
    std::cout<<(*p1<*p2)==(x,y)<<std::endl; //THIS ALWAYS HOLDS because FPU checks are always the same as integer checks
    //However this entire thing breaks if it's an unsigned int.
}