slycelote / caide Goto Github PK
View Code? Open in Web Editor NEWAutomates certain common tasks that you do during programming competitions
Automates certain common tasks that you do during programming competitions
(duplicates) including more than one custom library with some macroses and typedefs (some may exist in more than one library) leads to appearing of duplicates of macroses and typedefs.
and also all macroses and typedefs aren't grouped together and separated by functions.
i suggest to group all macroses together and remove duplicates and then write them in submission file.
and the same for typedefs.
An example from competitive companion: https://github.com/jmerle/competitive-companion/blob/master/tests/data/facebook-coding-competitions/problem/normal.json
Can we use gcc for windows in caide command line UI??
Right after the solution has just been created, build fails with a link error. Workaround is to build cpplib
project manually or close and reopen the solution.
After a bit of playing around I've found the following workaround (just to use macro in next line):
#define _USE_MATH_DEFINES
_USE_MATH_DEFINES
While workaround is not actually that bad, it may still be unobvious. So probably it's at least advisable to add it to readme or maybe fix it other way if it is possible.
While running caide httpServer and then clicking on the competitive companion, the problem gets parsed successfully, and then if I hit enter to exit, it doesn't exit and the server runs forever, How to stop this???
And How to debug my code when not using visual studio, I generally use print statements to know what is happening but caide doesn't keep execute those cerr statements and hence I cannot debug the code...
So what to do in this case??
Caide have been an extremely helpful tool for me, primarily its ability to create single file ready to submit that uses code from library headers. It has been hard to use it on different platforms, since compiling is not easy/fast, but you have released binaries. The workaround I found was using docker to run such binaries. The result was this docker wrapper which I wanted to share: https://github.com/mfornet/caide-docker
Contest can have problems like A, B, C1, C2... So C1 and C2 will crush caide.
Example:
https://codeforces.com/contest/1354
When I parse a problem Visual Studio often hangs, How to remove it?
Using std::to_string
leads to failed clang parsing.
I couldn't really figure out what is valid fix or workaround for this. Seems like defining _GLIBCXX_USE_C99
should help but then it results in bunch of other errors. Maybe just updating headers would help but I don't know how hard it is exactly.
Can't figure out how to support C++14 and C++17. I have changed the ISO standard to C++17 for each of the projects:
But I still get an error on the concat.cpp file. Maybe there is a way to do it but can't figure it out.
Please add support for atcoder. Thanks!
add support for "competitive champions", it parses problems almost from all online judges on internet.
I tried installing caide on VSCode but I found no such extensions in the marketplace. I'm using Ubuntu 18.04. Is this not supported for Linux or is there something wrong with my machine?
it would be really helpful, if their was a README for c#.
I am currently using VS2019, Extension is working fine for me, on default it is creating c++ files, but you can change language.
/* solution.cpp */
class Test {
public:
Test(int n) : n(n) {}
private:
Test() = delete;
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}
/* submission.cpp */
class Test {
public:
Test(int n) : n(n) {}
private:
= delete;
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}
/* Solution file */
class Test {
public:
Test(int n) : n(n) {}
~Test() {
print();
}
void print() {
cout << n << endl;
}
private:
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}
/* Submission.cpp: no method "Test::print()" that is called from destructor (destructor is not called explicitly, only by default on exit from function solve() ) */
class Test {
public:
Test(int n) : n(n) {}
~Test() {
print();
}
private:
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}
I didn't find this in the docs, if it's already in the docs please point it out,thanks!
I tend to have put some precalculations into the constructor for TopCoder solutions. Unfortunately, I found out the hard way that without "caide keep" comment it simply removes that constructor. I suggest 2 options:
While loading the solution, Visual Studio stops responding, after 2 or 3 times of manual opening or closing it works.
Very much looking forward to
when I have tried to Run Tests Command, the console screen was waiting for my input rather than executing the stored testcases.
The issue started behaving differently, but have not been fully fixed.
(Sorry, i dont know how to re-activate this:
#29)
Image of issue:
Contest had E1 and E2
https://pasteboard.co/Jfg2DOh.png
A workaround is to close the solution from the File menu and then open it again from File -> Recent solutions
In the readme, it was told to put all my pre-written headers in the cpplib directory.
What if we put the whole directory in the cpplib directory so will it be able to parse the other headers as I have something like this ...
numbers/
/...Headers
Graphs/
/...Headers
I have tried to parse the problem from the codechef with the following link.
https://www.codechef.com/problems/LIFTME
it fails to parse with the following error
the competitive companion doesn't work as well on my PC. I am at windows 10 and with visual studio 19 (community edition).
I also had a question, what is I want to include some pre-written library of mine in my solution, but it is not present in the cpplib folder, How shall we do that?
Originally posted by @Spidy104 in #34 (comment)
@slycelote, should I follow the instructions on the Install.txt file inside the libcaide or should I just add the .exe file from the realeases page to my $PATH and run it from there?
1>LINK : fatal error LNK1104: cannot open file 'D:\cp\cpp\CAIDESLN\cpplib\Debug\cpplib.lib'
1>Done building project "AWatermelon.vcxproj" -- FAILED.
THIS IS AN error I am continuously getting, how to fix this.
The automatically generated *.cpp files do not contain some necessary header files, so I have to add #include<cctype>
every time to use std::isupper
,
Is there a way to modify the generated template?
Where should I modify?
I also had a question, Is there any way to make the questions parse into a certain directory.
Originally posted by @Spidy104 in #34 (comment)
It should be possible to create CMakeLists files automatically when new problems are added.
Implement a plugin for Sublime Text
Something like caide problem http://url --name A
Sorry to disturb/interrupt your beautiful work on caide, but I wanted to say something.
While running the tests, can you do something so as it shows the running time of our code, it helps us understand better the efficiency of our solution
Sorry for the poor English, since it is not my native language.
Thanks...
Happy Coding...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.