Search Results

Search found 34176 results on 1368 pages for 'project types'.

Page 95/1368 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • C++ private inheritance and static members/types

    - by WearyMonkey
    I am trying to stop a class from being able to convert its 'this' pointer into a pointer of one of its interfaces. I do this by using private inheritance via a middle proxy class. The problem is that I find private inheritance makes all public static members and types of the base class inaccessible to all classes under the inheriting class in the hierarchy. class Base { public: enum Enum { value }; }; class Middle : private Base { }; class Child : public Middle { public: void Method() { Base::Enum e = Base::value; // doesn't compile BAD! Base* base = this; // doesn't compile GOOD! } }; I've tried this in both VS2008 (the required version) and VS2010, neither work. Can anyone think of a workaround? Or a different approach to stopping the conversion? Also I am curios of the behavior, is it just a side effect of the compiler implementation, or is it by design? If by design, then why? I always thought of private inheritance to mean that nobody knows Middle inherits from Base. However, the exhibited behavior implies private inheritance means a lot more than that, in-fact Child has less access to Base than any namespace not in the class hierarchy!

    Read the article

  • Java constructor using generic types

    - by user37903
    I'm having a hard time wrapping my head around Java generic types. Here's a simple piece of code that in my mind should work, but I'm obviously doing something wrong. Eclipse reports this error in BreweryList.java: The method initBreweryFromObject() is undefined for the type <T> The idea is to fill a Vector with instances of objects that are a subclass of the Brewery class, so the invocation would be something like: BreweryList breweryList = new BreweryList(BrewerySubClass.class, list); BreweryList.java package com.beerme.test; import java.util.Vector; public class BreweryList<T extends Brewery> extends Vector<T> { public BreweryList(Class<T> c, Object[] j) { super(); for (int i = 0; i < j.length; i++) { T item = c.newInstance(); // initBreweryFromObject() is an instance method // of Brewery, of which <T> is a subclass (right?) c.initBreweryFromObject(); // "The method initBreweryFromObject() is undefined // for the type <T>" } } } Brewery.java package com.beerme.test; public class Brewery { public Brewery() { super(); } protected void breweryMethod() { } } BrewerySubClass.java package com.beerme.test; public class BrewerySubClass extends Brewery { public BrewerySubClass() { super(); } public void androidMethod() { } } I'm sure this is a complete-generics-noob question, but I'm stuck. Thanks for any tips!

    Read the article

  • Design pattern for loading multiple message types

    - by lukem00
    As I was looking through SO I came across a question about handling multiple message types. My concern is - how do I load such a message in a neat way? I decided to have a separate class with a method which loads one message each time it's invoked. This method should create a new instance of a concrete message type (say AlphaMessage, BetaMessage, GammaMessage, etc.) and return it as a Message. class MessageLoader { public Message Load() { // ... } } The code inside the method is something which looks really awful to me and I would very much like to refactor it/get rid of it: Message msg = Message.Load(...); // load yourself from whatever source if (msg.Type == MessageType.Alpha) return new AlphaMessage(msg); if (msg.Type == MessageType.Beta) return new BetaMessage(msg); // ... In fact, if the whole design looks just too messy and you guys have a better solution, I'm ready to restructure the whole thing. If my description is too chaotic, please let me know what it's missing and I shall edit the question. Thank you all.

    Read the article

  • C++: Trouble with dependent types in templates

    - by Rosarch
    I'm having trouble with templates and dependent types: namespace Utils { void PrintLine(const string& line, int tabLevel = 0); string getTabs(int tabLevel); template<class result_t, class Predicate> set<result_t> findAll_if(typename set<result_t>::iterator begin, set<result_t>::iterator end, Predicate pred) // warning C4346 { set<result_t> result; return findAll_if_rec(begin, end, pred, result); } } namespace detail { template<class result_t, class Predicate> set<result_t> findAll_if_rec(set<result_t>::iterator begin, set<result_t>::iterator end, Predicate pred, set<result_t> result) { typename set<result_t>::iterator nextResultElem = find_if(begin, end, pred); if (nextResultElem == end) { return result; } result.add(*nextResultElem); return findAll_if_rec(++nextResultElem, end, pred, result); } } Compiler complaints, from the location noted above: warning C4346: 'std::set<result_t>::iterator' : dependent name is not a type. prefix with 'typename' to indicate a type error C2061: syntax error : identifier 'iterator' What am I doing wrong?

    Read the article

  • Value types of variable size

    - by YellPika
    I'm trying to code a small math library in C#. I wanted to create a generic vector structure where the user could define the element type (int, long, float, double, etc.) and dimensions. My first attempt was something like this... public struct Vector<T> { public readonly int Dimensions; public readonly T[] Elements; // etc... } Unfortunately, Elements, being an array, is also a reference type. Thus, doing this, Vector<int> a = ...; Vector<int> b = a; a[0] = 1; b[0] = 2; would result in both a[0] and b[0] equaling 2. My second attempt was to define an interface IVector<T>, and then use Reflection.Emit to automatically generate the appropriate type at runtime. The resulting classes would look roughly like this: public struct Int32Vector3 : IVector<T> { public int Element0; public int Element1; public int Element2; public int Dimensions { get { return 3; } } // etc... } This seemed fine until I found out that interfaces seem to act like references to the underlying object. If I passed an IVector to a function, and changes to the elements in the function would be reflected in the original vector. What I think is my problem here is that I need to be able to create classes that have a user specified number of fields. I can't use arrays, and I can't use inheritance. Does anyone have a solution? EDIT: This library is going to be used in performance critical situations, so reference types are not an option.

    Read the article

  • Java: Incompatible Types

    - by user2922081
    import java.text.*; import java.util.*; public class Proj3 { public static void main(String[]args){ // DecimalFormat df = new DecimalFormat("#0.00”); Scanner s = new Scanner(System.in); int TotalHours = 0; int TotalGrade = 0; System.out.print("How many courses did you take? "); int Courses = Integer.parseInt(s.nextLine()); System.out.println(""); int CourseNumber = Courses - (Courses - 1); while (Courses > 0){ System.out.print("Course (" + CourseNumber +"): How many hours? "); int Hours = Integer.parseInt(s.nextLine()); TotalHours = TotalHours + Hours; System.out.print("Course (" + CourseNumber +"): Letter grade? "); char Grade = s.nextLine().charAt(0); if (Grade == 'A'){ TotalGrade = TotalGrade + (4 * Hours); } if (Grade == 'B'){ TotalGrade = TotalGrade + (3 * Hours); } if (Grade == 'C'){ TotalGrade = TotalGrade + (2 * Hours); } if (Grade == 'D'){ TotalGrade = TotalGrade + (1 * Hours); } Courses = Courses - 1; CourseNumber = CourseNumber + 1; } Double GPA = TotalGrade / TotalHours; System.out.println(df.format(GPA)); } } This is for an assignment and I don't know how to fix my problem. The Double GPA = TotalGrade / ToutalHours; line is coming up with the Incompatible Types error. Also I'm supposed to include the DecimalFormat df = new DecimalFormat("#0.00”);line at the beginning of the main but its not working. Anything is very helpful. Thanks

    Read the article

  • Blend "Window is not supported in a WPF Project"

    - by Andy Dent
    I am having a frustrating time with Blend reporting "Window is not supported in a Windows Presentation Foundation (WPF) project." due to unbuildable configurations but can't quite work out how to mangle my way out of it. I've worked out it is probably due to my trying to have a single solution with x86 and x64 configurations. There is no way to tell Blend 2 which is the active Solution Configuration and active Solution Platform. I think it's a bit of a weakness in the configuration system, or maybe the way I've set things up, but I have Debug64 and Debug solution configurations one of each is used with the platform x86 and x64. I also think it's a simple sorting problem - x64 comes before x86 and Debug comes before Debug64 so Blend ends up with an unbuildable config of Debug with x64. When I choose the combination of Debug and x64 in VS, its XAML editor can't load either. The solution is a moderately complex one - there's a pure Win32 DLL, C++/CLI Model project and two other WPF assemblies used by the main WPF project. UPDATE I have ripped all the x64 config out of my solution and rebuilt everything with no effect. I then uninstalled Blend 2 and installed Blend 3 - it doesn't like things either. The Visual Studio XAML editor is still very happy as is the program building and running. (echoes of strangled scream of frustration from oz)

    Read the article

  • WiX 3: Using heat.exe to add bulk files to a new WiX project: HEAT5150

    - by Karen Kwong
    If this is a repeat question, please direct me to the existing solution. I wasn't able to find a matching query. We currently use InstallShield. I'm attempting to covert a project with 407 files to a WiX3 installation package. I tried using heat.exe to do some of the automation but I get the following warning for almost every file: c: heat dir "c:\projectDir\projectA" -gg -ke -template:Product -out "c:\install\projectA\heatOutput" heat.exe: warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: c:\projectDir\projectA\plugin1.dll. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: c:\projectDir\projectA\plugin1.dll, error: 126. Q: Is it normal for this warning to be reported for every file? If there's a current "How To create/convert to your first WiX install project with many files" tutorial, please point me to it. The key requirement is "with many files". Thank-you -Karen Kwong- PS. I know that WiX is designed for incremental install project creation but it would be nice to know if there's an automated way to convert existing install projects.

    Read the article

  • Returning Meaningful Exceptions from a WCF Project

    - by MissingLinq
    I am pretty new to WCF in general. What little experience I have comes from using fairly simple .SVC services in ASP.NET web applications. I tried experimenting with using a WCF Project for the first time, and ran into a major show-stopper. As I’m sure most are aware, for some strange reason, in a web application in which the customErrors mode is set to On , services (both .ASMX and .SVC) will not return exception details to the client. Instead, the exception and stack trace are emptied, and the message always reads “There was an error processing the request”, which is not at all helpful. When services are directly hosted inside the web application itself, it’s easy to work around this restriction by placing the services in a dedicated folder, and setting for that folder. However, I’m running into this same issue with exceptions not being returned from services that live in a separate WCF project. Thing is, I don’t know how to work around that. In a nutshell: I need to get my WCF Project services to bubble REAL exceptions to the client – or at least, the original exception message, instead of “There was an error processing the request”.

    Read the article

  • maven generate eclipse project for custom packaging

    - by Riduidel
    Hi,for a project I'm working on, I've defined a custom maven packaging, and the associated lifecycle (through the definition of a components.xml and the definition of a LifecycleMapping). Obviously, this packaging corresponds to a specific development, for which a plugin has been created in Eclipse. What I would like to do is configure Eclipse according to my pom.xml content. I've obviously looked at Customizable build lifecycle, but I'm more than confused by provided information. From what I understand, I must define in my target project a build plugin, in which i'll add configuration elements specific to my project. As an example, having a configurator called mycompany.mydev.MyEclipseConfigurator, I'll have to write <build> <plugins> <plugin> <groupId>org.maven.ide.eclipse</groupId> <artifactId>lifecycle-mapping</artifactId> <version>0.9.9-SNAPSHOT</version> <configuration> <mappingId>customizable</mappingId> <configurators> <configurator id='mycompany.mydev.MyEclipseConfigurator'/> </configurators> </configuration> </plugin> </plugins> </build> Am I right ?

    Read the article

  • WCF: WSDL-first approach: Problems with generating fault types

    - by Juri
    Hi, I'm currently in the process of creating a WCF webservice which should be compatible with WS-I Basic Profile 1.1. I'm using a wsdl-first approach (actually for the first time), defining first the xsd for the complex types, the WSDL and then using svcutil.exe for generating the according server as well as client-side interfaces/proxies. So far everything works fine. Then I decided to add a fault to my WSDL. Regenerating with svcutil succeeded, but then I noticed that my generated fault doesn't have the properties I defined in my xsd file (which is imported by my WSDL). Fault XSD definition <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://product.mycompany.com/groupsfault_v1.xsd" xmlns:tns="http://product.mycompany.com/groupsfault_v1.xsd"> <complexType name="groupsFault"> <sequence> <element name="code" type="int"/> <element name="message" type="string"/> </sequence> </complexType> </schema> Generated .Net fault object [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] [System.Xml.Serialization.XmlRootAttribute(IsNullable=false)] public partial class groupFault : object, System.Xml.Serialization.IXmlSerializable { private System.Xml.XmlNode[] nodesField; private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("groupFault", "http://sicp.services.siag.it/groups_v1.wsdl"); public System.Xml.XmlNode[] Nodes { get { return this.nodesField; } set { this.nodesField = value; } } public void ReadXml(System.Xml.XmlReader reader) { this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); } public void WriteXml(System.Xml.XmlWriter writer) { System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); } public System.Xml.Schema.XmlSchema GetSchema() { return null; } public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) { System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); return typeName; } } Is this ok?? I'd expect to have an object created that contains properties for "code" and "message" s.t. you can then throw it by using something like ... throw new FaultException<groupFault>(new groupFault { code=100, message="error" }); ... (sorry for the lower-case type definitions, but this is generated code from the WSDL) Why doesn't the svcutil.exe generate those properties?? Some sources on the web suggested to add the /useSerializerForFaults option. I tried it, it doesn't work giving me an exception that the fault type is missing on the wsdl:portType declaration. Validation with several other tools succeeded however. Any help is VERY appreciated :) thx

    Read the article

  • Installed VS Express 2010 with .NET 4.0 and now .NET 3.5 setup project adds 15 dependencies

    - by Heckflosse_230
    Hi, I installed VS Express 2010 with .NET 4.0 and now a .NET 3.5 setup project in VS 2008 adds 15 dependencies (below), what is going on??? I did not change anything in the project in between installing VS 2010, VS 2008 is packagin the following files in the project: ==================== Packaging file 'Microsoft.Transactions.Bridge.dll'... Packaging file 'System.Core.dll'... Packaging file 'System.Data.DataSetExtensions.dll'... Packaging file 'System.Data.Entity.dll'... Packaging file 'System.Data.Linq.dll'... Packaging file 'System.Data.Services.Client.dll'... Packaging file 'System.Data.Services.Design.dll'... Packaging file 'System.IdentityModel.Selectors.dll'... Packaging file 'System.IdentityModel.dll'... Packaging file 'System.Runtime.Serialization.dll'... Packaging file 'System.ServiceModel.Web.dll'... Packaging file 'System.ServiceModel.dll'... Packaging file 'System.Web.Abstractions.dll'... Packaging file 'System.Web.Extensions.dll'... Packaging file 'System.Xml.Linq.dll'... ==================== I've uninstalled VS 2010 and .NET 4.0 but to no avail, same problem. Lesson learned: DON'T EXPERIMENT ON DEVELOPMENT MACHINE! Thanks, Chris

    Read the article

  • JBoss Seam project can not be run/deployed

    - by user1494328
    I created sample application in Seam framework (Seam Web Project) and JBoss Server 7.1. When I try run application, console dislays: 23:29:35,419 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."secoundProject-ds.xml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."secoundProject-ds.xml".PARSE: Failed to process phase PARSE of deployment "secoundProject-ds.xml" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:85) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82) at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80) ... 6 more 23:29:35,452 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment secoundProject-ds.xml in 1ms 23:29:35,455 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015863: Replacement of deployment "secoundProject-ds.xml" by deployment "secoundProject-ds.xml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"secoundProject-ds.xml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"secoundProject-ds.xml\".PARSE: Failed to process phase PARSE of deployment \"secoundProject-ds.xml\""}} 23:29:35,457 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "secoundProject-ds.xml" 23:29:35,920 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."secoundProject-ds.xml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."secoundProject-ds.xml".PARSE: Failed to process phase PARSE of deployment "secoundProject-ds.xml" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:85) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82) at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80) ... 6 more 23:29:35,952 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.deployment.unit."secoundProject-ds.xml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."secoundProject-ds.xml".PARSE: Failed to process phase PARSE of deployment "secoundProject-ds.xml" My secoundProject-ds.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> <datasources> <local-tx-datasource> <jndi-name>secoundProjectDatasource</jndi-name> <use-java-context>true</use-java-context> <connection-url>jdbc:mysql://localhost:3306/database</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>root</user-name> <password></password> </local-tx-datasource> </datasources> When I comment tags errors disappear, but application is disabled in browser (The requested resource (/secoundProject/) is not available.). What should I do to fix this problem?

    Read the article

  • Visual studio 2010 setup project problem.

    - by Guru
    Hi there, I've made an application that uses .NET framework 3.5 SP1 and SQL Server 2008 Express. Application is fine and now i'm going to to make a setup project for this. When I first build my setup it was fine as all the prerequisites were not included in setup. But I want my setup to install .NET 3.5 SP1 and SQL SERVER 2008 Express also. So for this I've changed the options in setup project's properties from "Download prerequisites from following location" to "Download prerequisites from the same location as my application". In addition to that I've also checked the options above like .NET 3.5 SP1 and SQL Server 2008 Express etc. After doing all this I build my project again. This time I'm Getting 57 Errors. Error 1 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\aspnet.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information. D:\MindStrike Setup\MindStrike Setup.vdproj MindStrike Setup Error 2 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\aspnet_64.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information. D:\MindStrike Setup\MindStrike Setup.vdproj MindStrike Setup Error 3 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\clr.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information. D:\MindStrike Setup\MindStrike Setup.vdproj MindStrike Setup Error 4 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\clr_64.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information. D:\MindStrike Setup\MindStrike Setup.vdproj MindStrike Setup As the question will become too large so I'm just pasting 3 errors but there are totally 57 errors. Please help me . Thanks in advance Guru

    Read the article

  • Asp.net Webdeployment Project override applicationSettings

    - by citronas
    I got a web deyploment project for a web application project in vs 2008. While building the web deployment project, I want to replace properties in the web.config. My settings are autogenrated by the deisgner. <applicationSettings> <NAMESPACE.Properties.Settings> <setting name="Testenvironment" serializeAs="String"> <value>True</value> </setting> </NAMESPACE.Properties.Settings> </applicationSettings> In the config file which contains the settings for the specific server looks like the following: <?xml version="1.0"?> <applicationSettings> <NAMESPACE.Properties.Settings> <setting name="Testenvironment" serializeAs="String"> <value>False</value> </setting> </NAMESPACE.Properties.Settings> </applicationSettings> Sadly, this does not work. I get an error "The format of a configSource file must be an element containing the name of the section" that highlights the second line (2nd example code). How must the Tag be named in order to make evertything work? Edit: Deleting the "applicationSetting"-Tags does not work either.

    Read the article

  • CS Master's Degree Project vs. Thesis options

    - by Nwosh
    I'm doing a master's degree in computer science, and I'm currently at the point where I have to decide between the thesis and non-thesis options offered by my university. The thesis option was my first choice, it entails taking less courses but tends to take more time doing your thesis. The non-thesis option involves taking more coursework, taking a comprehensive exam, and doing a project in one semester with a faculty member. I'd like to pursue a PhD degree eventually (although not right away, I want to get some years of professional experience first), and I heard that having demonstrated the ability to work on a thesis helps a lot with admission (like: not doing thesis raises questions and suggests not being interested in research) and that the experience itself is very good. At the same time, almost everyone I know who did a thesis at my university took a long time (2-3 years), in theory it could be done in 1.5 years. I'm a part time student and I don't really want to spend so much time just getting a master's degree, I could still publish a few papers while working on the project option and I'd be done in a year or so, additionally, I heard having a master's degree with a project and more coursework is more desirable for the industry. So, when applying for a PhD degree in CS at some of the better universities, would the time spent working on the master's thesis help in getting me accepted? Or should I opt for the non-thesis option and hope that the extra coursework and publishing some papers would make up for not working on a thesis?

    Read the article

  • C++ errors not shown in Visual Studio C# project

    - by Diana
    I have in Visual Studio 2008 a .NET 3.5 C# project that uses a dll compiled from a C# project (let's call it dll A). Dll A is using on his turn some C++ libraries. The problem is that when I encounter an error while calling objects from dll A, the application just closes, without showing any error. But I need to know what's the problem, I cannot just guess and go blind all along the project with this... I checked Window's event log, could not find anything. I checked the settings of throwing errors in Visual Studio, in menu Debug - Exceptions, all of them are checked (including C++ exceptions), so, any errors should be thrown. My code looks something like this: tessnet2.Tesseract tessocr = new tessnet2.Tesseract(); tessocr.Init(@"s:\temp\tessdata", "eng", false); tessocr.GetThresholdedImage(bmp, Rectangle.Empty).Save("s:\\temp\\" + Guid.NewGuid().ToString() + ".bmp"); List<tessnet2.Word> words = ocr.DoOCR(bmp, "eng"); //App exits at this line If I put in my code something like int x = Convert.ToInt32("test"); this should throw an error. And it throws, and Visual Studio shows it. Does anyone having any idea why the errors are not being shown? Or where else could be registered? Any help is very appreciated! Thanks!

    Read the article

  • How to use DataContractSerializer to create xml with tag names that match my known types

    - by mezoid
    I have the following data contract: [CollectionDataContract(Name="MyStuff")] public class MyStuff : Collection<object> {} [DataContract(Name = "Type1")] [KnownType(typeof(Type1))] public class Type1 { [DataMember(Name = "memberId")] public int Id { get; set; } } [DataContract(Name = "Type2")] [KnownType(typeof(Type2))] public class Type2 { [DataMember(Name = "memberId")] public int Id { get; set; } } Which I serialize to xml as follows: MyStuff pm = new MyStuff(); Type1 t1 = new Type1 { Id = 111 }; Type2 t2 = new Type2 { Id = 222 }; pm.Add(t1); pm.Add(t2); string xml; StringBuilder serialXML = new StringBuilder(); DataContractSerializer dcSerializer = new DataContractSerializer(typeof(MyStuff)); using (XmlWriter xWriter = XmlWriter.Create(serialXML)) { dcSerializer.WriteObject(xWriter, pm); xWriter.Flush(); xml = serialXML.ToString(); } The resultant xml string looks like this: <?xml version="1.0" encoding="utf-16"?> <MyStuff xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/"> <anyType i:type="Type1"> <memberId>111</memberId> </anyType> <anyType i:type="Type2"> <memberId>222</memberId> </anyType> </MyStuff> Does anyone know how I can get it to instead use the name of my known types rather than anyType in the xml tag? I'm wanting it to look like this: <?xml version="1.0" encoding="utf-16"?> <MyStuff xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/"> <Type1> <memberId>111</memberId> </Type1> <Type2> <memberId>222</memberId> </Type2> </MyStuff>

    Read the article

  • controlling which project header file Xcode will include

    - by jdmuys
    My Xcode project builds to variations of the same product using two targets. The difference between the two is only on which version of an included library is used. For the .c source files it's easy to assign the correct version to the correct target using the target check box. However, including the header file always includes the same one. This is correct for one target, but wrong for the other one. Is there a way to control which header file is included by each target? Here is my project file hierarchy (which is replicated in Xcode): MyProject TheirOldLib theirLib.h theirLib.cpp TheirNewLib theirLib.h theirLib.cpp myCode.cpp and myCode.cpp does thing such as: #include "theirLib.h" … somecode() { #if OLDVERSION theirOldLibCall(…); #else theirNewLibCall(…); #endif } And of course, I define OLDVERSION for one target and not for the other. So is there a way to tell Xcode which theirLib.h to include per target? Constraints: - the two header files have the same name. As a last resort, I could rename one of them, but I'd rather avoid that as this will lead to major hair pulling on the other platforms. - I'm free to tweak my project as I otherwise see fit Thanks for any help.

    Read the article

  • Best way to fork SVN project with Git

    - by Jeremy Thomerson
    I have forked an SVN project using Git because I needed to add features that they didn't want. But at the same time, I wanted to be able to continue pulling in features or fixes that they added to the upstream version down into my fork (where they don't conflict). So, I have my Git project with the following branches: master - the branch I actually build and deploy from feature_* - feature branches where I work or have worked on new things, which I then merge to master when complete vendor-svn - my local-only git-svn branch that allows me to "git svn rebase" from their svn repo vendor - my local branch that i merge vendor-svn into. then i push this (vendor) branch to the public git repo (github) So, my flow is something like this: git checkout vendor-svn git svn rebase git checkout vendor git merge vendor-svn git push origin vendor Now, the question comes here: I need to review each commit that they made (preferably individually since at this point I'm about twenty commits behind them) before merging them into master. I know that I could run git checkout master; git merge vendor, but this would pull in all changes and commit them, without me being able to see if they conflict with what I need. So, what's the best way to do this? Git seems like a great tool for handling forks of projects since you can pull and push from multiple repos - I'm just not experienced with it enough to know the best way of doing this. Here's the original SVN project I'm talking about: https://appkonference.svn.sourceforge.net/svnroot/appkonference My fork is at github.com/jthomerson/AsteriskAudioKonf (sorry - I couldn't make it a link since I'm a new user here)

    Read the article

  • How to arrange business logic in a Kohana 3 project

    - by Pekka
    I'm looking for advice, tutorials and links at how to set up a mid-sized web application with Kohana 3. I have implemented MVC patterns in the past but never worked against a "formalized" MVC framework so I'm still getting my head around the terminology - toying around with basic examples, building views and templates, and so on. I'm progressing fairly well but I want to set up a real-world web project (one of my own that I've been planning for quite some time now) as a learning object. I learn best by example, but example-based documentation is a bit sparse for Kohana 3 right now - they say so themselves on the site. While I'm not worried about learning the framework as I go along, I want to make sure the code base is healthily structured from the start - i.e. controllers are split nicely, named well and according to standards, and most importantly the business logic is separated into appropriately sized models. My application could, in its core, be described as a business directory with a range of search and listing functions, and a login area for each entry owner. The actual administrative database backend is already taken care of. Supposing I have all the API worked out and in place already - list all businesses, edit business, list businesses by street name, create offer logged in as business, and so on, and I'm just looking for how to fit the functionality into a MVC pattern and into a Kohana application structure that can be easily extended. Do you know real-life examples of "database-heavy" applications like directories, online communities... with a log-in area built on Kohana 3, preferably Open Source so I could take a peek how they do it? Are there conventions or best practices on how to structure an extendable login area for end users in a Kohana project that is not only able to handle a business directory page, but further products on separate pages as well? Do you know any good resources on building complex applications with Kohana? Have you built something similar and could give me recommendations on a project structure?

    Read the article

  • Problem while executing test case in VS2008 test project

    - by sukumar
    Hi all I have the situation as follows I have develpoed one test project in visual studio 2008 to test my target project. I was getting the following exception when i ran test case in my PC System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.GetType(UnitTestElement unitTest, String type) at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.ResolveMethods(). but the same project runs successfully in my colleague PC. as per my Understanding System.IO.FileNotFoundException will occur in case of missing out the dlls. i checked up with dependency walker to trace out the missed dll.dependency walke traced out the following dlls 1)MFC90D.dll 2)mSvcr90d.dll 3)msvcp90d.dll i copied this dlls to C:\windows\system32 from Microsoft visual studio 9.0 dir and again i ran the dependency walker.this time dependency walker is able to open the given testproject dll with 0 errors .even then the same exception comes up when i ran the test. i got fed up with this. can any one tell why it is behaving as PC dependent.is there any thing that i still missing? any suggestion can be helpfull Thakns in Advance Sukumar i

    Read the article

  • Problems using Maven to initialize a local thoughtsite (App Engine sample) project in Eclipse

    - by ovr
    This sample app ("thoughtsite") for App Engine contains a pom.xml in its trunk: http://code.google.com/p/thoughtsite/source/browse/#svn/trunk I ran mvn eclipse:eclipse and also tried using m2eclipse to import this source code into an Eclipse project. But I end up with this error despite the fact that I have the Google App Engine plugin and the Google App Engine SDK installed: Exception in thread "main" java.lang.ExceptionInInitializerError at com.google.appengine.tools.info.SdkImplInfo.<clinit>(SdkImplInfo.java:19) at com.google.appengine.tools.util.Logging.initializeLogging(Logging.java:36) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:82) Caused by: java.lang.RuntimeException: Unable to discover the Google App Engine SDK root. This code should be loaded from the SDK directory, but was instead loaded from file:~/.m2/repository/com/google/appengine/appengine-tools-sdk/1.3.0/appengine-tools-sdk-1.3.0.jar. Specify -Dappengine.sdk.root to override the SDK location. at com.google.appengine.tools.info.SdkInfo.findSdkRoot(SdkInfo.java:106) at com.google.appengine.tools.info.SdkInfo.<clinit>(SdkInfo.java:24) ... 3 more When I go into the project settings under "Google" and try to set it to use the default App Engine SDK it always reverts to trying to use Maven's App Engine SDK instead. No idea how to get this project working.

    Read the article

  • Nservicebus serization issue of derived types

    - by Tiju John
    Hi Guys, for the context setting, I am exchanging messages between my nServiceBus client and nSerivceBus server. its is the namespace xyz.Messages and and a class, Message : IMessage I have more messages that are in the other dlls, like xyz.Messages.Domain1, xyz.Messages.Domain2, xyz.Messages.Domain3. and messages that derive form that base message, Message. I have the endpoints defined as like : at client <UnicastBusConfig> <MessageEndpointMappings> <add Messages="xyz.Messages" Endpoint="xyzServerQueue" /> <add Messages="xyz.Messages.Domain1" Endpoint="xyzServerQueue" /> <add Messages="xyz.Messages.Domain2" Endpoint="xyzServerQueue" /> </MessageEndpointMappings> </UnicastBusConfig> at Server <UnicastBusConfig> <MessageEndpointMappings> <add Messages="xyz.Messages" Endpoint="xyzClientQueue" /> <add Messages="xyz.Messages.Domain1" Endpoint="xyzClientQueue" /> <add Messages="xyz.Messages.Domain2" Endpoint="xyzClientQueue" /> </MessageEndpointMappings> </UnicastBusConfig> and the bus initialized as IBus serviceBus = Configure.With() .SpringBuilder() .XmlSerializer() .MsmqTransport() .UnicastBus() .LoadMessageHandlers() .CreateBus() .Start(); now when i try sending instance of Message type or any type derived types of Message, it successfully sends the message over and at the server, i get the proper type. eg. Message message= new Message(); Bus.Send(message); // works fine, transfers Message type message = new MessageDerived1(); Bus.Send(message); // works fine, transfers MessageDerived1 type message = new MessageDerived2(); Bus.Send(message); // works fine, transfers MessageDerived2 type My problem arises when any type, say MessageDerived1, contains a member variable of type Message, and when i assign it to a derived type, the type is not properly transferred over the wire. It transfers only as Message type, not the derived type. public class MessageDerived2 : Message { public Message message; } MessageDerived2 messageDerived2= new MessageDerived2(); messageDerived2.message = new MessageDerived1(); message = messageDerived2; Bus.Send(message); // incorrect behaviour, transfers MessageDerived2 correctly, but looses type of MessageDerived2.Message (it deserializes as Message type, instead of MessageDerived1) any help is strongly appreciated. Thanks TJ

    Read the article

  • Using "ocamlfind" to make the OCaml compiler and toplevel find (project specific) libraries

    - by CharlieP
    Hello, I'm trying to use ocamlfind with both the OCaml compiler and toplevel. From what I understood, I need to place the required libraries in the _tags file at the root of my project, so that the ocamlfind tool will take care of loading them - allowing me to open them in my modules like so : open Sdl open Sdlvideo open Str Currently, my _tags file looks like this : <*>: pkg_sdl,pkg_str I can apparently launch the ocamlfind command with the ocamlc or ocamlopt argument, provided I wan't to compile my project, but I did not see an option to launch the toplevel in the same manner. Is there any way to do this (something like "ocamlfind ocaml")? I also don't know how to place my project specific modules in the _tags file : imagine I have a module name Land. I am currently using the #use "land.ml" directive to open the file and load the module, but it has been suggested that this is not good practice. What syntax should I use in _tags to specify it should be loaded by ocamlfind (considering land.ml is not in the ocamlfind search path) ? Thank you, Charlie P. Edit : According to the first answer of this post, the _tags file is not to be used with ocamlfind. The questions above still stand, there is just a new one to the list : what is the correct way to specify the libraries to ocamlfind ?

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >