View close_window_by_title.cpp
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
#include <windows.h> | |
#include <iostream> | |
int main(int argc, char* argv[]) { | |
if (argc <= 1) { | |
std::cerr << "ERROR: Please, specify the window title to close" << std::endl; | |
return EXIT_FAILURE; |
View sdl2_opengl.cpp
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
#include <iostream> | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.h> | |
constexpr int SCREEN_WIDTH = 800; | |
constexpr int SCREEN_HEIGHT = 600; |
View gist:2022feebc2988a51e195a624a387a641
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
wget --post-file=soaprequest.xml --header="Content-Type: application/soap+xml" --header="SOAPAction: \"soapaction\"" http://myhost:my_port_number/service/great.do -O response.xml | |
Where: | |
soaprequest.xml - contains the soap request (wrapped in SOAP envelop). | |
http://myhost:my_port_number/service/great.do - service endoint URL | |
response.xml - contains a response from the server |
View Server.java
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.util.stream.Collectors; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import com.sun.net.httpserver.HttpServer; |
View cpp
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
// #include <sys/socket.h> | |
#include <Winsock2.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <iostream> | |
#include <cstdio> | |
#include <algorithm> |
View file-utils.cpp
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
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
std::vector<std::string> utils::files::readLines(const std::string& filename) { | |
std::ifstream ifs(filename); | |
std::vector<std::string> lines; |
View SDL2 init
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
#include <cstdio> | |
#include <iostream> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
using namespace std; | |
int main(int argv, char* argc[]) { |
View sdl2-2d-plazma
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
#include <iostream> | |
#include <cmath> | |
#include <SDL2/SDL.h> | |
constexpr int SCREEN_WIDTH = 800; | |
constexpr int SCREEN_HEIGHT = 600; | |
// SDL stuff | |
void init_sdl(); |
View sdl_sample.cpp
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
#include <iostream> | |
#include <SDL2/SDL.h> | |
constexpr int SCREEN_WIDTH = 800; | |
constexpr int SCREEN_HEIGHT = 600; | |
int main(int argc, char *argv[]) { | |
if (SDL_Init( SDL_INIT_VIDEO) < 0) { |
View build.xml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="my project" default="copyStatic"> | |
<property name="INSTALL_ROOT" value="s:/tools/apache-tomcat-8.0.3/webapps/myproject" /> | |
<property name="tomcat.home" value="s:/tools/apache-tomcat-8.0.3" /> | |
<target name="copyStatic"> | |