compilation

'var' and 'let' in Typescript 1.5

耗尽温柔 提交于 2019-12-10 01:21:51
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 4 years ago . What exactly is the difference between using either ' var ' or ' let ' in Typescript? I know that 'let' allows the variable to be defined further into a scope without it being used outside of said scope. That is obviously a nice advantage for iterators in for loops. I know this is an ES6 definition, so compiling to ES6 should look nearly identical in terms

slow JDK8 compilation

泄露秘密 提交于 2019-12-09 22:57:08
问题 Trying to upgrade to JDK8 on a big project, compilation goes really slow on JDK8 compared to JDK7. Running the compiler in verbose mode, JDK8 compiler stops at a big generated converter class(Mapping) for entities from server to client. The converter methods in several cases call other converter methods from the same Mapping class. As a workaround tried to split the Mapping file into multiple files. This visibly improved performance when only compiling the Mapping class or it's containing

Is it possible to view what shell commands Eclipse is making?

泄露秘密 提交于 2019-12-09 17:03:04
问题 I have a rather length project I'm working on, which requires an older JDK to compile correctly, various JAR includes, and the like. I'm assembling the entire project using a batch script, and I'd like to make the whole process fully automated with the script. So I was wondering if I could view the shell commands Eclipse does to make a particular piece of code turn into a JAR (from compiling with the appropriate JDK I specified to making the JAR), so I don't need to manually go in and waste a

Re-building a deleted class file in Eclipse

﹥>﹥吖頭↗ 提交于 2019-12-09 13:28:14
问题 I accidentally deleted a .class (Java bytecode) file in my project (on the filesystem, not using Eclipse itself). Easy to fix, right? Just re-build it. But that doesn't work! Even if I select "Build Project" or "Build All" or "Build Automatically" from the "Project" menu, nothing actually happens on the file system, and I still get: Exception in thread "main" java.lang.NoClassDefFoundError I just want to re-compile this from the source code I already have! By the way, when I choose "Clean..."

Compile string of C code

痞子三分冷 提交于 2019-12-09 12:44:55
问题 Really off the wall question here, but is there a way to compile a string of C code in GCC without any medium to hold that string (eg. a source file)? Something along the lines of: $ gcc "#include <stdio.h> int main( void ){ printf('hello world'); return 0;}" -o test Feels really dirty, but it would be really nice if there was some simple way to do that type of thing. 回答1: If you use - as the input file in the command line, gcc reads from standard input. Since there is no file name extension

Building boost under msys, can't find mingw.jam

白昼怎懂夜的黑 提交于 2019-12-09 08:47:34
问题 I need to build boost to use the regex library. I was able to creat bjam using bootstrap.sh like so: ./bootstrap.sh --with-toolset=mingw Note - if I leave out the --with-toolset=mingw argument compilation fails - bootstrap can't find wait.h, resource.h, ar.h. With the mingw toolset argument, bjam is able to compile. Then I run bjam and get: ./bjam.exe mingw.jam: No such file or directory e:/libraries/boost_1_45_0/tools/build/v2/build\toolset.jam:38: in toolset.using rule mingw.init unknown in

how to compile only changed source files using ANT

老子叫甜甜 提交于 2019-12-09 06:08:05
问题 I am trying to write ant build for compiling source folder here is my script target for compiling. <target name="compile" depends="init"> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true"> <classpath refid="master-classpath"/> </javac> </target> In my project I have near about 1000 .java files. When ever a single .java file is changed above target tends to compile all .java files. Which make development very slow. I just want to know is there any way or code to change the

switch case vs if else [duplicate]

寵の児 提交于 2019-12-09 05:50:59
问题 This question already has answers here : Advantage of switch over if-else statement (22 answers) Closed 6 years ago . I was wondering if there was any difference in the way the following code was compiled into assembly. I've heard that switch-case is more efficient than if else, but in this example I am not quite sure if that would be the case. if(x==1){ ... }else if(x==2){ ... }else{ ... } and switch(x){ case 1: ... break; case 2: ... break; default: ... } 回答1: A compiler will sometimes turn

Compiling Erlang code on Windows

点点圈 提交于 2019-12-09 05:21:50
问题 I installed Erlang 13B and tried to follow the tutorials. Every time I get to c(tut) , I get an error instead of (ok, tut) , so it seems like there are no modules installed. Can anyone point me in the right direction? I've tried Emacs but I don't really know how to use it and haven't even got close to getting the Erlang mode working. For instance, where do I type: (setq load-path (cons "C:/Program Files/erl5.6.2/lib/tools-<ToolsVer>/emacs" load-path)) (setq erlang-root-dir "C:/Program Files

Why doesn't the C++ compiler complain when I use functions without parentheses?

白昼怎懂夜的黑 提交于 2019-12-09 03:11:11
问题 I was looking at some code a friend sent me, and he said: "It compiles, but doesn't work". I saw that he used the functions without the parentheses, something like this: void foo(){ cout<< "Hello world\n"; } int main(){ foo; //function without parentheses return 0; } The first I said was "use parentheses, you have to". And then I tested that code - it does compile, but when executed doesn't work (no "Hello world" shown). So, why does it compile (no warning at all from the compiler GCC 4.7 ),