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
| def to_string(value) | |
| value.to_s | |
| end |
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<typeinfo> | |
| #include"CTE/CTE.hpp" | |
| auto main ( ) -> int | |
| { | |
| auto eval1 = CTE_EVAL ( "1+20*10/(5+5)" ) ; | |
| auto eval2 = CTE_EVAL ( "1+20*10/(5+5)+.5" ) ; | |
| auto eval3 = CTE_EVAL ( u8R"*****("Hello"+" "+"World")*****" ) ; | |
| std::cout << eval1 << std::endl ; | |
| std::cout << typeid ( eval1 ).name ( ) << std::endl ; | |
| std::cout << eval2 << std::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
| module Helper where | |
| import Database.Persist.TH | |
| import UserModule ( UserDefineType ) | |
| derivePersistField "UserDefineType" |
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 pygame, sys, random | |
| pygame.init() | |
| size = (800,450) | |
| white = (255, 255, 255) | |
| color = (30, 30, 180) | |
| fps = 30 | |
| screen = pygame.display.set_mode(size) | |
| pygame.display.set_caption('lifegame') | |
| cellsize = 8 |
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"TSP/TSP.hpp" | |
| auto main ( ) -> int | |
| { | |
| TSP_PRINTF ( "%c\n" , 'a' ) ; | |
| TSP_PRINTF ( "%s\n" , "hoge" ) ; | |
| TSP_PRINTF ( "%d\n" , 1 ) ; | |
| TSP_PRINTF ( "%f\n" , 0.1 ) ; | |
| TSP_PRINTF ( "%%\n%c\n%s\n%d\n%f\nHello! TSP!\n" , 'e' , "piyo" , 1 , 0.25 ) ; | |
| // TSP_PRINTF ( "%f\n" , "hoge" ) ; // <- Compile Error | |
| } |
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
| void abc(int arg) |
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
| case_ < char >::of | |
| < | |
| match < char , long > , | |
| match < short , int > , | |
| match < int , short > , | |
| match < long , char > , | |
| match < list < pattern < 0 > , double > , list < double , pattern < 0 > > > | |
| >::type // => long |
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"boost/xpresaive/xpresaive.hpp" | |
| namespace bx = boost::xpressive ; | |
| auto main ( ) -> int | |
| { | |
| bx::sregex regex1 = bx::bos >> ( "instance" | + ( bx::range ( 'a' , 'z' ) | bx::range ( 'A' , 'Z' ) ) ) ; | |
| bx::smatch result ; | |
| if ( bx::regex_search ( std::string { "instanceof" } , result , regex1 ) ) | |
| { | |
| std::cout << result.str ( ) << std::endl ; // output : "instance" | |
| } |