I read an article about using C# 3 features in C# 2 where you can for instance type var x = 2; and even if the project is a 2.0 project, the Visual Studio 2008 compiler picks it up and generates the same code as it would if you type int x = 2.
But what I don't get is, should you not do this in some cases? I always thought that the var k...
Is it safe to store information such as usernames and passwords within comments in your source code? I am not worried about some getting access to my source but I am concerned in regards to someone decompiling my compiled silverlight XAP file. Is anybody 100% sure if the compiler strips off commented code. I would assume it does but I...
I'm trying to use member variables of a templated base class in a derived class, as in this example:
template <class dtype>
struct A {
int x;
};
template <class dtype>
struct B : public A<dtype> {
void test() {
int id1 = this->x; // always works
int id2 = A<dtype>::x; // always works
int id3 = B::...
From what I've read it appears that FogBugz was originally written in VBScript. Now apparently they use their own custom compiler and language that will translate the source code to more "accessible" languages such as PHP and (I think) C#. Is there a name for this language? What does a hello world look like in it? Is there any hope of se...
I've got an old project in Eclipse 2.1 and compiled with a JDK 1.4.2_12. I want to upgrade the version of Eclipse to Eclipse Galileo.
I've imported my project and set the compilation level to 1.4 and I've also updated my build path to use the correct JDK.
The problem is that when I compare the compiled files in the classes folder in th...
Someone on my team tried fixing a 'variable not used' warning in an empty catch clause.
try { ... } catch (Exception ex) { }
-> gives a warning about ex not being used. So far, so good.
The fix was something like this:
try { ... } catch (Exception ex) { string s = ex.Message; }
Seeing this, I thought "Just great, so now the compil...
are compilers in different languages????
...
I was looking over Martin Fowler's recent book contents - Domain Specific Languages and I noticed some ANTLR example - that got me thinking that writing compilers will become more and more popular since people needs in this matter will increase.
So, will the compiler theory still be as arid (being subjective here) as it was until now or...
Fortran->Algol->Cpl->Bcpl->C->C++->Java .....
Seems like every language is built upon an ancestor language.
My question : New languages extend parent ones or there is some kind of a trick?
e.g. System.out.print() in Java ; is it actually printf() in C, and so on (printf is actually .. in Cpl)?
If so, doesn't this make every further l...
In the following code, Foo::add calls a function via a function object:
struct Plus {
inline int operator()(int x, int y) const {
return x + y;
}
};
template<class Fct>
struct Foo {
Fct fct;
Foo(Fct f) : fct(f) {}
inline int add(int x, int y) {
return fct(x,y); // same efficiency adding directly?
}
};
Is this th...
I would like to take a file that is an IL file, and at run time compile it back to an exe.
Right now I can use process.start to fire off the command line with parameters (ilasm.exe) but I would like to automate this process from a C# service I will create.
Is there a way to do this with reflection and reflection.emit?
While this ...
Howdy all,
I've been learning to program for a Mac over the past few months (I have experience in other languages). Obviously that has meant learning the Objective C language and thus the plainer C it is predicated on. So I have stumbles on this quote, which refers to the C/C++ language in general, not just the Mac platform.
With C ...
I'm trying to use a relative path in the -output compiler argument, here's what I've tried (with and without quotes):
-o="./deploy/file.swf"
-o="/./deploy/file.swf"
-o="./file.swf"
-o="/./file.swf"
-o="file.swf"
-o="file.swf"
None of these attempts yields a new file, it's as if they are ignored. The deploy directory is in the roo...
We once had an interview with a very experienced C++ developer who couldn't answer the following question: is it necessary to call the base class destructor from the derived class destructor in C++?
Obviously the answer is no, C++ will call the base class destructor automagically anyway. But what if we attempt to do the call? As I see i...
I have read Static Memory Allocation are done during Compile time.
Is the 'address allocated' used while generating executables ?
Now, I am in doubt how the memory allocation is handled when the code executable is transferred completely onto a new system.
I searched for it but I didn't get any answer on the internet.
...
Hello,
At my company we have recently done some tricky stuff with C++ and templates, making use of some features of the compiler. When working with this code people need to take a few setup steps otherwise they get some rather cryptic compiler errors, what I would like to do is determine if there is a way to tell the compiler to inject,...
My Delphi installation has been going downhill for the past few months. It seems though that every so often when I build a release it has strange errors in it which are resolved if I build, then compile, then build, compile, etc.
I've talked to another developer who thinks that this is a compiler error. This sort of degrading perfor...
I'm trying to turn some of the programs in gera's Insecure Programming by example into client/server applications that could be used in capture the flag scenarios to teach exploit development. The problem I'm having is that I'm not sure how Visual Studio (I'm using 2005 Professional Edition) decides where to allocate variables on the sta...
What are main diferens between flash ActionScript and Flex actionscript?
Why Flash can not compile AS files generated from Flex (with keep-as) directly?
Somy problem is - I want to compile generated from MXML .AS files using Flash CS5... But it appeares to me I can not... Why?
...
I thought that C# generated compiled code (by JIT)
But I have lately discovered that I can edit code while debugging mode in C# (VS 2008)
Does that means that C# is interpreted? or there is a trick?
...