Bread-first search

The fact that this solver is calling a random number generator makes me think that it simply tries out stuff until something works. Is that assessment correct?
An even more overblown well engineered approach would be to try out all possibilities in a breadth-first manner. In fact, I did write something like this. And since nobody said anything about being reasonable, I wrote it in Haskell.
Pro:
It's super short and works beautifully
Con:
It's in Haskell. Not sure if that's better or worse than Java.
type Cube = Int
type Step = Int
type PossibleRotation = [Int] -- As long as the cube array
data State = S [Step] [Cube]

solvePuzzle :: [State] -> [PossibleRotation] -> [Step]
solvePuzzle states possibleRotations
  | null solutions = solvePuzzle (concatMap (\s -> zipWith (applyRotation s) possibleRotations [0..]) states) possibleRotations
  | otherwise = getSteps (head solutions)
  where solutions = filter (\(S _ cubes) -> all (==0) cubes) states

getSteps :: State -> [Step]
getSteps (S steps _) = steps

applyRotation :: State -> PossibleRotation -> Int -> State
applyRotation (S steps cubes) rotation rotationId = S (steps++[rotationId]) (zipWith (\cube rot -> (cube + rot) `mod` 4) cubes rotation)

-- solvePuzzle [(S [] [0,2,0,0])] [[1,1,0,1],[1,1,1,0],[0,1,1,1],[1,0,1,1]]
-- solvePuzzle [(S [] [0,2,0,0])] [[1,1,0,1],[1,1,1,0],[0,1,1,1],[1,0,1,1]]

Feel free to use the code. Though, if one wants to make something actually usable, I'd recommend writing it in Typescript and having a proper, static website. I'd totally be willing to help if you're interested.

Yes, I did it dirty and used the random number gen instead of "the smart way".  Now I just need to figure out how to read this.

I've played and refactored a bunch.  Few setup calls and it finds a faster solution.
9670 Solutions found after 2294145 attempts
--Best Solution Found--
Initial Cube State
[N|N|N|E|W]
Hits
Hit #1 - Cube Index [2] - Triggers [0,4]
[E|N|E|E|N]
Hit #2 - Cube Index [2] - Triggers [0,4]
[S|N|S|E|E]
Hit #3 - Cube Index [1] - Triggers [0,2]
[W|E|W|E|E]
Hit #4 - Cube Index [0] - Triggers [2]
[N|E|N|E|E]
Hit #5 - Cube Index [0] - Triggers [2]
[E|E|E|E|E]

Color Key
Unmodified Cube
Cube to Touch
Modified Because of Touch

Yes, I did it dirty and used the random number gen instead of "the smart way". Now I just need to figure out how to read this.

I can rewrite it in mostly any language you like. And actually add comments.
Here it is in Javascript.
/**
 * A possibility that we'll explore in the breadth-first search
 */
class State {
  /**
   * Which cubes did we touch to get to this state?
   */
  steps = [];
  /**
   * How are the cubes arranged? I'm using numbers (0,1,2,3)
   */
  cubes = [];

  constructor(steps, cubes) {
    this.steps = steps;
    this.cubes = cubes;
  }
}

/**
 * Applies a rotation to some cubes. A rotation just describes which cubes get rotated.
 * It then returns a new array of cubes.
 */
function applyRotation(rotation, cubes) {
  if (rotation.length != cubes.length)
    throw new Error("There has to be one rotation for every cube.");
  let newCubes = cubes.slice(); // Copy the array
  for (let i = 0; i < rotation.length; i++) {
    newCubes[i] = mod(cubes[i] + rotation[i], 4);
  }
  return newCubes;
}

function applyAllRotations(possibleRotations, state) {
  // We take every single rotation, and create a new state
  return possibleRotations.map(
    (rotation, i) =>
      new State(state.steps.concat(i), applyRotation(rotation, state.cubes))
  );
}

/**
 * states: We explore all possibilities at the same time. Could be improved by only visiting actually new states.
 * possibleRotations: If we touch cube n, which cubes get rotated
 */
function solvePuzzle(states, possibleRotations) {
  // Solutions are those possibilities where every cube is 0 (facing in the desired direction, could be made better)
  let solutions = states.filter((state) => state.cubes.every((cube) => cube == 0));

  if (solutions.length == 0) {
    // Keep searching
    const newStates = states
      .map((state) => applyAllRotations(possibleRotations, state))
      .flat();
    return solvePuzzle(newStates, possibleRotations);
  } else {
    // Yay, we found a solution
    return solutions[0].steps;
  }
}

function mod(a, b) {
  // Most languages don't implement a proper modulo that handles negative numbers
  // Instead they implement a division-remainder. Ew.
  return ((a % b) + b) % b;
}

solvePuzzle(
  // We haven't done anything yet
  // And the cube at index 1 has been rotated 2 times
  [new State([], [0, 2, 0, 0])],

  // And if we hit the cube at index N, it will get rotated accordingly
  [
    [1, 1, 0, 1],
    [1, 1, 1, 0],
    [0, 1, 1, 1],
    [1, 0, 1, 1],
  ],
);

And the whole "Good" direction thing is not needed for most, except for puzzles that have a fixed direction.

I think the easiest way is to have a function that checks if a solution is valid. That way, you could easily switch out which variant to use at runtime.

9670 Solutions found after 2294145 attempts

Yeah, the max depth variant works. But doing it breadth-first, where you first check all solutions with a max depth of 0, then with a max depth of 1, then with a max depth of 2, and so on is neater. It guarantees that the first solution you find is also the best one.

I did some work, think it is better now, and it doesn't check everything
Sample

Very nice indeed!

Oh lol, I also have a super simplistic one that assumes cubes will only ever rotate in one direction

I keep thinking, need to add drag and drop somewhere, or pre-program all the puzzle configurations, but if you just showed up to the puzzle, the pieces are in a fixed direction, here is the answer.

Oh lol, I also have a super simplistic one that assumes cubes will only ever rotate in one direction

This puzzle is why I wrote it.

I think the easiest option is to code in every puzzle in the game.
Which makes me wonder: Is there a list of all puzzles somewhere?

On the official map it has every cube puzzle listed.  But I already solved them, so I can't play with them again to get the X triggers Y logic and initial diection.

But I could easily change up the code and have it start at a lower max depth, and then on failure, increase it until it works / max.

I suppose there are a few reasonable options:

Creating a new Genshin account and speedrunning to Inazuma
Crowdsourcing it. As long as we have one puzzle and a nice UI, it should make for a decent Reddit post. (Karma go brrr.) Or we could ask on a Genshin Discord server.
Or we could join random people and solve their puzzles
Or looking up videos of some of the puzzles might also work

Also, how do you feel about turning this into a website?  Costs nothing, is easy to make, and saves people the trouble of downloading something.
Of course, if you want to try out anything something different, I'm up for it. (Like Rust compiled to WebAssembly?)

It would not be that hard to make simple js page version, since it would just be all client side.  Use a worker.  I thought about making a simple site, but I forgot about github pages, then it could have a crude map of all the puzzles to click to see the root solution and if you messed with it, enter the current facing.
I still have one of my kids accounts that hasn't don't anything yet in inazuma.

It would not be that hard to make simple js page version, since it would just be all client side. Use a worker. I thought about making a simple site, but I forgot about github pages, then it could have a crude map of all the puzzles to click to see the root solution and if you messed with it, enter the current facing.

Yep, fully agreed. It's always nice when a web-development project boils down to client side Javascript. No complicated servers involved, haha.
And yes, the crude map is definitely a good idea.

I still have one of my kids accounts that hasn't don't anything yet in inazuma.

Sweet! Then that beautifully solves that.

Just need to worry about copyrights, Jenshin Impact is always pretty memeable.

On the topic of Jenshin Impact, this is what my better Genshin desktop icon looks like.

Bwahaha yes indeed. I also propose drawing the Inazuma map instead of using the official, probably copyrighted one. Bonus points for drawing it with Microsoft Paint.

This is a task I need to give to my oldest kid, they "think they can draw".  And they will add in random sea monsters.

Soooooo, think I found how to make a zoomable map that can use a custom image.
https://leafletjs.com/examples/crs-simple/crs-simple.html

Did some cursory research, seems like I could do a angular project, have it build into /docs and it will present.  Don't need to go overboard, two views (world map), and puzzle.  So there could be links to specific puzzles.

I need to eventually convert the 20 year old monolith to Angular, so seems like it will be Angular.  Should have a demo site that does nothing soon.

I need to eventually convert the 20 year old monolith to Angular, so seems like it will be Angular. Should have a demo site that does nothing soon.

Then Angular it is! Always nice when a fun project has the side-effect of "learning something useful".
I'll look forward to the demo site!
While I'm at it, should I do all my contributions through Github pull requests or would you prefer giving me access to the repository? Either option is equally fine with me.

Ok, the demo should appear here https://mgatelabs.github.io/GenshinSolvers/ It should take a few minutes for it to switch.
Pull requests would be the best, I should setup a pages-dev branch for me to work under and pull them in also.

Yeah, base url stuff.
By the way, there is a slightly more elegant way of doing the Github pages stuff that doesn't require you to mix auto-generated files with the other files.
Basically

Move the stuff from https://github.com/mgatelabs/GenshinSolvers/tree/Pages to the main branch
Add the docs or whatever folder to the .gitignore
npm install gh-pages
Build an Angular project
And then use the gh-pages to automatically take everything from the docs folder and force-push it to the gh-pages branch. I got a script for it here
Tell Github to use the gh-pages branch

Ok, had to undo and re-do the changes, but it is now doing the magic.
But the Pages branch should be the page specific branch.  The original java app should stay in the master branch.

Sounds reasonable :)
The easiest way of redoing the changes is to checkout the master branch before the revert. Then select everything except for the .git folder and copy it somewhere else. Then checkout the Pages branch. And replace everything there with what you copied previously.

Ok, time to get serious, need to make a development branch where my changes will go, and then start merging them instead of just pushing to Pages.
And probably need to start making issues about the missing things

Ok, time to get serious, need to make a development branch where my changes will go, and then start merging them instead of just pushing to Pages.
And probably need to start making issues about the missing things

Awesome! From the quality of life tweaks, could you please add in the "format on save" stuff? And you'll definitely want to add the .nojekyll file, otherwise Github pages occasionally acts up.
https://github.com/mgatelabs/GenshinSolvers/pull/6/commits/6c4f39419799f66287d5fadea990059cf72024d7

Nice, thank you :)
As soon as you got issues for the various features in place, feel free to assign me to some. Or I'll simply comment on the ones that I'd like to take care of.

I just noticed, "bread" first search.

Nice, spotted the pun. Yes indeed, searching for a nice loaf, preferably a cat loaf should be the first thing any good algorithm does. 😋

The demo has been updated to the latest dev build https://mgatelabs.github.io/GenshinSolvers/

It has the Inazuma map
It has teleport, puzzle and seven icons

It does nothing yet

So now, is the hard part, research, need to visit a few of the puzzles, take a screen shot with the camera, remove the character.  Save the initial orientations, see what each hit does.
Then need to start building out the puzzle json, the 2nd screen for the puzzle info and solver.

As for collecting data, I think the safest option is to record it all. Fire up OBS, start recording and take notes of what each hit does.
That way, if you mess up, you still have a screen recording to fall back to.
And about the "getting to the puzzles part", I'd be up anytime to play Genshin. XD

Regarding the presentation, one thing that would be useful would be "which direction is the player looking in". As in, the direction the arrow is pointing in on the minimap.

True, which way you are facing is important.  All the small details.

So thinking, Bootstrap to handle mobile / desktop?

Nice progress!

True, which way you are facing is important. All the small details. But if possible we need to face true direction, so all the NESW makes sense. And some of the images may need to be edited, i'm thinking of a few puzzles where some of the cubes are a bit away.

Yeah, true. There is at least one puzzle where the pieces are separated by an ocean.

I was thinking about threejs, i've used it in the past. It gets tricky, but could make a 3d model with an arrow facing and place it over the image, it just gets tricky to determine the orientation and position, so it scales well.

I was more thinking of recreating the cubes using Three.js. Not sure how practical that would be.
One alternative, along those lines, would be using isometric pixel art. Like this

And at some point need to add in the translation stuff, but don't even have a solver yet, so it can wait. I don't think this is going to be very "wordy" app.

Yes, you're definitely right about that. Depending on how things go, we might be able to get away with practically zero text.

So thinking, Bootstrap to handle mobile / desktop? Grids, fancy fields.

Sure, Bootstrap is a solid choice. Probably an overkill for this, but why not.

I like the iso metric art style, kind of feels like minecraft, but I fear there may be a disconnect between the iso view and the real world.  Unless we specifically take the images in a certain way.  I've written a game in three js before, I can make it do things.

I like the iso metric art style, kind of feels like minecraft, but I fear there may be a disconnect between the iso view and the real world. Unless we specifically take the images in a certain way. I've written a game in three js before, I can make it do things.

True, it might make the tool not quite as easy to use as it could be.
If we're going with the 3D Three.js approach, I wonder if stitching some Genshin screenshots together to make an environment map would work. Or if that would be too tricky to be worthwhile.

I think fixed 3D, like the old Grim Fandango, place the 3d cubes on top of the image.  So the player just need to stand in a similar spot and shoot arrows at the cubes in the order we present.  Otherwise we would need to break out the Nvidia image tech where it makes 360 images in games, but I don't think GI does that.  Now we could add in multiple images and allow switching for some of the less simple ones, just adjust the "world" position so it all makes sense.

I agree, this sounds like the best option so far. Let's go with that then.

One quick question regarding puzzles: Do they really only ever rotate in one direction/increment the glowing leaves by 1?
If yes, then we can use the super simplistic code from https://github.com/mgatelabs/GenshinSolvers/issues/1#issuecomment-1048511959

I'm pretty sure they all turn the same way, and they all move by 1 state, but until it has been evaluated, not 100% sure.

Here is an untested solver, it works just like the simplistic one. The main differences are that it's properly typed, doesn't do useless work and has comments.
Please do let me know when and where I should integrate it ;)
type PuzzleState = readonly number[];

type Puzzle = {
  /**
   * We represent the state with simple numbers
   */
  initialState: PuzzleState;

  /**
   * What state do we want to reach?
   */
  finalState: PuzzleState;

  /**
   * What's the maximum state (exclusive), before wrapping around.
   * 4 in the case of a rotating cube puzzle.
   */
  maximumNumber: number;

  /**
   * A state transition basically says "if we hit cube X then Y will be affected"
   */
  stateTransitions: number[][];
};

type PuzzleSolveStep = {
  previousStep: PuzzleSolveStep | null;
  touchedCube: number | null;
  state: PuzzleState;
};

/**
 * @param puzzle The puzzle to be solved
 * @returns A solution if one was found, otherwise null
 */
function solvePuzzle(puzzle: Puzzle) {
  // To prevent doing work more often than we have to
  const solvedStates = new Set<string>();

  // Which puzzle states can we reach and have not solved yet.
  const workQueue: PuzzleSolveStep[] = [
    {
      previousStep: null,
      touchedCube: null,
      state: puzzle.initialState.slice(),
    },
  ];

  while (true) {
    // Take from the beginning of the queue
    let unsolved = workQueue.shift();
    if (unsolved === undefined) break;

    // Now apply every possible state transition
    for (let i = 0; i < puzzle.stateTransitions.length; i++) {
      const newState = unsolved.state.slice();

      // Apply the state transition
      puzzle.stateTransitions[i].forEach((affectedCube) => {
        newState[affectedCube] = mod(newState[affectedCube] + 1, puzzle.maximumNumber);
      });

      const newWork: PuzzleSolveStep = {
        previousStep: unsolved,
        touchedCube: i,
        state: newState,
      };

      // Check if it's a solution
      const isFinalState = newState.every((v, i) => puzzle.finalState[i] == v);
      if (isFinalState) {
        return newWork;
      }

      // Otherwise insert the new state as "work to do"
      if (!solvedStates.has(stateToString(newState))) {
        solvedStates.add(stateToString(newState));
        workQueue.push(newWork);
      }
    }
  }

  return null;
}

function stateToString(state: PuzzleState) {
  return state.map((v) => v + "").join(",");
}

/**
 * Proper modulo, always returns a positive number
 */
function mod(a: number, b: number) {
  return ((a % b) + b) % b;
}

I think I need to flesh out a Worker that would accept input.  Think i'll have a cube class, direction enum, and the connections.  Then after the worker is finished, just need a way to get the value.  I've never actually used a Worker before.

I think I need to flesh out a Worker that would accept input. Think i'll have a cube class, direction enum, and the connections. Then after the worker is finished, just need a way to get the value. I've never actually used a Worker before.

A worker is an absolute overkill for this. Given a crazy large puzzle with 10 stones and every stone has 4 rotations, that would still just be a maximum search space of 444*4... = 4^10 = 1048576 states.
Which means that any halfway decent algorithm should be able to absolutely crush a puzzle in less then a second.

I'm looking at the code sample and I think it would need some changes.  There are not a lot of times when it needs a specific direction, they just all need to face the same way or face the same direction as one that cannot move.  I think there is a series of 3 puzzles where some face different ways.  Maybe it needs different solution possabilities, like UNIFIED, they all face the same way, FORCED, they must all face this way, or CUSTOM, where you pass in the array of desired output.

I suppose one quick tweak would be changing it to an array of finalStates: PuzzleState[];. That way, multiple different solutions could be set.
In other news, I found a puzzle that I hadn't completed yet. Here is a shoddy, annotated screenshot.

Numbers of cubes
Which cubes they affect
Minimap
Solution (that I found)

An alternative would be passing a function that checks if a given state is a solution. Here is what a call would look like
solvePuzzle({
  initialState: [0, 2, 0, 0],
  isFinalState: unifiedSolution,
  // Or one of those two options
  // isFinalState: forcedSolution(0),
  // isFinalState: customSolution([0, 0, 0, 0]),
  maximumNumber: 4,
  stateTransitions: [
    [0,1,3],
    [0,1,2],
    [1,2,3],
    [0,2,3],
  ]
});

Tweaked code. Changes are isFinalState, refactoring the code to use a helper addWork function, and 3 functions at the bottom.
type PuzzleState = readonly number[];

type Puzzle = {
  /**
   * We represent the state with simple numbers
   */
  initialState: PuzzleState;

  /**
   * Did we reach the final state?
   */
  isFinalState: (state: PuzzleState) => boolean;

  /**
   * What's the maximum state (exclusive), before wrapping around.
   * 4 in the case of a rotating cube puzzle.
   */
  maximumNumber: number;

  /**
   * A state transition basically says "if we hit cube X then Y will be affected"
   */
  stateTransitions: number[][];
};

type PuzzleSolveStep = {
  previousStep: PuzzleSolveStep | null;
  touchedCube: number | null;
  state: PuzzleState;
};

/**
 * @param puzzle The puzzle to be solved
 * @returns A solution if one was found, otherwise null
 */
function solvePuzzle(puzzle: Puzzle) {
  // To prevent doing work more often than we have to
  const solvedStates = new Set<string>();

  // Which puzzle states can we reach and have not solved yet.
  const workQueue: PuzzleSolveStep[] = [];

  function addWork(step: PuzzleSolveStep) {
    const stateString = step.state.map((v) => v + "").join(",");
    if (!solvedStates.has(stateString)) {
      solvedStates.add(stateString);
      workQueue.push(step);
    }
  }

  addWork({
    previousStep: null,
    touchedCube: null,
    state: puzzle.initialState.slice(),
  });

  while (true) {
    // Take from the beginning of the queue
    let unsolved = workQueue.shift();
    if (unsolved === undefined) break;

    // Now apply every possible state transition
    for (let i = 0; i < puzzle.stateTransitions.length; i++) {
      const newState = unsolved.state.slice();

      // Apply the state transition
      puzzle.stateTransitions[i].forEach((affectedCube) => {
        newState[affectedCube] = mod(newState[affectedCube] + 1, puzzle.maximumNumber);
      });

      const newWork: PuzzleSolveStep = {
        previousStep: unsolved,
        touchedCube: i,
        state: newState,
      };

      // Check if it's a solution
      if (puzzle.isFinalState(newState)) {
        return newWork;
      }

      // Otherwise insert the new state as "work to do"
      addWork(newWork);
    }
  }

  return null;
}

/**
 * Proper modulo, always returns a positive number
 */
function mod(a: number, b: number) {
  return ((a % b) + b) % b;
}

function unifiedSolution(state: PuzzleState): boolean {
  return state.every(v => v == state[0]);
}

function forcedSolution(direction: number): (state: PuzzleState) => boolean {
  return (state) => state.every(v => v == direction);
}

function customSolution(finalState: PuzzleState): (state: PuzzleState) => boolean {
  return (state) => state.every((v, i) => finalState[i] == v);
}

I think we just need the default cube orientation (I think it defaults for each puzzle) and then allow them to click on the cube to rotate it, so it matches what they see, then they could hit solve and get a new solution.

So the info from there is:
It is a light puzzle.
initial directions = [2, 3, 3, 1]
0 : connects to 1, 3
1 : connects to 0, 3
2 : connects to 1
3 : connects to 0

Derpy Artwork

Cube has been rendered in 3d, and the textures are different on each side

Getting fancy
Moving around the camera, Window stays at 1.333 aspect ratio.  This way after the image is added, it will more them likely always line up.

I guess the 1st puzzle to implement will be the one @stefnotch gave details for.  And it seems like that may have been the last puzzle added to the game, since it's ID is the largest.
I need to re-grab the image, remove the character, maybe use the blur option since we want our cubes on top.  And then crop / make it smaller and try to place it behind the cubes.
I also need to re-work the puzzle component, the puzzle display window need to be it's own component to move all the THREE JS stuff to it's own place.

This is sort of getting somewhere

This does look very nice! I can honestly say that I'd enjoy using that tool :)
So, I'm guessing the next steps are

Setting the transform (translation and orientation) of the cubes
Making them click-able

Need to change the SPINNING puzzle top so it has an arrow facing forward.
Thinking to start make them match the image (1 area)

Camera Transform (X, Y, Z), looks at (0,0,0)
World Rotation (Degrees)
Cube X / Y / Z (Extra Rotation)

Need methods to change all these values and have it update the camera views.
Then making them clickable.  Need it to emit a message about cube x clicked
Need to make a method to pass in the "configuration".  So we can change the cube rotations.

I took a look at making them clickable and realized that the recommended library (three.interaction.js) isn't as well maintained as it should be.
After some searching, I found THREE.Interactive. It seems to be a solid alternative, but doesn't have Typescript types! So I did what I could and opened a pull request that fixes that and a bit. Hopefully I didn't break anything there. Let's see what the maintainer says :)

Worst case I can add a 2d click layer on top and make the 3d view just output.

So the only major actions are like "solve", "reset", "issues". Issues would redirect to the GitHub issues page.

I think we can get rid of "solve", if we just always auto-solve it. Maybe add in some debouncing so that it doesn't go insane after every click.

Would also need a comment/description block that would have some vague info. "Puzzle is only accessible after using the feather".

That is an excellent idea indeed!

If it is fast enough, we can keep a history of previous solutions and if the same one shows up twice, just use the history.

Ok, things are getting serious

Adding a selection node.

Woah, that's excellent! As for enforcing the same width, either set the width with CSS, or use a monospaced font, or use a table.

I started to integrate the puzzle solver code.  Seem to have it working locally, now I just need to reverse the state into a simple array and have it display.

Figured out the solver so now I have something like this:

Need to figure out the actions, since if you need to show which cube to hit, and maybe you want to see the hit with the previous cube configuration.  Or they would see hit X and show the result.
So would think I would need to add and extra finished step which just shows the end result.

Ok, solution now skips the initial step and have the finish step.

Any idea what's causing this error? It honestly has me stumped, but then again, I'm not used to Angular's less-than-ideal change detection. I prefer the Vue.js approach.

Do we have any idea if the back pieces are even hittable?

If the solver doesn't return a solution, then it's guaranteed that there is no solution. It explores the full search space.
In this case, it is possible to create configurations where the back pieces have been hit and there is a valid solution.

Thinking to hide the initial configuration in an acridian or something similar.

I think it's fine the way it is. Unless, of course, the cubes are clickable...

Any idea what's causing this error? It honestly has me stumped, but then again, I'm not used to Angular's less-than-ideal change detection. I prefer the Vue.js approach.

I think I angered the angular gods a bit.  I'll figure it out, probably doesn't like how i'm passing things around.

Interesting observation indeed. Judging from this video, there seem to be a lot of puzzles that have something like that. I suppose one would have to play around with the puzzles more to figure out what exactly they mean.

I checked the puzzle at https://mgatelabs.github.io/GenshinSolvers/puzzle?id=x14197 and the 3 back cubes have no interactions, so they will have empty connections and should be skipped when checking.

I checked the puzzle at https://mgatelabs.github.io/GenshinSolvers/puzzle?id=x14197 and the 3 back cubes have no interactions, so they will have empty connections and should be skipped when checking.

Interesting indeed. Then I'm glad that the algorithm I whipped up doesn't assume that hitting a cube will cause it to rotate.
Like, if we had an imaginary 2 cube puzzle where the user can only touch the second cube:
solvePuzzle({
  initialState: [3, 0],
  isFinalState: customSolution([3, 3]),
  maximumNumber: 4,
  stateTransitions: [
    [], // Nothing happens when hitting cube 0
    [1], // Cube 1 rotates when cube 1 gets hit
  ]
});

In other news, I just found out that there are a few other Genshin Impact puzzle solvers.

https://github.com/Neboer/Genshin-Inadzuma-block-puzzle-solver : Throws some serious mathematics at the puzzle, I'm actually not sure if it will give you an optimal solution
https://github.com/AceDroidX/genshin-puzzle : Is web based
https://github.com/RwbyChan/genshin-electro-puzzle-solver : Is web based and closed source
https://github.com/gideonapollob/genshin-puzzle-solver : Isn't intended for the general public, has solutions for 4 puzzles

What they all have in common is that the user has to configure the puzzles themselves. I might reach out to some of them, mainly to say: "Look, we've also built a solver. What do you think?"

Nice to know we're not the only ones building an overly complex solution to a simple problem.

Nice to know we're not the only ones building an overly complex solution to a simple problem.
But from what i've witnessed, we might be the simplest, but we have to put in all the leg work.

Yes indeed, I was quite amused to see what other people have tried. I personally really enjoyed the mathematical approach, even if it is like using an industrial jackhammer to tighten a screw.
And yes again, we're definitely building the simplest one. In fact, I'd go so far as to say that we're building the only one that's use-able enough to actually consider using. Most of the time, the

But watching that video, there are cubes with the thing on top and the user can hit them.  Maybe by the time they made those, they were like thing on top pretty, screw the rules.

Finally implemented the puzzle that was presented before.
https://mgatelabs.github.io/GenshinSolvers/puzzle?id=x19254

Started to test the app on iPhone, it crashed the browser, but all the buttons work.  Should have the click magic working soon.


Add bcl_convert component, including unit tests

Description
bcl_convert component for demultiplexing a bcl directory.
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] Conforms to the Contributing guidelines
[ ] Proposed changes are described in the CHANGELOG.md
[x] I have tested my code with viash ns test --parallel -q <name or namespace>
Check the correct box. Does this PR contain:

[ ] Breaking changes
[x] New functionality
[ ] Major changes
[ ] Minor changes
[ ] Documentation
[ ] Bug fixes

lgtm :)

Thanks for the comments! I tried to align the boolean arguments to how bcl-convert is handling them, hence the boolean rather than boolean_true or boolean_false.


[error] the argument(index) of renderItem function is wrong

in 0.8.12
the argument(index) of renderItem function doesn't Minus one.
forExample when dataSource = [].
the renderItem function will get index = 0, it means user will use dataSource[0].
it is different from 0.8.11 and make some application crush.

Same here. All my apps with the newest version 0.8.12 crash. Ned to downgrade to make them work again.

Please try out 0.8.13. If it still doesn't work please provide an example.


Unable to change port in the version of OpenSSH shipped with unc0ver

The default port of SSH is 22 and I want to switch to a higher port number for security purposes (working on open Wi-Fi, so) and also to be able to allow SSH into my device locally. I also want my SFTP server to be on that exact same higher port.
So here’s the issue. On other jailbreaks I used to be able to edit /etc/ssh/sshd_config and remove the hashtag before “Port” to allow customizing port number like I did with my linux machines. On unc0ver, however, the file sshd_config under the same directory appears to have faulty permissions which seems to me that sshd will not read its configuration because of this. I know this because upon modifying sshd_config to allow public key authentication and disable password login, it didn’t work until I changed the mask to 755.
However, changing the port number doesn’t work as expected AFTER a rejailbreak/reboot. So after I removed the hashtag and started a new sshd daemon by calling /usr/sbin/sshd, yes, I can ssh into the device at the port number specified. The issue becomes, if I reboot and then jailbreak, sshd will be running on port 22 again instead of the port specified in /etc/ssh/sshd_config. (The whole file doesn’t seem to have been read by the daemon) Very weird issue indeed. When troubleshooting with /usr/sbin/sshd -d I don’t see a problem coming out of the console except that it’s running on port 22 instead of the one I specified.
Worth to mention that I did try other working OpenSSH packages to troubleshoot. They include that really old version from 2016 on saurik’s repo, the relatively newer one on CS’s repo, but both didn’t survive a reboot due to the fact that unc0ver seems to have automatically replaced its supposedly latest version with unusable sshd_config back after each reboot even if I have “Reinstall OpenSSH” toggled off in its Settings.
Anyone has some insights on this or might want to share how one can change its port number on unc0ver?
There’s probably something wrong with the OpenSSH bundled with unc0ver since I’ve reinstalled it through Cydia (sbinger’s repo) and unc0ver multiples times and even if I start fresh the sshd_config is still not functioning.
Also since I’m posting this I also got the problem of all fakesigned apps crashing on unc0ver even if used the same ipas to reinstall them. I already have AppSync Unified installed from Karen’s repo but still. They used to work fine on Electra so I’m not quite sure what’s causing this. On the pro side I did experience the exploit process being much much smoother with voucher_swap on the 3.0 version. Huge thanks to the developers!

This is not a bug. You should modify the launch daemon plist instead.

#284 had some people who were wanting to help

@pwn20wndstuff

@JQ555888 ^

This is not a bug. You should modify the launch daemon plist instead.

Ah I see now. Thank you!

I don’t see how to do it.  I tried adding -p2222 under ProgramArguments but that didn’t do it.

I don’t see how to do it. I tried adding -p2222 under ProgramArguments but that didn’t do it.
Edit: I found you have to change the SockServiceName from ssh to 2222 in the LaunchDaemon plist. Adding args -p 2222 or changing the port in /etc/ssh/sshd_config will not do anything. However, you can still disable password based authentication using /etc/ssh/sshd_config.
Thought I'd leave this here in case anyone else ever comes across this.

Thanks a million!! I’ve been desperate for this exact fix. I had been trying to modify the plist to -f /etc/ssh/sshd_config which didn’t work either.
Unc0ver should by default SSH on either port 2222, or 22 and 2222, because iOS deliberately blocks any app from connecting to localhost:22. So you literally need 2 devices just to get to a terminal on the device you’re using.

I don’t see how to do it. I tried adding -p2222 under ProgramArguments but that didn’t do it.
Edit: I found you have to change the SockServiceName from ssh to 2222 in the LaunchDaemon plist. Adding args -p 2222 or changing the port in /etc/ssh/sshd_config will not do anything. However, you can still disable password based authentication using /etc/ssh/sshd_config.
Thought I'd leave this here in case anyone else ever comes across this.

OMG thanks, now it works...

@Siggi88
Thank you so much. This is still relevant and working on unc0ver for 13.5

def worth putting this info in a more prominent place. Glad I was able to "unc0ver" this tweak!

Many thanks for this.  I'd had a look at the plist but didn't quite get that the "ssh"  for the socket was defining the port number.  Great info!

Can someone help me? I installed OpenSSH and Filza. But when I enter the
/Library/LaunchDaemons/com.openssh.ssh.plist SockServiceName “ssh” ➡ “2222” definitely works to move it to 2222.
I cant get it to change to 2222, when i delete ssh and make it 2222 and click on save FilzaEscaped crashes. What can I do?

What is FilzaEscaped and why are you using that instead of the real Filza?
I suspect this is your problem.
On Thu, Aug 13, 2020 at 10:44 AM Vsteegman<EMAIL_ADDRESS>wrote:

Can someone help me? I installed OpenSSH and Filza. But when I enter the
/Library/LaunchDaemons/com.openssh.ssh.plist SockServiceName “ssh” ➡
“2222” definitely works to move it to 2222.
I cant get it to change to 2222, when i delete ssh and make it 2222 and
click on save FilzaEscaped crashes. What can I do?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/pwn20wndstuff/Undecimus/issues/335#issuecomment-673554343,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABNV24MHS22JFNMUUUUJBJLSAQC6BANCNFSM4GWA2PVQ
.

--
Sent from Gmail Mobile

في سبت، ١٥ أغسطس، ٢٠٢٠ في ١:٥٨ ص، كتب badger200<EMAIL_ADDRESS>
What is FilzaEscaped and why are you using that instead of the real Filza?
I suspect this is your problem.
On Thu, Aug 13, 2020 at 10:44 AM Vsteegman<EMAIL_ADDRESS>wrote:

Can someone help me? I installed OpenSSH and Filza. But when I enter the
/Library/LaunchDaemons/com.openssh.ssh.plist SockServiceName “ssh” ➡
“2222” definitely works to move it to 2222.
I cant get it to change to 2222, when i delete ssh and make it 2222 and
click on save FilzaEscaped crashes. What can I do?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/pwn20wndstuff/Undecimus/issues/335#issuecomment-673554343
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ABNV24MHS22JFNMUUUUJBJLSAQC6BANCNFSM4GWA2PVQ
.

--
Sent from Gmail Mobile
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pwn20wndstuff/Undecimus/issues/335#issuecomment-674303547,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AN7M56HB4Z3GQAQ5OTC4G6DSAW6RJANCNFSM4GWA2PVQ
.


RSpec deprecation warnings

RSpec is specified in the gemspec as ~> 2.14. This currently resolves to 2.99.0, which includes deprecation warnings for RSpec 3.
I suggest either:

Change the dependency to add < 2.99 (i.e. spec.add_development_dependency "rspec", "~> 2.14", "< 2.99")
Fix the deprecation warnings and upgrade to RSpec 3.

I'd be happy to submit a pull request for either of these.

Good shout. I'd prefer to upgrade to RSpec 3. I'd gladly accept a PR to achieve this if your able to :+1:


(PearTreeJump) should skip whitespace

Using <Plug>(PearTreeSpace) often leads to the cursor being one space away from the closing string. It would be good if <Plug>(PearTreeJump) ignored this space and just moved past the closing string:
{% foo| %} -> {% foo %}|

@tmsvg Could you please tell how can this be used? For example if I want to use the closer character to jump automatically? E.g. in {% foo| %} I press } and it jumps over.
I've tried mapping imap } <Plug>(PearTreeJump) but that didn't seem to work.

Maybe this should be a separate issue, but currently pressing PearTreeBackspace after pressing PearTreeSpace doesn’t delete the space in front of the cursor as well as the one behind it. Personally I would prefer if this was the case.


Check if is possible to have the wideq_state.json file inside the userdata folder

Isn't it possible to have the wideq_state.json file inside the userdata folder? That would be much better for the docker setup, because userdata is a docker volume and thus accessible.
Originally posted by @kipusoep in https://github.com/majki09/domoticz_lg_thinq_plugin/issues/5#issuecomment-1011953936

What userdata actually you mean? Domoticz plugin's configuration data should be stored in Configuration fields. Configuration allows the plugin store structured data in the database rather than writing files or creating Domoticz variables to hold it.
I'm about to move all wideq_state.json fields to Configuration, so all config from wideq_state.json file will be saved into domoticz database.
Will this be OK for you?

I guess the userdata folder is docker specific. From https://registry.hub.docker.com/r/domoticz/domoticz :
volumes:
  - ./config:/opt/domoticz/userdata

So this userdata folder is a subfolder of the domoticz root folder. That's where the database etc. is stored.
Here's an example from a fresh instance:
-rw-r--r-- 1 root root    4096 Jan 18 09:40 domoticz.db
-rw-r--r-- 1 root root   32768 Jan 18 09:40 domoticz.db-shm
-rw-r--r-- 1 root root 1112432 Jan 18 09:40 domoticz.db-wal
drwxr-xr-x 2 root root    4096 Jan 18 09:40 plugins

This is currently in my instance:
drwxr-xr-x 105 root root     4096 Aug 17 16:00 Config
-rwxr-xr-x   1 root root    97954 Apr 26  2020 History.txt
-rwxr-xr-x   1 root root    35147 Apr  2  2020 License.txt
drwxr-xr-x   5 root root     4096 Aug 17 15:59 backups
-rwxr-xr-x   1 root root      477 Jan 18 09:42 domocookie.txt
-rwxr-xr-x   1 root root 13861696 Apr 26  2020 domoticz
-rw-r--r--   1 root root  3260416 Jan 18 09:40 domoticz.db
-rw-r--r--   1 root root    32768 Jan 18 09:42 domoticz.db-shm
-rw-r--r--   1 root root  4144752 Jan 18 09:42 domoticz.db-wal
-rwxr-xr-x   1 root root     4433 Apr  2  2020 domoticz.sh
drwxr-xr-x   4 root root     4096 Aug 17 16:00 dzVents
drwxr-xr-x   5 root root     4096 Jan 13 10:28 plugins
drwxr-xr-x   8 root root     4096 Aug 17 16:00 scripts
-rwxr-xr-x   1 root root     3414 Apr  2  2020 server_cert.pem
-rwxr-xr-x   1 root root      610 Apr  2  2020 updatebeta
-rwxr-xr-x   1 root root      627 Apr  2  2020 updaterelease
-rw-r--r--   1 root root      540 Jan 12 17:11 wideq_state.json
drwxr-xr-x  13 root root     4096 Aug 17 16:01 www

There's probably stuff that shouldn't even be there, but the thing is I don't know which items ;-)
Anyway, storing it in the database is the best solution ofcourse, because it's one of the things that's inside the volume :-)

Ah OK, now it's more than clear 👍 Thanks!
So yeah, hopefully I will get this to have all that wideq_state.json stuff inside domoticz.db. I think that should make this plugin fully "dockerable".

OK, I have made some changes, but I need you to check if it actually works for you.
Just git pull --rebase.
If it's OK then I will close this issue.

I'll give it a go next week!

As you may have noticed, I wasn't able yet to try this. I hope I can do it this week.

Hi @kipusoep!
No problem, take your time 😄

Darn this has taken far too long. I'm going to try again to focus on this somewhere in the next 2 weeks.

So I finally been able to test it. The persistence seems to work according to the logs:
2022-05-10 21:09:36.898 Status: Airco 1e verdieping: Initialized version 1.2.2, author 'majki'
2022-05-10 21:09:36.925 Status: Airco Zolder: Initialized version 1.2.2, author 'majki'
2022-05-10 21:09:37.259 Airco Zolder: LG API2 (gateway) config saved do Domoticz Configuration.
2022-05-10 21:09:37.260 Airco Zolder: LG API2 (auth) config saved do Domoticz Configuration.
2022-05-10 21:09:37.260 Airco Zolder: Getting AC status successful.
2022-05-10 21:09:37.663 Airco 1e verdieping: LG API2 (gateway) config saved do Domoticz Configuration.
2022-05-10 21:09:37.664 Airco 1e verdieping: LG API2 (auth) config saved do Domoticz Configuration.
2022-05-10 21:09:37.665 Airco 1e verdieping: Getting AC status successful.

But when I remove the wideq_state.json file and restart domoticz, I get errors:
2022-05-10 21:10:14.576 Error: Airco 1e verdieping: Call to function 'onStart' failed, exception details:
2022-05-10 21:10:14.583 Error: Airco Zolder: Call to function 'onStart' failed, exception details:
2022-05-10 21:10:14.587 Error: Airco 1e verdieping: Traceback (most recent call last):
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/plugin.py", line 565, in onStart
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: _plugin.onStart()
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/plugin.py", line 96, in onStart
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: state=self.state)
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/example.py", line 298, in example
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: client._auth = authenticate(client.gateway)
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/example.py", line 25, in authenticate
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: callback_url = input()
2022-05-10 21:10:14.588 Error: Airco 1e verdieping: EOFError: EOF when reading a line
2022-05-10 21:10:14.590 Error: Airco Zolder: Traceback (most recent call last):
2022-05-10 21:10:14.590 Error: Airco Zolder: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/plugin.py", line 565, in onStart
2022-05-10 21:10:14.590 Error: Airco Zolder: _plugin.onStart()
2022-05-10 21:10:14.590 Error: Airco Zolder: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/plugin.py", line 96, in onStart
2022-05-10 21:10:14.590 Error: Airco Zolder: state=self.state)
2022-05-10 21:10:14.590 Error: Airco Zolder: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/example.py", line 298, in example
2022-05-10 21:10:14.590 Error: Airco Zolder: client._auth = authenticate(client.gateway)
2022-05-10 21:10:14.591 Error: Airco Zolder: File "/opt/domoticz/userdata/plugins/domoticz_lg_thinq_plugin/example.py", line 25, in authenticate
2022-05-10 21:10:14.591 Error: Airco Zolder: callback_url = input()
2022-05-10 21:10:14.591 Error: Airco Zolder: EOFError: EOF when reading a line

Right, I found out reading config from database has been disabled here, why?

Hey @kipusoep!
I finally had some time to touch this - sorry for waiting. With latest commit 392f5c1550d68c7887fa2d94bf5df958592714f9 there is no need to move wideq_state.json file anywhere - location is auto-detected now and it's working both for docker and non-docker domoticz instances. Pleas give it a try and let me know, maybe we will finally have a chance to close this issue 😃

I pulled and restarted the container, seems to work fine! Thanks :-D


StringValueArray does not parse arrays with apostrophes

Here is a sample bit of code that was a bit puzzling - I have an .ini section [TestRun] with a string array with one of the array values having an apostrophe - when I step through the code (see below .ini entries) the StringValueArray returns a null.
Removing the apostrophe (see 2nd [TestRun] section) then StringValueArray parses properly.
I did not see any exceptions to using StringValueArray and wondered why an apostrophe would create a problem - is this fixable?
`
; fails to parse - StringValueArray returns null but there is an error that is not thrown
[TestRun]
Test = {010|Store A, 020|Store's We Like, 30|Stores We Do Not Like}
; parses fine - Only difference from previous is apostrophe for 020|...
[TestRun]
Test = {010|Store A, 020|Stores We Like, 30|Stores We Do Not Like}
Section test = config["Test"];
string[] _test = test["Test"].StringValueArray;
`

Hey there,
this is not a parsing error, but a data error. I forgot to remove ''' as a valid comment char.
Thus, SharpConfig will parse everything after the apostrophe as a comment.
You can verify this by looking at the setting's Comment property value.
This will be fixed ASAP, thanks for reporting it.

Thanks! Make sense


Improve checking of the call traces

Current method: dmesg | grep -i 'call trace'
Proposed method : grep -rnw '/var/log' -e 'call trace' --ignore-case
Reason: I've seen that if the dmesg is reset then call traces appeared earlier, will not show in output of "dmesg" command.

@juhlee-microsoft  re-assigning this request to Andrei to cover at some point this month.


Automatically pick tab affordance based on tab list wrapping status?

Should we be able to have spicy-sections work automatically, eg apply tabs behavior only if the tab labels fit without wrapping?
Rik wrote:

Not sure if this is covered but imho this needs a “switch to list when would wrap” setting.
The media query values are just numbers guessing at when the tabs would wrap. Best to calculate what the max width is before it wraps and use that.

Which 'list' would you switch to by default?  collapses? exclusive-collapses? no affordances/inline?

Collapse based on total length of content in sections relative to viewport height.

@rikschennink I "get" the intent of idea, but the details are still kind of fuzzy in my head... Can you expand on how you imagine this working a little more? Like.. .what should an author write (understanding that what an author will write in the custom element isn't probably what we will ultimately propose - it's just an easy way to currently move it 'into css' and think about the problem space)... So, using our element for reference -  if an author asks for 'tab-set' as the affordance - it would ... sometimes not be a tab set... automatically? Can you override that?
Or are you suggesting this is a kind of different keyword value, or...?

@bkardell I think most authors don't know what they want and don't even consider the problems that arise when using tabs on more narrow viewports. So it would be better to automatically handle that.
I think if an author asks for a tab-set you need to fix it to a tab-set, even if it breaks. Same with collapsible, as that is a component that would at least function in every context.
Maybe you can use prefers-{affordance-key} vs {affordance-key}
Use tab-set if possible
<spicy-sections affordance="prefers-tab-set">

Force tab-set
<spicy-sections affordance="tab-set">

I can definitely see the appeal of this, and maybe some kind of prefers- or auto mode like this makes sense...  seems useful to have some discussion and see if there is something larger to discuss in open-ui or something we'd like to experiment with here.. Would be great to hear opinions from @davatron5000 @mirisuzanne and @jonathantneal ...
Here are my own thoughts:  As an author who is frequently 'fine' with native controls - I like the idea, even more generally than this, that there could be a 'more like traditional controls` mode that has some decisions and design built in.  Currently we make only the very most core decisions necessary for styling (there has to be some default padding between tabs when they go into flow/flex, for example).  As an author I would be happy to have the ability to opt into something with some nice 'tab' design - maybe even this.
One thing to note tho - this definitely would seem to open a lot of new doors for disagreements and discussions.  There is less agreement at almost every level than one would think.  Even "Should controls match the OS, or be consistent across browsers?" is almost exactly 50/50 in polls.  Reviewing the tabs in other systems (who we are also trying to coordinate with) there are almost as many opinions on how overflow of tabs should work as there are implementations, for example).
Maybe some second property, or a prefers- version solves some of that? Unsure... What do you all think?

I like the idea that I could change controls based on some relationship between content & context (like overflow of tabs). And I like the idea of having some clever preset heuristics, so you can get nice stuff "out of the box". And I agree with @bkardell that there would be a lot of complexities to resolve around how that should actually work.

i think this thread is the best place to post this comment, rather than making a new one.  but, I was wondering if I was missing something, when playing around with the demo today, in how to make the component consistently render as tabs.  Rik's comment makes me wonder if I was not actually missing something, and this is not a current feature?
As the tab rendering and the accordion rendering behave differently (and rightly so), I would expect there to be a feature to allow for a persistent rendering of one version of the component or another.  I tried doing this in the demo by setting the media query for tabs to just be min-width 1em.  But that didn't do what I had expected.
The use case I'm thinking of here are for people who have low vision and are purposefully zooming in and out of their browser to better view a page as a whole, and then zoom in to read content as necessary.  Presently, as I mention in #19, the experience here would introduce some hurdles as users who may need to zoom in/out will have the content they are trying to view auto-collapse on them. They'd then have to re-orientate themselves to the new semantic structure. And, if they are also primarily relying on keyboard to navigate the page/component, they would then also need to realize they need to revise their key presses for the altered UI.
Allowing for authors to specify that tabs stay tabs, and then allowing for a tablist to overflow (scroll, generate an overflow menu... I'm sure you all have spoken about this, and I'm sorry I'm likely just rehashing ideas), would be a welcome option to mitigate against my outlined scenario.
Thanks

i think this thread is the best place to post this comment, rather than making a new one. but, I was wondering if I was missing something, when playing around with the demo today, in how to make the component consistently render as tabs. Rik's comment makes me wonder if I was not actually missing something, and this is not a current feature?

You just only specify that affordance, instead of any others... These are read one time (the implementation of this is not the proposal, we'll figure that part out next) so if you used devtools or something that won't work...
  --const-mq-affordances: [screen] tab-bar;

Basically like https://codepen.io/bkardell/pen/QWMGNzO (other than text, the only diff is in the css pane on line 4).. Can you share a pen of what you tried/expect?  There is some more documentation about things we were playing with in the implementation, but we thought better to keep it simple on details and start getting feedback.

thank you @bkardell
i was again just using the app that was included with Dave's blog post.  I tried playing around with the CSS in that to create what you've demonstrated here.  I unfortunately didn't save what I did, since it wasn't working for me.  But this this functionality does exist per your demonstration, this is definitely promising.  Thank you.


stream: use "open", not "connect"

This is more consistent with the typical stream wording of "open" / "close" and treating streams as pipes IMHO.
If not this PR, could we please add documentation of "connect" to the README?

Seems the API is resembling http://nodejs.org/api/net.html#net_class_net_socket.   Therefore this PR is unnecessary.  However, I still thing the README could be improved to help others.


Problems with acceptance testing

Hi,
First of all, thanks for all the hard work on this great addon, it works great!
I'm having issues with opening the menu while writing acceptance tests. I tried pausing the test and opening the menu manually but it refuses to work on the acceptance test environment.
Maybe I'm missing something, but it seems it just doesn't work.

@juanazam I'm not sure. Can you post some screenshots and some code samples?

@offirgolan The only problem is that the menu transformations are not displayed. The menu is never displayed as open when the test is running. You can do assertions on its content but visually it's not working. I guess this is not a big deal but it is a bit missleading.

Huh thats weird. It could be some viewport CSS issues. My suggestion would be to use pauseTest() and see what the width / height of the parent containers are for the ember-burger-menu element. If that doesnt work, let me know and I'll try to figure out whats going on.

@offirgolan It seems that the scaling done to show the app within the testing container is messing up with ember-burger-menu's CSS. I already used pauseTest() but I was not able to figure out why it's not being displayed as it should.

Ah damn. Okay I'll investigate this further and see if I can figure something out.


How can I install it on a mac?

How can I install on my mac? is there a package?

There's an old .app in the releases section or if you want the last version you can compile it by yourself

Thank you very much friend, I hope it works for me, the circuit substitute has a Mac, but cannot install JW Library, apparently it is only for Mac with M1.


Crash when parsing query

I am not able to reproduce this, but I got this with something vaguely like $var = $func($arg1, . I have also noticed issues where $v = $f() doesn't work, $v = $fu() doesn't work, but $v = $fun() does work, and $v = $f($p) works. It's very strange.
My use case is that I an interactively trying to build a Weggli query on each keystroke.
Tree sitter query generation failed: Structure
 ([(assignment_expression left: [(identifier) (field_expression) (field_identifier)] @0 right: [(cast_expression value: (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))) (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))])
                                                                                ^
sexpr: ([(assignment_expression left: [(identifier) (field_expression) (field_identifier)] @0 right: [(cast_expression value: (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))) (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))])
                        (init_declarator declarator: [(identifier) (field_expression) (field_identifier)] @0 value: [(cast_expression value: (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))) (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))])
                        (init_declarator declarator:(pointer_declarator declarator: [(identifier) (field_expression) (field_identifier)] @0) value: [(cast_expression value: (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))) (call_expression function:[(identifier) (field_expression) (field_identifier)] @1 arguments:(argument_list . [(identifier) (field_expression) (field_identifier)] @2 . (ERROR)))])]@3)
This is a bug! Can't recover :/

Here's another one:
Tree sitter query generation failed: Structure
                 (binary_expression left: [(identifier) (field_expression) (field_identifier)] @2 operator: "*" right: [(identifier) (field_expression) (field_identifier)] @1)]))]) consequence:(identifier) @4)@5(#eq? @4 "g"))
                                                                                ^
sexpr: ((if_statement "if" @0 condition:(parenthesized_expression [(binary_expression left: (parenthesized_expression [(binary_expression left: [(identifier) (field_expression) (field_identifier)] @1 operator: "*" right: [(identifier) (field_expression) (field_identifier)] @2)
                (binary_expression left: [(identifier) (field_expression) (field_identifier)] @2 operator: "*" right: [(identifier) (field_expression) (field_identifier)] @1)]) operator: ">" right: [(identifier) (field_expression) (field_identifier)] @3)
                (binary_expression left: [(identifier) (field_expression) (field_identifier)] @3 operator: "<" right: (parenthesized_expression [(binary_expression left: [(identifier) (field_expression) (field_identifier)] @1 operator: "*" right: [(identifier) (field_expression) (field_identifier)] @2)
                (binary_expression left: [(identifier) (field_expression) (field_identifier)] @2 operator: "*" right: [(identifier) (field_expression) (field_identifier)] @1)]))]) consequence:(identifier) @4)@5(#eq? @4 "g"))
This is a bug! Can't recover :/

And another:
Tree sitter query generation failed: Structure
 ((if_statement "if" @0 condition:(parenthesized_expression (ERROR (ERROR)) [(identifier) (field_expression) (field_identifier)] @1) consequence:(goto_statement "goto" @2 label:(statement_identifier)))@3)
                                                           ^
sexpr: ((if_statement "if" @0 condition:(parenthesized_expression (ERROR (ERROR)) [(identifier) (field_expression) (field_identifier)] @1) consequence:(goto_statement "goto" @2 label:(statement_identifier)))@3)
This is a bug! Can't recover :/```

Thanks for the bug report.
I'm not entirely sure how you are able to create these crashes, at least I can't reproduce any of these using the CLI interface.Could you add some debug code to build_query_tree to dump the input string that triggers these crashes?
Still, I think the panic call in https://github.com/googleprojectzero/weggli/blob/01499e238c9b8e4af514dea1ff637c8e1846db18/src/lib.rs#L59 is just sloppy coding. That method should return an error message instead of crashing, I'll try to find some time to fix this in the coming days.

Here was a recent error we got:
Tree sitter query generation failed: Structure
 ((ERROR (identifier) @0 (binary_expression left:(identifier) @1 operator:"-" (ERROR (identifier) @2) right:[(assignment_expression left: (identifier) @3 right: [(cast_expression value: (identifier) @4) (identifier) @4])
                                                                             ^
sexpr: ((ERROR (identifier) @0 (binary_expression left:(identifier) @1 operator:"-" (ERROR (identifier) @2) right:[(assignment_expression left: (identifier) @3 right: [(cast_expression value: (identifier) @4) (identifier) @4])
                        (init_declarator declarator: (identifier) @3 value: [(cast_expression value: (identifier) @4) (identifier) @4])
                        (init_declarator declarator:(pointer_declarator declarator: (identifier) @3) value: [(cast_expression value: (identifier) @4) (identifier) @4])]))@5(#eq? @0 "ind")(#eq? @1 "find")(#eq? @2 "R")(#eq? @3 "end")(#eq? @4 "end"))
This is a bug! Can't recover :/

I think this is against a very recent commit. I'm petty sure we're now tracking the version that can return null. We're using weggli via weggli-native.


asData?.value should be always mapped to null when loading

Describe the bug
provider.asData?.value is returning previous value even if isLoading is true.
To Reproduce
// declare some basic provider (reproduced with Family provider but I guess it should occur without Family as well)
@riverpod
Future<int?> someData(SomeDataRef ref, {required int something}) async {
    await Future.delayed(Duration(seconds: 10));
    return something;
}

...
// in build:

final data = ref.watch(someDataProvider(0));
print("${data.isLoading} ${data.asData?.isLoading} ${data.asData?.value != null}");

...
// invalidate provider somewhere else
ref.invalidate(someDataProvider(0));

Once value is there, after invalidate isLoading will be = true, but data.asData?.value will still be holding a value (it will not map it to null as expected). So before new value is loaded you get true true true as output (which in theory should never happen).
Even with .map you get:
    data.map(
      data: (v) {
        print("hasData and yet isLoading=${data.isLoading}");
        return null;
      },
      error: (v) {
        print("hasError");
        return null;
      },
      loading: (v) {
        print("isLoading");
        return null;
      },
    );

flutter: hasData and yet isLoading=true
flutter: hasData and yet isLoading=false

loading is never fired in this case.
Expected behavior
When isLoading = true, asData?.value should be null (which is how docs describe it as well).

That's the expected behavior of AsyncData.
During a refresh, an AsyncData with isLoading=true is returned.
What you can do is asyncValue.unwrapPrevious().value

  /// If you do not want to return previous value during loading/error states,
  /// consider using [asData] :
  ///
  /// ```dart
  /// ref.watch(provider).asData()?.valueOrNull;
  /// ```

  /// Upcast [AsyncValue] into an [AsyncData], or return null if the [AsyncValue]
  /// is in loading/error state.

If that's expected behavior, than it is completely different from what docs describe it to be.

Good call, I've fixed this on master.

@rrousselGit valueOrNull docs should be updated too
https://github.com/rrousselGit/riverpod/blob/6031730a580eef328f08186000774e0695ed7499/packages/riverpod/lib/src/common.dart#L516


usb: cdc_acm: Fix usb host-reset issue

Fixes issue #76064
cdc_acm_irq_tx_ready() and cdc_acm_irq_is_pending() now take configured and suspended states into account
like cdc_acm_fifo_fill() already does.
Tested with the described reproduction from the issue multiple times.

Changed commit message

removed the fixes info
changed info from issue centric view it problem centric (UART API issue)
Added the proposed changes using a single inline function
Added a buffer space check as this is also expected

Rebased to merge log change

@jfischer-no , can you help take a look at this PR one more time with the updates made to address review comments.

@jfischer-no , can you help take a look at this PR one more time with the updates made to address review comments.

Where do you see it being addressed or updated?

@jfischer-no
My commit  2 weeks ago
I narrowed the issue to it's core (UART API violation) and changed the commit description to also be clear about what it fixes.

I see my fixes were used for a commit and pushed 2 days ago without noticing me, this pr or naming my work on the topic or the issue they fix.
I will look into it if all parts of the issue is fixed.
If everything is fixed I'll close the pull request and issue.
I am not sure what to say to this.
It's kinda helpful but feels really rude.
I'm glad it's likely over.
Have a nice weekend everyone.

I see my fixes were used for a commit and pushed 2 days ago without noticing me, this pr or naming my work on the topic or the issue they fix.

Can you point where this occurred?

Commit c5a31aec3c6acd2e3d7d4f34dec97d2961a3eb72
cdc_acm_irq_rx_ready() and cdc_acm_irq_is_pending() changes
Commit b79ffe35820cf50c52195f37465723b5e1097921
cdc_acm_irq_rx_ready() issue fixed by cdc_acm_irq_update() change
I don't care about the code (it's mostly trivial stuff) but about not noticing this PR and the issue. And therefor also for ignoring the work on finding the source of the issue. I understand there's frustration because it took so long but I am frustrated about that as well, we need the fix mainlined, too. Noticing this only by luck ... not nice.


Transparencies around hair doesn't take XeGTAO_Decals correctly

noticed this issue with Decal XeGTAO in the "Before: Effects" pass.
fixed it by just swapping to a different one of the drawcalls
image was darkened to exaggerate effect, but its still really distracting normally.
Image 1 is the issue, Image 2 is what it looks like fixed, and image 3 is what i swapped it to. there were multiple other drawcalls selected in the effects stage, those of which i am actually completely unaware of what they fix but thought id at least bring this to your attention. i made sure it wasnt any of my own changes i've made, redownloaded the config multiple times to check, and it happens on the raw fresh config every time. obviously i'm just messin around with REST so disabling those other passes on the drawcalls maybe broke something and i'll leave the tweaking to you LOL. thanks!

on a side note, water also has this effect sometimes and im not sure why. i wanted to report this in the same bug report because i think they are linked due to transparencies

fixed my water issue by doing this!! + an additional screenshot showing both issues fixed

my own changes caused issues with visual effects such as status effects on the player, fixed

after a bunch of testing i've found my config pretty much breaks everything, so issue remains


We want to specify the connection info per each class or table when we execute jar file

Feature Request
Description of Problem:
...what problem are you trying to solve that the project doesn't currently solve?
We created a relevant ticket previously (https://github.com/finos/legend/issues/482),
To extend the previous question, we want to specify the connection info per each class or table.
...please resist the temptation to describe your request in terms of a solution.  Job Story form ("When [triggering condition], I want to [motivation/goal], so I can [outcome].") can help ensure you're expressing a problem statement.
Potential Solutions:
...clearly and concisely describe what you want to happen. Add any considered drawbacks.

... if you've considered alternatives, clearly and concisely describe those too.

Hi @waterfall49 the database details are sourced from the model connection runtime and used to make a database connection. See https://github.com/finos/legend/tree/service-exec-jar-example/examples/service-execution-jar and https://github.com/finos/legend/wiki/Database-Connectors---Configuration and let me know if you have further questions. / cc @beekemarie

Hi @waterfall49 the database details are sourced from the model connection runtime and used to make a database connection. See https://github.com/finos/legend/tree/service-exec-jar-example/examples/service-execution-jar and https://github.com/finos/legend/wiki/Database-Connectors---Configuration.
You can additionally use multiple model stores backed by multiple databases, see https://github.com/finos/legend-engine/blob/b9c7618bf11aac64430082d6d0c2b13f5e6f5128/legend-engine-xt-relationalStore-pure/src/main/resources/core_relational/relational/graphFetch/tests/testCrossStoreGraphFetch.pure and
Let me know if you have further questions.
/ cc @beekemarie

Closing this issue as a stale issue. Please re-open in the legend-engine repo if this is still relevant.


warnings for web-start tutorial step 5, 6

I navigated to the web-start subdirectory, then tried to run

firebase init

but am getting warnings like:

You are currently outside your home directory
You are initializing in an existing Firebase project directory

is this expected? I tried to skip the init command but if I try to run

firebase use --add
firebase serve

an error results after trying to start the server: Error: An unexpected error has occurred.

am closing this as I just decided to run

firebase init
(although I didn't want to overwrite something important)

now the server is running ok (with firebase serve)


Failed to add new file

I tested the git_index_add_bypath api in libgit2 and it works fine. Using git status could see the new tracked file, the following libgit2 code used:
#include <stdio.h>
#include <git2.h>
int main()
{
        int err = 0;
        git_repository* repo = NULL;
        git_libgit2_init();
        err = git_repository_open(&repo, "/path/to/repo");
        if (err)
        {
            printf("open repo failed\n");
            return 1;
        }
	printf("open repo ok\n");
	git_index* index = NULL;
	err = git_repository_index(&index, repo);
	if (err)
	{
		printf("get index failed!\n");
		return 1;
	}
	git_index_add_bypath(index, "relative/path/to/new/file");
	git_index_write(index);
        return 0;
}

But when i used git2rs, index.add_path did not give any error and the index.write was called sucessfully. But  using git status could not see the file should be added, the following code used:
pub fn StageAddNewFile(repoPath:&str, relativePath:&str, user:&str, email:&str)->std::result::Result<(), git2::Error>
{
    let mut ret = git2::Repository::open(repoPath);
    if ret.is_err()
    {
        println!("open repo {} failed!", repoPath);
        return std::result::Result::Err(ret.err().unwrap());
    }
    let mut repo = ret.unwrap();
    let mut index = repo.index().unwrap();
    let stagedRet = index.add_path(Path::new(&relativePath)); // relative/path/to/new/file
    if stagedRet.is_err()
    {
        println!("stage add {} failed! {}", relativePath, stagedRet.as_ref().err().unwrap().to_string());
        return std::result::Result::Err(stagedRet.err().unwrap());
    }
    let stagedRet = index.write();
    if stagedRet.is_err()
    {
        println!("stage add {}  failed! {}", relativePath, stagedRet.as_ref().err().unwrap().to_string());
        return std::result::Result::Err(stagedRet.err().unwrap());
    }
    println!("staging add new file {} ok!", relativePath);
    return std::result::Result::Ok(());
}

git2 version is "0.14.2"
Any help?

There isn't anything immediately obvious from your code example that could be wrong (other than being written in an unusual style for Rust). You may want to double-check that you are passing the paths in that you expect, and that the added file actually has modifications.  It can help if you can put together a complete and minimal example, such as:
use std::path::Path;
use std::error::Error;
use git2::*;
use std::fs;
use std::process;

fn main() -> Result<(), Box<dyn Error>> {
    let repo = Repository::init("foo")?;
    fs::write("foo/bar", "test")?;
    let mut index = repo.index()?;
    index.add_path(Path::new("bar"))?;
    index.write()?;
    let status = process::Command::new("git").arg("status").current_dir("foo").status()?;
    assert!(status.success());
    Ok(())
}

Should display something like:
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   bar

There isn't anything immediately obvious from your code example that could be wrong (other than being written in an unusual style for Rust). You may want to double-check that you are passing the paths in that you expect, and that the added file actually has modifications. It can help if you can put together a complete and minimal example, such as:
use std::path::Path;
use std::error::Error;
use git2::*;
use std::fs;
use std::process;

fn main() -> Result<(), Box<dyn Error>> {
    let repo = Repository::init("foo")?;
    fs::write("foo/bar", "test")?;
    let mut index = repo.index()?;
    index.add_path(Path::new("bar"))?;
    index.write()?;
    let status = process::Command::new("git").arg("status").current_dir("foo").status()?;
    assert!(status.success());
    Ok(())
}

Should display something like:
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   bar

Thanks. After one hour debug, i found the problem that some logic would reset the work dir after adding the file.
The code works fine.


Will you upgrade to Bootstrap 4?

Bootstrap 4 has already been released. Your library is excellent. It would be even better if you upgraded to Bootstrap 4.

hey @lucivaldo, I don't have any plans at this time (see note in README).
However, take a look at the bs3 patch file. Making one for BS4 may be pretty straight forward.
I would happily accept a PR for this.


Image Inpainting

Inpainting is the process of removing damage, such as noises, strokes, or text, on images using the cv2.inpaint() function.
@geekquad  sir, I would like to implement the same.

Could I work on this?

Go ahead @aryasoni98.


Support for stylelint 16

Currently Stylelint fails when trying to update to v16 with the following error:
> npx stylelint "src/**/*.{vue,scss}"

TypeError: Cannot read properties of undefined (reading 'rejected')
    at Object.<anonymous> (/Users/dev/project/node_modules/stylelint-scss/src/rules/comment-no-empty/index.js:12:42)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/dev/project/curbee/node_modules/stylelint-scss/src/rules/index.js:31:23)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)

This is probably caused by some breaking changes described in the docs migration guide:
https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md
Probably this depends also on updating stylelint-config-standard-scss where an equivalent issue was opened:
https://github.com/stylelint-scss/stylelint-config-standard-scss/issues/145

I have added a test case and it is working fine #65. Could you please provide a repository to reproduce your problem?

Okay, You checked it just after the release of<EMAIL_ADDRESS>With the latest update of stylelint-config-standard-scss it works indeed. I will close this issue :)


Latest nfs-utils doesn't work out of the box with Vagrant

Issue Type

Bug Report / Support Request

Summary
As of nfs-utils-2-1-2-rc2 (discussion) UDP is disabled by default thus requiring the user to either:

enable udp in /etc/nfs.conf
change the nfs options in Drupal VM's config.yml

At the moment this only affect Fedora 25+ but we have had issues regarding this before. Not sure what prompted them then as the the repo sources do specify versions that should have udp and nfsv3 support.
Some nfs-utils versions across distros.

[x] Ubuntu 16.04: UDP enabled nfs-utils v1.2.8 ref
[ ] Fedora 25, 26: UDP disabled nfs-utils v2.1.1-5.rc4+ ref
[x] Arch Linux: UDP enabled nfs-utils v2.1.1-4 ref
[x] Debian 9: UDP enabled nfs-utils v 1.3.4-2.1 ref

I think it's still fairly safe to default to nfsv4 on Linux hosts as they mention in the commit that it's been supported for a decade. A possible fix:
   if options[:type] == 'nfs' && !options.key?(:nfs_version) && Vagrant::Util::Platform.linux?
     options[:nfs_version] = 4
     options[:nfs_udp] = false
   end

Related:

https://github.com/geerlingguy/drupal-vm/issues/1040#issuecomment-313215521
https://github.com/geerlingguy/drupal-vm/issues/245
https://github.com/geerlingguy/drupal-vm/issues/1425#issuecomment-310796259
https://github.com/geerlingguy/drupal-vm/issues/1375

@yareckon mind sharing why you changed the nfs version? Was it because it didn't work out of the box, or something else?
@quietone1 did you have the default nfs-utils package or had you updated it manually or done other config configurations? I'm wonder why nfsv3 with udp didn't work for you on Debian Jessie.
@larmedina75 you mentioned you were using nfsv4, was this the default on your distro? Which distro are you using?

I don't think we actually need to specify NFSv4, we could just let the default be used but set it to use TCP rather than UDP. This works on macOS sierra too and even gives a performance improvement for me.

An employee at HashiCorp also recommended my latest suggestion when using intense composer installs https://github.com/mitchellh/vagrant/issues/7799#issuecomment-315909690

Anyone on Linux who has had this issue, would be great if you could check if #1482 solves it.

This looks very similar to the issue I had with Fedora 25.
https://github.com/geerlingguy/drupal-vm/issues/245#issuecomment-308110394

@jozzya yes that's the same issue. I'm now leaning more towards defaulting to TCP because:

There's been a ton of random NFS bugs triggered during intense composer operations on Linux lately, all seem to be fixed by switching to TCP
On my own macOS laptop there's no performance hit by switching to TCP. There's really no reason to use UDP unless it's faster, which it doesnt seem to be.


ReadMe Updated

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[x] It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
[x] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[x] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Description:
This PR aims to remove a non working link and also transform the Gold from readme file to the table.

@yyx990803 Please Review this and Let me know. I am glad to contribute to Vue Repo. This is my first PR, Happy to Contribute

Sorry but the sponsor sections in the README file is auto generated.

btw, congrats on your first PR @Shivansh2407 !  🙂

Thank you @xerosanyam and @yyx990803👍


About multiplication factors 0.35 & 0.47

Hi author,
In your  program, there are values: 0.35 and 0.47. What do they mean?
Thank you!
def bboxes_to_grasps(bboxes):     # converting and scaling bounding boxes into grasps, g = {x, y, tan, h, w}     box = tf.unstack(bboxes, axis=1)  #bboxes <tf.Tensor 'batch_join:1' shape=(64, 8) dtype=float32>     x = (box[0] + (box[4] - box[0])/2) *0.35     y = (box[1] + (box[5] - box[1])/2) *0.47     tan = (box[3] -box[1]) / (box[2] -box[0]) *0.47/0.35     h = tf.sqrt(tf.pow((box[2] -box[0])*0.35, 2) + tf.pow((box[3] -box[1])*0.47, 2))     w = tf.sqrt(tf.pow((box[6] -box[0])*0.35, 2) + tf.pow((box[7] -box[1])*0.47, 2))     return x, y, tan, h, w

`Hi author,
In your program, there are values: 0.35 and 0.47. What do they mean?
Thank you!
def bboxes_to_grasps(bboxes):
converting and scaling bounding boxes into grasps, g = {x, y, tan, h, w}
box = tf.unstack(bboxes, axis=1)
x = (box[0] + (box[4] - box[0])/2) *0.35
y = (box[1] + (box[5] - box[1])/2) *0.47
tan = (box[3] -box[1]) / (box[2] -box[0]) *0.47/0.35
h = tf.sqrt(tf.pow((box[2] -box[0])*0.35, 2) + tf.pow((box[3] -box[1])*0.47, 2))
w = tf.sqrt(tf.pow((box[6] -box[0])*0.35, 2) + tf.pow((box[7] -box[1])*0.47, 2))
return x, y, tan, h, w`

Hi! Sorry that I'm so late with the answer.
The original images are 640x480 pixels and the vertex of the ground truth rectangle grasps should be scaled when scaling the images. For example, if the x-coordinate of one grasp vertix is 200 in the original dataset then if I scale the images to 224x224 the annotated vetex is to be scaled too:
x_scaled = 200 * 224/640 = 200 * 0.35

The corresponding y value for the same vertex scales with a factor of 0.47.


Update to MidnightLib v0.2.8

I think you removed modmenu codes  maybe you have a plan, so i only updated midnightlib and fabric_dependencys.
i hope you will excute plan for works properly.

Thanks :)


Build subscription configuration from cloud config values

Fixes https://github.com/Azure/azure-sdk-for-cpp/issues/3959

/azp run cpp - storage

Dumped some debug output: this is working now w/ targeting the correct subscription: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1889177&view=logs&j=0e5f814d-cf97-538b-97bd-6df4d48a563d&t=c2531f20-e0fb-547b-6487-96e062bb5590&l=126


Add bug comments

Welcome to Codecov :tada:
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


search: Fix x icon overlap in search bar

Fixes #19765
For fixing the bug I have changed the padding-right from 20px to 40px .

@amanagr I have added a fix for stream-filter in right side bar. Can you please review it ?

@madrix01 Thanks for working on this!
I think your latest two commits are similar and you should squash them.
Also, don't forget to put a period(.) at appropriate places in your commit messages.
(Read: https://zulip.readthedocs.io/en/latest/contributing/version-control.html#commit-messages)


Issue in IOS devices can't  send or received any event

[ERROR:flutter/shell/common/shell.cc(1055)] The 'pusher_channels_flutter' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.

same issue


🐛 calibre web convert epub to pdf failed because of missing libnss3 in container.

Which addon?

Addon name : calibre web
Addon version : Current version: 0.6.20-ls207

Describe the bug
i can not convert epub to pdf it is an known issue seems to be easy fix please if you have the time see below links for it to work it needs libnss3 installed.
https://github.com/janeczku/calibre-web/issues/2487
https://bugs.launchpad.net/calibre/+bug/1955911
To Reproduce

Supervisor version: latest main
Host system version: debian ha supervised

thanks for your quick response i just installed the update but i still have the same error when converting epub>pdf
Calibre failed with error: ImportError: cannot import name 'QWebEnginePage' from 'qt.webengine' (/app/calibre/lib/calibre-extensions/python-lib.bypy.frozen/qt/webengine.pyc)

calibre-web log:
calibre-web (1).log
Home assistant calibre-web addon log:
db21ed7f_calibre-web_2023-05-05T15-23-47.184Z.log

I'm sorry I have added libnss3 to the container so not sure how I can help... I don't really know calibre-web

Actually it is already in the container : https://github.com/linuxserver/docker-calibre-web/blob/984876c8c9cc42c88d82e77d0f88382c76ddbd47/Dockerfile#L23
You could post in the linuxserver github https://github.com/linuxserver/docker-calibre-web as they are the ones providing the base image

Okay ill do that thank you for your quick reply

Wait, looks like issues already described such as : https://github.com/linuxserver/docker-calibre-web/issues/219#issuecomment-1435559765
I'll push a new version with those modifications

They fixed one warning but for me the wrong one i still get this one and that engine is needed to convert to pdf.
____________________ WARNING ____________________
Setting up completion failed with error:

Traceback (most recent call last):
  File "calibre/linux.py", line 837, in setup_completion
  File "calibre/linux.py", line 587, in write_completion
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/gui2/tweak_book/main.py", line 12, in <module>
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/ebooks/oeb/polish/check/css.py", line 11, in <module>
ImportError: cannot import name 'QWebEnginePage' from 'qt.webengine' (/app/calibre/lib/calibre-extensions/python-lib.bypy.frozen/qt/webengine.pyc)

I'm sorry I can't help you if the linuxserver github's tells you what we need to change I'll implement that

sorry but this version lscr.io/linuxserver/calibre-web:latest works fine

oh, I see the issue... you're 100% right it wasn't on latest release. I'll solve that now


Slow icongrid scrolling

Testing the app store binary v155 shows good performance for all scrollers except GenericItem, MultiGenericItem and IconGrid samples. Is this the nature of the icons being rendered or some regression?

@gradha it is related to the amount of icons and their rendering. (Normal text painting in those cases)


feat(step-functions): support string.split

String split!

Do we need any documentation in the website for these new features?

Do we need any documentation in the website for these new features?

We don't currently have any documentation for supported operations. I was going to add a Caveat due to Step Functions removing empty strings from the output.

https://github.com/functionless/functionless/issues/517


add support for helm catalogs

@joshwget
Doing things in 1 transaction takes a long long time...

LGTM other than a few small things

@joshwget Updated code according to your comments

Okay, real LGTM this time. I'll check to see if @vincent99 or @ibuildthecloud want to review.

Can you setup a test catalog and add integration tests? (Similar to https://github.com/rancher/test-catalog)


optimizers.Adam no longer accepts tf.Variable

When trying to call Adam with a tf.Variable I get the following error:
  File "site-packages\ray\rllib\algorithms\impala\impala_tf_policy.py", line 230, in optimizer
    optim = tf.keras.optimizers.Adam(self.cur_lr)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "site-packages\keras\src\optimizers\adam.py", line 62, in __init__
    super().__init__(
  File "site-packages\keras\src\backend\tensorflow\optimizer.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "site-packages\keras\src\optimizers\base_optimizer.py", line 124, in __init__
    raise ValueError(
ValueError: Argument `learning_rate` should be float, or an instance of LearningRateSchedule, or a callable (that takes in the current iteration value and returns the corresponding learning rate value). Received instead: learning_rate=<tf.Variable 'lr:0' shape=() dtype=float32, numpy=0.0005>

Tested with Keras 3.3.3.
The issue was first reported here: https://github.com/ray-project/ray/issues/45050

This is normal. You could simply cast the TF Variable to a float.
Passing the TF Variable directly might give you the impression that updates to the TF Variable would be reflected on the learning rate, which isn't the case. In order to dynamically update the learning rate, you should use a LearningRateSchedule or a Callback that sets the learning rate.


Logout doesn't work

Steps to reproduce:

Go to the demo app: http://ueberauth-example.herokuapp.com/
Create a account via email/password
Click logout

Nothing happens.
Relates to #12 ?

I tried out the suggested solution in #12 but it doesn't seem to be enough on it's own as the user doesn't seem to be logged out or the session isn't being dropped.

@doomspork , @yordis , Is there a chance to re-deploy the app on Heroku to verify that this issue was solved by https://github.com/ueberauth/ueberauth_example/pull/54 ?

@ramortegui deploying now and fixed the automatic deploys as well :+1:
Thanks again for all your help! I'm open to suggestions on improving the app and I'm happy to help as I can in doing so.


feat(frontend): cast/cmp with session timezone

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Support:

Cast

[X] date to timestamptz
[X] timestamp to timestamptz
[X] timestamptz to date
[X] timestamptz to timestamp
[X] timestamptz to time

Comparison

[X] date with timestamptz
[X] timestamp with timestamptz

Missing:

Cast

timestamptz to string

We have implemented this to always use UTC because it is the basis of many things.

string-without-zone to timestamptz (e.g. '2022-10-01 12:00:00'::timestamptz)

Arithmetic

interval-var + timestamptz = timestamptz (e.g. interval '1' day + '2022-03-13 09:00:00Z'::timestamptz)
timestamptz + interval-var = timestamptz
timestamptz - interval-var = timestamptz

When doing so, we will emit the PgResponse NOTICE:
dev=> select '2022-01-01 00:00:00'::timestamp::timestamp with time zone;
NOTICE:  Your session timezone is UTC. It was used in the interpretation of timestamps and dates in your query. If this is unintended,
                change your timezone to match that of your data's with `set timezone = [timezone]` or
                rewrite your query with an explicit timezone conversion, e.g. with `AT TIME ZONE`.

         timestamp
---------------------------
 2022-01-01 00:00:00+00:00
(1 row)

Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Documentation
Refer to a related PR or issue link (optional)
https://github.com/risingwavelabs/risingwave/issues/5826

Not sure if this approach is the best.
Preferably, the timezone can become a context that the expression framework can reference rather than embedding in an AT TIME ZONE expression.
For instance, it's hard to support string to timestamptz casting fully, and also implicit casting does not seem to be caught by the binder.

All casts (explicit, assign, implicit) can be handled at a single place: FunctionCall::new_cast. However, it does not have access to self: Binder and has a lot of indirect callers if we want to add a new parameter to it.
As mentioned above, including timezone as context in the expression framework has the advantage of supporting more expressions. It also takes a large effort to refactor, and cannot provide the notice at binding phase. To get a notice when time zone is used implicitly, we still need to (1) update all indirect callers of FunctionCall::new_cast as above; or (2) add an extra frontend phase that visit all exprs. The latter one is easier to extend and maintain, but is more expensive.
Just sharing some thoughts. I do not have a preference over any one.

I decided to avoid a context. As you mentioned, it would either require significant refactor, or the alternative I thought of, which was to use task-local context, seemed risky, although it may be worth exploring if more context-dependent evaluations are required (for instance, for a system time operator).
I went with intercepting the ExprImpls at the end of the optimizer phase, in particular, when they are about to be finalized as prost.
I detail some further observations in the tracking issue: https://github.com/risingwavelabs/risingwave/issues/7175#issuecomment-1376799576

Seems the session information will be lost during recovery test, as it seems the session is started from scratch. This makes the results fail to agree. Any ideas @yezizp2012?  Can we somehow remove that file from recovery test as it is expected behaviour? (we may need another way to persist the default session config for the database/user)

Seems the session information including session timezone will be lost during recovery test, as it seems the session is restarted from scratch. Any ideas @yezizp2012?

Yes, the frontend will be killed randomly during the recovery test, which will lead the session restart and all config will be reset.

Perhaps we should remove the .slt file requiring session config from recovery test? (we may need another way to persist the default session config for the database/user)

Yes, .slt requiring session config can't be well test by recovery test, we'd better ignore it for now. You can ignore the new slt in this PR in this place: https://github.com/risingwavelabs/risingwave/blob/c8323d58d18e4ec458b19857c4bbe5d7e0b7841d/src/tests/simulation/src/slt.rs#L47


Quarto and table: heading style seems wrong

Description
Hi,
in this small sample repo, I have a test GT page.
This is the rendered version: striped style is also applied to the header, which then does not stand out well from the rest.
Reproducible example
The gt.qmd file in this repo.
Expected result
I expect to have no odd class applied in the line with class gt_col_headings, but instead I have this in the output:

  Field 1
  Field 2
  Field 3

Development environment

Operating System: debian 11
great_tables Version: 0.1.5
Quarto: 1.4.536

Additional context
I have opened a related discussion here https://github.com/posit-dev/great-tables/discussions/116

I'm adding that you do not have the striped style in the example tables of this official page, and there is no odd style applied to gt_col_headings row.
Instead I have striped by default. Probaby because I use quarto 1.4 and you are using the 1.3 one.


Unable to mount local config folder with apoc.conf

I have a neo4j local deployment that needs to have an apoc.conf file. To include this in the deployment, I'm mounting the local volume with apoc.conf into neo4j's container folder, /var/lib/neo4j/conf. When running docker-compose up, the container dies and I get an error message ( see steps below) in the docker logs.
Neo4j Version: 5.11.0-community-bullseye
Operating System: MacOS 13.5.1 (22G90)
API: Docker
Steps to reproduce

Create ~/deployment
Add the docker-compose.yml file below to it
Create ~/deployment/neo4j/conf
Add the apoc.conf file below to it
Run docker-compose up
See that the deployment failed
Check the logs with docker ps --all and docker logs
See similar error to sed: couldn't open temporary file /var/lib/neo4j/conf/sed8CXFyW: Permission denied
See sed file in the mounted config folder

Expected behavior
The apoc.conf file is copied into the container, and the application runs without error
Actual behavior
A new file is created in the mounted directory without permissions, causing the deployment to fail
----------  1 thomas  staff    0 Sep  8 21:02 sedUqUrUV

Local setup
Filesystem
- deployment
   - docker-compose.yaml
   - neo4j
      - conf
         - apoc.conf

docker-compose.yml
services:
  neo4j:
    image: neo4j:5.11.0-community-bullseye
    container_name: neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      - NEO4J_AUTH=neo4j/neo4j222
    volumes:
      - ~/deployment/neo4j/conf:/var/lib/neo4j/conf

apoc.conf
apoc.import.file.enable=true

bump

Hi, I 've explored and tried to simulated this issue.
For the solution, I see that we could mount to the outside folder and it will be written directly to the var/lib folder. The default of the config file is also mentioned in their docs for Linux and MacOS, docker environment
- ./example/docker/neo4j/conf:/conf
https://neo4j.com/docs/operations-manual/current/configuration/file-locations/?utm_source=google&utm_medium=PaidSearch&utm_campaign=GDB&utm_content=APAC-X-Awareness-GDB-Text&utm_term=&gad_source=1&gclid=CjwKCAiAx_GqBhBQEiwAlDNAZihhvFpWKNw1zPsF795zKKSiWFslH-6zc3cqFzkoMB0rqoW3IONFMxoCL_4QAvD_BwE