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 <time.h> | |
signed long getTZ () | |
{ | |
struct tm* timeStruct; | |
time_t timeValBase = 86400; /* I know an implementation in which time_t is unsigned */ | |
time_t timeVal; | |
timeStruct = gmtime(&timeValBase); /* parse as the universal time */ | |
timeVal = mktime(tp); /* intentionally treat as the local time in order to find the time zone */ |
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
diff -ru paco-2.0.9/gpaco/gconfig.h paco-2.0.9-newglib/gpaco/gconfig.h | |
--- paco-2.0.9/gpaco/gconfig.h 2010-06-26 04:51:00.000000000 +0900 | |
+++ paco-2.0.9-newglib/gpaco/gconfig.h 2013-01-08 13:03:12.497896388 +0900 | |
@@ -11,7 +11,7 @@ | |
#include "paco/baseconfig.h" | |
#include <glibmm/ustring.h> | |
-#include <glib/gkeyfile.h> | |
+#include <glib.h> | |
#include <vector> |
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
<NotepadPlus> | |
<UserLang name="HSP" ext="hsp as" udlVersion="2.0"> | |
<Settings> | |
<Global caseIgnored="yes" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments" id="0">00// 00; 01 02 03/* 04*/</Keywords> | |
<Keywords name="Numbers, additional" id="1"></Keywords> | |
<Keywords name="Numbers, prefixes" id="2">0x 0b $ %</Keywords> |
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"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<language name="Hot Soup Processor" section="Sources" version="1.00" extensions="*.hsp;*.as"> | |
<highlighting> | |
<list name="keywords"> | |
<item> await </item> | |
<item> break </item> | |
<item> continue </item> | |
<item> else </item> | |
<item> end </item> |
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> | |
using std::cout; using std::endl; | |
// A class whose instance will be included as a member of a monostate class | |
class CContent { | |
public: | |
CContent() {cout << "CContent constructor" << endl;} | |
~CContent() {cout << "CContent destructor" << endl;} | |
void speak() {cout << "Bonjour le monde !" << endl;} |
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
class Parent { | |
static final int Val = 1; | |
public int getval() { | |
return Val; | |
} | |
} | |
class Child extends Parent { | |
static final int Val = 2; | |
} |
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> | |
class Parent { | |
protected: | |
static const int val = 1; | |
public: | |
virtual int getval() {return val;} | |
}; | |
class Child : public Parent { |
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 <wchar.h> | |
#include <stdlib.h> | |
#include <locale.h> | |
int main() { | |
char* syslocale = getenv("LANG"); | |
const wchar_t teststr[] = | |
L"僕と契約して、" | |
L"プログラマになってよ!"; | |
setlocale(LC_ALL, syslocale); |
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
#ifndef MATRIX_HPP | |
#define MATRIX_HPP | |
#include <array> | |
#include <initializer_list> | |
#define MTXTMP template <typename T, unsigned int rows, unsigned int cols> | |
/* Matrix class template */ | |
MTXTMP class matrix { |
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
fizzbuzz = [f n | n <- [1..]] | |
where | |
f x | |
| x `mod` 15 == 0 = "Fizz Buzz" | |
| x `mod` 5 == 0 = "Buzz" | |
| x `mod` 3 == 0 = "Fizz" | |
| otherwise = show (fromIntegral x) | |
main = do print (take 60 fizzbuzz) |