Child Pays for Parent transactions get stuck on testnet

I’m building a service prototype by reusing Electrum code and generated 4 consequent transactions which are CPFP type on the testnet. They are staying unconfirmed for several hours but test transaction with 10 sat/vbyte got confirmed in the nex block.

What could be a possible reason for that? Could it be testnet-specific so I should not expect the same behavior on mainnet?

enter image description here

Creating a child page with the parent set as the front page results in strange permalink

I’m not sure if this is a bug by the theme author but when I try to create a sub page (child page) with the front page as the parent, the resulting permalink includes the name of the template. This only happens when the parent of the page is set as the front page.

So for example, I have “Work” set as the front page. When I try to create a child page with “Work” as the parent, the permalink turns into this: https://example.com/template-name/pagename

But even when I don’t specify a template, the template name still gets inserted into the permalink.

I would like it if the permalink became this: https://example.com/work/pagename

I tried reaching out to the theme author but he is unresponsive. Any idea what I can do to fix this?

Ensuring referential integrity in child, group relationship

I’m not going to lie – Sql Server is not in the top 10 of my skill set, but it’s something that I have to do from time to time.

What’s more, I’m using Entity Framework, so there is a workaround required because it doesn’t yet support foreign key relationships.

In this scenario, I have 3 tables, representing some content, stacked in a ‘grouped’. relationship. I use the term grouped because a child might be in multiple groups rather than just being associated with a single parent.

TopicKeywords

It contains info about keywords.

A keyword can only be assigned to a one page but a page can have multiple keywords associated with it.

CREATE TABLE [dbo].[TopicKeyword] (     [Id]      SMALLINT      NOT NULL,     [Keyword] VARCHAR (100) NOT NULL,     [Volume]  INT           NOT NULL,     [PageId]  SMALLINT      NOT NULL,     CONSTRAINT [PK_TopicKeyword] PRIMARY KEY CLUSTERED ([Id] ASC),     CONSTRAINT [AK_TopicKeyword_Keyword] UNIQUE NONCLUSTERED ([Keyword] ASC),     CONSTRAINT [FK_TopicKeyword_PageMeta] FOREIGN KEY ([PageId]) REFERENCES [dbo].[PageMeta] ([Id]) );  GO CREATE NONCLUSTERED INDEX [IX_TopicKeyword_PageId]     ON [dbo].[TopicKeyword]([PageId] ASC);  GO CREATE UNIQUE NONCLUSTERED INDEX [IX_TopicKeyword_Id_PageId]     ON [dbo].[TopicKeyword]([Id] ASC, [PageId] ASC); 

The next two tables represent the parent child relationship.

TopicContent (child)

Contains keywords for a ‘Cluster’.

KeywordId must exist in the TopicKeywords table. ParentKeywordId must exist in the TopicCluster table.

Each ParentKeywordId/KeywordId combination must be unique – also, they can’t both be the same thing.

CREATE TABLE [dbo].[TopicContent] (     [ParentKeywordId] SMALLINT NOT NULL,     [KeywordId]       SMALLINT NOT NULL,     CONSTRAINT [PK_TopicContent] PRIMARY KEY CLUSTERED ([ParentKeywordId] ASC, [KeywordId] ASC),     CONSTRAINT [FK_TopicContent_TopicCluster] FOREIGN KEY ([ParentKeywordId]) REFERENCES [dbo].[TopicCluster] ([KeywordId]),     CONSTRAINT [FK_TopicContent_TopicKeyword] FOREIGN KEY ([KeywordId]) REFERENCES [dbo].[TopicKeyword] ([Id]),     CONSTRAINT [CK_TopicContent_ParentKeywordId] CHECK ([ParentKeywordId]<>[KeywordId]) );  GO CREATE NONCLUSTERED INDEX [IX_TopicContent_KeywordId]     ON [dbo].[TopicContent]([KeywordId] ASC); 

TopicCluster (parent)

Contains the cluster/parent/group entity.

The KeywordId must exist in the TopicKeywords table, and the KeywordId/PageId combination must be valid.

KeywordId must be unique.

A page (PageId) can only own one TopicCluster, so it must in theory, be unique.

CREATE TABLE [dbo].[TopicCluster] (     [KeywordId] SMALLINT NOT NULL,     [PageId]    SMALLINT NOT NULL,     CONSTRAINT [PK_TopicCluster] PRIMARY KEY CLUSTERED ([KeywordId] ASC),     CONSTRAINT [AK_TopicCluster_PageId] UNIQUE NONCLUSTERED ([PageId] ASC),     CONSTRAINT [FK_TopicCluster_TopicKeyword] FOREIGN KEY ([KeywordId]) REFERENCES [dbo].[TopicKeyword] ([Id]),     CONSTRAINT [FK_TopicCluster_TopicKeyword2] FOREIGN KEY ([KeywordId], [PageId]) REFERENCES [dbo].[TopicKeyword] ([Id], [PageId]) );  GO CREATE NONCLUSTERED INDEX [IX_TopicCluster_KeywordId_PageId]     ON [dbo].[TopicCluster]([KeywordId] ASC, [PageId] ASC); 

This is my ‘novice’ attempt. I’d appreciate any advice and suggestions for improvement.

Directed graph that returns before all its child nodes are visited?


Give an example of a directed graph in which a depth-first search backs up from a vertex $ v$ before all the vertices that can be reached from $ v$ via one or more edges are discovered.

My professor recently asked this question as a warm up to lecture, but never answered it. I still have not figure how that is possible. Why would it return if it’s not complete?

I just can’t see a scenario where this would happen.

It would never return, since DFS is (essentially) recursive and it can’t return without having hit all base cases.

Programmatically add field collection item (child) into a existing field collection item (parent)

I have a nested field collection item, field_collection_parent which contains one field_text and a field collection field_collection_child contains two text fields(field_a and field_b).

Now I’m trying to add more field_collection_child into an existing field_collection_parent (using its entity_id) but the new field_collection_child is not getting created.

Below are my codes:

$  entityId = 331  $  field_collection_1 = entity_load('field_collection_item', array($  remId));  $  field_collection_2 = entity_create('field_collection_item', array('field_name' => 'field_collection_child')); $  field_collection_2->setHostEntity('field_collection_parent', $  field_collection_1); $  field_collection_2->field_a['und'][0]['value'] = 'http://www.google.com'; $  field_collection_2->field_b['und'][0]['value'] = 'http://www.google.com'; $  field_collection_2->save(); 

Even I’ve tried https://www.drupal.org/node/2382811, but no luck.

What is the appropriate architecture to access variable in parent from element of child list?

I have a Parent object which looks like this (pseudocode):

class Parent {   String token;   Child[] children; } 

It contains a token string and an array of Child objects. My problem is that each of these Child objects needs to access the token string from the Parent class.

My first hunch is to loop through the children and specifically set a reference to the Parent object. Is there a more recommended way to take care of this, or is this kind of coupling unavoidable? I’m working in C# specifically but would be interested in any language-agnostic solutions as well.

How can I add child elements to a custom element in HTML markup?

I want to create a custom element that’s able to host any HTML within:

<my-custom-element>   <p>This is some message.</p>   <div><button>Click here</button></div> </my-custom-element> 

It looks like the above markup doesn’t seem to work. Every browser renders it like:

<my-custom-element></my-custom-element>   <p>This is some message.</p>   <div><button>Click here</button></div> 

How can I have a custom element contain child elements in markup?

How do I configure the migrate API to assign all parent and child taxonomy terms to an entity during import?

I’m importing media files which have a taxonomy in the media content type definition.

Here is the section of my Yaml file that deals with the taxonomy.

field_nih_asset_taxonomy_auto:     -       plugin: skip_on_empty       method: process       source: nihtaxonomy     -       plugin: hierarchical_taxonomy       bundle: nih_asset_taxonomy_auto       ignore_case: true       source:         - t1         - t2         - t3         - t4         - t5         - t6           -       plugin: explode       delimiter: / 

The second plugin ‘hierarchictal_taxonomy’ comes from the Migrate Hierarchictal Taxonomy module.

My source file is a json file and here are the mappings for the two plugin sources from above.

"nihtaxonomy": "ntp-db/ntp_reports/ntp_pathology_tbls/99020_tables", "t1": "ntp-db", "t2": "ntp_reports", "t3": "ntp_pathology_tbls", "t4": "99020_tables", "t5": "", "t6": "" 

What I’m expecting to happen is the import reads from the ‘nihtaxonomy’ source, explodes that, and assigns all of those terms as taxonomies.

Then, I’m expecting the hierarchical taxonomy plugin to create the parent child relationships. (there are no more than 6 terms, but it varies per record, if that matters).

This is working correctly. The problem is that the only term that’s being assigned to the entity is the last child, so 99020_tables in this example. But I need all of the terms attached.

How do I need to configure my Yaml file so all the terms get attached to the node?

Angular 7 child routes import component usando modules


Estou tentando setar algumas rotas filhas na minha aplicação angular 7 porém elas não funcionam, tenho o seguinte cenário:

Possuo um base-home.component e um home.component, encapsulei os dois components em modules específicos de cada um, base-home.module e home.module, importei os dois módulos no app.module, e setei no app-routing.module umas rota '/' que chama o base-home.component, e uma rota filha '/home' que chama o home.component, porém ele não carrega a página, porém se eu importar os components direto no app.module em vez de importar os modules eles funciona, segue como estão os arquivos:

// app.module.ts  import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core';  import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component';  import { HomeModule } from './home/home.module'; import { BaseHomeModule } from './base-home/base-home.module';  @NgModule({   declarations: [     AppComponent   ],   imports: [     BrowserModule,     CommonModule,     AppRoutingModule,     BaseHomeModule,     HomeModule   ],   providers: [],   bootstrap: [AppComponent] }) export class AppModule { }  
// app-routing.module.ts  import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router';  import { HomeComponent } from './home/home.component'; import { BaseHomeComponent } from './base-home/base-home.component';  const routes: Routes = [   {     path: '',     component: BaseHomeComponent,     children: [       {         path: 'home',         component: HomeComponent        }     ]   } ];  @NgModule({   imports: [RouterModule.forRoot(routes)],   exports: [RouterModule] }) export class AppRoutingModule { }  
// base-home.module.ts  import { NgModule } from '@angular/core';  import { BaseHomeComponent } from './base-home.component';  @NgModule({   declarations: [       BaseHomeComponent   ],   exports: [       BaseHomeComponent     ] }) export class BaseHomeModule {}  
// home.module.ts  import { NgModule } from '@angular/core';  import { HomeComponent } from './home.component';  @NgModule({   declarations: [       HomeComponent   ],   exports: [       HomeComponent     ] }) export class HomeModule { }  

Dessa maneira acima ele não funciona, mas se eu importar o base-home.component direto no no app.module ele funciona, dessa forma:

// app.module.ts  import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core';  import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component';  import { HomeModule } from './home/home.module'; import { BaseHomeComponent } from './base-home/base-home.component';  @NgModule({   declarations: [     AppComponent,     BaseHomeComponent   ],   imports: [     BrowserModule,     CommonModule,     AppRoutingModule,     HomeModule   ],   providers: [],   bootstrap: [AppComponent] }) export class AppModule { }  

Alguém sabe como eu posso fazer as child routes funcionar importando apenas os modules com os components encapsulados sem precisar importar o component direto no app-module ?