This file contains hidden or 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
| uniform sampler2D u_scene_tex; | |
| in vec2 v_tex; | |
| out vec4 fragcolor; | |
| void main() { | |
| fragcolor = texture(u_scene_tex, v_tex) * 0.186315; | |
| fragcolor += texture(u_scene_tex, v_tex + vec2(0.0, 0.00208333)) * 0.168585; | |
| fragcolor += texture(u_scene_tex, v_tex - vec2(0.0, 0.00208333)) * 0.168585; | |
| fragcolor += texture(u_scene_tex, v_tex + vec2(0.0, 0.00416667)) * 0.124891; | |
| fragcolor += texture(u_scene_tex, v_tex - vec2(0.0, 0.00416667)) * 0.124891; | |
| fragcolor += texture(u_scene_tex, v_tex + vec2(0.0, 0.00625)) * 0.0757501; |
This file contains hidden or 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
| #include <swnt/Effects.h> | |
| #include <swnt/effects/Mist.h> | |
| template<class T> | |
| inline bool intersect(const Vec3<T>& p0, const Vec3<T>& p1, const Vec3<T>& p2, const Vec3<T>& p3, Vec3<T>& result) { | |
| Vec3<T> s1 = p1 - p0; | |
| Vec3<T> s2 = p3 - p2; | |
| float s, t; | |
| s = (-s1.y * (p0.x - p2.x) + s1.x * (p0.y - p2.y)) / (-s2.x * s1.y + s1.x * s2.y); |
This file contains hidden or 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
| size_t weather_write_data(void* ptr, size_t size, size_t nmemb, void* str) { | |
| std::string* s = static_cast<std::string*>(str); | |
| std::copy((char*)ptr, (char*)ptr + (size + nmemb), std::back_inserter(*s)); | |
| return size * nmemb; | |
| } | |
| std::string weather_download_yahoo_rss() { | |
| std::string result; | |
| std::string url = "http://weather.yahooapis.com/forecastrss?w=10242&u=c"; // w=10242 is Aberaron |
This file contains hidden or 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
| #!/bin/sh | |
| # Compiling nginx + php + mysql on Mac OSX 10.9 | |
| # --------------------------------------------- | |
| # | |
| # | |
| # CONFIGURE | |
| # --------------- | |
| # 1) Edit `conf/nginx.conf` and add this to the between the server { ... } config. | |
| # NOTE: the current config you only need to uncomment the example that looks like this, |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| void triangulate(float* a, float* b, int n); | |
| void backsubst(float* a, float* b, int n); | |
| void print(float* a, int rows, int cols); | |
| int main() { | |
| printf("\nGauss Seidel Elimination - Ch. 10 - Direct Solution of Linear Equation, page 204, An Introduction To Numerical Methods in C++\n\n"); |
This file contains hidden or 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
| #!/bin/sh | |
| # Compiling nginx + php + mysql on Mac OSX 10.9 | |
| # --------------------------------------------- | |
| # | |
| # | |
| # CONFIGURE | |
| # --------------- | |
| # 1) Edit `conf/nginx.conf` and add this to the between the server { ... } config. | |
| # NOTE: the current config you only need to uncomment the example that looks like this, |
This file contains hidden or 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
| #!/bin/sh | |
| # Compiling nginx + php + mysql on Mac OSX 10.9 | |
| # --------------------------------------------- | |
| # | |
| # | |
| # Configure nginx | |
| # --------------- | |
| # Add this to the between the server { ... } config: | |
| # |
This file contains hidden or 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
| #!/bin/sh | |
| # Compiling nginx + php + mysql on Mac OSX 10.9 | |
| # --------------------------------------------- | |
| # | |
| # | |
| # Configure nginx | |
| # --------------- | |
| # Add this to the between the server { ... } config: | |
| # |
This file contains hidden or 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
| #!/bin/sh | |
| # Compiling nginx + php + mysql on Mac OSX 10.9 | |
| # --------------------------------------------- | |
| # | |
| # | |
| # Configure nginx | |
| # --------------- | |
| # Add this to the between the server { ... } config: | |
| # |
This file contains hidden or 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
| #include <assert.h> | |
| #include <GLFW/glfw3.h> | |
| #include <swnt/GUI.h> | |
| GUI::GUI() | |
| :win_w(0) | |
| ,win_h(0) | |
| { | |
| } |