ui – Recursos GraphQL en frontend

He estado viendo por la red que hay muchos tutoriales de como usar GraphQL en el Server, pero no hay demasiada documentación de como tratarlo en el frontend con más complejidad.

Me gustaría que en esta pregunta pudiéramos añadir recursos, tutoriales, proyectos opensource etc. para que todos tengamos más a mano esta información.

Ser capaces de poder crear mapas de datos interactivos como este añadiendo la correspondiente información:

introducir la descripción de la imagen aquí

Si alguno tiene algún tipo de recurso, no del backend o creación de APIs con GraphQL sino para el frontend y así poder crear estos “mapas de datos” en nuestras aplicaciones estaríamos toda la comunidad muy agradecida. ¡Realmente escasea la info en este campo!

Propongo centralizar info independientemente de la tecnología que se use, así habrá mas variedad de recursos y podrá ser útil para más de nosotros.

En cualquier caso, gracias por leer hasta aquí.

theming – working on Custom Slider Programmatically and want to print twig file’s code in block

I am working on a custom slider programmatically. I create a Custom Module (block_example) and make a block (BlockExample.php) and a twig file (blockexample.html.twig) and also a module file (block_example.module). I want to place some code in twig file and call it in block file.

this is build function frome block file (BlockExample.php)

public function build() {

    $renderable = (
    '#theme' => 'blockexample',

    return $renderable;

this is (blockexample.html.twig) file code
     <div class="col-sm-3">
        <h1>This is Title</h1>
        <p>Description Coming From Twig File</p>

this is (block_example.module) file code
function block_example_theme() {
  return array(
    'block_example' => (
      'variables' => ('test_var' => NULL),


Now main question is how to print twig file in BlockExample.php

reference request – Triangular Multiplication Table using Do-while Loop

I want to ask a question or probable favor in how do I make my program codes “do while loop” in creating a Triangular Multiplication. Is there a probable way on to create such thing without using any other statement?

public class Main {
  static void ssbr(int n) {
    int i = 1;
    System.out.printf("%4d", n * i);
    i = i + 1;
    } while(i <= 7);

public static void main(String() args) {
    int i = 1;
            i = i + 1;
        } while (i <= 7);

Output it gave:

1  2  3  4  5  6  7
2  4  6  8 10 11 12
3  6  9 12 15 18 21
4  8 12 16 20 24 30
5 10 15 20 25 30 35
6 12 18 24 30 36 42
7 14 21 28 35 42 49

Output I wanted:

2  4
3  6  9
4  8 12 16
5 10 15 20 25
6 12 18 24 30 36
7 14 21 28 35 42 49

continuous integration – Should I put build and deploy scripts as a git submodule to application repo?

Our build-deploy repo consist of scripts that would build and deploy our application. (Dockerfile, Kubernetes Manifest, Ansible for generating app config). I plan to make it a submodule under application repos.

The pros I can see are:

  • you have one source of truth for git version that would able to build and deploy
  • submodule is checked-out as release, depending app controls which version of build-deploy repo to use
  • build and deploy anywhere
  • central maintenance of build-deploy repo

Is this ideal/conform with 12 factor app? what might be the drawbacks? Our application config is in separate repo.

java – Searching for an idiomatic Rust implementation of Minimum Edit Distance (LeetCode #72)

I am solving LeetCode Dynamic Programming challenges (this one is #72, at https://leetcode.com/problems/edit-distance).

Here below, I’ve implemented a Rust solution for the minimum edit distance between two strings problem

use std::collections::HashMap;
use std::cmp::min;

impl Solution {
    pub fn min_distance(word1: String, word2: String) -> i32 {
        let mut D: HashMap<(i32, i32), i32> = HashMap::new();
        let m = word1.len() as i32;
        let n = word2.len() as i32;

        let w1: Vec<char> = word1.chars().collect();
        let w2: Vec<char> = word2.chars().collect();

        for i in 0..=m {
            D.insert((i, 0), i);
        for j in 0..=n {
            D.insert((0, j), j);

        for i in 1..=m {
            for j in 1..=n {
                if w1((i-1) as usize) == w2((j-1) as usize) { 
                    D.insert((i, j), *D.get(&(i-1, j-1)).unwrap());
                } else {
                    let p = *D.get(&(i - 1, j - 1)).unwrap();
                    let q = *D.get(&(i - 1, j)).unwrap();
                    let r = *D.get(&(i, j - 1)).unwrap();

                    D.insert((i, j), 1 + min(p, min(q, r)));

        return *D.get(&(m, n)).unwrap();

I’ve actually also solved the same thing in JAVA, which I have a much better command on…

public class EditDistance {
    public static int minDistance(String word1, String word2) {
        int m = word1.length();
        int n = word2.length();
        int()() D = new int(m+1)(n+1);

        for(int i=0; i<=m; ++i) D(i)(0) = i;
        for(int j=0; j<=n; ++j) D(0)(j) = j;

        for(int i=1; i<=m; ++i) {
            for(int j=1; j<=n; ++j) {
                if(word1.charAt(i-1) == word2.charAt(j-1)) D(i)(j) = D(i-1)(j-1);
                else D(i)(j) = 1 + Math.min(D(i-1)(j-1), Math.min(D(i-1)(j), D(i)(j-1)));
        return D(m)(n);

    public static void main(String() args) {
        System.out.println(minDistance("intention", "execution"));

Something about my Rust solution seems off to me. Not really sure but here are some of my irritations:

  1. I couldn’t find a better way to iterate a string and refer to it by its index easily other than having to convert it to a vector.

  2. I think I’m unwrap()-ing too much. Although I’m not aiming for code golf here, it still feels subconsciously that I could have avoided so many unwrap()s.

  3. I feel a bit bad because I kind of word to word translated my solution from Java… perhaps there’s a more Rust-idiomatic way of doing whatever I did?

Looking forward to your advise and help 🙂 Thanks in advance!

magento2 – QLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

I am trying to upload product price with just two column “sku” and “price”.

when i am checking data , its successful but when i am trying to import i am getting this following issue

SQLSTATE(23000): Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`zest`.`catalog_category_product`, CONSTRAINT 
`CAT_CTGR_PRD_CTGR_ID_SEQUENCE_CAT_CTGR_SEQUENCE_VAL` FOREIGN KEY (`category_id`) REFERENCES `sequence_catalog_category` (`sequence_value`) ON DEL), query was: INSERT INTO `catalog_category_product`
(`product_id`,`category_id`,`position`) VALUES (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?) 
ON DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`), 
`category_id` = VALUES(`category_id`)

Please help me to fix this. Thanks in advance.

Como inserir Mersenne twister no meu programa em C?

Boa noite!

Sou iniciante em C e estou com dificuldade em inserir o Mersenne Twister para gerar numeros aleatorios em meu programa.

Encontrei o algoritmo pronto aqui:

Porem, não sei onde coloco o arquivo .c (copio no meu codigo, fica separado 🤷 sei lá), e não sei onde coloco o arquivo .h

Obrigado pela atenção!

usability – What encouraged the designers of GNOME Web 3.11.90 to show both (a) the page title and (b) the address/location/URL in the header bar?

Points of reference, please, for documents and/or discussions that supported the design rationale.

I’ll add one answer, I don’t know whether it’s ideal.


A brief, two-screenshot introduction to how the bar responds to a click on the title/URL:

The following screenshot (source) exemplifies a clearly presented title and address, complementing tabs with favicons:

A March 2014 screenshot of Web

From Apps/Web – GNOME Wiki!, a more familiar shot of a single window without tabs:

enter image description here

UX Stack Exchange answers such as https://ux.stackexchange.com/a/26055/16809 and https://ux.stackexchange.com/a/4879/16809 help me to know that the current design of Web is pleasantly consistent with relevant parts of the Gnome Human Interface Guidelines (HIG). I’d now like to find discussions that demonstrate/reinforce the value of those consistencies.

Personal opinion

I love the design of the header bar in the current Gnome Web.

I dislike what Apple has done, publicly, to Safari 8 in the first four developer previews of Yosemite – up to and including build 14A298i of OS X 10.10. Where previously we had a title bar (with a visible title) and address, now there’s neither.

Whilst there’s personal dislike of that design, I would like potential answers to be fairly free from bias …

Ideal answers

Links to discussions that demonstrate:

  • healthy argument with multiple points of view
  • logical conclusions.


Thank you

dnd 5e – RAW, can Mordekainen’s Magnificent Mansion create components for activities/spells?

No, not if it’s Read in English (RiE)

FURNISH — fur·nish
provide (a house or room) with furniture and fittings.

It has functioning furniture, dresser, armoire, butchers, beds, etc…

DECORATE — dec·o·rate
/ˈdekəˌrāt/ verb make (something) look more attractive by adding extra items or images to it.

Paintings, vases, sculptures, etc..

So by these English definitions, you aren’t making a mine shaft with valuable ore nor greenhouse with rare herbs.

The intent is a safe haven with food, water and accommodations suitable for basic living needs. In addition to that, you can make it luxurious with extra decorations.

Furnishings and other objects created by this spell dissipate into
smoke if removed from the mansion.

Per the spell, anything created inside via spell, disappears leaving mansion.

Unlike the rod of security, any specialized room won’t benefit you more than 24 hour period anyways.

As always, subject to change with your DM. 🙂

hard drive – Bootcamp & Tested Disks

My bootcamp doesn’t work, at the windows set up page I get “windows cannot locate the disk and partition specified in the unattended answer…” which I think is due to the weird nested disks I have
enter image description here

How can I clean up the way that the disk is formatted? I don’t want this pointless nested disks