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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.NetworkInformation; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program |
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 <map> | |
#include <string> | |
#include <vector> | |
#include <boost/algorithm/string.hpp> | |
#include <boost/lambda/lambda.hpp> | |
using namespace std; | |
using namespace boost::lambda; | |
int main() |
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 <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
int main() { | |
std::vector<std::string> symbols = {"IF1209", "IF1210"}; | |
std::vector<const char *> chars(symbols.size()); | |
std::for_each(symbols.begin(), symbols.end(), [](std::string& s) { |
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 <QtCore/QCoreApplication> | |
#include <QtNetwork> | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QNetworkAccessManager manager; | |
QNetworkReply *reply = manager.get(QNetworkRequest(QUrl("http://www.tiexue.net"))); |
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
x1 <- seq(from=1, to=10, by=0.5) | |
x2 <- seq(from=13, to=4, by=-0.5) | |
x <- xts(matrix(c(x1=x1, x2=x2), ncol=2), order.by=Sys.time()+1:length(x1)) | |
colnames(x) <- c("x1", "x2") | |
x$comparison <- sigComparison(label="", data=x, columns=c("x1", "x2"), relationship="gt") | |
x$crossover <- sigCrossover(label="", data=x, columns=c("x1", "x2"), relationship="gt") | |
x$threshold1 <- sigThreshold(label="", data=x, column="x1", threshold=2.3, relationship="gt", cross=T) | |
x$threshold2 <- sigThreshold(label="", data=x, column="x1", threshold=2.3, relationship="gt", cross=F) | |
x |
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
bee <- add.rule( | |
strategy = bee, | |
name='ruleSignal', | |
arguments = list(sigcol="fast.gt.up", | |
sigval=TRUE, | |
orderqty=100, | |
ordertype='market', | |
orderside='long', | |
osFUN='osMaxPos'), |
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
/* | |
This makes some assumptions about your code, for example that you’ve got ownership rules set up properly. If a relationship to another entity uses the cascade deletion rule, it’s considered to be owned by the receiver, and thus will be copied by -deepCopyWithZone:. | |
*/ | |
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
@interface NSManagedObject (RXCopying) <NSCopying> | |
-(void)setRelationshipsToObjectsByIDs:(id)objects; |