parameterized

Automatic SystemVerilog variable size using interface width and $size?

我的未来我决定 提交于 2019-12-05 00:47:51
问题 I am trying to make a module (a DSP in my case) with a standardized memory interface in SystemVerilog, and would like the variables in the module to size automatically based on the bus widths in the attached interface. My rationale: this makes the code more portable by allowing it to auto-size to any connected interface, instead of requiring an HDL coder to pass in parameters that tell the module the widths of all the interface busses that will connect to it (not that this would be terrible,

Jenkins build parameterized with a choice of versions of a Nexus artifact (all GAVs)

送分小仙女□ 提交于 2019-12-04 14:56:55
Is there a Jenkins plugin that can do a group-artifact-version (GAV) search of my Nexus repo and list the results? I would like the results to be available on a parameterized build as a choice (a dropdown). I added a groovy script to a Dynamic Choice Parameter (See Jenkins Plugins ) Some hurdles were: Our Nexus server issues a basic authentication challenge so I couldn't simply use a groovy " http://blah ".toURL().text I didn't want to load in missing groovy jars like httpbuilder so I simply used the Java URLConnection class and the encoded user:pass as a header. Used REST api to Nexus to get

Guice SPI: find bindings by wildcard types

…衆ロ難τιáo~ 提交于 2019-12-04 14:17:50
Guice provides a means to find all bindings for a given type ( Injector#findBindingsByType ) and it also provides a TypeLiteral class from which it seems possible to construct a wildcard type. What I would like to do is find all bindings for some type that is parameterised by a wildcard type but I can't figure out how to do it. A look at the guice src suggests I might be barking up the wrong tree but I figured I'd ask around anyway... so for example given a type Foo<E extends Bar> BarImplOne implements Bar BarImplTwo implements Bar and some bindings like bind(new TypeLiteral<Foo<BarImplOne>>()

Parameterized Query: Check if field is in array of values in SELECT statement

谁说我不能喝 提交于 2019-12-04 13:17:30
I'm trying to configure a parameterized query to the effect of: SELECT field1 FROM myTable WHERE field2 IN (1,2,3,4) The database I'm using is Postgres. This query run successfully unparameterized, but I'd like to use a parameterized query with a JdbcTemplate to fill in the list for valid field2 values (which are integers). Trying various values for var ( "1,2,3,4" , "[1,2,3,4]" , "{1,2,3,4}" , or "(1,2,3,4)" ) I've tried variations on the query: myJdbcTemplate.query("SELECT field1 FROM field2 IN (?)", new Object[]{ var }) and myJdbcTemplate.query("SELECT field1 FROM field2 IN (?::integer[])",

Incremental build in Jenkins

戏子无情 提交于 2019-12-04 13:06:57
问题 I am using Jenkins 1.462 and maven version is 3.0.4. At Jenkins I enabled check-box "Incremental build - only build changed modules" I want to figure out 2 questions: Whether incremental build is sufficient? Here How do I trigger a Jenkins build of a single module in a multi-module Maven build from Subversion? for example is stated that it doesn't work at 100% Here http://www.slideshare.net/andrewbayer/7-habits-of-highly-effective-jenkins-users at page 19 is stated that incremental builds are

Parameterized methods in generic class type

允我心安 提交于 2019-12-04 08:25:15
I have a rather simple question. I can't find an answer by searching though. Is there a difference in these two code-fragments? And what is the difference? Fragment1: public class BinaryTree<T extends Comparable<? super T>> { ... public <E extends T> void add(E value) { ... } public <E extends T> void add(E value, Node node) { ... } ... } Fragment2: public class BinaryTree<T extends Comparable<? super T>> { ... public void add(T value) { ... } public void add(T value, Node node) { ... } ... } Fragment1 specifies explicitly, that the parameter value must be either of type T or a subtype of type

Parameterized queries WITHOUT stored procedures?

孤者浪人 提交于 2019-12-04 08:16:22
Every sample I've seen uses stored procedures. I've adopted an old application written in Classic ASP that uses inline SQL. This is an obvious issue, so I need to convert it to safer code. The client does not wish that I use stored procedures in this application, so is there a way to run parameterized queries without stored procedures? Thanks AdaTheDev Yes, there is. Have a look at some of these examples: http://www.securestate.blogspot.com/2008/09/classic-asp-sql-injection-prevention_30.html http://www.userfriendlythinking.com/Blog/BlogDetail.asp?p1=7013&p2=119&p7=3001 Is there any reason why

How to pass build artifact into another job in Jenkins

时光怂恿深爱的人放手 提交于 2019-12-03 22:26:43
Setup I have two jobs in Jenkins: build master - this builds the code and creates an artifact deploy master - this deploys the artifact Currently, deploy master has "Copy artifacts from another project" build step using "latest successful build". My Goal I want to change this step from "latest successful build" to "specified by a build parameter" so that I can select a specific build when deploying without modifying the configuration of deploy master job each time. What I've tried First, I changed to "specified by a build parameter". Then I checked the box next to "This project is

Specific Builder for Parameterized Type

◇◆丶佛笑我妖孽 提交于 2019-12-03 16:26:24
I'm trying to write a class in scala that wraps a (parameterized) collection and overrides it's foreach method. What it does with the foreach method is unimportant for the purpose of this question, so lets say it just prints each element out as it's visited. So ideally, we'd be able to use the wrapper as follows: scala> val a = List(1,2,3,4,5) scala> val b = MyWrapper(a) scala> b.foreach{ x => x } 1 2 3 4 5 The key is that I want this to work with any iterable; not just a list. So my first attempt was something like what follows class MyWrapper[A, S[A] <: Iterable[A]]( val s: S[A] with

Automatic SystemVerilog variable size using interface width and $size?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 16:10:57
I am trying to make a module (a DSP in my case) with a standardized memory interface in SystemVerilog, and would like the variables in the module to size automatically based on the bus widths in the attached interface. My rationale: this makes the code more portable by allowing it to auto-size to any connected interface, instead of requiring an HDL coder to pass in parameters that tell the module the widths of all the interface busses that will connect to it (not that this would be terrible, it just seems cleaner without the parameters). I can't seem to get this to work, however. Here's an