I'm trying to write something like this:
type 'a 'b xxx = {aaa: 'a: bbb: 'b: ccc: int};;
It does not compile. Is it just syntax error, or they don't allow multiple paramters on type ? Then why ?
I have a mixed Java / C# project and use an ant script that contains a csc task to compile the dll. This works, but I get a warning
[csc] This task is deprecated and will be removed in a future version
[csc] of Ant. It is now part of the .NET Antlib:
[csc] http://ant.apache.org/antlibs/dotnet/index.html
How can I replace the csc task? I can surely create an exec task calling nant with a project.build file, but that feels completely wrong.
Hi, I need to know a way to show a message or something like that when I compile my program and the user or password are wrong, because when I do this nothing happens.
I'm making a system that save logs.
log4net just using C#. if you can help me I'd appreciate.
thanks!
I need to analyze a document and compile statistics as to how many times each a sequence of words is used (so the analysis is not on single words but of batch of recurring words). I read that compression algorithms do something similar to what I want - creating dictionaries of blocks of text with a piece of information reporting its frequency.
It should be something similar to http://www.codeproject.com/KB/recipes/Patterns.aspx
Do you have anything written in C#?
I am trying to patch dmenu with the files provided here: http://aur.archlinux.org/packages.php?ID=27334
I do not know how to do it, I've read that I should do patch file-to-patch the-path, but in the patch provided there is more than one file involved. I've tried patching manually but I failed, it will not compile.
Why doesn't the u-infinity appear under the limit when I compile? Instead it is appearing to the right of the limit. How do I correct this?
\frac{1}{\lim_{u \rightarrow \infty}}
I am trying to create a runnable jar file from java classes using ant. The java classes use external jars. When I execute the build.xml its showing class not found exception while running the java program. Its compiling fine.
Part of My source code:
<path id="project-libpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<path id="project-classpath">
<fileset dir="C:/xmldecode/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${classes.dir}">
<classpath refid="project-classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<copy todir="${classes.dir}">
<fileset dir="C:/xmldecode/lib"/>
</copy>
<pathconvert property="mf.classpath" pathsep=";">
<path refid="project-classpath" />
<flattenmapper />
</pathconvert>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="${mf.classpath}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true">
</java>
Greetings,
Can anyone tell me how the heck I'm meant to use a maven repository or whatever the term is with a project?
I've downloaded the OAuth library from Google. I run mvn compile, test, install, deploy
I want to know where the Jar goes so I can just put it into my class path. Any help appreciated!
I wrote a simple c++ application in Visual Studio 2005 but when I compile it, the executable wants to run as admin. I tried deleting the manifest but it still wants to run as admin. I am running Windows Vista Home premium. Any help would be appreciated!
What steps are needed to compile Version Information inside a windows DLL from the command line. I have been looking at VersionInfo files, but could not figure out how to link them to the DLL.
Thank you
We have recently downloaded, installed and compiled gcc-3.0.4 code. gcc compiler has built successfully and we where able to compile some same test cpp file. I would like to know how we can modify gcc source code so that we add additional run time debugging statements like the binary in execution compiled by my gcc should print below statement in a log file:
filename.cpp::FunctionName#linenumber-statement
or any additional information that I can insert via this tailored compiler code Any references would be highly appreciable.
Hello all,
I have the simplest code that I want to separate in three files:
Header file: class and struct declarations. No implementations at all.
Inline functions file: implementation of inline methods in header.
Code file: normal C++ code for more complicated implementations.
When I was about to implement an operator[] method, I couldn't manage to compile it. Here is a minimal example that shows the same problem:
Header (myclass.h):
#ifndef _MYCLASS_H_
#define _MYCLASS_H_
class MyClass
{
public:
MyClass(const int n);
virtual ~MyClass();
double& operator[](const int i);
double operator[](const int i) const;
void someBigMethod();
private:
double* arr;
};
#endif /* _MYCLASS_H_ */
Inline functions (myclass-inl.h):
#include "myclass.h"
inline double& MyClass::operator[](const int i) {
return arr[i];
}
inline double MyClass::operator[](const int i) const {
return arr[i];
}
Code (myclass.cpp):
#include "myclass.h"
#include "myclass-inl.h"
#include <iostream>
inline MyClass::MyClass(const int n) {
arr = new double[n];
}
inline MyClass::~MyClass() {
delete[] arr;
}
void MyClass::someBigMethod() {
std::cout << "Hello big method that is not inlined" << std::endl;
}
And finally, a main to test it all:
#include "myclass.h"
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
MyClass m(123);
double x = m[1];
m[1] = 1234;
cout << "m[1]=" << m[1] << endl;
x = x + 1;
return 0;
}
void nothing() {
cout << "hello world" << endl;
}
When I compile it, it says:
main.cpp:(.text+0x1b): undefined reference to 'MyClass::MyClass(int)'
main.cpp:(.text+0x2f): undefined reference to 'MyClass::operator[](int)'
main.cpp:(.text+0x49): undefined reference to 'MyClass::operator[](int)'
main.cpp:(.text+0x65): undefined reference to 'MyClass::operator[](int)'
However, when I move the main method to the MyClass.cpp file, it works. Could you guys help me spot the problem?
Thank you.
good stuff
// ok to alias a List Type
using AliasStringList = System.Collections.Generic.List<string>;
// and ok to alias a List of Lists like this
using AliasListOfStringList1 = System.Collections.Generic.List<System.Collections.Generic.List<string>>;
bad stuff
// However **error** to alias another alias
using AliasListOfStringList2 = System.Collections.Generic.List<AliasStringList>;
Produces the compile error
The type or namespace name
'AliasStringList' could not be found
(are you missing a using directive or
an assembly reference?)
Hi Guys,
I have just updated my nant script to compile my .net framework 4 solution.
And I got the above error while generating commonassemblyinfo.cs in my solution.
I visited msdn website and also added that line :
in my web.config under runtime-configuration.
But that didn't solve my problem.
Can anyone please suggest what am I missing?
hey guys i have a question regarding amzi prolog with eclipse,
Im running a .pro file which executes a breadth first search and if queue gets too long,
the following error message appears:
system_error 1021 Control stack full.
Compile code or increase .cfg
parameter 'control'
If so, how may i run the compiled code under eclipse? I've tried running the project but the listener just ends without accepting any queries....?
I don't normally use VB, and even less vba for excel, but I'm writing a function inside a macro and seem to not understand even the basics of creating a function
For example
Public Function test() As Integer
return 1
End Function
This gives a compile error.
This is profoundly stupid, but how do I make a function return an integer in vba?
Let's assume that I have files a.cpp b.cpp and file c.h. Both of the cpp files include the c.h file. The header file contains a bunch of const int definitions and when I compile them I get no errors and yet I can access those const as if they were global variables. So the question, why don't I get any compilation errors if I have multiple const definitions as well as these const int's having global-like scope?
Why on earth won't this compile? Scala 2.8.0RC3:
Java
public interface X {
void logClick(long ts, int cId, String s, double c);
}
Scala
class Y extends X {
def logClick(ts: Long, cId: Int,sid: java.lang.String,c: Double) : Unit = {
...
}
}
Error
class Y needs to be abstract, since method logClick in trait X of type
(ts: Long,cId: Int,s: java.lang.String,c: Double)Unit is not defined
Hi,
I need to install matplotlib in a remote linux machine, and I am a normal user there.
I downlodad the source and run
python setup.py build
but I get errors, related with numpy, which is not installed, so I decieded to install it first. I download and compile with
python setup.py build
My question now is, how do I tell to teh matplotlib installation where the numpy files have been installed?
Thanks
Hi All
I've just created a little app that programmatically compiles code using the C# Compiler, and it works brilliantly. But, one thing that I need it to do is compile Windows.Forms code. Like, I can create a console app with it, but I can't create a GUI-based form. Here's the link that got me started:
http://support.microsoft.com/kb/304655
Can somebody please help?
Thank you :)
I have gcc installed in c:/programfiles (also set as a path variable), and i have all the necessary files for gtk from http://www.gtk.org/download-windows.html, glib,gtk,pango,atk and cairo. Although I have no clue as to how to compile a c program using gtk with the gcc compiler. How do I set everything up so that it works?. (I don't know where each zip file goes.?) basically I don't really know where start.
Hi there,
I was wondering if there is a way to conditionally compile entire namespaces in C#. Or am I left with having to explicitly decorate each source file within the namespace with the preprocessor directives to exclude it? In sub-versions of my application the code in various namespace is simply not required and I would like it excluded.
Thanks in advance!
Long story short: I want to add the --core-library flag at compile time to include a library that depends on some javax libraries that aren't included in the android platform. I have attempted the walkthrough here: http://commons.apache.org/scxml/usecases/scxml-stopwatch-on-android.html but nothing ever changed on the emulator.
I don't think I can repackage the libraries I'm after because I cannot amend the callers to call the new packages without violating a license agreement.
Please, someone, point me in the right direction.
With a scripting language like python (or php), things are not compiled down to bytecode like in .net or java.
So does this mean that on every request, it has to go through the entire application and parse/compile it? Or at least all the code required for the given call stack?
Hi
Is there any way to cast to a dynamic generic interface..
Site s = new Site();
IRepository<Site> obj = (IRepository<s.GetType()>)ServiceLocator.Current.GetInstance(t)
obviously the above won't compile with this cast. Is there anyway to do a dynamic cast of a generic interface. I have tried adding a non generic interface but the system is looses objects in the Loc container.
Thanks
Phil