980 questions
Best practices
0
votes
3
replies
67
views
Can a Composite Component class inherit from another abstract base class without breaking the Composite pattern?
I’m studying and implementing the Composite design pattern in C# for a university project.
In most textbook examples (GoF, Refactoring.Guru, etc.) the class hierarchy looks like this:
Component
├── ...
1
vote
0
answers
72
views
ERROR: input of anonymous composite types is not implemented
I am really confused.
I have this postgis query :
with
f as ( SELECT
ST_AsGeoJSON(p.geompos)::json As geometry,
row_to_json((p.id_client, p.design_site, p.adresse)) As properties
FROM ...
0
votes
1
answer
159
views
Android flingBehavior button to scroll back to start
I have a LazyRow containing multiple Card items that the user can scroll through. I wanted this to be snapping to each of these items, so I added flingBehavior to the LazyRow.
My question now is:
How ...
0
votes
0
answers
80
views
composite unique key validation - laravel 11
Here i given below my table schema
Schema::create('yarn_work_order_items', function (Blueprint $table) {
$table->id();
$table->foreignId('yarn_work_order_id')->constrained('...
0
votes
1
answer
78
views
Laravel HasMany through composite key
I have 1:N relation where parent table LOCATIONS contains fields server_id and location_id and table DEVICES is related to the LOCATIONS throught fields server_id and location_id.
How can I establish ...
0
votes
0
answers
37
views
JPA Composite Primary and Foreign keys that only share 1 field
I have the following DB model (all fields are not nullable):
File SourceTypes
----------- -----------
country PK country PK
filename PK sourcetype PK
sourcetype sourcename
...
0
votes
1
answer
213
views
How to convert GitHub actions output to environment vairiables?
Just to give some background, we are refactoring our action for fetching secrets and we are trying to keep it compatible with our old action, so that we don't have to rewrite all of the workflows to ...
0
votes
1
answer
748
views
How to resolve Workday Composite Report error: Encountered unexpected error joiningBusinessObject cannot be null
I hope to ask a question about composite report building.
Context: I am building a composite report showing the number of leavers and active headcount by Country. So far, I have a matrix report as sub-...
0
votes
1
answer
52
views
I have created a composite template , if i am adding 2 documents then 2 same tabs for signing are added but I want one signing tab for each document
I have created a composite template. for every document added in the composite template , there is same signing tab is added in the document eg- 3 documents then 3 tabs one over above. I want one tab ...
2
votes
1
answer
174
views
When and where woocommerce_order_status_completed_notification hook is executed in WooCommerce?
I have WooCommerce 8.0.3 installed on my e-shop. In short, let's say I have an order with ID 123 in status processing. In a specific situation, I'm running this code:
// Make sure e-mails are ...
0
votes
0
answers
785
views
How can I have a condition based input variable definition in a composite workflow
I have a job that calls a composite action as below:
CHANGE_ORDER:
needs:
- SETVARS
runs-on: 'windows-latest'
steps:
- name: Process CO Change Order
uses: mmctech/...
0
votes
1
answer
977
views
EF Core >= 7 : composite unique Index involving nested objects
I would like to add a composite unique index like this on Town having Zip as a ValueObject and Country as a navigation property whose Id is not explicitly specified :
x.HasIndex(t => new { t.Zip....
0
votes
2
answers
83
views
How to increase String input for every time component method is called
I just started learning coding (mainly Java) for about 6 months at a University and now we just covered section of Composite design pattern (with Component, Leaf and Composite classes).
My class ...
0
votes
1
answer
75
views
I'm Trying to use this MULTIPLY composite effect made by Kristopher Ives. and I don't understand why my Datatype TYPE_INT doesn't match whats required
This is the new Composite class for a Multiply(Overlay) effect made by Kristopher Ives(Howto perform a MULTIPLY composite effect using Graphics2D). As far as I can tell he's been inactive for quite ...
1
vote
1
answer
424
views
Is there a way to compose a batch of images with imagemagick?
I have a series of PNG images (ABC_a.png, ABC_b.png, XYZ_a.png, XYZ_b.png, BCA_a.png, BCA_b.png etc.) and would like to compose every image of the same code (i.e. the name of an image without _a or _b)...
0
votes
1
answer
504
views
File System using composite pattern
I'm trying to build a File system such that contains the following classes: FileSystem, Directory, File.
My code is:
public class FileSystem {
private List<Directory> ld;
public ...
0
votes
0
answers
89
views
How to print in my class like tree command in unix?
I am trying really hard to make my code to print the files and the directories in the same way that the command 'tree' in unix print.
What do I need to do so it will work? I'm stuck on it to much ...
0
votes
2
answers
535
views
How to print a return statement from an Object in JavaScript?
so Im trying to get my code to print out a message that returns 'This is Bob Martin from USA'.
This is what I did so far. I've been trying to figure out what went wrong but can't seem to get this to ...
0
votes
0
answers
118
views
PSD file convert into png format and apply watermark on formatted png file, But watermark's original colour is missing
original file
Watermark img
After apply watermark
Code for PSD to PNG conversion:
/usr/local/bin/convert /tmp/1657736296-sample1.psd /tmp/sample1.png
Code for watermark apply on converted PNG file
...
2
votes
1
answer
98
views
Can I call this an implementation of the Composite Pattern
I have this design which I self-proclaim to be Composite Pattern, though I'm not entirely sure about that. So I'm aksing for your statement on this.
This is the interface which collectively describes ...
0
votes
1
answer
1k
views
How to use Jimp composite in Javascript to layer images
I'm trying to create in image generator where I can create all permutations of an image given different elements on 3 layers. I have managed to get the three folders into arrays and am trying to use ...
0
votes
1
answer
113
views
Matching sums of consecutive elements of two sets
Given two sets of integers P and C of the same length. How can I find ALL matching sums of consecutive elements at the same starting and ending positions in the two sets, including overlapping subsets?...
2
votes
1
answer
148
views
Good OO way to categorize related objects in a model in java
I have a class Vehicles with three list fields, namely:
turboVehicles : List<ITurboVehicle>,
trailerVehicle : List<ITrailerVehicle>,
vehicles : List<IVehicle>, (containing all ...
0
votes
1
answer
280
views
Interface literals in Go
First to clarify the title, I know there is no such thing as interface literals in Go but I couldn't come up with another name for this issue.
I was reading some Go code and found a weird construct, ...
0
votes
0
answers
103
views
Does the composite design patterm adhere the principles of SOLID (spacialy the L and the I)? [duplicate]
Does the composite design template adhere to the principles of solid?
if all the compositing method are declared at the component its violation of the Interface Segregation Principle. if compositing ...