Control net

Can dpm-solver used for control-net?

Of course. Please check https://github.com/AUTOMATIC1111/stable-diffusion-webui , where all the samplers starting with "DPM" are dpm-solver (with different settings). As far as I known, the best are "DPM++2M" and "DPM++2M Karras".

Sorry to bother you, your results are very exciting, and I have achieved good results in unconditional generation, but I am currently encountering a problem. I trained a diffusion model by myself,it is a conditional diffsuion,can be described as F(x,t,c),the condition added as control-net(It can be analogized as a condition module),but my generative quality is poor,why?There is my code.
model_fn = model_wrapper(
eps_model,
noise_schedule,
guidance_type ="classifier-free",
condition = condition,
model_type="noise",  # or "x_start" or "v" or "score"
)
dpm_solver = DPM_Solver(model_fn, noise_schedule, algorithm_type="dpmsolver++",correcting_x0_fn="dynamic_thresholding")
x_T = torch.randn(sample_num,3,512,512).to(device)
x_sample = dpm_solver.sample(
x_T,
steps=50,
order=3,
skip_type="time_uniform",
method="multistep",
)

Of course. Please check https://github.com/AUTOMATIC1111/stable-diffusion-webui , where all the samplers starting with "DPM" are dpm-solver (with different settings). As far as I known, the best are "DPM++2M" and "DPM++2M Karras", which are 2nd-order multistep dpm-solver++, w/o Karras' time step settings.

Sorry to bother you, your results are very exciting, and I have achieved good results in unconditional generation, but I am currently encountering a problem. I trained a diffusion model by myself,it is a conditional diffsuion,can be described as F(x,t,c),the condition added as control-net(It can be analogized as a condition module),but my generative quality is poor,why?There is my code.
model_fn = model_wrapper(
eps_model,
noise_schedule,
guidance_type ="classifier-free",
condition = condition,
model_type="noise", # or "x_start" or "v" or "score"
)
dpm_solver = DPM_Solver(model_fn, noise_schedule, algorithm_type="dpmsolver++",correcting_x0_fn="dynamic_thresholding")
x_T = torch.randn(sample_num,3,512,512).to(device)
x_sample = dpm_solver.sample(
x_T,
steps=50,
order=3,
skip_type="time_uniform",
method="multistep",
)

Hi @jianghuyihei , for conditional sampling, please use order=2.
Moreover, could you please give me more details? e.g., can order=1 work? (which is equivalent to DDIM); what is your guidance scale? What does the image look like?

Hi @jianghuyihei , for conditional sampling, please use order=2.
Moreover, could you please give me more details? e.g., can order=1 work? (which is equivalent to DDIM); what is your guidance scale? What does the image look like?
Ok,fine,I do not use guidance scale,and while order = 1,step =1000,result is also bad.My date is a road inraster,size of 512*512.Unconditionally generated very well, perhaps because I added conditions?How to deal with it. My condition added as control net(i transform it as a conditional mouldule into the unet)

@jianghuyihei
I think the bug is not related to the solver, because order=1 is DDIM.
How do you train your conditional model? Maybe you should check the code of control net to figure out why your conditional model is bad...


Find-window MAC&WIN fixes

Fixed find-window on Mac to test that window title contains pattern, not just equals to it
Fixed find-window on Win to avoid window title string allocation failure when marshalling it from win32api
\cc @inikulin @AlexanderMoskovkin

Spaces may be included in window name(title) and process name, so we're using newline as separator between window name and process name when returning them via stdout from our window finding module on MacOS.

FPR

LGTM

LGTM


Maintenance 10 with-cov

tag

Codecov Report

:exclamation: No coverage uploaded for pull request base (maintenance10@14b686b). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             maintenance10      #14   +/-   ##
================================================
  Coverage                 ?   37.44%
================================================
  Files                    ?       68
  Lines                    ?     5961
  Branches                 ?        0
================================================
  Hits                     ?     2232
  Misses                   ?     3729
  Partials                 ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14b686b...ad2b4e7. Read the comment docs.


Can ConsoleSpanExporter be used in Prod systems?

Following the warning mentioned here, this is a general question about the stability of ConsoleSpanExporter in Prod like systems.
Can ConsoleSpanExporter be used to export all traces to stdout/files or is it not recommended due to certain limitations?

It's absolutely not recommended to use it this way in production. ConsoleSpanExporter is for debugging use only. The interface will adhere to semver but the output rendered by the exporter may change at any time.

Closing as this is now documented in JSDoc, see #4956


Questions about Code

您好，我在程序运行时候遇到以下问题，还望您百忙之中解答：
1，在ReadMe中提到的 python setup.py develop 请问这个功能的用处是什么？如果我只是希望test您发布的代码和程序，是否必须要运行这个命令？
2，关于 Dataset Organization Form， 请问 test 阶段 blur 文件夹和 gt 文件夹内容可以一样吗？对于每个video，例如 video 1，其下面文件夹中 frame1 frame2 是否有明确的命名要求？还是说按照0001 0002 或者 a001 a0002等存在先后顺序的命名即可？
3，我在运行test.py代码时候报错提示：
basicsr/archs/deblur_arch.py", line 75, in forward
b, t, c, h, w = lrs.size()
ValueError: not enough values to unpack (expected 5, got 4)
请问这个lrs 变量的理论形状是什么呀？ b的含义是什么？
还望您帮忙解答，谢谢。

1.We use setup.py help establish the environment, our code was modified based on Basicsr, hoping to save time on writing programs such as dataloader. It is recommended to install according to the instructions, and the requirements for the pytorch version are not strict. 2. The following figure shows our test data naming method and composition form.Actually, all the data is split into frames that are close to 5TB, so we cannot upload images.

3.b：batchsize，t：frame，c：channel，h：height，w：width.

1.We use setup.py help establish the environment, our code was modified based on Basicsr, hoping to save time on writing programs such as dataloader. It is recommended to install according to the instructions, and the requirements for the pytorch version are not strict.
2. The following figure shows our test data naming method and composition form. Actually, splitting all videos into frames takes up nearly 5TB of memory.

3.b：batchsize，t：frame，c：channel，h：height，w：width.

Thanks for your patient reply!


Replicator fails to start with "Cannot find module 'bs58'"

What is the bug?
I recently updated my hub and have tried various ways of building / running the replicator app but I can't get it to run because it's always complaining it's missing the bs58 module. Here are the full logs:
replicator-1  | Error: Cannot find module 'bs58'
replicator-1  | Require stack:
replicator-1  | - /home/node/app/packages/core/dist/index.js
replicator-1  | - /home/node/app/packages/hub-nodejs/dist/index.js
replicator-1  | - /home/node/app/apps/replicator/build/util.js
replicator-1  | - /home/node/app/apps/replicator/build/db.js
replicator-1  | - /home/node/app/apps/replicator/build/app.js
replicator-1  |     at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
replicator-1  |     at Module._load (node:internal/modules/cjs/loader:990:27)
replicator-1  |     at Module.require (node:internal/modules/cjs/loader:1237:19)
replicator-1  |     at require (node:internal/modules/helpers:176:18)
replicator-1  |     at Object.<anonymous> (/home/node/app/packages/core/dist/index.js:10822:27)
replicator-1  |     at Module._compile (node:internal/modules/cjs/loader:1378:14)
replicator-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
replicator-1  |     at Module.load (node:internal/modules/cjs/loader:1212:32)
replicator-1  |     at Module._load (node:internal/modules/cjs/loader:1028:12)
replicator-1  |     at Module.require (node:internal/modules/cjs/loader:1237:19) {
replicator-1  |   code: 'MODULE_NOT_FOUND',
replicator-1  |   requireStack: [
replicator-1  |     '/home/node/app/packages/core/dist/index.js',
replicator-1  |     '/home/node/app/packages/hub-nodejs/dist/index.js',
replicator-1  |     '/home/node/app/apps/replicator/build/util.js',
replicator-1  |     '/home/node/app/apps/replicator/build/db.js',
replicator-1  |     '/home/node/app/apps/replicator/build/app.js'
replicator-1  |   ]
replicator-1  | }
replicator-1  |
replicator-1  | Node.js v21.6.2

How can it be reproduced? (optional)
Update/clone hub monorepo
yarn install && yarn build in main folder
cd apps/replicator
docker compose up -d --build
The replicator docker container fails with the above error
Additional context (optional)
tim@emrakul:~/projects/farcaster/hub-monorepo/apps/replicator$ nvm version
v21.7.3
tim@emrakul:~/projects/farcaster/hub-monorepo/apps/replicator$ npm --version
10.5.0
tim@emrakul:~/projects/farcaster/hub-monorepo/apps/replicator$ yarn --version
1.22.22
tim@emrakul:~/projects/farcaster/hub-monorepo/apps/replicator$ docker --version
Docker version 26.1.2, build 211e74b

Hey @timjrobinson, sorry for the delay in response.
We have since deprecated the Replicator project due to a number of issues with it. Please check out Shuttle, which is what we are going to maintain going forward (and also use on Warpcast!)


Add the support of some MPLS fields for IPFIX (Junos MPLS-IP template)

Hello,
I've recently patched the producer_nf.go file to produce some MPLS fields. Some fields were already present in the flow.proto file but I needed to add one more.
I added this part of code in producer_nf.go (after line 335) :
	//MPLS
	case netflow.IPFIX_FIELD_mplsTopLabelStackSection:
		var mplsLabel uint32
		DecodeUNumber(v, &mplsLabel)
		flowMessage.MPLS1Label = uint32(mplsLabel >> 4)
		flowMessage.HasMPLS = true
	case netflow.IPFIX_FIELD_mplsLabelStackSection2:
		var mplsLabel uint32
		DecodeUNumber(v, &mplsLabel)
		flowMessage.MPLS2Label = uint32(mplsLabel >> 4)
	case netflow.IPFIX_FIELD_mplsLabelStackSection3:
		var mplsLabel uint32
		DecodeUNumber(v, &mplsLabel)
		flowMessage.MPLS3Label = uint32(mplsLabel >> 4)
	case netflow.IPFIX_FIELD_mplsTopLabelIPv4Address:
		flowMessage.MPLSTopLabelIpv4Addr = v

And to support the new field "MPLSTopLabelIpv4Addr" I modified the flow.proto like that :
bytes MPLSTopLabelIpv4Addr = 63; // mplsTopLabelIPv4Address
Could you please take into account this enhancement in the main branch ?
BR
David

Hello,
Thank you for this suggestion.
Just catching up on this, would you be able to make a PR?
Could you create a mplsLabelIP field in protobuf and handle both
MPLSTopLabelIpv4Addr
and
MPLSTopLabelIpv6Addr
Thank you

hello
It's done.
Thank you
David

Merged in #99 and #95


Updating elephant repo link

What are the links to relevant tickets?
WEB-4834
What does this PR do?
Part of moving elephant to github
What functional/unit tests does this PR have?
N/A
How should a developer review this?
Visually
Any background context you want to provide?
No
Screenshots (if appropriate)

Quality checklist (for PR author to complete BEFORE code review):

[x] I've checked there is appropriate unit test coverage.
[x] I've updated documentation with any changes to procedures.
[ ] I've tested this cross browser for any visual changes.
[x] I've checked this work against the requirements of the Jira.
[x] I am ready for this to be code reviewed, merged and tested.

Reviewer 1 @lukefrake

[x] I agree with the assumptions made in the quality checklist.
[x] I’ve witnessed the work behaving as expected.
[x] I’ve witnessed the tests running successfully.
[x] I’ve checked for appropriate test coverage.
[x] I’ve checked for coding anti-patterns.
[x] I've checked this work against the requirements of the Jira.
[x] I don’t believe this work introduces unnecessary technical debt.
[x] +1 from me!

Reviewer 2 @t1gr0u

[x] I agree with the assumptions made in the quality checklist.
[x] I’ve witnessed the work behaving as expected.
[x] I’ve witnessed the tests running successfully.
[x] I’ve checked for appropriate test coverage.
[x] I’ve checked for coding anti-patterns.
[x] I've checked this work against the requirements of the Jira.
[x] I don’t believe this work introduces unnecessary technical debt.
[x] +1 from me!

Can we remove CHANGELOG.md while your in here please

@lukefrake good point... removed


Proposal: Support Observable as a first argument for .list() and .object() factories

In the current implementation the first argument of the FirebaseListFactory or FirebaseObjectFactory can be an url string, firebase reference or a firebase query. I'm proposing to support an observable that results in one of these values.
Advantage
In a  multi-tenant application scenario on a single firebase database we currently prefix the reference with a tenant identifier, which can be switched by the user if he is granted access to multiple tenants. We currently wrap the factory methods, but I would love angularFire to handle it by accepting an observable reference.
If this is ok, I can create a pull request.

What's the effort required to wrap this? Feels like observables probably make short work of this kind of thing?

I don't think we need to change FirebaseListFactory or FirebaseObjectFactory to achieve this, you can simply use mergemap from your Observable with the url, for example.
this.http.get('/firebaseUrlForThisUser')
  .mergeMap(url => this.fbDb(url + '/users')


feature: Editable table columns

This introduces 3 new table columns:

SelectColumn
TextInputColumn
ToggleColumn

These column names correspond to the names of the form components they mimic.
Data can be written to the main Eloquent table, a relationship, or a pivot column.
These do not directly utilise the form builder, but do consume traits from that package for certain features
Validation can be added to the columns using rules(['required', 'max:255']). Validation rules like required() and maxLength() that are used in the form builder are not necessary in this context, as there is no frontend validation.

Wouldn't a checkbox be useful as well, in addition to the toggle?


Android: Press events not firing on large SVGs (snack available)

Bug
Press events are not fired on Android devices if the SVG element pressed is further away than the device's window (even if visible when rendered).
Environment info
Library version: 9.13.6
Steps To Reproduce

Create an SVG that is larger than the device's window size and place a circle outside the device's window size (but inside the SVG). Add a press event to the circle.
Launch it on Android
Test to see if the circle react to onPress.

See snack further down.
Describe what you expected to happen:
I would expect all components to behave the same since they are identical, i.e. I would expect the press events to work no matter what coordinates are used.
Reproducible sample code
https://snack.expo.io/@insats/android-svg-bug (number 8 does not react to press events)

The same problem happens to me, off view element event does not fire at all.

I suspect that the transforms are accounted for correctly in the clipping / bounds calculations, anyone interested in taking a look at it? I can probably point out some relevant code regions and answer any questions

@msand It seems like this isn't a bug with react-native-svg after all. I've managed to reproduce it with plain react native: https://snack.expo.io/@insats/android-touch-event-bug
I've posted there: https://github.com/facebook/react-native/issues/27647

Ah, good to know. Anyway, it seems quite probable to me that it would relate to transforms and the bounds clipping calculations. Android prefers (almost requires) that the clipping mode can only constrain the bounds, such that it can decide if a view can possibly contain the touch event by only considering it's bounds, rather than having to traverse the entire tree with depth-first-search, reversed / sorted such that it accounts for z-index / document / render tree order and overlap of visibility.
It might be that you need to have a specific combination of (Animated.createAnimatedComponent wrapped) View, ScrollView, Svg, and G elements, with specific styles / transforms, to get it to work as expected in android. Other cases, and especially ones that developers likely expect to work, would be great to get cross-platform support for.

One workaround is to ensure that all parent elements are big enough, either set a background color, a border, or make overflow hidden to see that the bounds of the ancestors clip the views that you want to respond to interactions.
import * as React from 'react';
import {
  Text,
  View,
  StyleSheet,
  PanResponder,
  Animated,
  TouchableOpacity,
} from 'react-native';
import Constants from 'expo-constants';
import points from './assets/points';

const maxX = points.reduce((acc, p) => Math.max(acc, p.x), 0) + 25;
const maxY = points.reduce((acc, p) => Math.max(acc, p.y), 0) + 25;

export default class App extends React.Component {
  constructor(props, context) {
    super(props, context);
    let val = { x: 0, y: 0 };
    let xy = new Animated.ValueXY();
    xy.addListener(value => (val = value));
    this.pan = PanResponder.create({
      onMoveShouldSetResponderCapture: () => true,
      onMoveShouldSetPanResponderCapture: () => true,
      onPanResponderGrant: (e, gestureState) => {
        xy.setOffset({ x: val.x, y: val.y });
        xy.setValue({ x: 0, y: 0 });
      },
      onPanResponderMove: Animated.event([
        null,
        { dx: xy.x, dy: xy.y, useNativeDriver: true },
      ]),
      onPanResponderRelease: () => {
        xy.flattenOffset();
      },
    });
    this.xy = xy;
  }
  render() {
    return (
      <View style={styles.container} {...this.pan.panHandlers}>
        <Animated.View
          style={[
            styles.map,
            {
              width: maxX,
              height: maxY,
              transform: this.xy.getTranslateTransform(),
            },
          ]}>
          {points.map((p, i) => (
            <Point key={i} i={i} p={p} />
          ))}
        </Animated.View>
      </View>
    );
  }
}

class Point extends React.PureComponent {
  onPress = () => alert('Pressed ' + this.props.i);
  render() {
    const {
      i,
      p: { x, y },
    } = this.props;
    return (
      <View
        style={[
          {
            top: y,
            left: x,
            position: 'absolute',
          },
        ]}>
        <TouchableOpacity style={styles.button} onPress={this.onPress}>
          <Text style={styles.buttonText}>{i}</Text>
        </TouchableOpacity>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    paddingTop: Constants.statusBarHeight,
    backgroundColor: '#cccccc',
    flex: 1,
  },
  map: {
    backgroundColor: 'white',
  },
  button: {},
  buttonText: {
    width: 25,
    height: 25,
    lineHeight: 25,
    color: 'white',
    textAlign: 'center',
    backgroundColor: 'blue',
  },
});

Actually, I realized I've fixed this issue before in react-native-svg, e.g. this seems to work correctly:
https://snack.expo.io/@msand/android-touch-event-bug
import * as React from 'react';
import {
  View,
  StyleSheet,
  PanResponder,
  Animated,
  TouchableOpacity,
} from 'react-native';
import { Svg, G, Rect, Text } from 'react-native-svg';
import Constants from 'expo-constants';
import points from './assets/points';

const AnimatedG = Animated.createAnimatedComponent(G);

const maxX = points.reduce((acc, p) => Math.max(acc, p.x), 0) + 25;
const maxY = points.reduce((acc, p) => Math.max(acc, p.y), 0) + 25;

export default class App extends React.Component {
  constructor(props, context) {
    super(props, context);
    let val = { x: 0, y: 0 };
    let xy = new Animated.ValueXY();
    xy.addListener(value => (val = value));
    this.pan = PanResponder.create({
      onMoveShouldSetResponderCapture: () => true,
      onMoveShouldSetPanResponderCapture: () => true,
      onPanResponderGrant: (e, gestureState) => {
        xy.setOffset({ x: val.x, y: val.y });
        xy.setValue({ x: 0, y: 0 });
      },
      onPanResponderMove: Animated.event([
        null,
        { dx: xy.x, dy: xy.y, useNativeDriver: true },
      ]),
      onPanResponderRelease: () => {
        xy.flattenOffset();
      },
    });
    this.xy = xy;
  }
  render() {
    return (
      <View style={styles.container} {...this.pan.panHandlers}>
        <Svg width="100%" height="100%">
          <AnimatedG
            style={[
              {
                transform: this.xy.getTranslateTransform(),
              },
            ]}>
            <Rect fill="white" width={400} height={600} />
            {points.map((p, i) => (
              <Point key={i} i={i} p={p} />
            ))}
          </AnimatedG>
        </Svg>
      </View>
    );
  }
}

class Point extends React.PureComponent {
  onPress = () => alert('Pressed ' + this.props.i);
  render() {
    const {
      i,
      p: { x, y },
    } = this.props;
    return (
      <G transform={`translate(${x}, ${y})`}>
        <Rect
          fill="blue"
          width={25}
          height={25}
          onPress={this.onPress}
          onClick={this.onPress}
        />
        <Text x={12.5} y={17} textAnchor="middle" style={styles.buttonText}>
          {i}
        </Text>
      </G>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    paddingTop: Constants.statusBarHeight,
    backgroundColor: '#cccccc',
    flex: 1,
  },
  buttonText: {
    fill: 'white',
    textAlign: 'center',
  },
});

Another (less complete compared to previous one) workaround, which might be useful for debugging the issue in react-native; is using ScrollView and comparing how it behaves differently from the example you made:
import * as React from 'react';
import {Text, ScrollView, StyleSheet, TouchableOpacity} from 'react-native';
import points from './points';

const side = 1000;

export default class App extends React.Component {
  render() {
    return (
      <ScrollView contentContainerStyle={{height: side}}>
        <ScrollView horizontal contentContainerStyle={{width: side}}>
          {points.map(({x, y}, i) => (
            <TouchableOpacity
              key={i}
              style={[
                styles.button,
                {
                  left: x,
                  top: y,
                },
              ]}
              onPress={() => alert(i)}>
              <Text style={styles.text}>{i}</Text>
            </TouchableOpacity>
          ))}
        </ScrollView>
      </ScrollView>
    );
  }
}

const r = 25;

const styles = StyleSheet.create({
  text: {
    color: 'white',
    textAlign: 'center',
  },
  button: {
    width: r,
    height: r,
    borderRadius: r,
    position: 'absolute',
    backgroundColor: 'blue',
  },
});

Another workaround:
import * as React from 'react';
import {
  Text,
  View,
  Animated,
  Dimensions,
  StyleSheet,
  PanResponder,
  TouchableOpacity,
} from 'react-native';
import points from './points';

const initial = {x: 0, y: 0};
const {width, height} = Dimensions.get('window');
const maxX = points.reduce((acc, p) => Math.max(acc, p.x), 0) + 25;
const maxY = points.reduce((acc, p) => Math.max(acc, p.y), 0) + 25;

export default class App extends React.Component {
  constructor(props, context) {
    super(props, context);
    const xy = new Animated.ValueXY();
    const {x: dx, y: dy} = xy;
    let offset = initial;
    xy.addListener(flatOffset => {
      offset = flatOffset;
    });
    const {panHandlers} = PanResponder.create({
      onMoveShouldSetPanResponderCapture: () => true,
      onPanResponderGrant: () => {
        xy.setOffset(offset);
        xy.setValue(initial);
      },
      onPanResponderMove: Animated.event([null, {dx, dy}]),
      onPanResponderRelease: () => {
        xy.flattenOffset();
      },
    });
    this.translateXY = {
      transform: xy.getTranslateTransform(),
    };
    this.panXY = panHandlers;
  }
  render() {
    const {panXY, translateXY} = this;
    return (
      <View style={styles.container} {...panXY}>
        <Animated.View
          style={[
            translateXY,
            {
              width: maxX,
              height: maxY,
            },
          ]}>
          <View style={styles.map} />
          {points.map(({x, y}, i) => (
            <TouchableOpacity
              key={i}
              style={[
                styles.button,
                {
                  left: x,
                  top: y,
                },
              ]}
              onPress={() => alert(i)}>
              <Text style={styles.text}>{i}</Text>
            </TouchableOpacity>
          ))}
        </Animated.View>
      </View>
    );
  }
}

const r = 25;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    backgroundColor: '#cccccc',
  },
  map: {
    width,
    height,
    borderWidth: 1,
    borderColor: 'black',
    position: 'absolute',
    backgroundColor: 'white',
  },
  text: {
    color: 'white',
    textAlign: 'center',
  },
  button: {
    width: r,
    height: r,
    borderRadius: r,
    position: 'absolute',
    backgroundColor: 'blue',
  },
});

This issue is certainly related to TouchTargetHelper.java in react-native, and also
public boolean pointInView(float localX, float localY, float slop)
in Android.View, which is called from:
protected boolean isTransformedTouchPointInView(float x, float y, View child, PointF outLocalPoint)
in Android.ViewGroup
mostly due to
    /**
     * Utility method to determine whether the given point, in local coordinates,
     * is inside the view, where the area of the view is expanded by the slop factor.
     * This method is called while processing touch-move events to determine if the event
     * is still within the view.
     *
     * @hide
     */
    public boolean pointInView(float localX, float localY, float slop) {
        return localX >= -slop && localY >= -slop && localX < ((mRight - mLeft) + slop) &&
                localY < ((mBottom - mTop) + slop);
    }

Not allowing touch events onto children which are outside the clip bounds. Which is an issue when you're using absolutely positioned elements, as they don't contribute to the width and height of the parent.

So, either use the proper svg solution, or find a way to fix the issue in react-native. Seems like the issue is actually that absolutely positioned children don't contribute to the bounds used in the logic for finding if the point is inside the view. Alternatively, change the logic in TouchTargetHelper to ignore the bounds, and do a complete DFS of the entire tree, without the short-circuit of bounds intersection on non-leaf views. Svg has all elements absolutely positioned, so it's quite natural it's been fixed here already.

@msand Thanks, your explanations are quite helpful - although the deeply nested logic of how Android works in the native layer is way over my head.
The solution to use an animated group worked perfectly (albeit your snack doesn't work on my Android device, nothing happens when any blue dot is pressed). In either case, it solved the problem for me, and all touch events work as expected on both iOS and Android.
But it actually caused a new problem: The initial  XY position is not respected. Try changing the values of the initial variable in your snack and see - the default position (before any pan etc. is performed) should change, but it doesn't. The rendered element defaults to 0 0. Subsequent renders seem to work, but not the initial one.

Ahh, I finally got it working (for my specific component – which is an in-game map in an RPG), by simply moving the transform to the SVG root element instead, (i.e. const AnimatedSvg = Animated.createAnimatedComponent(Svg.Svg)). Thank god (or @msand) 🙏

If you want to add an additional static transform, then I'd recommend wrapping the AnimatedG with another G and set the transform attribute like this:
  render() {
    const {
      panXY,
      translateXY,
      props: { points = defaultPoints, x = 100, y = 0 },
    } = this;
    return (
      <View style={styles.container} {...panXY}>
        <Svg width="100%" height="100%" fill="white">
          <G transform={`translate(${x},${y})`}>
            <AnimatedG style={translateXY}>
              <Rect width="100%" height="100%" />
              <Points points={points} />
            </AnimatedG>
          </G>
        </Svg>
      </View>
    );
  }

or directly on the Svg element:
  render() {
    const {
      panXY,
      translateXY,
      props: { points = defaultPoints, x = 100, y = 0 },
    } = this;
    return (
      <View style={styles.container} {...panXY}>
        <Svg
          fill="white"
          width="100%"
          height="100%"
          transform={`translate(${x},${y})`}>
          <AnimatedG style={translateXY}>
            <Rect width="100%" height="100%" />
            <Points points={points} />
          </AnimatedG>
        </Svg>
      </View>
    );
  }
}

The initial variable is only used to reset the Animated.ValueXY, and shouldn't be changed.

I would've expected that the rendered, initial, animated group would respect the initial transform values, but they don't. If you look at this snack (yours, with a tiny edit):
https://snack.expo.io/@insats/android-touch-event-bug---group
I've changed const xy = new Animated.ValueXY(); to const xy = new Animated.ValueXY({ x: 50, y: 50 });, but the initial render still shows the group at 0 0. Isn't that a bug, albeit a totally different one? If I use console.log to check the values at render, they are indeed 50 50, but the

Try doing this instead:
const initial = { x: 0, y: 0 };
const initialOffset = { x: 50, y: 50 };

export default class PointsPanSurface extends React.PureComponent {
  constructor(props, context) {
    super(props, context);
    const xy = new Animated.ValueXY();
    const { x: dx, y: dy } = xy;
    let offset = initial;
    xy.addListener(flatOffset => {
      offset = flatOffset;
    });
    xy.setValue(initialOffset);
    xy.flattenOffset();

Or alternatively:
const initial = { x: 0, y: 0 };
const initialOffset = { x: 50, y: 50 };

export default class PointsPanSurface extends React.PureComponent {
  constructor(props, context) {
    super(props, context);
    const xy = new Animated.ValueXY(initialOffset);
    const { x: dx, y: dy } = xy;
    let offset = initialOffset;
    xy.addListener(flatOffset => {
      offset = flatOffset;
    });

Changed initial to initialGestureDelta, this is probably a more descriptive name:
const AnimatedG = Animated.createAnimatedComponent(G);

const initialGestureDelta = { x: 0, y: 0 };
const initialOffset = { x: 50, y: 50 };

export default class PointsPanSurface extends React.PureComponent {
  constructor(props, context) {
    super(props, context);
    const xy = new Animated.ValueXY(initialOffset);
    const { x: dx, y: dy } = xy;
    let offset = initialOffset;
    xy.addListener(flatOffset => {
      offset = flatOffset;
    });
    const { panHandlers } = PanResponder.create({
      onMoveShouldSetResponderCapture: () => true,
      onMoveShouldSetPanResponderCapture: () => true,
      onPanResponderGrant: () => {
        xy.setOffset(offset);
        xy.setValue(initialGestureDelta);
      },
      onPanResponderMove: Animated.event([null, { dx, dy }]),
      onPanResponderRelease: () => {
        xy.flattenOffset();
      },
    });
    this.translateXY = {
      transform: xy.getTranslateTransform(),
    };
    this.panXY = panHandlers;
  }
  render() {
    const {
      panXY,
      translateXY,
      props: { points = defaultPoints },
    } = this;
    return (
      <View style={styles.container} {...panXY}>
        <Svg width="100%" height="100%" fill="white">
          <AnimatedG style={translateXY}>
            <Rect width="100%" height="100%" />
            <Points points={points} />
          </AnimatedG>
        </Svg>
      </View>
    );
  }
}

I guess this can be closed by now. Reply if still having issues.

I guess this can be closed by now. Reply if still having issues.

What should i do, it runs with expo on web browser but not on android device
`import React, { Component, useState } from "react";
import { PanResponder, Animated, View, StyleSheet } from "react-native";
import Svg, {
Circle,
Ellipse,
G,
Text,
TSpan,
TextPath,
Path,
Polygon,
Polyline,
Line,
Rect,
Use,
Image,
Symbol,
Defs,
LinearGradient,
RadialGradient,
Stop,
ClipPath,
Pattern,
Mask,
} from "react-native-svg";
import { Audio } from "expo-av";
import tigerAudio from "../assets/tiger.mp3";
import { mv } from "../constants";
import populateCoordinates, { getMoveAngle } from "../utils";
export interface NodeProps {
n: number;
spacing: number;
vSpacing: number;
selectTigerToMove: (position: number) => void | undefined;
selected: boolean;
movable: boolean;
moveTiger: (
initialPosition: number,
newPosition: number,
step: number
) => void;
isMoveAllowed: (
initialPosition: number,
newPosition: number,
move: string,
step: number
) => boolean;
resetMove: (initialPosition: number) => void;
}
const AnimatedUse = Animated.createAnimatedComponent(Use);
const scroll = false;
const zeroDelta = { x: 0, y: 0 };
const Tiger: React.FC = (props: NodeProps) => {
let { n, spacing, vSpacing, movable, selected } = props;
let initialX = spacing / 2;
let initialY = vSpacing / 2.5;
let colPosition = n % 5;
let rowPosition = Math.floor(n / 5);
let cx = colPosition * spacing + initialX;
let cy = initialY + rowPosition * vSpacing;
// console.log("got", colPosition, rowPosition);
const xy = new Animated.ValueXY();
const { x: dx, y: dy } = xy;
let offset = zeroDelta;
xy.addListener((flatOffset) => {
console.log("got flatOffset", flatOffset);
offset = flatOffset;
});
const findNextPosition = (
currentPosition: number,
move: string | undefined,
step: number
) => {
if (!move) {
console.log("move not defined , position cant be found");
return currentPosition;
}
let currentPosOffset = 0;
switch (move) {
case mv.top: {
currentPosOffset = -5;
break;
}
case mv.topRight: {
currentPosOffset = -4;
break;
}
case mv.right: {
currentPosOffset = 1;
break;
}
case mv.bottomRight: {
currentPosOffset = 6;
break;
}
case mv.bottom: {
currentPosOffset = 5;
break;
}
case mv.bottomLeft: {
currentPosOffset = 4;
break;
}
case mv.left: {
currentPosOffset = -1;
break;
}
case mv.topLeft: {
currentPosOffset = -6;
break;
}
default: {
currentPosOffset = 0;
break;
}
}
currentPosOffset = step === 2 ? currentPosOffset * 2 : currentPosOffset;
return currentPosition + currentPosOffset;
};
const { panHandlers } = PanResponder.create({
onStartShouldSetPanResponder: (evt, gestureState) => movable,
onMoveShouldSetPanResponderCapture: () => movable,
onPanResponderGrant: () => {
let finalizedOffset = offset;
xy.setOffset(finalizedOffset);
// xy.setOffset({ x: 0, y: 0 });
  xy.setValue(zeroDelta);
},
onPanResponderMove: (_, gesture) => {
  let ang = getMoveAngle(gesture.dx, gesture.dy);
  console.log("got", ang);
  let newCoords = populateCoordinates(ang, gesture.dx, gesture.dy);
  console.log("newcoords", newCoords);
  xy.x.setValue(newCoords.x);
  xy.y.setValue(newCoords.y);
},
onPanResponderRelease: (e, gestureState) => {
  xy.flattenOffset();
  let initialPosition = n;
  let angle = getMoveAngle(gestureState.dx, gestureState.dy);
  console.log("got angle", angle);
  let { direction } = populateCoordinates(
    angle,
    gestureState.dx,
    gestureState.dy
  );
  let step =
    gestureState.dx >= 1.5 * spacing ||
    gestureState.dx <= -1.5 * spacing ||
    gestureState.dy >= 1.5 * vSpacing ||
    gestureState.dy <= -1.5 * vSpacing
      ? 2
      : 1;
  console.log("got step", step);
  //how to reject pan if gestureState value is more than 120

  let nextPosition = findNextPosition(initialPosition, direction, step);
  //while finding nex position check validity
  console.log(
    "got direction to ",
    nextPosition,
    " from ",
    initialPosition,
    direction
  );
  let moveAllowed = props.isMoveAllowed(
    initialPosition,
    nextPosition,
    direction,
    step
  );
  if (moveAllowed) {
    props.moveTiger(initialPosition, nextPosition, step);
  } else {
    console.log("resetting move");
    props.resetMove(initialPosition);
  }

  // console.log("pan resopnder released", gestureState.dx, gestureState.dy);
},

});
const panXY = {
style: {
transform: xy.getTranslateTransform(),
position: "absolute",
},
onClick: async () => {
// try {
//   const {
//     sound: soundObject,
//     status,
//   } = await Audio.Sound.createAsync(tigerAudio, { shouldPlay: true });
//   // Your sound is playing!
// } catch (error) {
//   // An error occurred!
// }
},
...panHandlers,
};
return (
<>

<AnimatedUse
href="#tiger"
x={cx - spacing / 4}
y={cy - spacing / 4}
fill={"yellow"}
width={spacing / 2}
height={spacing / 2}
opacity={movable ? 1 : 0.8}
{...panXY}
/>

      <Stop offset="30%" stopColor="transparent" />
      <Stop offset="60%" stopColor="transparent" />

      <Stop offset="80%" stopColor="#05a" />
      <Stop offset="100%" stopColor="#0a5" />
    </LinearGradient>
  </Defs>
  {selected && (
    <Rect
      fill="none"
      stroke="url(#linear)"
      strokeWidth={3}
      x={cx - spacing / 3.6}
      rx={10}
      y={cy - spacing / 3.6}
      width={spacing / 1.8}
      height={spacing / 1.8}
    />
  )}
</>

);
};
export default Tiger;
`

Hi @msand I'm running into a similar issue described above, where the onPress function doesn't fire on polygons rendered inside of a wide svg canvas. (only on android). I'm not sure at which point it breaks, but it only seems to occur on wide svgs.
I've attached a video of the issue below, where the viewport width is 7500 px:
https://github.com/software-mansion/react-native-svg/assets/12414548/702d9ac5-7d0d-49d7-983a-e5f4bb22df0b
As you can see, the polygons on the right side of the svg don't get highlighted when pressed.
I've considered applying a transform to the polygons but it's a bit more difficult since they contain multiple points, not just an x,y coordinate. Any ideas how I can solve this? 🙏  I've been at this issue for months now and I'm at a complete loss
SVG component:
<GestureDetector gesture={gestures}>                     <View                         style={[                             styles.container,                             gestureHandlerContainerStyle,                             {                                 width: containerDimensions.width,                                 height: containerDimensions.height,                             },                         ]}                     >                         <Animated.View                             style={[                                 styles.content,                                 {                                     width: contentDimensions.width,                                     height: contentDimensions.height,                                 },                                 animatedStyle,                             ]}                         >                             <Svg                                 height={svgCanvasSize.height}                                 width={svgCanvasSize.width}                                 viewBox={0 0 ${vbWidth} ${vbHeight}}                                 preserveAspectRatio="none"                             >                                 <TouchablePolygons/>                             </Svg>                         </Animated.View>                     </View>                 </GestureDetector>
Touchable Polygon:
... return (             <G>                 {holds.map((hold) => {                     return (                         <Polygon                             key={hold.id}                             points={hold.touchPolygonStr}                             fillOpacity={0}                             fill="black"                             onPress={() => this.toggleHoldAction(hold)}                         />                     );                 })}             </G>         ); ...


Turn arrows at intersections point towards the center lane

https://github.com/a-b-street/abstreet/blob/a85ec6cccd7b47fc39edbfcdaea61bfc86180b20/map_gui/src/render/lane.rs#L331

The code points the arrow towards the average turn movement per road, which is a lane change for the outer lanes. This is most apparent on wide one-way streets. It would make more sense to use the minimum turn movement per road as this will be straight when that option is available.

Fixed by #811


add header row for local_io_adaptor

What do these changes do?
set options.include_header=true

Related issue number

Fixes #864

LGTM.

Hi @wuyueandrew,
Thanks for contributing to vineyard! Could you please recommit your patch with a sign-off information to conform the DCO requirement?
You could do it via
git commit --amend -s --no-edit
git push --force

See also: https://github.com/v6d-io/v6d/pull/865/checks?check_run_id=7408001476

Merged.

Hi @wuyueandrew,
Thanks for contributing to vineyard! Could you please recommit your patch with a sign-off information to conform the DCO requirement?
 I remember your pull requests on graphscope so I assume you would sign-off this commit as well.
Thanks for your contribution for both vineyard and graphscope project :heart:!


Basic support for help text from resource files

Hi,
pull request for #276  .
regards
Kai

FYI there are a number of existing tests that failed due to these changes: "Both HelpText and ResourceName cannot set at the same time". You can see full details in the appveyor link above.
If you can fix that and add a few tests with resource files I'll merge. I assume you can manually set the locale to test specific foreign localizations on, say, a US English PC?

Hey,
sorry for closing and reopen. I just deleted my dev branch and forgot about the open pull request based on the dev branch.
I've fixed a bug regarding to this feature in this commit: https://github.com/balticer/commandline/commit/e9fa316ae6d5ac5ac479f2728913fceaddfb1030
Regarding the failing tests:
The problem is that these tests not set helpText nor resourceName. So when the behaviour is fine and of these must be set, then these tests have to be adjusted. I'm not insane with the testing project, but i'll look into.
regards
Kai

I see. However, HelpText is not a required property so it doesn't make sense to throw an exception when no help text is present. To preserve backwards compatibility, we should return null when it hasn't been set.

AppVeyor build fails because of some problems with the build system. Locally it compiles fine, also the tests runnning fine. Any hint to fix the problem with the AppVeyor build system?

Have the paket.lock or paket.dependencies files changed locally? It sounds like you've added a dependency that isn't accounted for in the files that exist in source control.

No changes on this files locally. The AppVeyor build fails, not my local build. Possible to run AppVeyor again on this changeset?

When you build are you using build.cmd or the usual VS compile + test runner?

Did this get merged?  I ask because I just got a email notification that said that 276 was closed, which is referenced on this PR


Fix: Cron.run() was resetting the timezone

time.Timer() does not return a timezone within time.Time, since Timer is unaware of the custom timezone as it only accepts time.Duration when it's initialized.
Thus the receiver needs to take care of the timezone.
// NewTimer only receives time.Duration
func NewTimer(d Duration) *Timer

// And time.Duration only holds int64 but no timezone specifier
type Duration int64

Interesting.. your change to the tests causes them to fail without your change to the code?
Great find, thanks

+1 I was about to try and track down what was happening here also. Good find.


When I open 2 tabs, the page is almost destined to crash.

Describe the bug
When I open 2 tabs, the page is almost destined to crash.
To Reproduce
Steps to reproduce the behavior:
just open mac app | Browser extensions| web page，run some query, then open 2 tab, run or  write some graphql，it will run crash
Desktop (please complete the following information):
-OS: macOS
platform: desktopAPP & Browser extensions &  web page
This problem exists on multiple MacBookPros, maybe our schema file is too large, it is about 500kb, and once we open a new tab, it will crash.

How do you mean crash? Any errors?

How do you mean crash? Any errors?

like this:

I've tested with Github's GraphQL and the only issue I had was with space allocations for the browser extensions, but it didn't crash. Perhaps you can share a bit more about your specific use case. Can you check the console for any errors? Is it okay with one tab? Does it immediately crash when you open the second window? Can you share these facts based on your usage with the desktop apps?

I've tested with Github's GraphQL and the only issue I had was with space allocations for the browser extensions, but it didn't crash. Perhaps you can share a bit more about your specific use case. Can you check the console for any errors? Is it okay with one tab? Does it immediately crash when you open the second window? Can you share these facts based on your usage with the desktop apps?

I'm very sorry, man, I can't reproduce this problem at present. This problem generally occurs when I open more than 1 tab for graphql writing or querying. Opening more tabs will become delayed or stuttered. Continuing writing may occur collapse. This problem appears on desktopAPP and web pages.
If you can try a larger graphql document and open N tabs to write graphql, you may run into this problem

I can't think of a product with a bigger schema than GitHub has. If you can, let me know. On the other hand, perhaps you can help debug and contribute to the project for such cases. PRs would be welcome 😊


Refactor datastore connection: move behavior into API objects

@tseaver This is what we discussed in #2230. LMKWYT. This way we can just ditch google.cloud.client.Client (for _ClientFactoryMixin) and remove the connection module. Right now, the only real logic in the Connection class is in the constructor.

I could be missing something, but there is logic in the non-virtual "public" methods which needs testing.  Did we just not have explicit tests for those connection methods before?

LGTM.  Maybe we need an issue to track adding explicit coverage for the API methods (whichever way we go about dropping Connection)?

@tseaver Is it problematic to just get rid of the Connection for all packages? The motivation is #2230/#2221 so all APIs may need access to project or other pieces that the Connection doesn't have access to. This is especially difficult if we need different resource prefixes used on the same stub.


improve lint setting on frontend

Hello team. This PR improves linters setting for the frontend. (and apply it.)

web/.eslintrc.js
web/package.json

Sorry for the huge diff, but almost all changes are from linters and no change in appearance of frontend.

/remove-lifecycle stale

/label tide/merge-method-squash

/lgtm


Update version_control.rst

Correcting typo -- additional bracket at the end of the sentence

Sure, looks good. Thanks!


Release tagged version

I know that i can use version 2.1.0+9-b74a6a57 but would still be nice to have 2.2.0.

hey @leonardehrenfried,
I've been wanting to get back to sbt-dynver, to finish working with @eliaslevy in #62.
part of the reason I don't push a tag right now is I'm not sure if with your #63 if it should be sbt-dynver 3.0.0.. wdyt?

Hmm, on the one hand it is hard to imagine how somehow someone could rely on the absence of the +0 and whose workflow is now broken.
On the other hand, I would err on the side of caution and bump the number to 3.0.0. Version numbers don't cost anything and I don't see any downsides to the bump.

Good point. Let's go with 3.0.0.

https://github.com/dwijnand/sbt-dynver/releases/tag/v3.0.0


Keep consistency with the toString template

FppTest\LoadTemplateTest::it_loads_body_template_for_base_enum_class
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
{
return $this->name;
}
+

public function toString(): string
{

   return $this->name;

}

}
'
/home/travis/build/prolic/fpp/tests/LoadTemplateTest.php:212
FAILURES!
Tests: 280, Assertions: 488, Failures: 1, Incomplete: 1.
On Tue, Oct 2, 2018, 07:29 Matthias Breddin<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/prolic/fpp/pull/87
Commit Summary

Keep consistency with the toString template

File Changes

M src/templates/enum.template
https://github.com/prolic/fpp/pull/87/files#diff-0 (7)

Patch Links:

https://github.com/prolic/fpp/pull/87.patch
https://github.com/prolic/fpp/pull/87.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/prolic/fpp/pull/87, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAYEvDrZQs5AojHaatqMtjxIpoLWqF0yks5ugqVigaJpZM4XDERk
.

closed -> new pr: https://github.com/prolic/fpp/pull/88


Add ability for service to report the system managing the service

This will only matter in instances where you may not be using service.New, or service.ChosenSystem. This allows the service itself to report the system it was created with.

Coverage decreased (-0.01%) to 9.442% when pulling 77ea021d0b40c6eb3ff75eb7f4d209d79dc63df0 on SteelPhase:system-name into 8f267d80f2eb68998661a325c0e53fca4485e626 on kardianos:master.

What's the difference between service.Platform() and service.Service.SystemName() ?  Is there a reason to not have this as a package global function? I guess I'm not sure how it could be different from one service to another service (on a single run).

I ran into a case today where I was passing service.Service around and needed to know what Platform that service was. I went with this approach because it seemed pretty simple. Since my use case can manage multiple different services at once, I have situations where a service could be running on SystemV or Upstart on the same box.


[TLS]: Pass a heap-allocated value to pthread_setspecific()

pthread_setspecific() requires the pointer passed as a value to
be either NULL or allocated on the heap as the destructor called
when the thread exits will pass this value to free().

__dispatch_tsd is already allocated per thread as it is declared
using __thread so it is stored in the .tbss not the heap.
Allocate a pointer to hold the address of __dispatch_tsd instead
of passing the address directly to satisfy pthread_setspecific()
and still allow _libdispatch_tsd_cleanup() to retrieve the address.

This showed up as an issue on Linux when linking in libdispatch.a into a dynamic executable. It didnt occur when linking in libdispatch.so or when creating a fully static binary (based off of TestFoundation).
The pthread destructor calls free() on the value passed in and this causes a memory error - the destructor doesnt seem to be called in the other two versions.
I dont have a unit test to add here however I will be adding a test to swift-corelibs-foundation that currently triggers this bug. It also shows up in binaries built using the method outlined in https://github.com/apple/swift/pull/9958
Lastly, the manpages on both macOS and Linux are not detailed on whether the value is freed by libpthread, this was mostly found by looking at the glibc source and through experiments. If there is a difference on macOS this PR may need modification.

This patch makes absolutely no sense to me. pthread_setspecific() will not call free() as part of the destruction of the TSD value, it will call whatever function you associate with the key. If a free is called it means the function associated with the key calls free and this would be wrong.

IOW while I truly believe there's something crashing with the static variant of libdispatch linked in a binary, I believe your patch leaks.

@MadCoder Yeah, I will have another look. there is definitely something calling free() on the value of __dispatch_tsd which seems odd as its not called in  _libdispatch_tsd_cleanup() either.

@MadCoder Ok I had another look at this and its due to init constructor ordering.
CoreFoundation/Base.subproj/CFRuntime.c __CFInitialize ultimately calls dispatch_once but if this occurs before src/init.c _libdispatch_init is called then the __dispatch_tsd_key is 0. However libp11-kit owns key 0 and has set its destructor in pthread_key_create() to free().
The ordering is due to libdispatch being a dependancy of libFoundation and with static libraries the dependancy has to come after the library that is dependant on it. This sets the default constructor ordering I believe.
As a test fix I did the following:
$ (cd swift-corelibs-libdispatch/ ; git diff)
diff --git a/src/init.c b/src/init.c
index dea5e87..7faaa24 100644
--- a/src/init.c
+++ b/src/init.c
@@ -33,7 +33,7 @@
 #pragma mark dispatch_init

 #if USE_LIBDISPATCH_INIT_CONSTRUCTOR
-DISPATCH_NOTHROW __attribute__((constructor))
+DISPATCH_NOTHROW __attribute__((constructor(9)))
 void
 _libdispatch_init(void);

$ (cd swift-corelibs-foundation/ ; git diff)
diff --git a/CoreFoundation/Base.subproj/CFRuntime.c b/CoreFoundation/Base.subproj/CFRuntime.c
index ead676d..35cd491 100644
--- a/CoreFoundation/Base.subproj/CFRuntime.c
+++ b/CoreFoundation/Base.subproj/CFRuntime.c
@@ -966,7 +966,7 @@ pthread_t _CF_pthread_main_thread_np(void) {

 #if DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD
-static void __CFInitialize(void) __attribute__ ((constructor));
+static void __CFInitialize(void) __attribute__ ((constructor(10)));
 static
 #endif
 #if DEPLOYMENT_TARGET_WINDOWS
$

which worked but was thinking of a neater fix. Possibly something like the following:
in lib dispatch:
#define LIBDISPATCH_INIT_PRIORITY 9
in CoreFoundation
#if DEPLOYMENT_ENABLE_LIBDISPATCH
#define CFINITIALIZE_PRIORITY (LIBDISPATCH_INIT_PRIORITY + 1)
#endif

The other alternative would be for __CFInitialize to call _libdispatch_init() with a flag in _libdispatch_init() to only allow it to be called once.

I strongly dislike relying on constructor ordering across projects.
I think that the fix here is rather that when libdispatch is built statically the libdispatch intializer is not __attribute__((constructor)) and it is the responsibility of whatever projects embeds libdispatch to call it. Here it would be within __CFInitialize that this call should be made.
Incidentally this is exactly how it works on Darwin already, and _libdispatch_init() is only used when USE_LIBDISPATCH_INIT_CONSTRUCTOR is set, which IMO shouldn't be for the static variant. These symbols are already exported:
DISPATCH_EXPORT DISPATCH_NOTHROW void libdispatch_init(void);
#if !TARGET_OS_WIN32
DISPATCH_EXPORT DISPATCH_NOTHROW void dispatch_atfork_prepare(void);
DISPATCH_EXPORT DISPATCH_NOTHROW void dispatch_atfork_parent(void);
DISPATCH_EXPORT DISPATCH_NOTHROW void dispatch_atfork_child(void);
#endif

and should be hooked from CF or whichever library you end up hooking libdispatch into.

I agree with you about constructor ordering across projects. In this case wouldn't it be easiest to never enable the constructor in libdispatch for either static or dynamic and then always have __CFInitialize call libdispatch_init() ?
Both the libdispatch.so and libdispatch.a built by swift will always be private versions in the swift toolchain. Also I think there is no guarantee that the constructors will be called in the correct order when both libs are dynamic. This also allows mixing a static dispatch with a dynamic Foundation and vice-versa.
One last question. Is there a good reason to have the _libdispatch_init() constructor? Surely any programs / libraries that use libdispatch can just call libdispatch_init() directly and bypass any ordering issues.

libdispatch is also used standalone outside of swift and initialization must work here. so no I disagree it should be disabled for the dynamic build. _libdispatch_init() hence must be used for the DSO, but not the static library.

I meant just when building it as part of swift, ie set USE_LIBDISPATCH_INIT_CONSTRUCTOR to 0 as part of the swift build, not removing the constructor.
Alternatively, what about adding a guard into libdispatch_init(), then always call libdispatch_init() from __CFInitialize
diff --git a/src/queue.c b/src/queue.c
index 2406e7e..9461bba 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -780,6 +780,12 @@ DISPATCH_EXPORT DISPATCH_NOTHROW
 void
 libdispatch_init(void)
 {
+       static int init = 0;
+       if (init != 0) {
+               return;
+       }
+       init = 1;
+

I don't like that as it means that it will make distributing swift harder for distributions. When libdispatch is a dynamic library it should use its constructor, so that when linked in C programs it still works without the C program having to initialize it itself.
It;s the only way to allow C/C++ libraries that use dispatch to be used from Swift.

BTW I hope that libdispatch as a static library is not the default for Swift builds, exactly for the reason above, we can't quite have two libdispatch's in the same binary, that would end very poorly. It has to be a dynamic module anyway.

The static one will only be linked in on Linux if -static-stdlib is used and if that is the case the dynamic one wont be.
How do you ensure constructor ordering between libFoundation.so and libdispatch.so on Linux because at the moment it may just be working by chance.

no there's no chance involved when you have DSOs because the constructors are run in dependency order. The problem exists only within the same object.

dead pull request, closing, please reopen with updates if you feel it should be revived


Host key verification failed for private repository

I am getting below error when i am running /deploy.php from browser or if i push anything in repository.
$ git clone --depth=1 --branch master git@github.com:myrepository.git /tmp/spgd-8fbc87725193f8667aff13a1372edd28/
Cloning into '/tmp/spgd-8fbc87725193f8667aff13a1372edd28'...
Host key verification failed.
fatal: Could not read from remote repository.
When i run $ git clone --depth=1 --branch master git@github.com:myrepository.git /tmp/spgd-8fbc87725193f8667aff13a1372edd28/ directly in terminal its cloning repository without any error.
I have also referred #9 but didn't help.

Is there any solution?
I have the same problem

No luck. Please do post here if you find any solution.

I'm having the same issue...have setup the SSH key and everything but no luck. Works a charm on public projects but that's no good to me..

I found out way it doesn't work - basically is is because git sends message to deploy.php and then apache is trying to run "git clone..." on your server, well, apache is not root so it runs (in my server it's daemon on others it's  www-data) the command and it won't let it to add git to known_hosts.
Try to run this on your server:
sudo -u www-data  ssh -T<EMAIL_ADDRESS>for me it's asking me to save git to known host:
The authenticity of host 'github.com (<IP_ADDRESS>)' can't be established.
RSA key fingerprint is 16:27:...:48.
Are you sure you want to continue connecting (yes/no)? yes
I write "yes" and this is what I got
Failed to add the host to the list of known hosts (/usr/sbin/.ssh/known_hosts).
Permission denied (publickey).
And this is weird because I opened the permissions to the known_hosts file...
I think after solving this it should work...

You need to generate a key for www-data user and added to github repo.
If www-data has the /var/www/ home directory, then in there you will have a .ssh forder where the generated key files and the known_hosts file  should be.
how to generate a ssh key as web server user:
http://stackoverflow.com/questions/7306990/generating-ssh-keys-for-apache-user`
Good luck!

Thanks! this tip took me one step forward, the problem now is that I cannot add the new id_rsa to ssh-agent for some reason..
When I try to write this:
sudo ssh-add /usr/sbin/.ssh/id_rsa
It says:
Could not open a connection to your authentication agent.

I got it working on private repository too. I have followed below steps :
Note : For debian system(which is i am on), www-data is the Apache user. If you are on non-debian system you can check apache user by this command : ps aux | egrep '(apache|httpd)' and replace that user name with  www-data here.

Create new directory in your webroot :
--- mkdir -p /var/www/.ssh/
--- chown -R www-data:www-data /var/www/.ssh
--- chmod 0700 /var/www/.ssh

Generate a new key for www-data user (Apache user) or move current user key to /var/www/.ssh directory.
--- To generate fresh key : sudo -u www-data ssh-keygen -t rsa.
--- To use existing one : cp ~/.ssh/ /var/www/.ssh/ (We are moving id_rsa.pub, id_rsa & known_hosts files here)

Change ownership of /var/www/.ssh directory www-data.
--- sudo chown -R www-data:www-data /var/www/.ssh

Change ownership of /var/www/your-deployment-directory/ directory to www-data.
--- sudo chown -R www-data:www-data /var/www/YourProjectDirectory

That's it !!
Happy Coding :+1:

Thanks for you replies! I had generated the SSH key and hooked it up in
github, so thats not the problem. Also the script runs just fine when i
connect to an open Repo using https so i dont think its permission related.
Anyway will have a play around with it to see if i can work it out. Just to
be clear, does it definetly work for github private repo over SSH, I saw
several people having the same issue, dont want to spend time trying to fix
it if it doesnt work in the first place :-)
On 3 Jan 2016 11:50 pm, "orendecor"<EMAIL_ADDRESS>wrote:

I found out way it doesn't work - basically is is because git sends
message to deploy.php and then apache is trying to run "git clone..." on
your server, well, apache is not root so it runs (in my server it's daemon
on others it's www-data) the command and it won't let it to add git to
known_hosts.
Try to run this on your server:
sudo -u www-data ssh -T<EMAIL_ADDRESS><EMAIL_ADDRESS>for me it's asking me to save git to known host:
The authenticity of host 'github.com http://github.com
(<IP_ADDRESS>)' can't be established. RSA key fingerprint is
16:27:...:48. Are you sure you want to continue connecting (yes/no)? yes
I write "yes" and this is what I got
Failed to add the host to the list of known hosts
(/usr/sbin/.ssh/known_hosts). Permission denied (publickey).
And this is weird because I opened the permissions to the known_hosts
file...
I think after solving this it should work...
—
Reply to this email directly or view it on GitHub
https://github.com/markomarkovic/simple-php-git-deploy/issues/65#issuecomment-168496005
.

tl;dr - working if you remove passphrases from id_rsa file.
Long story:
The problem is that id_rsa is encrypted with passphrases, and when I try to run ssh-agent on this id_rsa (so it will not ask for the passphrases each time) it won't have a permission on this file.
This because id_rsa has 600 rights (reading only for its owner - which is the apache user), and if you change this permissions then git won't accept this key because its permissions are too open.
I ended up removing the encryption for this key by running this line:
sudo openssl rsa -in id_rsa -out new_id_rsa
Since then everything is working fine :)
(I'm not sure what are the implications of this passphrases removal)

I see - thank you for confirming, much appreciated!
On Wed, Jan 6, 2016 at 10:26 AM, orendecor<EMAIL_ADDRESS>wrote:

tl;dr - working if you remove passphrases from id_rsa file.
Long story:
The problem is that id_rsa is encrypted with passphrases, and when I try
to run ssh-agent on this id_rsa (so it will not ask for the passphrases
each time) it won't have a permission on this file.
This because id_rsa has 600 rights (reading only for its owner - which is
the apache user), and if you change this permissions then git won't accept
this key because its permissions are too open.
I ended up removing the encryption for this key by running this line:
sudo openssl rsa -in id_rsa -out new_id_rsa
Since then everything is working fine :)
(I'm not sure what are the implications of this passphrases removal)
—
Reply to this email directly or view it on GitHub
https://github.com/markomarkovic/simple-php-git-deploy/issues/65#issuecomment-169167586
.

I'm having the same trouble.  This was working perfectly when my repository was public, but it broke when I went private. I initially encountered the error:
_
Host key verification failed.
fatal: Could not read from remote repository._
I contacted GitHub and was instructed to add GitHub's public key to the known hosts file, which I did with ssh -T<EMAIL_ADDRESS>However, I still got this:
_
$ git clone --depth=1 --branch master git@github.com:mcki0127/[project].git /tmp/spgd-accb135f8fe13d74a36dc288e0b65c4d/_
Cloning into '/tmp/spgd-accb135f8fe13d74a36dc288e0b65c4d'... Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Next, per GitHub support, I added GitHub's key to the global known hosts file with ssh-keyscan -t rsa github.com >> /etc/ssh/ssh_known_hosts
But the error persists.  I have tried kalpitpandit's solution, and copied the keys into the var/www directory and changed the owners of the .ssh and project directories to www-data (which I believe is the apache user, I'm on Ubuntu).
Currently I am getting this error:
_
$ git clone --depth=1 --branch master git@github.com:mcki0127/[project.git] /tmp/spgd-accb135f8fe13d74a36dc288e0b65c4d/
Cloning into '/tmp/spgd-accb135f8fe13d74a36dc288e0b65c4d'...
Failed to add the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts (/var/www/vhosts/[project directory]).
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights_
I currently have the same ssh keys in root directory and in var/www.  private keys have permission 600 and public keys have 644.  I'm at a loss at this point.

I just got this to work.  It ended up being a combination of incorrect ownership (username:psacln) and placing the .ssh folder in the wrong directory.   It had to be in the project directory itself instead of in /var/www/.  Now on to more important things ...

I opened #68 which is a related issue/request

I could't make work the private repo from BitBucket, so at this point my solution was quite dirty but straight forward:
<EMAIL_ADDRESS>I know this is not the best solution, but at least it's a provisory solution.


List of anime , auto shutdown

Describe the feature here
if i can rate this library i will give it 10/5 :P
amazing work thanks for this library and keep doing good work and hope ur well in this time of pandemic

i can queue multiple anime at the beginning. like find and add anime to download queue.

auto shutdown when everything is complete

i think iam thinking too far but if possible option to pause

anyway best repo i have ever come across on github

Number 1 can definitely get added, but I think it requires further rewrite of the core. I think using anime-downloader as a library is the best option for this one.
Number 2 is very easy to add, can probably make a PR like today or tomorrow.
Number 3 is already kinda added as aria2 can resume canceled downloads.


maven error during building in docker

I follow this.
docker run -it --name sr -d starrocks/dev-env:main
docker exec -it sr /bin/bash
git clone https://github.com/StarRocks/starrocks.git
cd starrocks
sh build.sh

And I meet this error:
Build Frontend Modules: fe-common,spark-dpp,fe-core
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.starrocks:spark-dpp:jar:1.0.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] fe-common [jar]
[INFO] spark-dpp [jar]
[INFO] fe-core [jar]
[INFO]
[INFO] ----------------------< com.starrocks:fe-common >-----------------------
[INFO] Building fe-common 1.0.0 [1/3]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from spring-plugins: https://repo.spring.io/plugins-release/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.1/maven-checkstyle-plugin-3.1.1.pom
Downloading from cloudera-public: https://repository.cloudera.com/artifactory/public/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.1/maven-checkstyle-plugin-3.1.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.1/maven-checkstyle-plugin-3.1.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] fe-common 1.0.0 .................................... FAILURE [ 6.457 s]
[INFO] spark-dpp 1.0.0 .................................... SKIPPED
[INFO] fe-core 3.4.0 ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.564 s
[INFO] Finished at: 2022-03-16T02:39:36Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.1: Could not transfer artifact org.apache.maven.plugins:maven-checkstyle-plugin:pom:3.1.1 from/to spring-plugins (https://repo.spring.io/plugins-release/): Transfer failed for https://repo.spring.io/plugins-release/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.1/maven-checkstyle-plugin-3.1.1.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

What should I do? Please help me.

[ERROR] Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.1: Could not transfer artifact org.apache.maven.plugins:maven-checkstyle-plugin:pom:3.1.1 from/to spring-plugins (https://repo.spring.io/plugins-release/): Transfer failed for https://repo.spring.io/plugins-release/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.1/maven-checkstyle-plugin-3.1.1.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR]

please check your network

ok, I try.

you could add a mirror in ~/.m2/settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers/>
  <mirrors>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>central</mirrorOf>
     <name>阿里云公共仓库</name>
     <url>https://maven.aliyun.com/repository/central</url>
    </mirror>
    <mirror>
      <id>repo1</id>
      <mirrorOf>central</mirrorOf>
      <name>central repo</name>
      <url>http://repo1.maven.org/maven2/</url>
    </mirror>
    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>apache snapshots</mirrorOf>
     <name>阿里云阿帕奇仓库</name>
     <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>
  </mirrors>
  <proxies/>
  <activeProfiles/>
  <profiles>
    <profile>
        <repositories>
           <repository>
                <id>aliyunmaven</id>
                <name>aliyunmaven</name>
                <url>https://maven.aliyun.com/repository/public</url>
                <layout>default</layout>
                <releases>
                        <enabled>true</enabled>
                </releases>
                <snapshots>
                        <enabled>true</enabled>
                </snapshots>
            </repository>
            <repository>
                <id>MavenCentral</id>
                <url>http://repo1.maven.org/maven2/</url>
            </repository>
            <repository>
                <id>aliyunmavenApache</id>
                <url>https://maven.aliyun.com/repository/apache-snapshots</url>
            </repository>
            <repository>
                <id>spring</id>
                <url>https://maven.aliyun.com/repository/spring</url>
                <releases>
                <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
     </profile>
  </profiles>
</settings>

How do I make this xml work, just write these contents into ~/.m2/settings.xml ?
I had writen this xml and tried building in aliyun HongKong emc and aliyun ShangHai emc, but still met this errors...

you could run curl https://repo.spring.io/plugins-release/ and see output.

I got this.

could you retry it with a oracle JDK?
https://stackoverflow.com/questions/21579247/plugin-org-apache-maven-pluginsmaven-compiler-plugin-or-one-of-its-dependencies

ok, I try.

@waittttting We need to consider putting ~/.m2 into the docker image.


Sergoe UI Font not included with Figma Mixed Reality Toolkit

Hi! My team is looking for the Sergoe UI Fonts used in the figma components. Where are these available?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 62712b23-e5db-ab31-7cce-eb31e2e6baad
Version Independent ID: 14d3b6ff-951a-1e92-8508-8d2b2ba608fa
Content: Figma Toolkit - Mixed Reality
Content Source: mixed-reality-docs/mr-dev-docs/design/figma-toolkit.md
Product: mixed-reality
Technology: mr-dev
GitHub Login: @DongPark
Microsoft Alias: dongpark

@cgimber I guess you are using this on Mac? (Windows should have Segoe UI fonts in the system by default)
You can download Segoe UI fonts from this page:
https://docs.microsoft.com/en-us/windows/uwp/design/downloads/
Thanks!


Fix Navigation to zen

fixed in 3.1.93

Let's fix again as it was discovered today.

Done in 3.1.97

@evshvarov check and close the issue please

Works


NullPointerException in StringValueFacetCounts when using MultiCollectorManager

Description
When I use MultiCollectorManager which merges both FacetsCollectorManager and TopScoreDocCollectorManager with a query not matching any docs, I expect to get 0 as a facet count, but get NPE:
Cannot read the array length because "this.denseCounts" is null
java.lang.NullPointerException: Cannot read the array length because "this.denseCounts" is null
	at __randomizedtesting.SeedInfo.seed([6C38B1BA02A289D7:8DDEDB50125C0203]:0)
	at org.apache.lucene.facet.StringValueFacetCounts.getTopChildren(StringValueFacetCounts.java:210)
	at org.apache.lucene.facet.TestStringValueFacetCounts.testNarrowSingleValued(TestStringValueFacetCounts.java:102)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

A reproducer code:
  public void testNarrowSingleValued() throws Exception {
    Directory dir = newDirectory();
    RandomIndexWriter writer = new RandomIndexWriter(random(), dir);

    Document doc = new Document();
    doc.add(new SortedSetDocValuesField("field", new BytesRef("foo")));
    writer.addDocument(doc);

    IndexSearcher searcher = newSearcher(writer.getReader());
    writer.close();

    TopScoreDocCollectorManager docCollector = new TopScoreDocCollectorManager(10, 10);
    FacetsCollectorManager facetCollector = new FacetsCollectorManager();
    MultiCollectorManager merged = new MultiCollectorManager(docCollector, facetCollector);

    Object[] results = searcher.search(new MatchNoDocsQuery(), merged); // no docs matched!
    StringDocValuesReaderState state =
            new StringDocValuesReaderState(searcher.getIndexReader(), "field");

    StringValueFacetCounts counts = new StringValueFacetCounts(state, (FacetsCollector) results[1]);
    FacetResult top = counts.getTopChildren(10, "field");
    assertEquals(top.childCount, 0); // as no docs matched, it should be zero
    IOUtils.close(searcher.getIndexReader(), dir);
  }

The same code is working flawlessly without NPE on Lucene 9.10, but started throwing NPE on 9.11.
Version and environment details

Lucene main (from d29c57e50c38c1a090395644165b34f5191246b8), also broken on Lucene 9.11
Eclipse Temurin JDK 21.0.3
Linux

My feeling is that this NPE is related to this change recently backported to 9.11: https://github.com/apache/lucene/pull/12408/files#diff-de1c07b8609beac65af6c1604e2f4aad86f2aa9771615cfb4ce6b93204a7189c

For the reference, two related parent PRs:

https://github.com/apache/lucene/pull/13300
https://github.com/apache/lucene/pull/12408


Fix issue #9 | Open to custom animations

Overview
I've created a way to use custom animations with skeleton keeping a way to use the default animations
Fixes: #9
Changes

Changed AnimationProperty to BaseAnimation type
Created an example page with custom animation
Created a simple way to use defaults animations with markup extension

<MyView
                      sk:Skeleton.IsBusy="{Binding IsBusy}"
                      sk:Skeleton.Animation="{sk:DefaultAnimation Fade}" />

Preview

Nice contribution @felipebaltazar , Thank you for everything you do!


added a blurry loading page

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue no.201)

Type of change

Explain the Testing instructions
Test Configuration:

Operating system: windows10
Version:
Text-editors used: vs code editor

Checklist:

[x ] My code follows the style guidelines of this project

[x ] I have performed a self-review of my own code

[x ] I have commented my code, particularly in hard-to-understand areas

[ x] My changes generate no new warnings

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

make this PR on css effects

make this PR on css effects
ok


[Bug] .GLTF files are displayed when GLB format is selected

When you export to gltf, there's an option to select which format you want to use: GLTF or GLB.
But no matter which one you choose, the explorer will always show both GLTF and GLB files.

Expected behavior: show only .glb files when expoting to GLB;
show only .gltf files when exporting to GLTF

Dynamic filtering is not implemented yet.
Set it as enhancement


Added class offering link click logging [#174653677]

This adds a generic logger client to the portal with the offering details component as the first user of the client.
The following events are logged:

clickedPreviewLink
clickedTeacherEditionLink
clickedReportLink
clickedExternalReport

in each case the event_value is the url of the link.

@scytacki A couple of notes:

This defines a new application name ('rigse-log') for the portal log messages
I wasn't sure if we wanted to use snake_case or camelCase for the event names so I went with cameCase.

@scytacki A couple of notes:

This defines a new application name ('rigse-log') for the portal log messages
I wasn't sure if we wanted to use snake_case or camelCase for the event names so I went with cameCase.

@scytacki I added a follow on commit to add the activity and parameters to the other event logged: https://github.com/concord-consortium/rigse/pull/925/commits/9b28ece75471d5708f68d4e0cddbf630adaf3486

@scytacki I added a follow on commit to add the activity and parameters to the other event logged: https://github.com/concord-consortium/rigse/pull/925/commits/9b28ece75471d5708f68d4e0cddbf630adaf3486


Table 37 and 39 OnDelete- and TestStatusOpen

we cannot use SuspendStatusCheck to be valid in the OnDelete-Trigger, although the record is global.
We want to delete lines even if the Status is "Released".
We cannot use the OnBeforeTestStatusOpen as mentioned in #4312 because this would apply to every Statuscheck, not only the specific check in the  OnDelete-Trigger.
both should be working for T37 and T39 in a way of:
if myconditionisvalid then begin
rec.suspendstatuscheck(true);
rec.delete(true);
end;

Hi @GuntherGebauer . Sorry, but it's not fully clear where is the problem and what is not working. Below is simple extension I've tested. Sales line of "credit memo" type deleted from the released document.
codeunit 50101 SubCodeunit
{
trigger OnRun()
begin
end;
procedure DeleteSalesCrMemoLine()
var
    SalesHeader: Record "Sales Header";
    SalesLine: Record "Sales Line";
begin
    SalesHeader.SetRange("Document Type", SalesHeader."Document Type"::"Credit Memo");
    SalesHeader.SetRange(Status, SalesHeader.Status::Released);
    if SalesHeader.FindFirst() then begin
        SalesLine.SetRange("Document Type", SalesHeader."Document Type");
        SalesLine.SetRange("Document No.", SalesHeader."No.");
        if SalesLine.FindFirst() then begin
            SalesLine.SuspendStatusCheck(true);
            SalesLine.Delete(true);
            SalesLine.SuspendStatusCheck(false);
        end;
    end;
end;

}
pageextension 50102 SalesCrMemoExt extends "Sales Credit Memos"
{
layout
{
// Add changes to page layout here
}
actions
{
    // Add changes to page actions here
    addlast(CreditMemo)
    {
        action(DeleteCrMemoLine)
        {
            Caption = 'DeleteCrMemoLine';

            trigger OnAction()
            var
                SubCodeunit: Codeunit SubCodeunit;
            begin
                SubCodeunit.DeleteSalesCrMemoLine();
            end;
        }
    }
}

}

@RomanZanizdra 👍
Sorry, I have tested our Code as follows:
Codeunit 50101:
IF SalesLine.FIND('-') THEN BEGIN
SalesLine.SuspendStatusCheck(TRUE);  <-- at this Point saleslines.Statuschecksuspended = true
SalesLine.DELETEALL(TRUE); <-- at this Point saleslines.Statuschecksuspended = false
END;
salesline.deletell(true) runs into
T37_OnBeforeDeleteEvent(VAR Rec : Record "Sales Line";RunTrigger : Boolean)
where already rec.Statuschecksuspended = false
and then after returning from this trigger into
Table 37
OnDelete()
TestStatusOpen;
where now rec.Statuschecksuspended = false
and the lines could not be deleted

Hi @GuntherGebauer . Yes, you will not be able to use DeleteAll in that case, I'm afraid there is nothing to do. Are there any problems that prevent you from using repeat..until and delete?

Hi @RomanZanizdra
Isn't that really bad Code with Findset, Repeat, delete(true) until next=0 ?
Why is deleteall(true) not triggered in the same way as delete(true) for a single record?

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Observable not working with *ngIf when false

This is a...

[ ] feature request
[?] bug report
[x] usage question

What toolchain are you using for transpilation/bundling?

[ ] @angular/cli
[ ] Custom @ngTools/webpack
[ ] Raw ngc
[ ] SystemJS
[ ] Rollup
[x] Other - angular-webpackstart-kit

Environment
NodeJS Version: 6
Typescript Version: 2.2.2
Angular Version: 4
@angular-redux/store version: 6.2.0
@angular/cli version: (if applicable)
OS:
Expected Behaviour:
I have the following in my component:
constructor(private authService: AuthService,
        private router: Router,
        private sessionActions: SessionActions,
        private ngRedux: NgRedux<AppState>) {

        this.credential = new Credential('', '');
    }
@select(['session', 'isBusy']) readonly isBusy$: Observable<boolean>;

This is in my template
<label>{{isBusy$ | async}}</label>
<button class="btn btn-primary btn-block" (click)="login()" *ngIf="!isBusy$ | async">Log In</button>
<button class="btn btn-primary btn-block" *ngIf="isBusy$ | async">Logging In</button>

This is what my store looks like when the page loads:
{
  session: {
    authentication: 'authenticating',
    isBusy: false
  },
  router: ''
}

I expected the first button to show.
Actual Behaviour:
When I load the page the label shows "false". However, the first button does not show. If I remove the ngIf from the first button and then click on it the second button shows (I have a reducer that sets the state to false on the login action).
Shouldn't this work? I have tried moving to ngRedux.select in my ngOnInit function but that did not change anything.

I think the issue is with this expression:
!isBusy$ | async
The ! is applied before the | async. So it's evaluating to:
(!isBusy$) | async
false | async.
Async pipe doesn't know what to do with a boolean, since it's expecting an observable.
You could try this:
!(isBusy$ | async)
Alternately if that doesn't work the way I currently think from my armchair you could do something like this instead:
constructor(private authService: AuthService,
        private router: Router,
        private sessionActions: SessionActions,
        private ngRedux: NgRedux<AppState>) {

        this.credential = new Credential('', '');
        this.showLogInButton$ = this.isBusy$.map(busy => !busy);
    }
@select(['session', 'isBusy']) readonly isBusy$: Observable<boolean>;

Feel free to reopen if I'm wrong.

You were correct. Thanks for helping me catch the obvious I should have seen! Still trying to wrap my head around observables.

No problemo :)

Thanks very much it was very useful. Stuck for long time didn't know why my boolean expression is not working

this code worked for
!(isBusy$ | async)
thx man

Confirm. I had the same problem.
Using !(isBusy$ | async) works fine.
Thanks a lot @SethDavenport

Thank you so much for your sharing. 😍


Dropdown to change locale

see #83
Someone should add comments in routing.yml because my english it not good enough :)

@JulienItard I like the flags, but where are they from? Also, I think we should only add the flags that we're using from now (especially if we know the source, and can find other flags if we need them)

@JulienItard thanks for this. I like it.
My only concern are the flags. I think we should get rid of them. This is one of the classic usability problems, as explained here. Take for the example the Spanish language: it's official in 21 different countries, but we only show the flag for one specific country.

@weaverryan I use this flag https://dribbble.com/shots/1211759-Free-195-Flat-Flags

@JulienItard I'm afraid that's not a good enough reason. Flags cannot be shown in a language selector because countries and languages have nothing to do. In you look around, you'll only see flags when a website lets you select a country, not a language.

please revert the permission changes. Templates and config files have no reason to be executable

Everything is ok now?

I've tested it and from a code point of view, everything looks correct to me.
However, I'd like to suggest some design changes. This is the current design:

The first issue I see is that the icon represents a flag, which has nothing to do with languages ;)  The second issue, is that I think it's better to display the current language name. The last issue is that this selector is usually dispalyed at the rightmost part of the page. Something like this:

It would be nice too if the current language is displayed in bold letters in the language list:

Lastly, if you don't like the fa-language icon, another common alternative is to use fa-globe, which FontAwesome also relates to "translation":

I vote for fa-language icon :+1:

I vote for fa-globe :)

Up

Yeah, it's a bit overhead. What about to add Twig function to return  locale_code => locale_name array of all supported locales.

Yes, it would be better to create a Twig global variable from the locales parameter and use something like: for locale in locales|split('|')

Parameters do not need to be flat strings, they can also contain array values: http://symfony.com/doc/current/components/dependency_injection/parameters.html#array-parameters. You don't need to use the "split" function.

@voronkovich yes, but we want to define the locales in one single parameter and then, define the global Twig variable based on that parameter:
parameters:
    locales: en|fr|de|es|cs|ru|uk|ro|pt_BR

# ...

twig:
    globals:
        locales: %locales%

What about locale human readable names? Maybe somethink like:
twig:
    globals:
        languages:
            en: English
            ru: Russian
            # ... other

@bocharsky-bw, I agree with you. In the template we will need languages names, not only codes.

I was hoping we can define just the locale codes and Symfony will do the magic of displaying the name of each language in its own language (English, Français, Español, etc.)

@javiereguiluz, are you meaning this? http://symfony.com/doc/current/components/intl.html#country-names

Yep, Intl component could help us, but I think we need locales

Good ideas, i'll do it tomorrow.

What do you think about it ?

I think locale menu relates to whole project, not only to Blog, so this method in BlogController a bit confused me. Maybe better to use custom Twig function in order to render locale menu?

Better ?

I like it more :+1:

@JulienItard thanks a lot for implementing this feature, for your patience during the review process and for removing the flags even if you didn't want to do it at first :)

@JulienItard Thanks a lot!


Support filters in YAML path

The replace mechanism only supports selecting the YAML path by object key and array index (e.g. foo.bar.[0].baz). This is quite fragile if you have to replace within arrays.
Example:
# kustomizazion.yaml
images:
- name: frontend
  newTag: v2
- name: backend
  newTag: v2

or
# values.yaml
myapp:
   env:
   - name: FOO
     value: foo
   - name: BAR
     value: bar

Replacing the image tags or the env values requires the array to be in a stable order. Also the replacement path is hard to read if you don't know the YAML file: myapp.env.[1].value -> are we replacing FOO or BAR here?
Possible solution:
JsonPath has filter expressions. Selecting the value of FOO would look like this: myapp.env[?(@.name=='FOO')].value
There is a python library jsonpath-ng which can output the matching paths:
>>> jsonpath_expr = parse('foo[*].baz')
# Matches remember where they came from
>>> [str(match.full_path) for match in jsonpath_expr.find({'foo': [{'baz': 1}, {'baz': 2}]})]
['foo.[0].baz', 'foo.[1].baz']

Those returned full_path strings are exactly the simplified YAML path supported by the GitOpsCLI. We could just plug this library in between and translate complicated JsonPath expressions.
The library even has a short form to specify the filters: myapp.env[?name=='FOO'].value
This solution would be backwards compatible. However, we could also choose to just enable this JsonPath translation feature via CLI flag. Any opinions on that?

Just noticed that jsonpath-ng also has an update function. This could replace the whole self-built path parse & replace. It also works in combination with ruamel.yaml because it only operates on the loaded python objects.
WIP on branch feat/json-path

I would change the implementation in the back for all cli functions instead of using a feature flag. Reasoning: Feature flag could be great for testing, but in the long term will increase support and maintenance / testing efforts.

:tada: This issue has been resolved in version 5.3.0 :tada:
The release is available on:

v5.3.0
GitHub release

Your semantic-release bot :package::rocket:


Serve nested metadata

When defining nested metadata like the following:
---
api_version: v1alpha1
groups:
  - name: Worker
    spec: worker
    metadata:
      fleet:
        public_ip: ...
        metadata: ...

bootcfg will generate the following on requests to /metadata:
FLEET=map[public_ip:...]

I would instead expect the following:
FLEET_PUBLIC_IP=...
FLEET_METADATA=...

Seems like a reasonable expectation. I've seen double __ used as a separator in other contexts, if reversibility is a concern. Also, there is the question of how best to handle metadata containing lists.

lists: I'd be lazy and just skip them for now. Or create a space separated string variable.
double underscores: That would make it impossible to generate CoreOS systemd.service compatible names, like FLEET_METADATA.
I am basically trying to save me some typing and to make the bootcfg file easier to grasp by eliminating common prefixes (which incidentally correspond with the variable prefixes expected by CoreOS systemd.service names).

Closed by #279


issue line 24

hello,
there is a problem on
print("[✓]", end="")
something is wrong with the end=""
if i remove this part,
the formatted print of {folder_name} and {folder_id} are on error too.
can you give me more info for fix theses errors?
Thanks.

Hi,
Can you give us more details about the environment you use and a stack trace of the error you got?
I tested everything on a Windows 10 machine with Python 3.10 and everything worked fine.

ok, thank you for your answer. I've found my issue.
I used python on macOS, but python command refer to python 2.7.
I change python command with python3.9 and it's working.
hope the script change files ownership too, because I've so many files to change ownership .^^

I hope it will. 🙂 However, the ownership changes are a bit limited (~2500 files) due to the continuous e-mail sending which cannot be disabled but I hope it will be enough for you or at least you can get things done after waiting a bit. Let me know if you need any help.

I reopen here.
I test on one folder to change ownership of files inside.
the script can get the name of the folder but after the script finish but the file didn't change ownership.
do you need some screen?


ARROW-15502: [Java] Detect exceptional footer size in Arrow file reader

When a malformed Arrow file containing an extremely large footer size (much larger than the file size) is fed to the ArrowFileReader, our implementation fails detect the problem, due to integer arithmetic overflow.
This will lead to extremely large memory allocation and eventually causing an OutOfMemoryError.

LGTM, just one question about the API change.  Did this come from the fuzzer?  Have you opened up a seperate PR to add the fuzzing file to our corpus to prevent regressions?

LGTM, just one question about the API change. Did this come from the fuzzer? Have you opened up a seperate PR to add the fuzzing file to our corpus to prevent regressions?

@emkornfield Thanks for your feedback. This bug was discovered by the previous (C++) fuzzing files.

LGTM, please go ahead and merge.


[Feature Request] use tags for Blocks

It would be great if we could use tags instead of block ids.  For example #beds or #shulkers rather than adding all the different colors.
Alternatively, if the Blocks could have groups that share settings and be en/disabled together.
Also, be able to reorder the list.

I was thinking about this in the past. I was also very annoying for me to add all shulkers, or beds, or all type of signs. But I didn't come up with good idea how to implement this without rewriting big part of block esp code.

The code you pointed out runs only if you are ingame and you added new block to the list.
Method private void checkBlock(BlockState state, BlockPos pos) checks for block in all other cases, like when server sends you a chunk, or when server sends you block update packets.
The second reason I didn't add this feature was it requires a lot of UI code changes, possibly even more than java code.

I don't know if the client can see or use them.

Normally client can see all tags. But nothing prevents you from implementing mod that adds new tags that are visible only on the server side.

I don't know if the client can see or use them. But being able to group blocks together would be useful, for example, suspicious sand and gravel do not have a tag, but should be searched together.

I was also thinking about this, but again this requires tons of UI changes.

The other thing that would be helpful (though it's pretty minor) would be block state compare too.

I had similar idea to add script where you can write custom conditions for block search. Like checking neighbor blocks, or filter out blocks by Y coordinate.

Block groups added. For other things you can create separate topics.