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
| import Control.Monad | |
| import Network | |
| import System.IO | |
| import System.Time | |
| main = withSocketsDo $ do | |
| sock<-listenOn (PortNumber 8001) | |
| forever (serve sock) | |
| serve sock = do |
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 <png++/png.hpp> | |
| int main(void) | |
| { | |
| png::image<png::rgb_pixel> image(256,256); | |
| for(size_t y=0; y<image.get_height(); ++y) | |
| for(size_t x=0; x<image.get_width(); ++x) | |
| image[y][x] = png::rgb_pixel(x,y,(x+y)/2); | |
| image.write("test.png"); | |
| return 0; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <wiringPi.h> | |
| #include <iostream> | |
| using namespace std; | |
| static const int PIN = 0; | |
| void onInterrupt(void) | |
| { | |
| cout<< "onInterrupt"<< endl; | |
| } |
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 <winsock2.h> | |
| #include <windows.h> | |
| #include <ws2tcpip.h> | |
| #include <string> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <ctime> | |
| #include <thread> | |
| #include <chrono> | |
| #include <list> |
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
| #!/usr/bin/python | |
| #-*- Coding:UTF-8 -*- | |
| import xml.sax | |
| import xml.sax.handler | |
| class gml_handler(xml.sax.handler.ContentHandler): | |
| def __init__(self): | |
| self.curves = [] | |
| self.railroad_sections = [] |
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 <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netdb.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <iostream> | |
| using namespace std; | |
| int main(void) |
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
| (defpackage :BCM2835 | |
| (:use :FFI) | |
| (:export :init | |
| :close | |
| :gpio-fsel | |
| :gpio-write | |
| :gpio-lev | |
| :gpio-set | |
| :gpio-clr | |
| :delay |
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 <string.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <sys/socket.h> | |
| #include <netdb.h> | |
| #include <errno.h> | |
| #define GNU_SOURCE | |
| #include <signal.h> |