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
| netstat -ano | findstr 4000 | |
| taskkill -PID 43804 -f |
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
| /* Catmull-Rom interpolating splines in ES6 | |
| ---- | |
| authors: Nicholas Kyriakides (2017) & Unknown | |
| from: "A class of local interpolating splines" | |
| Catmull, Edwin; Rom, Raphael | University of Utah, 1974 | |
| Barnhill, Robert E.; Riesenfeld, Richard F. (eds.). | |
| Computer Aided Geometric Design. | |
| @summary |
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
| | Image format (sized) | Unsized | Compr | Pixel format | Pixel type | | |
| |---------------------------------------|--------------------|-------|--------------------|-----------------------------------| | |
| | GL_R8 | GL_RED | False | GL_RED | GL_UNSIGNED_BYTE | | |
| | GL_R8_SNORM | GL_RED | False | GL_RED | GL_BYTE | | |
| | GL_R16 | GL_RED | False | GL_RED | GL_UNSIGNED_SHORT | | |
| | GL_R16_SNORM | GL_RED | False | GL_RED | GL_SHORT | | |
| | GL_R32F | GL_RED | False | GL_RED | GL_FLOAT | | |
| | GL_R8I | GL_RED | False | GL_RED_INTEGER | GL_INT | |
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
| enum class format : GLenum { | |
| r = GL_RED, | |
| g = GL_GREEN, | |
| b = GL_BLUE, | |
| rg = GL_RG, | |
| rgb = GL_RGB, | |
| bgr = GL_BGR, | |
| rgba = GL_RGBA, | |
| bgra = GL_BGRA, | |
| r_int = GL_RED_INTEGER, |
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
| // these matrices are for left-handed coordinate systems, with depth mapped to [1;0] | |
| // the derivation for other matrices is analogous | |
| // to get a perspective matrix with reversed z, simply swap the near and far plane | |
| glm::mat4 perspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear, float zFar) { | |
| return glm::perspectiveFovLH_ZO(fov, width, height, zFar, zNear); | |
| }; | |
| // now let zFar go towards infinity | |
| glm::mat4 infinitePerspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear) { |
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
| /** | |
| * | |
| * MIT License | |
| * | |
| * Copyright (c) 2017-2022 Cody Tilkins | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| // Convert a wide Unicode string to an UTF8 string | |
| std::string utf8_encode(const std::wstring &wstr) | |
| { | |
| int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL); | |
| std::string strTo(size_needed, 0); | |
| WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL); | |
| return strTo; | |
| } | |
| // Convert an UTF8 string to a wide Unicode String |
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 <iostream> | |
| #include <chrono> | |
| using namespace std; | |
| int main(void) | |
| { | |
| // unsync the I/O of C and C++. | |
| ios_base::sync_with_stdio(false); |
$ wget -c -m -np -k -p -E -e robots=off 'http://example.com/folder/'
- -c Continue getting a partially-downloaded file
- -m This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings. It is currently equivalent to ‘-r -N -l inf --no-remove-listing’
- -k --convert-links After the download is complete, convert the links in the document to make them suitable for local viewing
- -p This option causes Wget to download all the files that are necessary to properly display a given HTML page
- -E cause the suffix ‘.html’ to be appended to the local filename
- -e robots=off causes it to ignore robots.txt for that domain
- -r makes it recursive
NewerOlder