Search Results

Search found 2952 results on 119 pages for 'dependencies'.

Page 13/119 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Creating Dependencies Only to be able to Unit Test

    - by arin
    I just created a Manager that deals with a SuperClass that is extended all over the code base and registered with some sort of SuperClassManager (SCM). Now I would like to test my Manager that is aware of only the SuperClass. I tried to create a concrete SCM, however, that depends on a third party library and therefore I failed to do that in my jUnit test. Now the option is to mock all instances of this SCM. All is good until now, however, when my Manager deals with the SCM, it returns children of the SuperClass that my Manager does not know or care about. Nevertheless, the identities of these children are vital for my tests (for equality, etc.). Since I cannot use the concrete SCM, I have to mock the results of calls to the appropriate functions of the SCM, however, this means that my tests and therefore my Manager need to know and care about the children of the SuperClass. Checking the code base, there does not seem to be a more appropriate location for my test (that already maintains the appropriate real dependencies). Is it worth it to introduce unnecessary dependencies for the sake of unit testing?

    Read the article

  • StructureMap problems with bidirectional/circular dependencies

    - by leozilla
    I am currently integrating StructureMap within our business layer but have problems because of bidirectional dependencies. The layer contains multiple manager where each manager can call methods on each other, there are no restrictions or rules for communication. This also includes possible circular dependencies like in the example below. I know the design itself is questionable but currently we just want StructureMap to work and will focus on further refactoring in the future. Every manager implements the IManager interface internal interface IManager { bool IsStarted { get; } void Start(); void Stop(); } And does also have his own specific interface. internal interface IManagerA : IManager { void ALogic(); } internal interface IManagerB : IManager { void BLogic(); } Here are to dummy manager implementations. internal class ManagerA : IManagerA { public IManagerB ManagerB { get; set; } public void ALogic() { } public bool IsStarted { get; private set; } public void Start() { } public void Stop() { } } internal class ManagerB : IManagerB { public IManagerA ManagerA { get; set; } public void BLogic() { } public bool IsStarted { get; private set; } public void Start() { } public void Stop() { } } Here is the StructureMap configuration i use atm. I am still not sure how i should register the managers so currently i use a manual registration. Maybee someone could help me with this too. For<IManagerA>().Singleton().Use<ManagerA>(); For<IManagerB>().Singleton().Use<ManagerB>(); SetAllProperties(convention => { // configure the property injection for all managers convention.Matching(prop => typeof(IManager).IsAssignableFrom(prop.PropertyType)); }); After all i cannot create IManagerA because StructureMap complians about the circular dependency between ManagerA and ManagerB. Is there an easy and clean solution to solve this problem but keep to current design? br David

    Read the article

  • Gradle fails injecting dependencies into subprojects using fileTree

    - by Matthias
    Maybe I'm missing something about the way Gradle works. What I have here is a parent project, which only contains configuration, i.e. there won't be any artifact being built when building it, it merely manages and builds all its subprojects. Now the subprojects share some dependency configuration, so I figured what I would do in the root project's build.gradle is: subprojects { dependencies { compile fileTree(dir: 'lib', includes: ['*.jar']) } } that, however, does not work, it fails with a rather obscure error message: A problem occurred evaluating root project 'qype-android' Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.file.DefaultConfigurableFileTree) values: [file set 'lib'] Possible solutions: module(java.lang.Object) after some trial and error, I could "fix" this issue by applying the 'java' plugin to the parent project. How come? I don't see anywhere from the Gradle docs that a fileTree dependency requires the Java plugin. Even so, why would I need it on the project that is injecting the configuration, as opposed to on the project that is being configured (note that the subprojects all apply the Java plugin themselves)? Does this mean that if I have N different subprojects that are all of varying natures, and apply different plugins, that the parent projects must always apply the set of all plugins beings used somewhere to itself, too?

    Read the article

  • Set service dependencies after install

    - by Dennis
    I have an application that runs as a Windows service. It stores various things settings in a database that are looked up when the service starts. I built the service to support various types of databases (SQL Server, Oracle, MySQL, etc). Often times end users choose to configure the software to use SQL Server (they can simply modify a config file with the connection string and restart the service). The problem is that when their machine boots up, often times SQL Server is started after my service so my service errors out on start up because it can't connect to the database. I know that I can specify dependencies for my service to help guide the Windows service manager to start the appropriate services before mine. However, I don't know what services to depend upon at install time (when my service is registered) since the user can change databases later on. So my question is: is there a way for the user to manually indicate the service dependencies based on the database that they are using? If not, what is the proper design approach that I should be taking? I've thought about trying to do something like wait 30 seconds after my service starts up before connecting to the database but this seems really flaky for various reasons. I've also considered trying to "lazily" connect to the database; the problem is that I need a connection immediately upon start up since the database contains various pieces of vital info that my service needs when it first starts. Any ideas?

    Read the article

  • ctypes DLL with optional dependencies

    - by pisswillis
    Disclaimer: I'm new to windows programming so some of my assumptions may be wrong. Please correct me if so. I am developing a python wrapper for a C API using ctypes. The API ships with both 64 and 32 DLLs/LIBs. I can succesfully load the DLL using ctypes.WinDLL('TheLibName') and call functions etc etc. However some functions were not doing what they should. Upon further investigation it appears that the 32bit DLL is being used, which is what is causing the unexpected behaviour. I have tried using ctypes.WinDLL('TheLibName64') but the module is not found. I have tried registering the DLL with regsrv32, but it reports there is no entry point (it also reports no entry point when I try and register TheLibName, which is found by WinDLL(). The DLL came with a sample project in Visual Studio (I have 0 experience with VS so again please correct me here) which builds both 32 and 64 bit versions of the sample project. In the .vcsproj file the configurations for the 64 bit version include: AdditionalDependencies="TheLibName64.lib" in the VCLinkerTool section. In windows/system32 there are both TheLibName.dll/.lib, and TheLibName64.dll/.lib. So it seems to me that my problem is now to make the python ctypes DLL loader load these optional dependencies when the DLL is loaded. However I can't find any information on this (perhaps because, as a doze noob, I do not know the correct terminology) in the ctypes documentation. Is there a way to do this in ctypes? Am I going about this in completely the wrong way? Any help or general information about optional DLL dependencies and how they are loaded in windows would be much appreciated. Thanks

    Read the article

  • Install perl module with dependencies

    - by AlxAlx
    I'm trying to install a Perl module like this : pi@raspbmc:~$ sudo cpan HTTP::Date Cpan get the file Checksum is ok uncompressed successfully But I got this error : Using Tar:/bin/tar xf "HTTP-Date-6.02.tar": Couldn't untar HTTP-Date-6.02.tar: 'Cannot allocate memory' Any ideas ? My filesystem : Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 15G 2.1G 12G 16% / /dev/mmcblk0p1 69M 8.1M 61M 12% /boot EDIT : I tryed curl -L http://cpanmin.us | perl - App::cpanminus But when I do sudo cpanm HTTP::Date I got this error : -bash: cpanm: command not found

    Read the article

  • Dependencies issue while installing Graphviz 2.28

    - by M. Saâd
    I want to install this packages for Nagvis : graphviz-2.28.0-1.el6.i686.rpm graphviz-doc-2.28.0-1.el6.i686.rpm graphviz-gd-2.28.0-1.el6.i686.rpm graphviz-graphs-2.28.0-1.el6.i686.rpm graphviz-perl-2.28.0-1.el6.i686.rpm But while installing, i have this error : # rpm -ivh graphviz-2.28.0-1.el6.i686.rpm erreur: Dépendances requises: libgdkglext-x11-1.0.so.0 est nécessaire pour graphviz-2.28.0-1.el6.i686 libglut.so.3 est nécessaire pour graphviz-2.28.0-1.el6.i686 libgtkglext-x11-1.0.so.0 est nécessaire pour graphviz-2.28.0-1.el6.i686 libgts-0.7.so.5 est nécessaire pour graphviz-2.28.0-1.el6.i686

    Read the article

  • Installing Heroku on Lucid Lynx reveals missing dependencies

    - by Sir Emeth
    I am trying to get a Ruby on Rails app hosted free somewhere, and Heroku is looking like my last resource. It is supposed to work on Linux, and the gem installs with no errors, but whenever I run any Heroku command it spits out several errors, all connected, and talking about a failed require. I looked it up in the code, and it says: require 'readline' That is it. I have tried to install every variation of libreadline that I can find and think of, but none of it makes any difference.

    Read the article

  • Packaging python software with custom dependencies

    - by viraptor
    Hi, I'm looking for a good way to package a Python application that is going to be deployed on a Debian server. The application itself depends on some modules which are not included in base Debian repository, although they might be in the future. This creates some problems... I depend on some patches to those modules. If the original module gets installed one day, the application will break. However if I install everything I need in a virtualenv just for that application, I lose the ability to upgrade Python itself (in case of security updates). The third option would be to rename my fork of the upstream module and just treat it as a completely separate one. But that would mean changing the code (not much work, but it wouldn't be that clean / universal anymore). Are there any other options that I missed? Are there any pros / cons I didn't see in the solutions above?

    Read the article

  • How can I download a package and all of its dependencies with apt-get

    - by Velislav Marinov
    I'm using Ubuntu 12.04 and I would like to use apt-get to download a package and all of it's depenedcies. Those packages will have to be installed on computers with no internet connection, so in addition to the base package I also need to all of the package's dependcies as well. Is there an easy way to do this (like in muon package manager)? I now that I can use the apt-get download command for this, but I don't want to manually specify each package that muon recommends to install or upgrade.

    Read the article

  • WIN32 services dependencies

    - by grmbl
    I know this has been handled before but I'm not getting a clear answer from this question. I have a service that depends on the print spooler.Every now and then, the spooler crashes...(luckily not often)... I need to stop that service when the spooler service crashes. I'm not sure if adding dependency for Spooler to my service will do just that? I tried using recovery option "Run Program" and use some script to stop the service but I don't fully trust that... (getting "Access Denied" errors) Thank you for your advice.

    Read the article

  • Crunchbang asks for URIs to get build dependencies for php5 [closed]

    - by Koen027
    I'm trying to install PHP5, by compiling it myself. I'm doing this on Crunchbang Linux, version 11. Specifically, the version using the 3.2 kernel. Crunchbang 11 is based on Debian. This is a 64-bit Virtual machine, running on a 64-bit Win7 Professional. Using Virtualbox 4.2 This is my sources.list file: http://pastebin.com/rQJNwX7c When I try to do sudo apt-get build-dep php5, I get the following output: Reading package lists... Done Building dependency tree Reading state information... Done E: You must put some 'source' URIs in your sources.list I'm not sure what's going on here. Can anyone point out what's missing in my setup? Also, since I'm under 300 reputation on serverfault, I can't add the "crunchbang" tag.

    Read the article

  • How to keep an old VB6 application running in Windows Vista and Windows 7?

    - by MusiGenesis
    I have an old VB6 app which I'm still trying to support. A few users have reported weird crashes when running the app in Vista or Windows 7. The log files don't show anything after one of these crashes, but the customers report that the error message said "OLE something ...", if they saw anything at all. I've never been able to reproduce these crashes while running the program on my own Vista or Windows 7 boxes, so I have essentially no information on what the problem is. My suspicion is that it's a problem with their versions of one or more of the umpteen billion DLLs that a VB6 application is dependent on. The app also uses lame_enc.dll, which introduces a few more dependencies. I'm guessing this is a common problem with VB6 apps (although it's possible that I just sucked as a programmer 10 years ago). Is there some magical installer/updater out there that makes sure all the VB6 dependencies are what they need to be for a VB6 app to function properly?

    Read the article

  • Is testability alone justification for dependency injection?

    - by fearofawhackplanet
    The advantages of DI, as far as I am aware, are: Reduced Dependencies More Reusable Code More Testable Code More Readable Code Say I have a repository, OrderRepository, which acts as a repository for an Order object generated through a Linq to Sql dbml. I can't make my orders repository generic as it performs mapping between the Linq Order entity and my own Order POCO domain class. Since the OrderRepository by necessity is dependent on a specific Linq to Sql DataContext, parameter passing of the DataContext can't really be said to make the code reuseable or reduce dependencies in any meaningful way. It also makes the code harder to read, as to instantiate the repository I now need to write new OrdersRepository(new MyLinqDataContext()) which additionally is contrary to the main purpose of the repository, that being to abstract/hide the existence of the DataContext from consuming code. So in general I think this would be a pretty horrible design, but it would give the benefit of facilitating unit testing. Is this enough justification? Or is there a third way? I'd be very interested in hearing opinions.

    Read the article

  • Checking that all libs and dlls are from the same build?

    - by unknownthreat
    I am developing a program in VS C++ 2008. Right now, I have a huge list of dll and lib dependencies and I am adding some more. I worry that when I need to update a dependency by building from source (where I have to manually replace built dlls and libs in the correct place), if I accidently forgot to replace something or vice versa, I may run into a compile and/or runtime problem. And finding which place goes wrong can be a bit difficult. So is there some sort of program or method out there that can suit this task to ease building a program with many updating dependencies?

    Read the article

  • How can I have a Makefile automatically rebuild source files that include a modified header file? (I

    - by Nicholas Flynt
    I have the following makefile that I use to build a program (a kernel, actually) that I'm working on. Its from scratch and I'm learning about the process, so its not perfect, but I think its powerful enough at this point for my level of experience writing makefiles. AS = nasm CC = gcc LD = ld TARGET = core BUILD = build SOURCES = source INCLUDE = include ASM = assembly VPATH = $(SOURCES) CFLAGS = -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions \ -nostdinc -fno-builtin -I $(INCLUDE) ASFLAGS = -f elf #CFILES = core.c consoleio.c system.c CFILES = $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) SFILES = assembly/start.asm SOBJS = $(SFILES:.asm=.o) COBJS = $(CFILES:.c=.o) OBJS = $(SOBJS) $(COBJS) build : $(TARGET).img $(TARGET).img : $(TARGET).elf c:/python26/python.exe concat.py stage1 stage2 pad.bin core.elf floppy.img $(TARGET).elf : $(OBJS) $(LD) -T link.ld -o $@ $^ $(SOBJS) : $(SFILES) $(AS) $(ASFLAGS) $< -o $@ %.o: %.c @echo Compiling $<... $(CC) $(CFLAGS) -c -o $@ $< #Clean Script - Should clear out all .o files everywhere and all that. clean: -del *.img -del *.o -del assembly\*.o -del core.elf My main issue with this makefile is that when I modify a header file that one or more C files include, the C files aren't rebuilt. I can fix this quite easily by having all of my header files be dependencies for all of my C files, but that would effectively cause a complete rebuild of the project any time I changed/added a header file, which would not be very graceful. What I want is for only the C files that include the header file I change to be rebuilt, and for the entire project to be linked again. I can do the linking by causing all header files to be dependencies of the target, but I cannot figure out how to make the C files be invalidated when their included header files are newer. I've heard that GCC has some commands to make this possible (so the makefile can somehow figure out which files need to be rebuilt) but I can't for the life of me find an actual implementation example to look at. Can someone post a solution that will enable this behavior in a makefile? EDIT: I should clarify, I'm familiar with the concept of putting the individual targets in and having each target.o require the header files. That requires me to be editing the makefile every time I include a header file somewhere, which is a bit of a pain. I'm looking for a solution that can derive the header file dependencies on its own, which I'm fairly certain I've seen in other projects.

    Read the article

  • Managing Data Dependecies of Java Classes that Load Data from the Classpath at Runtime

    - by Martin Potthast
    What is the simplest way to manage dependencies of Java classes to data files present in the classpath? More specifically: How should data dependencies be annotated? Perhaps using Java annotations (e.g., @Data)? Or rather some build entries in a build script or a properties file? Is there build tool that integrates and evaluates such information (Ant, Scons, ...)? Do you have examples? Consider the following scenario: A few lines of Ant create a Jar from my sources that includes everything found on the classpath. Then jarjar is used to remove all .class files that are not necessary to execute, say, class Foo. The problem is that all the data files that class Bar depends upon are still there in the Jar. The ideal deployment script, however, would recognize that the data files on which only class Bar depends can be removed while data files on which class Foo depends must be retained. Any hints?

    Read the article

  • List of dependency jar files in Maven

    - by Sindri Traustason
    Using Maven 2, is there a way I can list out the jar dependencies as just the file names? mvn dependency:build-classpath can list the jar files, but that will include the full path to their location in my local repository. What I need is essentially just a list of the file names (or the file names that the copy-dependencies goal copied). So the list I need would be something like activation-1.1.jar,antlr-2.7.6.jar,aopalliance-1.0.jar etc... ideally as a maven property, but I guess, a file such as build-classpath can generate will do. What I am trying to achieve is writing a Bundle-ClassPath to an otherwise manually maintained MANIFEST.MF file for a OSGi bundle. (You shouldn't need to understand this bit to answer the question.) To clarify: The question is not about how to write manifest headers into the MANIFEST.MF file in a jar (that is easily googleble). I am asking about how to get the data I want to write, namely the list shown above.

    Read the article

  • Dependency Injection: where to store dependencies used by only one method?

    - by simoneL
    I developing a project integrated with Dependency Injection (just for reference, I'm using Unity). The problem is that I have some Manager classes with several methods and in many cases I have dependencies used only in one method. public class UserManager : IUserManager { private UserRepository UserRepository {get;set;} private TeamRepository TeamRepository {get;set;} private CacheRepository CacheRepository {get;set;} private WorkgroupRepository WorkgroupRepository {get;set;} public UserManager(UserRepository userRepository, TeamRepository teamRepository, CacheRepository cacheRepository , WorkgroupRepository workgroupRepository, ... // Many other dependencies ) { UserRepository = userRepository; TeamRepository = teamRepository; CacheRepository = cacheRepository ; WorkgroupRepository = workgroupRepository; ... // Setting the remaining dependencies } public void GetLatestUser(){ // Uses only UserRepository } public void GetUsersByTeam(int teamID){ // Uses only TeamRepository } public void GetUserHistory(){ // Uses only CacheRepository } public void GetUsersByWorkgroup(int workgroupID){ // Uses only workgroupRepository } } The UserManager is instantiated in this way: DependencyFactory<IUserManager>(); Note: DependencyFactory is just a wrapper to simplify the access to the UnityContainer Is it OK to have classes like that in the example? Is there a better way to implement avoiding to instantiate all the unnecessary dependencies?

    Read the article

  • jQuery validation plugin dependencies

    - by Idsa
    Does jQuery validation plugin have some dependencies? For example, I saw blogposts that said delegate plugin should be used... but I don't see this plugin reference at any validation plugin example (for example, here: http://jquery.bassistance.de/validate/demo/milk/). The question arouse because validation plugin doesn't catch submit at my application.

    Read the article

  • Maven assembly plugin and adding system dependencies to the classpath

    - by NG
    Hi, I have some dependencies which I am providing myself. The jars are in the resources directory. In my pom they are scoped as system and I include the path to them. However, when I jar things up using the assembly plugin and use <addClasspath>true</addClasspath> It doesn't add the path of the system jars. How can I get them to be included automatically? Thanks

    Read the article

  • Implicitly including optional dependencies in Maven

    - by Jon Todd
    I have a project A which has a dependency X. Dependency X has an optional dependency Y which doens't get included in A by default. Is there a way to include Y in my POM without explicitly including it? In Ivy they have a way to essentailly say include all optional dependencies of X, does Maven have a way to do this?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >