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
0
answers
29
views
Element has no value in generating EDI Document
The instance's payload is complete and contains a complete value for each element, but when I run the program to generate the EDI Document, there is one element(DTM02) that does not have a value in ...
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('...
74
votes
11
answers
52k
views
When should I use composite design pattern?
I don't understand when I should use composite design pattern.
What kinds of benefits will I get from this design pattern?
I visited this website but it only tells me about the structure of the design ...
0
votes
1
answer
317
views
Expected [START_OBJECT] under [size], but got a [VALUE_NUMBER] in [composite]
I am getting this error when trying to query ElasticSearch (in case it matters, I am using python to query it):
elasticsearch.BadRequestError: BadRequestError(400, 'parsing_exception', 'Expected [...
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 ...
51
votes
1
answer
79k
views
SQL join with composite primary key
I have to join two tables.
But in one table primary key is not there,composite primary key is there,means three columns put together uniquely define a row of that table.
I have those three columns in ...
5
votes
1
answer
5k
views
Github composite action output can not be set from within a bash script
For one of my projects, I am setting an action output from within a bash script that is executed inside a composite action. I found that GitHub has excellent documentation on how to create a GitHub ...
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
...
4
votes
1
answer
1k
views
Is it possible to remove the doc_count and more from Composite Aggregations
I use an ElasticSearch search request with composite aggregation in order to get a list of all different indexed values of one specific field.
The result gives me all I need, but I don't need all that ...
68
votes
7
answers
45k
views
Difference between the Composite Pattern and Decorator Pattern?
What is the difference between the Composite Pattern and Decorator Pattern?
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/...
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
355
views
While parsing a block mapping, did not find expected key. Failed to load github composite action.yml
Below is my caller action yml [Github Actions workflow] that gives error upon calling composite action:
---
name: RECYCLE_dev
workflow_dispatch:
inputs:
ENVIRONMENT:
type: ...
33
votes
2
answers
74k
views
Check if a Postgres composite field is null/empty
With postgres composite types you can basically build a field with the structure being defined as another table. I have the composite field called "recipient" of type "person". This recipient field is ...
0
votes
0
answers
68
views
Composite desing pattern with UI tree editor MVC
Have any of you guys ever created an MVC RuleEngine UI editor with composite pattern in .NET Core?
How did you do that? I struggling with rendering that Tree and making it bindable to model for ...
1
vote
1
answer
444
views
General Protection Error after second 'New Downlaod' or 'Online Change'
I'm trying to build a composite pattern in Twincat 3.1.
Everything seems to work fine on Activate Configuration and the first new download or online change. The second new download causes General ...
1
vote
1
answer
2k
views
Gradle composite build dependency substitutions do not get applied
I have an android application with a library dependency which I would like to be substituted by a local project as described in composite builds
build.gradle (Module: MyApp.app)
dependencies {
...
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 ...
4
votes
2
answers
2k
views
Decorator design pattern with Composite Design pattern
I understand the composite design pattern and the decorator design pattern and their uses. Can we have a case where we have to use them together? How would the class diagram for such a scenario look ...
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 ...
28
votes
15
answers
16k
views
When are interfaces needed?
(In the context of .NET for what its worth)
I tend to not use inheritance and rarely use interfaces. I came across someone who thinks interfaces are the best thing since spit. He uses them ...
5
votes
4
answers
668
views
Can the composite pattern be used to generate HTML from a tree and handle the indenting as well, or this inherently not possible?
I watched this video on the composite pattern, where the main example is how to use the pattern as a mean to generate HTML code from a tree structure describing a todo list where each item can be in ...
4
votes
4
answers
8k
views
Composite Design pattern - how to create calculator
I want to explore the difference between recursion approach and composite design pattern. Composite design pattern reminds me of a tree structure. So if I have to write up how it would look in a class ...