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 --git a/evdns.c b/evdns.c | |
index a1636a1..6f453da 100644 | |
--- a/evdns.c | |
+++ b/evdns.c | |
@@ -3068,7 +3068,7 @@ search_request_new(struct evdns_base *base, struct evdns_request *handle, | |
handle->search_index = 0; | |
} | |
EVUTIL_ASSERT(handle->search_origname == NULL); | |
- handle->search_origname = mm_strdup(name); | |
+ handle->search_origname = mm_strdup(name); // XXX need retval check? |
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
#define CATCH_CONFIG_MAIN | |
#include "catch.hpp" | |
TEST_CASE( "compare/long_to_unsigned_x", "Should compile fine." ) | |
{ | |
long long_var = 1L; | |
unsigned char unsigned_char_var = 1; | |
unsigned short unsigned_short_var = 1; | |
unsigned int unsigned_int_var = 1; | |
unsigned long unsigned_long_var = 1L; |
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 <fstream> | |
#define BUFFER_SIZE 1024 | |
class popen_streambuf : public std::streambuf { | |
public: | |
popen_streambuf() | |
: _fp(NULL) |
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
// | |
// Compile: | |
// CXXFLAGS=-lblkid make hdio | |
// Run: | |
// sudo ./hdio /dev/<device> | |
// | |
// Author: Jardel Weyrich (jweyrich at gmail dot com) | |
// | |
#include <blkid/blkid.h> |
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
@interface SenTestCase : NSObject | |
@end | |
@interface SpecificSenTestCase : SenTestCase | |
@property (nonatomic, assign) NSUInteger param; | |
@end | |
typedef void (^DTSenTestCaseBlock)(SenTestCase *testCase); | |
@interface Impl : NSObject |
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
package ...; | |
import br.com.caelum.vraptor.tasks.Task; | |
import javax.inject.Inject; | |
import org.hibernate.HibernateException; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
package ...; | |
import br.com.caelum.vraptor.ioc.ApplicationScoped; | |
import br.com.caelum.vraptor.ioc.Container; | |
import br.com.caelum.vraptor.tasks.scheduler.Scheduled; | |
import br.com.caelum.vraptor.tasks.Task; | |
import java.util.List; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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 <stdio.h> | |
#include <stdarg.h> | |
void outputf(int level, const char *format, ...) { | |
FILE *stream = stdout; | |
static const int tab_size = 4; | |
const int width = level * tab_size + 1; | |
va_list args; | |
va_start(args, format); |
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
// | |
// Compile and run: | |
// LDFLAGS="-lpcre" make pcre_ucp_test && ./pcre_ucp_test | |
// | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pcre.h> |
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
x=0,y=0,z=0 | |
rootNode = 50, 50, 0 (world = 50,50,0) | |
card2 = 10, 0, 0 (world = 60,50,0) | |
salvou x=0,y=0,z=0 | |
salvou x=50,y=50,z=0 | |
OlderNewer