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
# - Try to find MySQL. | |
# Once done this will define: | |
# MYSQL_FOUND - If false, do not try to use MySQL. | |
# MYSQL_INCLUDE_DIRS - Where to find mysql.h, etc. | |
# MYSQL_LIBRARIES - The libraries to link against. | |
# MYSQL_VERSION_STRING - Version in a string of MySQL. | |
# | |
# Created by RenatoUtsch based on eAthena implementation. | |
# | |
# Please note that this module only supports Windows and Linux officially, but |
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 <stdlib.h> | |
#include <string.h> | |
#include "stack.h" | |
typedef struct StackNode { | |
StackItem item; /** The data of this node. **/ | |
struct StackNode *next; /** The next node (the one below the top). **/ | |
} StackNode; | |
struct Stack { |
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
/* | |
* Implementation of the benchmark tool. | |
*/ | |
#include "benchmark.h" | |
#ifndef __cplusplus | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "benchmark/benchmark.h" | |
#include "c/stack.h" | |
void test_func(void *data, size_t numBytes) | |
{ | |
Stack *stack = stackCreate(); | |
char *testData = (char *) data, *p; |
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 <cstdlib> | |
#include <cstring> | |
#include <stack> | |
#include "benchmark/benchmark.h" | |
void test_func(void *data, size_t numBytes) | |
{ | |
std::stack<char> myStack; | |
char *testData = (char *) data, *p; |
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
inline bool isNondigit(int digit) | |
{ | |
if(digit == 'ç') | |
return true; | |
else | |
return false; | |
} | |
void func() | |
{ |
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
<!doctype html> | |
<html> | |
<head> | |
<title>NVD3 scatter chart example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" | |
content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | |
<!-- Compatibility with older browsers. --> | |
<script src="../bower_components/webcomponentsjs/webcomponents.min.js"></script> |
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
/* | |
* Replace the original nv.toltip.cleanup function to fix shadow DOM issues. | |
* This is based on naunga's work at https://github.com/naunga/polychart-element | |
* I do not submit this as a pull request to nvd3 because it needs shadow DOM | |
* support or polyfill to work correctly, what nvd3 doesn't use. | |
**/ | |
(function(){ | |
nv.tooltip.cleanup = function() { | |
// Find the tooltips, mark them for removal by this class (so others cleanups won't find it) | |
var tooltips = document.querySelectorAll('body /deep/ .nvtooltip'); |
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
// Print an unsigned byte (8 bits) in binary digits. | |
void print_accu(unsigned char accu) { | |
int i, j; | |
for(i = 0x80, j = 0; j < 8; i /= 2) | |
putchar('0' + ((accu & i) >> (7 - j++))); | |
} |
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
/** | |
* Calls the functions from the behaviors in order and then the function | |
* from the element, if it exists. | |
*/ | |
_inheritanceCall: function(name) { | |
var args = arguments.slice(1); | |
for(b in this.behaviors) { | |
b[name].apply(this, args); | |
} |
OlderNewer