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
;-- Language mappings from word! to integer! for IDEone | |
;-- | |
;-- adapted from: https://ideone.com/faq | |
;-- (supported languages subsection) | |
;-- | |
;-- Capture made on 18-Mar-2014 by @HostileFork | |
[ | |
ada 7 ; gnat-4.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
;; https://github.com/red/red/issues/941 | |
red>> foo: function [] [a: 10 b: 20 return [a b]] | |
== func [/local a b][a: 10 b: 20 return [a b]] | |
red>> reduce foo | |
;-- skip console boilerplate head code | |
eval: action/native return type: 2 | |
eval: root loop... | |
eval: fetching value of type 20 |
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
Rebmake [ | |
Title: "Rebol Dialected Experiment to represent CMake files" | |
;; See: | |
;; http://curecode.org/rebol3/ticket.rsp?id=2177 | |
;; http://browsenpm.org/package.json#dependencies | |
Needs: [ | |
1.0 | |
cmake 2.8 | |
] |
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
// Test output for | |
// http://stackoverflow.com/questions/26421865/how-many-numbers-with-length-n-with-k-digits-d-consecutively/26426615 | |
when N = 0 and K = 0 and D = 6: | |
Fast way gives 0 | |
Slow way gives 0 | |
when N = 0 and K = 1 and D = 6: | |
Fast way gives 0 | |
Slow way gives 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
// "Fast way" results from code by Pham Trung | |
// ( as of this revision http://stackoverflow.com/revisions/26422842/6 ) | |
// "Slow way" results from the following brute-force C++ code | |
long FSlowCore(int N, int K, int D, vector<int> & digits) { | |
if (N == 0) { | |
auto startPos = find_if(digits.begin(), digits.end(), [](int x) {return x != 0;}); | |
if (startPos != digits.begin()) | |
return 0; | |
if (search_n(startPos, digits.end(), K, D) != end(digits)) { |
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
// Test for http://stackoverflow.com/questions/8455887/stack-object-qt-signal-and-parameter-as-reference/ | |
#include <iostream> | |
#include <QCoreApplication> | |
#include <QTimer> | |
#include "param.h" | |
int main(int argc, char *argv[]) | |
{ |
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
// const-wrapper-test.cpp | |
// | |
// For motivation and argumentation, reference: | |
// http://stackoverflow.com/questions/11167483/deriving-from-a-base-class-whose-instances-reside-in-a-fixed-format-database-m | |
// http://stackoverflow.com/questions/11219159/make-interchangeable-class-types-via-pointer-casting-only-without-having-to-all | |
#include <iostream> | |
#include <cassert> | |
#include "const-wrapper.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 <QApplication> | |
#include "mainwindow.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
MainWindow w; | |
w.show(); | |
return a.exec(); |
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
// http://stackoverflow.com/questions/13552057/c-vector-access-violation-when-trying-to-write | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class gen { | |
public: | |
int basa_biner; |
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
../src/core/b-boot.c:2917:1: warning: initializer-string for array of chars is too long [-fpermissive] | |
../src/core/b-init.c: In function ‘void Load_Boot()’: | |
../src/core/b-init.c:159:33: warning: invalid conversion from ‘void*’ to ‘REBYTE* {aka unsigned char*}’ [-fpermissive] | |
../src/core/b-init.c: In function ‘void Register_Codec(const REBYTE*, codo)’: | |
../src/core/b-init.c:704:2: warning: invalid conversion from ‘void*’ to ‘ANYFUNC {aka void (*)(void*)}’ [-fpermissive] | |
../src/core/b-init.c: In function ‘void Set_Option_String(REBCHR*, REBCNT)’: | |
../src/core/b-init.c:728:36: warning: invalid conversion from ‘REBCHR* {aka unsigned char*}’ to ‘const char*’ [-fpermissive] | |
../src/core/b-init.c: In function ‘REBCNT Set_Option_Word(REBCHR*, REBCNT)’: | |
../src/core/b-init.c:740:7: warning: invalid conversion from ‘REBCHR* {aka unsigned char*}’ to ‘const char*’ [-fpermissive] | |
../src/core/b-init.c: In function ‘void Init_Main_Args(REBARGS*)’: |
OlderNewer