dependencies

Why does scalac need a transitive dependency on the classpath

耗尽温柔 提交于 2019-12-24 01:16:29
问题 I'm running into an unexpected (only for me?) ScalaC behavior. The TL;DR is that the following is a recreation of an issue I saw while trying to migrate a codebase from maven to bazel. One of the main focuses of this migration is to try to minimize the dependencies each class needs for compilation so that builds will be triggered only when needed. Unfortunately what I saw is that given ClassIndirectlyNeedingFoo (uses)-> ClassUsingFoo (uses)-> Supplier the compilation of

Is there any possible reason to have some difficulties with jpg files in opencv while using imread function to read them?

拈花ヽ惹草 提交于 2019-12-24 00:45:57
问题 Recently, I use opencv in python. As I noticed, when I want to import cv2 module in python, I need to add cv2.so file path manually to the system paths using: sys.path.append('/path/to/cv.so') Howewer, when I want to read jpg files in the ipython notebooks, it fails: import sys import numpy as np import os sys.path.append("/usr/local/lib1/python2.7/site-packages") import cv2 im1=cv2.imread('pic1.png') print im1.shape #output: (512, 512, 3) im2=cv2.imread('pic1.jpg') print im2.shape #output: -

Dependency configurations

我的梦境 提交于 2019-12-24 00:35:26
问题 I know that if I make a library that uses product flavors, then when I use that library in an application, I can do this in a gradle: dependencies { flavor1Compile(path: '{path}', configuration: 'flavor1Config') flavor2Compile(path: '{path}', configuration: 'flavor2Config') } I also know that I can do this: dependencies { debugCompile(path: '{path}', configuration: 'debugConfig') releaseCompile(path: '{path}', configuration: 'releaseConfig') } What I want to do is essentially this:

How to Resolve 'not found: object anorm' for play 2.4.3

Deadly 提交于 2019-12-23 21:15:41
问题 I'm using play 2.4.3 , When I import anorm like import anorm._ import anorm.SqlParser._ this brings up the error message below in the IDE... not found: object anorm But my project will execute (without throwing any error). Dependencies libraryDependencies ++= Seq("com.typesafe.play" %% "anorm" % "2.3.6") Editor eclipse Luna scala version scalaVersion := "2.11.6" Activator Version 1.3.6 OS Windows 8 回答1: Your imports are incorrect - they should be: import anorm._ import anorm.SqlParser._ Note

How to configure msbuild/MSVC to deploy dependent files of dependent assemblies

牧云@^-^@ 提交于 2019-12-23 20:49:42
问题 I have a dependency chain that looks like this (simplification for example purposes): application -> foo (contains foo.dll) -> bar (contains bar.dll and bar_data.xml) the dependent files are correctly marked with "copy if newer" on the data file and "copy local" on the references. bar/bin/Debug correctly contains bar.dll and bar_data.xml foo/bin/Debug correctly contains foo.dll, bar.dll and bar_data.xml application/bin/Debug only contains foo.dll and bar.dll (and app.exe), but not bar_data

Automatic dependency detection not working in GFortran

房东的猫 提交于 2019-12-23 20:39:21
问题 I the GCC Wiki it is stated that support for auto-detection of dependencies has been available since version 4.6: Support the generation of Makefile dependencies via the -M... flags of GCC; you may need to specify additionally the -cpp option. The dependencies take modules, Fortran's include, and CPP's #include into account. Note: Using -M for the module path is no longer supported, use -J instead. In my program I have two Fortran files: module_1.f08 and main.f08 , where main uses module_1 .

Is it an good idea to make a wrapper specifically for a DateTime that respresents Now?

淺唱寂寞╮ 提交于 2019-12-23 20:08:56
问题 I have been noticing lately that is really nice to use a DateTime representing 'now' as an input parameter for your methods, for mocking and testing purposes. Instead of every method calling DateTime.UtcNow themselves, I do it once in the upper methods and forward it on the lower ones. So a lot of methods that need a 'now', have an input parameter DateTime now . (I'm using MVC, and try to detect a parameter called now and modelbind DateTime.UtcNow to it) So instead of: public bool IsStarted {

Maven dependency tree behavior of artifacts with scope “provided”

走远了吗. 提交于 2019-12-23 18:23:20
问题 I've stumbled with different behavior of the same project on two PC. On the both machine I run command mvn dependency:tree -X but receive a different results. On the first machine I receive: Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T06:51:42-07:00) Maven home: C:\opt\apache-maven-3.2.2\bin\.. Java version: 1.6.0_45, vendor: Sun Microsystems Inc. Java home: C:\Program Files\Java\jdk1.6.0_45\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7"

WPF C# how to create THIS binding in code?

倖福魔咒の 提交于 2019-12-23 16:51:06
问题 I wonder, how to create this binding, since Line.X2 IS NOT dependency property! :( <Line Y1="0" X1="0" Y2="0" Stroke="Blue" StrokeThickness="3" Margin="0 -2 0 -2" X2="{Binding Path=RenderSize.Width, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel}}}"/> 回答1: Line.X2 is a dependency property so you can do this in the normal way: myLine.SetBinding(Line.X2Property, new Binding("RenderSize.Width") { RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor,

How can my module require a specific version of npm?

柔情痞子 提交于 2019-12-23 16:45:52
问题 I am writing an npm module which comes with some scripts, e.g. npm run cureCancer . I want these scripts to accept extra parameters, which is possible only with npm 2 and above, e.g. npm run cureCancer -- fast This means that my module depends on npm 2 or newer, so I added the following to package.json: "devDependencies": { "npm": "^2.7.5" } Then I ran npm install . Then I ran npm -v expected: 2.7.5 observed: 1.4.23 . And of course npm run cureCancer -- fast fails. How can my module require a