How to know code usage of projects dependent on current project? - maven

I formerly use eclipse and open many projects in a single work space, for example, I have project A, B and C. Both B and C will be dependent on A, thus when I change code in A, I can get usage information in B and C immediately.
Then I transferred to use IDEA, which is awesome, yet projects are independent and they are dependent in pom declaration, the side effect is I cannot get usage of B and C immediately, I need to open B and C, then build A, and check whether some change such as access level adjustment broke codes in B and C.
So what is the best practice to resolve such issues?
PS: For me it's not good to add B and C as module to A.

Related

Visual Studio: multiple solutions or build configurations?

We have multiple projects, which can be roughly grouped into 3 groups: A, B & C. A-projects and B-projects depend on C-projects, but A and B are not dependent on each other.
I see two major possible architectures:
Have one solution with all projects, and define build configurations (so when I build A, I won't build B)
Have 2 solutions (A, B), and have the C-projects included in both.
Which one is preferred? Or is there better architecture?

How to represent sequential operation schemas [Z-notation]

I have an operation schema C which consists of two sequential operation schemas A and B. A must be performed before B. I'm stuck on how to represent the sequence of schema activation.
Can I use schema conjunction, i.e. C == A ∧ B ?
or is there a way to 'call' schema B from A?
I'm new to Z-notation, any help would be greatly appreciated!
A schema is just a way of wrapping up a chunk of mathematics.
There is a fairly standard way of interpreting that mathematics as describing an ADT. One schema represents the state variables and constraints among them, one schema represents the initialisation, and as many schemas representing operations as there are operations in the ADT's interface.
You are probably looking for forward schema composition, C == A ⨟ B.
For an example of a big Z specification, I suggest this recently uploaded project: https://github.com/vinahradau/finma
The following schema conjunction works in CZT. Here, C is not called from B, but rather after B.
─
A == B ∧ C
└

4 input logic gate, but all inputs not present in final formula

I need to draw a logic circuit using this K map.. but how can I represent all the other inputs on the circuit? I get (not)B as the answer.. but how should I show A C and D in the circuit?
You can either just place them in and have an open ended wire connected to nothing, or just don't include them. They have no relevance to the output of the circuit.
Since the K-Map brings the circuit into simplest form, its irrelevant where A, C, and D go. The K-map shows that, regardless of these variables, the simplest result will always be ~B. So, just put them as open wires or don't even include them. Doesn't really matter

Controlling collision control in chipmunk

In chipmunk I have 3 types of objects: A, B and C. I need A and B not to collide. I also need B and C not to collide. On the other hand I need A and C to collide. For A and B not to collide I set their collisionGroup to be the same.If I set B and C the same collisioGroup this time A and C will have the same collisiongroup thus causing A and C not to collide. I've tried to set collisionMask/collisionCategories but that didn't help either. Any idea how to accomplish this?
Here's how I solved the problem.
A.collisionGroup=#"beams"
A.collisionCategory=#[#"beam"];
A.collisionMask=#[#"box"];
B.collisionGroup=#"beams"
B.collisionMask=#[#"none"];
C.collisionCategory=#[#"box"];
C.collisionMask=#[#"beam"];
To make it clear. I assign the same collision group to A and B so that they don't collide under any circumstances. This is because collision group overrides any behaviors defined with collisionMask and collisionCategory. Then I set up so that A collides only with C and C collides only with A. I do it by cross setting each other's collisionMask and CollisionCategory. One more and a very import thing to consider is if you don't want B also to collide with C you have to set collisionMask of B to something else otherwise B will collide with anything that is not in the same collision group. Phew, that's it.

Using JavaScript/jQuery to generate fixtures

I'm putting together a tool for a colleague which helps to create a nice fixture list. I got about 2/3 through the tool, collecting various data ... and then I hit a brick wall. It's less of a JavaScript problem and more of a maths/processing brainblock.
Lets say I have 4 teams, and they all need to play each other at home and away. Using this tool - http://www.fixturelist.com/ - I can see that a home and away fixture with 4 teams would take 6 weeks/rounds/whatever. For the life of me, though, I can't work out how that was programmatically worked out.
Can someone explain the logic to process this?
For info, I would use this existing tool, but there are other factors/features that I need to work in, hence doing a custom job. If only I could understand how to represent that logic!
In your example of 4 teams, call them a, b, c and d:
a has to play b, c, d
b has to play c, d (game against a already included in a's games)
c has to play d (game against a already included in a's games, against b already included in b's games)
If they need to play at home and away, that's 12 games. You can play at most 4/2 = 2 games a week, so that's 6 weeks.
With n teams you need x games, where:
x = ((n-1 + n-2 + n-3 ...) * 2)
This takes y weeks, where:
y = x/(n/2) = 2x/n
This can be simplified with an arithmetic series fairly easily, or calculated with a for loop if you want.

Resources