w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
unable to get this class working in java on client code - no compilation errors but runtime
In your constructor, you've defined a local variable charCounts: int[] charCounts= new int[TOTAL_LETTERS]; This shadows the instance variable charCounts, to which I think you meant to assign it. Assign it to the instance variable charCounts like this: charCounts = new int[TOTAL_LETTERS]; This means that, in your code, the instance variable charCounts remains null until you access and a NullPointerException results.

Categories : Java

C# CodeDom "} Expected"
At the very end of the code you pasted, you're missing a close brace to your if statement, and it would also appear that the following line has one extra } in it: Temp.AppendLine(@"}}}}}"); It looks like it should be: Temp.AppendLine(@"}}}}");

Categories : C#

How to use " in CodeDom Source Code?
Take the TextBox input, convert it to a C# string literal and place it within the string that contains the attribute code: string description = textBox1.Text; string descriptionAsCsharpStringLiteral = "@"" + description.Replace(""", """") + """; string attribute = "[assembly: AssemblyDescription(" + descriptionAsCsharpStringLiteral + ")]"; Temp.AppendLine("using System.Reflection;") .AppendLine(attribute) .AppendLine("namespace ...");

Categories : C#

CodeDom Add File Properties?
Not sure what is the file property you are talking about . If you are looking at compiling any code via code take a look at the type System.CodeDom.Compiler.CompilerParameters or if you are looking to compile using the csharp compiler csc.exe then take a look at http://msdn.microsoft.com/en-us/library/6ds95cz0%28v=vs.71%29.aspx .

Categories : C#

Recursive type constraints in CodeDom
For the reasons unknown, Add method doesn't use type parameter name then it's passed as a Type type, but it will generate them from a string. Apparently difference is in the CodeTypeReference class constructor (which is ultimate item type in Constraints collection). So codeTypeParameter.Constraints.Add(constraint.ToString()); should give you an expected result.

Categories : C#

how to represent a generic method call in CodeDOM
I think you want the CodeTypeReference something like this: (Note that I haven't tested this fully, I've just created the graph - not actually rendered it to code) cas.Right = new CodeMethodInvokeExpression( new CodeMethodReferenceExpression( new CodeVariableReferenceExpression("row"), "Field", new CodeTypeReference("System.String")), new CodePrimitiveExpression(0));

Categories : C#

Public variable interference between InMemory generated assemblies from CodeDom
After a lot of trial and testing I found a solution. It had nothing to do with the Public variables and also changing the Namespace and Class name for each instance did not work either, each code assembly was still sharing information back and forth. So the answer... Because the multiple instances were being called from the same parent application the _evaluator Object needs to be independent for each instance in the Compiler code and the Invoking code. I ended up allowing for 5 instances that could be launched at the same time from a windows application. If one instance is closed then the program assigns the next called instance to the available id which I am storing in a public List(Of...) paired values. that code is not shown here of how to assign and remove. Dim _evaluator1 As Objec

Categories : Vb.Net

How to create optional arguments in Visual Basic generated through CodeDom?
The OptionalAttribute is not supported in VB.NET. I cannot find any official documentation that specifically says so, but if you try to use it in a VB.NET project, it will have no effect. To create an optional parameter in VB.NET, you must use the Optional keyword, for instace: Public Class Functions Public Function Foo() As Integer Return Bar() End Function Public Function Bar(Optional ByVal optionalParam As Integer = 1) As Integer Return optionalParam End Function End Class

Categories : Vb.Net

Unable to start debugging on the web server. Unable to connect to the webserver
Verify that your web.config has the following entry: <compilation debug="true" targetFramework="2.0" /> Note: If you are targeting framework 1.1, then obviously change the 2.0 to 1.1. UPDATE: The `targetFramework` attribute is new in .NET 4.0 and later, so to enable debugging on .NET 2.0 and earlier, then you cannot use the `targetFramework` attribute, like this: <compilation debug="true" />

Categories : Asp Net

C - compilation error
Everything is from compiled highest source file - main.o strange thing to compile an object-file again, or to name a source-file like an object-file. .o normally is what comes from the compilation step with a .c file.

Categories : C

Compilation Error C++
Maybe because extendedEuclid isn't defined yet ? You have to add its prototype before calling it. Add pair<LL, pair<LL, LL> > extendedEuclid(LL a, LL b); on the top of your file and it'll work ;)

Categories : C++

How to get compilation day from C++ defines?
There is a standard predefined macro: __DATE__ It expands to a string constant containing the date the preprocessor was run. The string always contains 11 characters in this format "Jul 28 2013". Code which determines the day of the week from the date can be found here.

Categories : C++

Conditional compilation for app name
Resolved by creating a small program fired as a Pre-Build event which read the Manifest and change it accordingly to the Config name passed to him For reference of anyone should have this problem here is the code. This implementation takes two parameter par1: name of the config par2: path to the WMAppManifest of the application static void Main(string[] args) { XmlDocument document = GetDocument(args[1]); SubstituteName(document, args[0]); SaveDocument(document, args[1]); } private static void SaveDocument(XmlDocument document, string path) { document.Save(path); } private static void SubstituteName(XmlDocument document, string ConfigName) { string name="appname "+ConfigName; if (ConfigName.Equals("Config1"

Categories : C#

QML pre-compilation to bytecode, is it possible?
QML pre-compilation to bytecode, is it possible? Unfortunately, this is not possible as of now. Also, this is a fairly large feature request, so will not probably be supported any time soon. For sure, not in the upcoming 5.2 for which we have the feature freeze in one week, but most probably not even 5.3 for next summer, etc. I have just discussed this issue shortly with one of the developers, so you may need to live with(out) it for now. I was also asking about creating a jira report for tracking this, but I have been told such a big feature requests are not tracked there like the v4 engine rewriting for the declarative repository in the near past.

Categories : Qt

error during gcc 4.7.3 compilation
Can you check that libgmp depends on? If libgmp depends on a library A, then most likely the undefined symbols would be in A. If you have manually compiled libgmp from source, Can you add the configure command in the question?

Categories : Gcc

ANT compilation fails
It would appear module1 is not compiling because the jar created by module2 is not being built. You're calling the subant task, without specifying target: <subant target="buildJar"> <fileset dir="../module2/" includes="build.xml" /> </subant> The module1 build file does not have a default target specified: <?xml version="1.0" encoding="UTF-8"?> <project name="module2"> .. .. My recommended solution is to specify a default target as follows: <project name="module2" default="buildJar"> Aside Multi-module build support and dependency management are features baked into more modern Java build tools. If you're trying to structure a large project in ANT, consider learning how the ivy plugin works.

Categories : Java

Compilation error VTK, C++
The readme says that it requires VTK 4.2. Are you sure that you are using exactly this version? Because Ubuntu 12.10 seems to pack version 5.8. Your options are: Find, download VTK 4.2, compile it and use your private copy instead of the system one. Find an updated version of volumemorph that works with your VTK version. Learn the differences between VTK 4.2 and 5.8 and patch the volumemorph yourself!

Categories : C++

.NET JIT compilation naivety
I'm a bit rusty with this, but I'm also interested in the low level assembly side of things. Here goes: push ebp; save stack frame pointer Push the value stored in EBP onto the stack, so that when we return from this method, we know where we came from. mov ebp,esp; setup current frame Move current stack position value from ESP to EBP, so that EBP is in the context of the current method. The preceding two lines of code are a convention that ensures there's a fixed position (stored in the EBP register) on the stack determining relative location of local variables. call 6F03BE38; Console.Out property getter No prizes for guessing that this is a call to Console.Out mov ecx,eax; setup "this" Returned values from methods are stored in EAX, which is a matter of the calling conventio

Categories : Dotnet

What vim features available only upon compilation?
Vim can be compiled as a small executable with only the bare minimum features needed for quick edits, that's the default vim you get on most unixes, or as a big executable with many more features needed for programing. The compile-time features required by commands and functions are listed in the doc under each command/function with specific requirements. No feature needed means the command is available no matter what features were enabled at compile time. You can read about the subject in :help :version

Categories : Vim

Javac Cross-Compilation with 1.7
You cannot have a newer version of source and lower version of target. For example, In Java 5, a number of new features were added to the language, such as generics, autoboxing and you cannot expect a JVM 1.4 to understand it. So, you must tell the compiler that your source code is Java 1.4 source code. This explains the results you have. The default for -target depends on the value of -source: If -source is not specified, the value of -target is 1.7 If -source is 1.2, the value of -target is 1.4 If -source is 1.3, the value of -target is 1.4 If -source is 1.5, the value of -target is 1.7 If -source is 1.6, the value of -target is 1.7 For all other values of -source, the value of -target is the value of -source. For more info refer to http://docs.oracle.com/javase/7/docs/technotes/too

Categories : Java

Android kernel compilation
.config file is auto generated file, changing any flags in .config will not affect the kernel configuration. To change the kernel configuration you need to open configuration window by typing below command in your kernel folder: make ARCH=arm menuconfig PS:: if you are using ubuntu 12.04 you may get some error while executing the 'make ARCH=arm menuconfig' command, to get rid of it try (atleast it worked for me): sudo apt-get install lib32ncurses5-dev

Categories : Android

GWT compilation fails in eclipse
From the log I can't say for sure but I can guess that in your RequestContext definitions you are declaring the service implementation. You should declare the service interface instead. EDIT: If a member of the Steering Committee says my answer is not clear it is probably true. Apologies and I'll try to be more explicit. From the log looks like there is some server class (i.e. a class that is executed on the application server; given that the log shows an error from the RequestFactory I presume we are in the middle of some client-server communication here) which is declared in the RequestFactory definition file: ApplicationRequestFactory.java. In particular, I would expect that some parameter in some method of the interface SearchRequestContext is of type FilterConfiguration. This is wron

Categories : Gwt

Waiting on compilation to finish
compile is async. So, you have two choices. One, don't use compile. Instead use one of the other ways to invoke a shell command, like shell-command or start-process or call-process. I think this is probably preferred; I don't see why you'd need to use compile here. Two, set compilation-finish-function.

Categories : Emacs

Namespace compilation issues
First, using namespace LLL_NWK is not appropriate here. You are declaring and defining a function void lllInit() outside of namespace LLL_NWK. You need to place the definition inside of the namespace, which can be done like this: void LLL_NWK::lllInit() { } or like this: namespace LLL_NWK { void lllInit() { } } Second, make sure you compile the code as C++.

Categories : C++

Understanding g++ compilation flags
"Generate extra code to write profile" is the -p option, and that will add extra code. The extent of that extra code is at least one register load and one function call at start and end of functions, but it does depend on the architecture. This may in turn affect other optimisations during compilation, such as availability of registers, inlining and when actually running the code it may affect cache-hit rates/miss-rates, and aside from the direct effect of executing those extra instructions. The -g option does not in itself add extra code, it just produces debug symbols that become part of the executable file so that a debugger can figure out where the functions, variables, etc are when you use the debugger.

Categories : Gcc

Get compilation Date & Time from .exe
You could rely on the operating system's 'created date' file metadata (right click on the executable and select Properties), but this won't work if the file was created in a different way (e.g. it was copied). Another thing you could try: The C++ preprocessor has some macros that you can use: __DATE__ and __TIME__. As a caveat, this will only show you when the preprocessor was run, not when the executable was fully compiled. You could save these into the program and then display them when the executable is run. Really, the easiest solution would probably be to save the current date/time in a separate file whenever a build is done.

Categories : C++

Jetty embedded and JSP compilation to 1.7?
http://www.eclipse.org/jetty/documentation/current/configuring-jsp.html#jsp-support When you are configuring the org.apache.jasper.JspServlet, there is an option for compilerTargetVM which lets you set this value. [edit] I'll add that you may want to look into the webdefault.xml file in jetty and poach the JspServlet definition there into your own web.xml and make your changes accordingly. http://www.eclipse.org/jetty/documentation/current/webdefault-xml.html

Categories : Java

Server Side Compilation for .mp4 and .swf
mp4 can be created with ffmpeg from a series of images. Here's a sample from FFMPEG - Stream series of images into MP4 with sound synchronization at specified frame rate Here is an example invocation of ffmpeg that takes frames named sphere00.png through sphere29.png together with one second audio track audio.wav and creates an out.mp4 file that shows the frames at 30 fps together with the sound. ffmpeg -r 30 -f image2 -i "sphere%02d.png" -i audio.wav out.mp4 swf can be created on-demand from Flex source using the mxmlc compiler (which can embed images or be generated dynamically easily). Other swf options include swfmill and haxe

Categories : Actionscript

QTMultimedia compilation for Raspberry Pi
If QtMultimedia is not being built, how can you expect it to work running the application? That probably means you're still missing some dependencies or something else is wrong with your env. Maybe you didn't set pkgconfig paths correctly. You can also try with this guide I wrote: http://thebugfreeblog.blogspot.it/2013/03/bring-up-qt-501-on-raspberry-pi-with.html. I had issues with audio and gstreamer, but some time has passed and something might have changed since then. If after building and deploying the QtMultimedia module and the gstreamer plugin you still get that, use the QT_DEBUG_PLUGIN env variable to get some logs.

Categories : Qt

gstreamermm and Qt compilation error
The error appears because Qt defines foreach macro as a shorthand for Q_FOREACH. This conflicts with declaration of foreach method in a few gstreamermm classes. There are a few possible ways to avoid the problem: Add CONFIG += no_keywords line to your Qt project file. Note that then you won't be able to use Qt-specific keywords like e.g. signals and slots. If you use them already (e.g. because they were auto-generated by QtCreator), you can replace them with Q_SIGNALS and Q_SLOTS macros. Change the order of header inclusion by putting gstreamermm.h before Qt headers. Put #undef foreach after including Qt headers but before including gstreamermm.h. 2 and 3 are much less elegant solutions, since the order of header inclusion shouldn't matter in a well-written application which uses well

Categories : C++

Cross compilation : jdk1.6 on jdk 1.7
That might not be enough. First of all, besides setting target to 1.6, you should also set source to 1.6: <javac source="1.6" target="1.6" srcdir="src"> to let the Java compiler know that it should interpret your code as 1.6-compatible source code. But a bigger problem is that this does not prevent you from using classes, interfaces and methods which are new in the Java 7 standard library. If you use Java 7-only classes, interfaces or methods, it will compile, but you'll get errors like NoSuchMethodError when you run it on Java 6 and you're calling a method that didn't exist in Java 6. The safest way to ensure that your code is compatible with Java 6 is installing JDK 6 and using that to compile your code. (Note: There's no problem with having multiple versions of the JDK insta

Categories : Java

Protobuf compilation with Go tools
goprotobuf "provides Go support, in the form of a library and protocol compiler plugin, for Google's protocol buffers". The README at the goprotobuf library has some good info. From https://code.google.com/p/goprotobuf/source/browse/README#106 : Consider file test.proto, containing package example; enum FOO { X = 17; }; message Test { required string label = 1; optional int32 type = 2 [default=77]; repeated int64 reps = 3; optional group OptionalGroup = 4 { required string RequiredField = 5; } } To build a package from test.proto and some other Go files, write a Makefile like this: include $(GOROOT)/src/Make.$(GOARCH) TARG=path/to/example GOFILES= test.pb.go other.go include $(GOROOT)/s

Categories : Go

How to prevent class compilation
No, you can't do checks like this during compilation (assuming a normal compile with javac). The usual way to do this is to have unit tests that are executed whenever you make a build (no one really does "manual" compiles in real projects, anyway). Having the build break with an error when a tests fails is a very common scenario.

Categories : Java

Moving directory after compilation of R
You are supposed to do configure [...] make make install rather than a manual move. This is a very standard process for source code on Unix system following the GNU conventions. For more details, please see the manual R Installation and Administration that came with the sources. There are also pre-built binaries for several distributions.

Categories : R

Freebasic Compilation Fail
In your program the variable var1 is declared in the main program scope. This variable will not be accessible in sub programs (procedures: SUB or FUNCTION), unless you use the SHARED keyword. Then the variable would become globally available in your program. The better way is to use local variables: declare sub premain declare sub main premain sleep: end sub premain print "EMC ALPHA v1.0" main end sub sub main print "Functions:" print "1.Add" print "2.Subtract" print "3.Multiply" print "4.Divide" '****vv HAVE A LOOK HERE vv**** dim var1 as integer input "Enter Function Number" ;var1 if var1=1 then print "HElo" end if '<== this was missing, too. ***** ("Expected END IF") end sub Global variables (created by SHARED) should only rarely b

Categories : Misc

C typedef enum compilation
An enum declaration creates an enumerated type. Such a type is compatible with (and therefore has the same size and representation as) some predefined integer type, but the compiler chooses which one. But the enumeration constants are always of type int. (This differs from C++, where the constants are of the enumerated type.) So typedef unsigned char ... vs. typedef enum ... will likely change the size and representation of the type, which can matter if you define objects of the type or functions that return the type, but the constants VALUE_1 et al will be of type int either way. It's probably best to use the enum type; that way the compiler can decide what representation is best. Your alternative of specifying unsigned char will minimize storage, but depending on the platform it migh

Categories : C

How to resolve this compilation error
You can define _CRT_SECURE_NO_WARNINGS in the header file that generates the error, before including the header file or apply it to the entire project by adding it to the project settings in "Project->Properties->Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions". #define _CRT_SECURE_NO_WARNINGS #include "initshader.h" //... your code here If you are using pre-compiled headers and the header generating the errors is included in stdafx.h you will need to add it to the stdafx.h header or add in your project settings as described above.

Categories : C++

DisplayFor() compilation error
The problem is in List.cshtml. You need to change it to soemthing like bellow: @using PartyBiz.Models.Objects @model IEnumerable @foreach(var m in Model) { @Html.DisplayFor( m => m.Organizations ) }

Categories : C#

How to suppress Jenkins or ios SDK compilation log
Could you execute your build/compile steps outside of jenkins (calling the exe's directly) and then simply redirect that output to a specific file (or something null)? I do something similar with Jenkins where I'm using Nant to perform the actual build, and my calls to the compiler actions create specific log files at each step.

Categories : Iphone

GHC: insert compilation date
Using Template Haskell for this is relatively simple. You just need to: Run IO action within Template Haskell monad: runIO :: IO a -> Exp a Then create a string literal with: stringE :: String -> ExpQ Put a whole expression within a quasiquote. $( ... ) This program will print time of its compilation: {-# LANGUAGE TemplateHaskell #-} import Language.Haskell.TH import Data.Time main = print $(stringE =<< runIO (show `fmap` Data.Time.getCurrentTime)) You may put the relevant fragment into a module that imports all other modules to make sure it is recompiled. Or take current revision information from your versioning system. See: TemplateHaskell and IO

Categories : Haskell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.