Блог пользователя Egor

Автор Egor, история, 3 года назад, ,

I would really appreciate any new ideas of what new features to add

I would also appreciate donations: Yandex.Money, PayPal

Seems like no one tried beta verion — I would really appreciate feedback

4.3.1

Task format is changes to JSON. I would recomment backing up your project before updating

4.2.2

4.2.1

• New Code Jam site support
• Fixes

4.1.8

• All parsers are up to date
• GCJ and Kattis are now only parsable from Chrome extension

4.1.5

• Fixed parsing for HackerRank
• Fixed enums in switches

4.1.3

• Various fixes for code generation

4.1.2

• Cojac version update. If you use Cojac for your own configurations update agent parameters as follows:
-Cints -Clongs -Ccasts -Cmath

• Cleanup
• Switched to Java 1.8
• Timus parser fix
• Kattis parser fix
• Include all Kattis sites

4.1.1

HackerEarth support

4.0.11

Fixed issue with using method as functional interface

4.0.10

Fix for USACO parsing. Currently on beta channel

•
• +33
•

 » 3 года назад, # |   0 What was the key to speedup, if it's not a secret?
•  » » 3 года назад, # ^ |   +8 Adding instead of removing
•  » » » 3 года назад, # ^ |   +5 Thanks.
•  » » » » 3 года назад, # ^ |   +8 Long answer is previously I added everything that was imported from task class and everything in the same package, then everything that is imported from those classes and so on, and then removing unused code which is slow and cyclic references may remain. Now I only add what is actually referenced. Among other things now you can reference classes by fqn instead of importing them. Moreover naming conflict would be handled by constructing other names for classes
•  » » » 3 года назад, # ^ |   0 -_-
 » 3 года назад, # |   0 Thanks you very much, your plugin is very helpful. :D
 » 3 года назад, # |   +3 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   -6 Hi Egor, I got this error after update CHelper and run my task. Can you give me an advise?NoSuchMethodError: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;
•  » » 3 года назад, # ^ |   0 What is the version of Intellij Idea that you use?
•  » » » 3 года назад, # ^ |   0 I use version 13.1.6.
•  » » » » 3 года назад, # ^ |   0 Well, I'll tag next build as only compatible with 14+ then. I recommend to update
•  » » » » » 23 месяца назад, # ^ |   0 I am having same error with version 14+
•  » » » » 3 года назад, # ^ |   +5 -_-
 » 3 года назад, # |   0 e-olimp support is broken?
•  » » 3 года назад, # ^ |   0 Yes, they redesigned. I am not sure I am inclined to fix it myself, but if anyone willing I gladly accept PR
•  » » » 3 года назад, # ^ |   0 and Kattis also? :(
•  » » » » 3 года назад, # ^ |   0 Kattis is working for me
•  » » » » » 3 года назад, # ^ |   0 Strange, it's not working for me. I just get the "Nothing to show" message in the problem list. I already hit the "Refresh" button a few times and waited for a few minutes. The other judges work OK. Any hints?I have IDEA 14, CHelper 4.0.1, running in Fedora 20 with Oracle JDK, in case it helps.
•  » » » » » » 3 года назад, # ^ |   0 Probably fix to suppress certificate warnings is not working on Fedora. You can just use Chrome plugin instead
 » 3 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   0 Hello,I recently tried to run TopCoder on C-Helper. However, when I try to run in Intellij Idea, it gives me an null pointer exception, and I can't compile it on Topcoder Arena. Is there anything I have to install other than CHelper and Arena? There error I've got in Idea is:null java.lang.NullPointerException at net.egork.chelper.codegeneration.SolutionGenerator.shouldAddElement(SolutionGenerator.java:338) at net.egork.chelper.codegeneration.SolutionGenerator.processElement(SolutionGenerator.java:314) at net.egork.chelper.codegeneration.SolutionGenerator.createInlinedSource(SolutionGenerator.java:63) at net.egork.chelper.codegeneration.SolutionGenerator$4.run(SolutionGenerator.java:502) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at net.egork.chelper.codegeneration.SolutionGenerator.createSourceFile(SolutionGenerator.java:496) at net.egork.chelper.configurations.TopCoderConfiguration.getState(TopCoderConfiguration.java:63) at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:201) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:58) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:53) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:94) at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:396) at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:61) at com.intellij.execution.impl.ExecutionManagerImpl$5.run(ExecutionManagerImpl.java:384) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:351) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:702) at java.awt.EventQueue$3.run(EventQueue.java:696) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:719) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)I'm really sorry for writing here. It seems like not a right location to post. Any help is appreciated. Thank you.
•  » » 3 года назад, # ^ |   0 Can you zip your project with task in question and send to egor at egork dot net?
 » 3 года назад, # |   +12 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   0 Can you change archive directory's structure to something simple like this:Topcoder SRM 660 SRM 661 ... Codeforce Round 300 Round 301 ...
•  » » 3 года назад, # ^ |   0 Probably I'll add customizeable archive structure in some future version
 » 3 года назад, # | ← Rev. 4 →   0 На CF, тимусе и др. сайтах обычно размер стека равен 64 МБ. Но JAVA прожорлива, и иногда этого не хватает.CHelper автоматически генерирует для задач типа "single test" такой код.  public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); OutputWriter out = new OutputWriter(outputStream); TaskA solver = new TaskA(); solver.solve(1, in, out); out.close(); } static class TaskA { // решение задачи } } Где и как можно настроить этот шаблон, чтобы код в функции main автоматически "обёртывался" такой штучкой:  public class Main { public static void main(String[] args) { new Thread(null, new Runnable() { @Override public void run() { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); OutputWriter out = new OutputWriter(outputStream); TaskA solver = new TaskA(); solver.solve(1, in, out); out.close(); } }, "MyLittlePony", 256 * 1024 * 1024).start(); } static class TaskA { } } 
•  » » 3 года назад, # ^ |   +3 Пока никак. С удовольствием приму патч добавляющий такую настройку
 » 3 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 года назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 года назад, # |   +3 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 года назад, # |   +1 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 года назад, # |   0 Совместима ли последняя версия CHelper с IDEA 2016.1? Можно ли обновиться или пока лучше не стоит?
•  » » 2 года назад, # ^ |   0 Кубок мы написали без проблем. В остальном ничего не могу сказать
•  » » » 2 года назад, # ^ |   0 ОК, спасибо! Попробую тоже испытать удачу :)
 » 22 месяца назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 20 месяцев назад, # |   0 Where can I download v4 ? I can only find v3 here ?
•  » » 20 месяцев назад, # ^ |   +5 You can install it through Jetbrains plugin repository
•  » » » 20 месяцев назад, # ^ | ← Rev. 2 →   +10 Can you please update CHelper to 4.1.5 on GitHub? I am using a modified version of CHelper (changed the codegen template slightly), that's why I need the source code for update.
•  » » » » 20 месяцев назад, # ^ |   +5 Done
 » 19 месяцев назад, # |   0 Two issues(version 4.1.5): (1) Codechef not listed in Parse Contest dialog. (2) Problem parsing broken for codechef. Getting "Connection problems or format change".I was able to fix (1) by adding codechef parser to Parser.PARSERS. Please help for (2). Trying codechef november long challenge 2016.
 » 18 месяцев назад, # |   0 Hi, Egor, When the Test Type is 'Number of tests known', Can I use separate threads to run every single test? Thanks for the amazing plugin.
•  » » 18 месяцев назад, # ^ |   0 No. You can use this template though
•  » » » 18 месяцев назад, # ^ |   0 It works! Thanks Egor.
 » 17 месяцев назад, # |   0 codechef is not showing up in parse contest
•  » » 17 месяцев назад, # ^ |   +5 Codechef can be parsed through chrome extension
•  » » » 17 месяцев назад, # ^ |   0 but some problems are still unable to parse in competitions, and problems in domains can't be parsed through plugin
•  » » » » 17 месяцев назад, # ^ |   +10 Because codechef has no fixed format for problem statements. So I use set of heurystics, which not laways work
•  » » » » » 17 месяцев назад, # ^ |   0 no problem sir, still a helpful plugin
 » 15 месяцев назад, # |   0 Hi! Can I manually create Topcoder task by using CHelper? Thanks :D
•  » » 14 месяцев назад, # ^ |   0 Unfortunately no
 » 14 месяцев назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 14 месяцев назад, # |   0 Egor — Unfortunately, I've had some trouble using the parser. You can see my directory and my settings here:When I attempt to parse a contest, I'm met with the "Nothing to show" screen found here:When I try to parse an individual problem using the Chrome extension, I see the circle animation on Chrome, but nothing happens on IDEA. (IDEA is open and the project is loaded.)Do you have any idea what could cause this issue? Many thanks for any response.
•  » » 14 месяцев назад, # ^ |   0 Well, not being aboe to parse from idea seems like idea do not have access to internet. Not being able to parse with chrome is likely something to do with idea not able to connect on localhost port. Do idea runs in some kind of sandbox?
•  » » » 14 месяцев назад, # ^ |   0 That sounds like a likely cause of the issue. IDEA is running on a basic Windows installation. I've tweaked the firewall a bit but haven't had any luck there. Any ideas about what could be causing the issue? Is it possible that the wi-fi configuration is at fault?Thanks for the assistance!
•  » » » 14 месяцев назад, # ^ |   0 Just posting a quick reminder since it's been a couple days since last response. No worries if we can't figure it out, but any thoughts you could provide would be much appreciated. I tested it on a different computer without the same firewall software, so I have to imagine that it's somehow related to the wi-fi.Thanks for any assistance!
•  » » » » 14 месяцев назад, # ^ |   0 I really have no idea what's wrong
•  » » » » » 14 месяцев назад, # ^ |   0 Understood, I'll see what I can do. I'll post here if I find a solution in the hope that any others with the same problem can benefit.
•  » » » » » 14 месяцев назад, # ^ |   0 For anyone else with the same issue, I managed to fix it by updating IntelliJ to the latest version. I searched around and found some errors related to an IntelliJ TransactionGuard class, and in case the class was broken, I updated IntelliJ, after which the program worked.Many thanks for your assistance and for creating the plugin.
 » 14 месяцев назад, # |   0 I see there's an option to parse entire contest in Idea plugin, but the Chrome extension seems to activate only on a single problem page. Am I missing something or the extension doesn't support contest parsing? That looks weird.
•  » » 14 месяцев назад, # ^ |   +8 Chrome parser only works with single page so it just can't parse whole contest at once. One exception is Google Code Jam because all problems presented in what is basically single page
 » 14 месяцев назад, # |   0 Why when I use global array: "int in[] = new int[1000000 + 1];"CHelper changes it to: "int in = new int[1000000 + 1];" ?
•  » » 14 месяцев назад, # ^ |   +5 try using int[] in = new int[...]
•  » » 14 месяцев назад, # ^ |   +5 Because this notation is present in Java only to faciliate back compatibility with c and it would be pain to make it work
 » 14 месяцев назад, # |   0 One more question — Is it possible to use stress testing with CHelper (writing an algorithm to automatically generate small test cases and their correct answers and printing the first one for which the main algorithm fails)? Also, is there any way to modify the template for the output class? I've checked through all of the templates in the project and haven't been able to find it. (It's given me a few issues with some online judges, most notably the USACO training pages.)
•  » » 14 месяцев назад, # ^ |   0 It is possible to stress test. If you look in task properties there is "Test class" if you push AdvancedIt is possible to use whatever output class you want as long as it has close method. You just need to update preferences
 » 13 месяцев назад, # |   0 I'm trying to use your parsers, and class Task raises some questions. It contains all necessary information about the problem except time and memory limit, while they are usually very easily parsed. On the other hand, it contains your plugin-specific data like mainClass, truncate, includeLocale etc.Did you think about extracting the parsers into a separate library with more general interface, independent of the plugin implementation?
•  » » 13 месяцев назад, # ^ |   0 I thought about it and decided I do not have time to do it right for now.Memory limit is actually parsed and put into VM arguments
 » 13 месяцев назад, # |   0 Tasks from CSAcademy Rounds are not being parsed. I think their new update is causing problem with the C-Helper Chrome Extension.
•  » » 13 месяцев назад, # ^ |   0 I'm afraid that'll have to wait until after World Finals (unless someone want to propose a pull request of course)
•  » » » 12 месяцев назад, # ^ |   0 Sir, can you update the CHelper for CSAcademy now? Tasks are not parsing at that site due to their upgradation of website.
 » 12 месяцев назад, # |   0 Hi guys. I have no problem running my code on Google Code Jam Pretest. When it time to download the input file from Google, where should I store the input file. Does the script support generating the output file to upload to Google server, if yes , can someone advice me how? Thanks in advance for the great script.
•  » » 12 месяцев назад, # ^ |   0 You just put it in "work directory" (as defined by run configuration, usually project root) and run Main class
•  » » » 12 месяцев назад, # ^ |   0 Hi Egor. Thanks for the help and fast reply. The competitive coding world beef plp like u.
 » 12 месяцев назад, # |   0 Hey Egor, now that this post is back to business, is it possible to have a feature where we can submit directly from the IntelliJ. That is we dont have to go back to the problem page, browse for our solution and get the result. The plugin would do all of this for me and return me the status of the solution. Even if you could do this for codeforces (because nowadays I just participate here), that would be great :)
•  » » 12 месяцев назад, # ^ |   +3 I want to introduce this functionality sometime, but I need API to do this as I would not want to hack my way through
 » 5 месяцев назад, # |   0 Unable to parse task from AtCoder :( Anyone here facing the same issue?Can anybody tell me how to fix this issue?
•  » » 5 месяцев назад, # ^ |   0 I hooe to deploy fix next week
 » 4 месяца назад, # |   +4 Tests were not parsing in today's contest. Can you please fix it?
 » 3 месяца назад, # |   +1 Chelper parser is not working. Every time I click on the plugin, nothing happens.
 » 2 месяца назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
•  » » 2 месяца назад, # ^ |   0 On clicking + button on chrome, screen for adding the task pop up. But after pressing ok, task is not being added in IntelliJ(Facing issue while parsing task on Codeforces and CSAcademy). Please fix it.
•  » » » 2 месяца назад, # ^ |   0 Well, I do not experience this issue, so I need more to try to fix it. Can you record short video with this issue?
•  » » » » 2 месяца назад, # ^ |   0 Can you suggest me how to record using screen recorder? I haven't used one till now.
•  » » » » » 2 месяца назад, # ^ |   0 You can use OBS Studio
•  » » » » » » 2 месяца назад, # ^ |   0 I have recorded it. You can watch it here.
•  » » » » » » » 2 месяца назад, # ^ |   0 I'll look into it tomorrow
•  » » » » » » » 2 месяца назад, # ^ |   0 Thank you for reporting, I located the issue and new version should be available shortly
 » 2 месяца назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 месяца назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 2 месяца назад, # |   0 Thank you for the new Code Jam parser! Are you planning to support parsing of the whole contest at once?
•  » » 2 месяца назад, # ^ |   0 Previously I parsed everything at once because web page actually had all the problems. New web page only has single problem statement
 » 2 месяца назад, # |   0 The link in section 4.2.2 https://plugins.jetbrains.com/plugins/beta/list is broken, it redirects me to https://plugins.jetbrains.com/plugins/list?channel=beta&pr_productId=.
•  » » 2 месяца назад, # ^ |   0 It is not a link, it is repository you need to add to idea plugin repositories in order to use beta versions of CHelper
 » 2 месяца назад, # |   +1 Can you add parse task for old GCJ system too? As Google Kickstart uses the same interface as of old GCJ system. Due to plugin update, I am unable to parse task in Kickstart :(
•  » » 2 месяца назад, # ^ |   0 I had not removed support, you should still be able to parse from old system with Chrome extension
•  » » » 2 месяца назад, # ^ |   0 Sorry for bothering you. Due to the slow internet connection, page was not fully loaded. So, add task button was not showing up. Now it is showing perfectly. Thank You.
 » 7 недель назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 5 недель назад, # |   0 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
 » 3 недели назад, # |   +3 Auto comment: topic has been updated by Egor (previous revision, new revision, compare).