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 FooBar | |
{ | |
public: | |
FooBar(); | |
~FooBar(); | |
}; | |
FooBar::FooBar() |
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 "FooBar.hpp" | |
FooBar::FooBar() | |
{ | |
std::cout << "constructor" << std::endl; | |
} | |
FooBar::~FooBar() | |
{ |
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 FooBar | |
{ | |
public: | |
FooBar() { | |
std::cout << "bar"; | |
} | |
~FooBar() { | |
std::cout << "foo"; | |
} | |
} |
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 <string> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc < 2) { | |
std::cerr << "Usage: " << argv[0] << " <word>" << std::endl; | |
return EXIT_FAILURE; | |
} | |
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
Thread 2 (Thread 8017131c0 (LWP 100116)): | |
#0 0x000000080195b2ba in __error () from /lib/libthr.so.3 | |
#1 0x000000080195afac in __error () from /lib/libthr.so.3 | |
#2 0x0000000801955f6a in pthread_mutex_getyieldloops_np () from /lib/libthr.so.3 | |
#3 0x0000000801956829 in pthread_mutex_trylock () from /lib/libthr.so.3 | |
#4 0x00000008012f79e9 in _malloc_prefork () from /lib/libc.so.7 | |
#5 0x00000008012fa031 in calloc () from /lib/libc.so.7 | |
#6 0x0000000801955d54 in pthread_mutexattr_init () from /lib/libthr.so.3 | |
#7 0x0000000801956001 in pthread_mutex_getyieldloops_np () from /lib/libthr.so.3 | |
#8 0x0000000801956829 in pthread_mutex_trylock () from /lib/libthr.so.3 |
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
Program received signal SIGINT, Interrupt. | |
[Switching to Thread 8017131c0 (LWP 100097)] | |
0x00000008019a02ba in __error () from /lib/libthr.so.3 | |
(gdb) bt | |
#0 0x00000008019a02ba in __error () from /lib/libthr.so.3 | |
#1 0x000000080199ffac in __error () from /lib/libthr.so.3 | |
#2 0x000000080199af6a in pthread_mutex_getyieldloops_np () from /lib/libthr.so.3 | |
#3 0x000000080199b829 in pthread_mutex_trylock () from /lib/libthr.so.3 | |
#4 0x00000008012f79e9 in _malloc_prefork () from /lib/libc.so.7 | |
#5 0x00000008012fa031 in calloc () from /lib/libc.so.7 |
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
$ php test.php | |
array(3) { | |
["version"]=> | |
string(1) "3" | |
["eof"]=> | |
string(1) "^" | |
["eor"]=> | |
string(1) "~" | |
} | |
array(6) { |
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
<?php | |
define("PARSING_HEADER", 1); | |
define("PARSING_DEFINITION", 2); | |
define("PARSING_DATA", 3); | |
define("PARSING_END", 4); | |
$fp = fopen("file.txt", "r"); | |
$state = 0; |
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
while (zmq_term(ctx, ZMQ_NOBLOCK)) { | |
if (errno == EAGAIN) { | |
// still sending | |
} | |
else { | |
// can't send messages | |
} | |
} |
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
make[2]: Entering directory `/tmp/zeromq2/src' | |
source='clock.cpp' object='libzmq_la-clock.lo' libtool=yes \ | |
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \ | |
/bin/bash ../libtool --tag=CXX --mode=compile /opt/sunstudio12.1/bin/CC -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -g -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo './'`clock.cpp | |
libtool: compile: /opt/sunstudio12.1/bin/CC -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -g -c clock.cpp -KPIC -DPIC -o .libs/libzmq_la-clock.o | |
"/opt/sunstudio12.1/prod/include/cc/stddef.h", line 51: Error: "unsigned" has already been included in this declaration. | |
"/opt/sunstudio12.1/prod/include/cc/stddef.h", line 51: Error: A declaration does not specify a tag or an identifier. | |
"/opt/sunstudio12.1/prod/include/cc/stddef.h", line 51: Error: Use ";" to terminate declarations. | |
"/opt/sunstudio12.1/prod/include/cc/stddef.h", line 51: Error: A declaration does not specify a tag or an identifier. | |
"/opt/sunstud |
OlderNewer