w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Java reflection: How can I load a class from another project without adding that project or JAR to my classpath?
You need to implement a custom classloader, something like this Class<?> cls = new ClassLoader() { public java.lang.Class<?> loadClass(String name) throws ClassNotFoundException { byte[] a = read class bytes from known location return defineClass(name, b, 0, a.length); }; }.loadClass("test.MyClass");

Categories : Java

adding a Main JSF project's Classes to another JSF project's Properties/Libraries
I have just found a way to add classes to another web project and it worked on my side. First, is to create a .jar file of your main project's classes and add it to your JSFUnit's project properties. You can't create a .jar file for a web project using netbeans IDE, so locate your build.xml from your project's folder and add this: <target name="-post-compile"> <jar destfile="${basedir}/dist/my_web_app.jar"> <fileset dir="${basedir}/build/web/WEB-INF/classes"> </fileset> </jar>

Categories : Java

Adding eclipse project dependencies to a Maven project
I'm not sure about your question 1, but if I understand it correctly, you would like to build with Eclipse two Maven projects where A depends on B? Then you may use an Eclipse plugin like m2eclipse. For your second question, I think the solution would be to use the system scope for your dependency that you can't find in any public repository. Of course, if you can deploy the dependency on an entreprise repository it would be better.

Categories : Java

How to import data via post deployment script from SQL Server CE into a SQL Server DB freshly created using VS database project
1) Is it possible to reference a SQL Server Compact database (sdfDB) in T-SQL script? If you are thinking to something like this, INSERT INTO [SQL SERVER Db].Table (Values) SELECT (Values) FROM [Sql Server Compact Db].Table unfortunately no, this is not possible. 2) If not, what is the best practice to import data into a freshly created DB from an embedded datasource which can be deployed by build script in a remote machine. You can use the SQL Server Compact Toolbox, that contains features to generate scripts from a Sql server compact file, that you can use to populate the SqlServer database. Features: Script! Migrate a SQL Server Compact database directly to SQL Server (LocalDB/Express) Migrate from SQL Server Compact to SQL Server, SQL Azure and SQL

Categories : Visual Studio 2012

What is the point of adding "IP domain.tld" to the ( /etc/hosts ) file if the server is not gonna be used as a mail server?
/etc/hosts file is an alternative to DNS host name resolution. It has nothing specifically to do with mail servers. But, to use a mail server it has to be found on the network. /etc/hosts is a local lookup file that computer uses as specified in /etc/nsswitch.conf. DNS is a network service provided for each domain. For example, BIND. Domain zone files are configured and hosted on the domains primary DNS servers. You can configure domain searches in /etc/resolv.conf.

Categories : Linux

adding dll to C# project
Not sure if this is it, but I've ran into a somewhat similar problem with images from ProjectA, where I want them to be shown in ProjectB. This however is not possible in Store Projects, the image should be in the same project and cannot be referenced from ProjectB to ProjectA (without returning any error). A workaround (if possible) would be to put the two projects in the same solution and add the charm flyouts (if they are images) as linked items in ProjectB... Hope this gets you towards a solution.

Categories : Xaml

Adding area to mvc project
I think problem is that, You have Same Name controller in Both Area and and application. Like You have Home Controller in Normal Application and Also in AREA And, it is causing the Duplicate Declaration of Same Controller. The way doing that is, specifying the NAMESPACE of the Controller Like the Following : public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "BEK_default", "BEK/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new string[] { "MyAppName.Areas.BEK.Controllers" } // specify the new namespace ); } If not that Case, Please post the Error Message you are getting.

Categories : Asp Net Mvc

Getting Error while adding new MVC 4 Project
For some reason, the nuget package manager is not always installed by default. I came across this problem a few times already. What you want to do is this. First: You need to unistall npm(nuget package manager), you did this already, you can try this again, just to be sure :) Visual studio -> Tools -> Extensions and Updates -> Npm -> unistall Second: after you unistall npm, you need to install it again to use it (ofc). There are several ways to install npm: 1) install it under Visual studio -> tools -> extenstions and Updates> npm -> install 2) GOTO http://nuget.org, search the install nuget link and click on it, downlaod the .vsix file and install in on your visual studio Third: after the installation, close and re-open visual studio, hopefully you will never get that error

Categories : Asp Net

bad mapping after adding the XmlViewResolver to the project
Don't extend AbstractController, just annotate using org.springframework.stereotype.controller eg : @Controller @RequestMapping(value = "/") public class RevenueReportController

Categories : Xml

Adding library project to Android.mk
You can right click on project A from Package Explorer, then click on Properties --> Java Build Path --> Projects --> Add. Add library projects B and C from here. No need to include them on Manifest. Import classes which you want to use on project A's class.

Categories : Android

Adding a custom jar to grails project
If a jar isn't available in a Maven repo and you can't add a dependency in BuildConfig.groovy, you can add it to the lib directory, but it's not automatically discovered. Run grails compile --refresh-dependencies to get it added to the classpath.

Categories : Spring

Adding folders in maven project
Yes, maven needs to "know" what those directories mean, though a clojure build plugin may use that directory by convention - see for example: https://github.com/talios/clojure-maven-plugin

Categories : Java

Adding Morphia depandancy to a project?
The link you've posted shows how to add Morphia if you're using maven to import your dependencies. It sounds like you're not doing this, so what you (probably) want to do instead is download the latest Morphia jar (currently 0.101.0) from: http://mvnrepository.com/artifact/com.google.code.morphia/morphia Then to add it to your classpath in Netbeans, see the answer to this question: How to add a JAR in NetBeans You should then be able to use the Morphia library

Categories : Java

Adding external .jar to androidstudio project
Change your dependencies like that dependencies { compile 'com.android.support:support-v4:13.0.+' compile 'org.beanshell:bsh:2.0b4' } You can now remove manually downloaded dependencies in libs directory. What you did was adding libraries to Android Studio project only. You should always add them to Gradle build files as only this is interpreted by Android Build Tools. There is also new version of build tools 18.0.1, you can install them and change version in you build.gradle. As far as I know they can handle aar dependencies better.

Categories : Java

Adding CoCosDenshion to exsiting project
Unfortunately CocosDenshion does not support of ARC so far. You have you specify not to compile your cocosDenshion files via ARC. For this go to Targets->Build Phases->Compiles Sources then find the specific file you want to remove ARC from it, once you find that file double click on it and add -fno-objc-arc as flag.

Categories : Objective C

Adding Ninject to Legacy Project C#
I don't think there's a set best practice, other than use common sense - it's kind of a case by case scenario. A few important questions to ask yourself: How much effort is going to be required to create interfaces for the current classes? How much additional effort is going to be required to write proper unit tests? Will these unit tests add more value than the time spent? How long is this legacy system even going to be maintained? There's nothing worse than doing a huge upgrade (requiring testing not only by the development staff, but by the product user) to replace it in 18 months. Also, how long has this legacy system been in place without issue? There's no reason to invent work if it appears stable and really has low maintenance.

Categories : C#

Adding Glimpse plugin to project
Can you share the tab that you have created? That will help figure out the problem. In general through, all tabs in Glimpse are plugins - including the ones that come with the Glimpse NuGet package, so it seems that some are being picked up but not others. A few troubleshooting tips: Check your bin folder and make sure the extension assembly is there Make sure your extension class is public Turn on logging. Glimpse will tell you what any loading exceptions it may of had. Restart your web server

Categories : C#

Adding third party reference dll's to C# project
First, make sure that the Oracle.DataAccess Assembly is indeed in place on the system. It might well be that something failed in your installation process. If it is in place, and you still get the error, you will need to install the Oracle client on this system. ODP is just a wrapper using the client. It will not enable a system without an Oracle client to access an Oracle database as far as I remember.

Categories : C#

Adding a "winmd" reference vs Adding a project reference
Tools + Options, Projects and Solutions, Build and Run. Change the "MSBuild project build output verbosity" setting to Normal. Pay attention to the build output, the messages you see after "XapPackager". Which show which files are getting added to the Xap package. Your DLL needs to be in that list. If it is not then your program will fail as described. In which case you'll need to find out why it is getting skipped. Start that by checking that the Copy Local property of the .winmd reference is True.

Categories : C#

redirecting-to/adding www in url codeigniter based project
This is because browsers wont resubmit POST data if the response is a redirect. This is a normal and expected thing. What you can do is to only rewrite GET requests with an extra condition: RewriteCond %{REQUEST_METHOD} GET [NC] RewriteCond %{HTTP_HOST} ^examplesite.com$ [NC] RewriteRule ^(.*)$ http://www.examplesite.com/$1 [R=301,L] Leave the $config['site_url'] option in application/config/config.php to an empty string (that will make CI do autodetect) and in your view code, use the site_url() helper or the form builder functions so it will use the domain that the request came in.

Categories : PHP

Adding a project to Xcode Workspace like CocoaPods
I am not sure if I fully understand the question so please forgive if I miss something. I desired a similar setup, multiple projects in a workspace, but all managed by Cocoapods. I needed the projects to link to each other. My motive was promoting MVC separation, so I had an App project (view), a Controller project, a Model project. The shell of a project is here: https://github.com/premosystems/iOSMVCTemplate/tree/1.0/MVC-Example/iOS/MVCApp Here are the basic steps: Create your projects, and add a podspec to each one. (e.g. controller podspec like this one: https://github.com/premosystems/iOSMVCTemplate/blob/1.0/MVC-Example/iOS/MVCApp/Controller/ProximityController/ProximityController.podspec) Add a Podfile that links all of the podspecs together. https://github.com/premosystems/iOSMV

Categories : Xcode

Android Studio adding external JAR to the project
the error message format shows that you are not using Gradle to build. You either loaded the eclipse project file (.classpath/.project) or had some existing iml files. This means changes to build.gradle will have no effect since Studio uses the IntelliJ internal builders instead. You need to import your build.gradle file instead to create a new Studio project.

Categories : Gradle

Adding gFlot library to a GWT project fails
<inherits name="ca.nanometrics.gflot.GFlot"/> is the old one. Since 3.0, use <inherits name='com.googlecode.gflot.GFlot'/> instead. See the example.

Categories : Gwt

Adding kSOAP dependency to Gradle project
I was in the same situation. And I gave up to add that jar from mavencentral. I added the raw jar as a lib. Download the latest (or whatever version) of ksoap2-android from this url Call it in the build.gradle like this dependencies { compile files('libs/ksoap2-android.jar') } I hope it solve. :)

Categories : Android

adding external jar to maven project in netbeans
You can follow this tutorial: http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html Example: Install the jar to your local maven repository: mvn install:install-file -Dfile=cxf-2.7.3.jar -DgroupId=org.apache.cxf -DartifactId=cxf-bundle -Dversion=2.7.3 -Dpackaging=jar Edit the pom.xml file in your project to include the newly added dependency: <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle</artifactId> <version>2.7.3</version> </dependency> This should work regardless of the IDE you are using.

Categories : Maven

Adding 3party Reference To Project with Powershell
You can use Add-Type cmdlet: Add-Type -Path "path-to-dll.dll" See: http://technet.microsoft.com/en-us/library/hh849914.aspx

Categories : C#

Adding Storyboard support in existing project
You need to load the storyboard first: [[UIStoryboard storyboardWithName:@"MainStoryboardName" bundle: nil] instantiateViewControllerWithIdentifier:@"SomeVCInMainStoryboard"]; Assuming that project is setup correctly, you should just need to change the names to load the Storyboard and a subsequent view controller.

Categories : IOS

adding resources in intellij for java project
The launcher.properties should not be under a folder called Login. It should be placed directly in the src/main/resources/com/abc/xyz folder. It is really as simple as I said but if the resources folder is not marked as a sources folder then this may be the problem. This is the initial class and setup: Now create the resources folder: This newly created folder should be automatically marked as a sources folder and if it is blue color marked then it is. Otherwise you'll have to mark it manually: Now you'll be able to add packages to it: And now you can add the file to it: And rerunning the application will not give you any null value back: And the package view will surely show the launchers.properties file as well:

Categories : Java

Adding odbc14.jar manually to Spring Roo project
You'll need to manually install the driver from Oracle. In command prompt install the driver to Maven's local repository using mvn install:install-file. > mvn install:install-file -Dfile=your_ojdbc.jar -DgroupId=com.oracle -DartifactId=oracle -Dversion=10.2.0.2.0 -Dpackaging=jar -DgeneratePom=true Now you add the dependency to the pom.xml <dependency> <groupId>com.oracle</groupId> <artifactId>oracle</artifactId> <version>10.2.0.2.0</version> </dependency>

Categories : Maven

Adding styles to a simple maven project
If you put a file under /resources it ends up in my-project.war/my-project.war/WEB-INF/classes/. This is where things go in your classpath. Instead, you should put the css file under /webapp. This will make them go under my-project.war/. These files will now be directly accessible by going to http://localhost:8080/test.css

Categories : Java

Cant adding JS file, or any other, to a Titanium project folder
This *? indication comes from the git plugin that is shipped with Titanium Studio. It indicates that the file is not commited. To answer your "can't find file" - question, I need to know some more details about your environment (target platform, sdk version, example code, ...)

Categories : Javascript

Adding Support Libraries to Android project
You have pinpointed the all important document and the relevant section "adding libraries with resources": http://developer.android.com/tools/support-library/setup.html The error suggests that your project is not able to find these resources. Please double check the following : You have checked "is library" on the library project You have exported the jars IN THE LIBRARY PROJECT as described in that section You have added the library project as a reference to your app project You have added the android-support-v4.jar to your libs folder in your app project If this is all definitely correct, check eclipse for any error messages - is it the library project or the app project that lights up like the proverbial Christmas Tree ?

Categories : Android

Adding two or more Python project paths to PYTHONPATH
Well, Python always takes the first occurence of "com" (here in PROJECTA) as the module "com" and doesn't even look for other occurences of "com" if it can't find something inside it. Python doesn't "merge" modules - if you think about it, it makes no sense as the modules can be arbitrarily general and complex. Solution A (normal) Include in PYTHONPATH the directory above the projects and address the modules with the prefix, like e.g. this: from PROJECTA import com as comA from PROJECTB import com as comB from comA.example.sample.projectBBB.srcfiles import pythonfile.py Btw. we are tacitly assuming you have __init__.py files where they should be (i.e. in all directories that should be treated as modules). Solution B (weird) Include in PYTHONPATH the directory above the projects as i

Categories : Python

Adding external jar file in maven project
Standard way in Maven to do this is to provide through dependency and tell maven I need this jar , can you please get it for me. Below is the details that will help you(maven) to identify the jar. <dependency> <groupId>groupid.of.your.jar</groupId> <artifactId>name.of.your.jar</artifactId> <version>version.of.jar</version> </dependency>

Categories : Maven

Adding Samsung SDK to Android Studio project
Maybe you can follow the instructions in chapter 8 in this document. Click here (invalid link) Be also sure of the .classpath file is not hidden in your project folder, when adding your .jar file. It can typically be the issue.

Categories : Android

Adding Cocos2d (2.0) to existing iPhone Project
I will point out the steps that I have taken , so someone can take a look Step 1. Create a test project in Cocos2d and find the “libs” folder in finder, and then just copy it into your project’s folder in finder. Then from finder, drag-and-drop the “libs” folder into Xcode’s “Project Navigator” sidebar and check the “add files to destination”. Step 2. In Project > Targets > Build Phases > Link Binaries with libraries > Hit the + and Check if following frameworks are there if not add them:
 AVFoundation.framework
 GameKit.framework
 CoreText.framework
 AudioToolbox.framework OpenAL.framework
 QuartzCore.framework
 CoreGraphics.framework
 UIKit.framework
 Foundation.framework OpenGLES.framework Step 3. In Project > Targets > Build Settings > Se

Categories : IOS

Use Image without adding it in WPF Project/Solution Resources
Maybe use the file absolute path, simply change the last line of the LoadBitmapFromResource function to: return new BitmapImage(new Uri(assembly.GetName().CodeBase + pathInApplication, UriKind.Absolute)); this should do the fix. Also you can try using the UriKind.Relative. Good day

Categories : C#

Intellij - adding module to imported git project
Import from existing sources option works only for Java projects right now, here is the related issue. You can add new module and specify the existing folder as its root instead of importing. If you need several modules, create a new empty project first, then add modules, but don't use import.

Categories : GIT

Adding Fetch button on the project Menu
The closest example of that is to look for commits like this one: "Added a clone button to support one-click clone". As you can see, more than one .haml file is impacted. This isn't the project menu, but can still give you a starting point. You should find more information in the GitLab forum.

Categories : Ruby On Rails

Adding Model Attribute with MySQL later in project
You need to use South (or something similar) to do a Schemamigration. Read the documents to see how to do it. It's quite easy, and will be very helpful later in your project (when you have lots of data in your database). The only other option (other than using another migration tool) is to drop the database and create it again, which would lose you all of your data.

Categories : Mysql



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