route when push notification is opened

I want to route the user to a specific screen when they open a push notification. I don't understand how to do this because it seems I can't pass the navigation prop to myhighest order component.
For example, I want to do something like this: http://stackoverflow.com/questions/42359027/react-native-render-a-page-on-push-notification

The solution may involve this https://reactnavigation.org/docs/navigators/#Calling-Navigate-on-Top-Level-Component

I use redux, and have a handler for the push-notification which triggers a navigation-action, works pretty smooth - although the correct view is pushed on the stack when the app is opened (would be neat to have it rendered initially) but works brilliantly for my use-case.

@raubas Where is the handler implemented? On your top level component? If so, I am confused how to use navigationActions from the top level component since I do not know how to dispatch them without access to a screen's navigation prop. Am I being stupid lol?

@ddeanto I have it set up in my root views component did mount where I register for notifications and Deep-links (using branch.io)
Basically I have a onNotification function which extracts all the params needed from the notification, and call:
this.props.dispatch( handleDeepLink(pushparams) )
Then I have som actions defined for handling deep links and navigation,

export function handleDeepLink( pushparams, uri ){
	return async dispatch => {
                // Some additional logic here ofc..
                let { routeName, params } = pushparams
		dispatch( navigate(routeName, params) )
	}
}

export function navigate(routeName, params = {}) {
	return {
		type: NavigationActions.NAVIGATE,
		routeName,
		params
	}
}

@raubas If you use navigate or dispatch reset action. it might redirect to the new screen, not specified route we wanted.
i've tried with this code:
const resetAction = NavigationActions.reset({
			index: 1,
			key: null,
			actions: [
				NavigationActions.navigate({ routeName: 'Home' }),
				NavigationActions.navigate({
					routeName: 'Main',
					params: {changeToTab: 'Message'}
				})
			]
		})
		this.navigator.dispatch(resetAction)

My schema:
StackNavigator

Home (view component)
Main (TabNavigator)

Tab1

Tab2

Now i want to navigate to Main (TabNavigator) and change to Tab2
It works if my app at Home, but if i already in Main or somewhere else, it will stack to new screen.
It would break the navigation flow.

i fixed with this
onPressNotificacion() {
  this.navigator.dispatch(NavigationActions.navigate({ routeName: 'somescreen', params: someParams }));
}

render() {
    return (
        <AppNavigator ref={nav => { this.navigator = nav; }} />
    );
  }

more info:
https://reactnavigation.org/docs/en/navigating-without-navigation-prop.html
https://github.com/react-navigation/react-navigation/issues/71

This took me longer than I wish but so far this has been a simple relatively bulletproof way of handling it with notifications that work with a toast in the foreground and a push notification in the background with 'react-native-push-notification'. The key was the custom deferred to handle when react-navigation wasn't ready yet or loading at the root of the app.
`const SwitchNavigator = createSwitchNavigator(
{
Main: {
screen: mainStackNavigator,
path: 'main',
},
},
{
initialRouteName: 'Main',
}
)
let navigationDeferred = new Deferred()
PushNotification.configure({
onNotification: notification => {
console.log('notification received', notification)
navigationDeferred.promise.then(
navigation =>
notification.foreground
? // toast the message as to not remove the user from what they are doing
// they can click it to go to the target or click the x to dismiss
showToast(navigation, notification)
: // wait until we have a navigation object available to actually navigate
// which happens if the app is just starting
navigateFromPushNotification(navigation, notification.data)
)
notification.finish(PushNotificationIOS.FetchResult.NoData)

},
popInitialNotification: true,
})
function navigateFromPushNotification(navigation, notificationData) {
const config = notificationScreenConfig[notificationData.notificationTypeCode]
if (!config) return
const resetAction = StackActions.reset({
index: 2,
actions: [
NavigationActions.navigate({ routeName: 'Home' }),
NavigationActions.navigate({ routeName: config.parentScreen }),
NavigationActions.navigate({ routeName: 'Notification', params: { notification: notificationData } }),
],
})
navigation.dispatch(resetAction)
}
function Deferred() {
this.promise = new Promise((resolve, reject) => {
this.reject = reject
this.resolve = resolve
})
}
export default class App extends React.Component {
render() {
return <SwitchNavigator ref={navigatorRef => navigationDeferred.resolve(navigatorRef)} />
}
}`

Using @johnculviner response i have added following code into my App.js for handling navigations from push notification.
which will wait for navigation object to be available inside notificationOpen method.
Also for NavigationService file please refer here.
import React, { Component } from "react";
import Nav from "./src/routes";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import store, { persistor } from "./src/redux";
import firebase from "react-native-firebase";

import NavigationService from './src/utils/helpers/NavigationService';

const Deferred = () => {
  var d = {};
  d.promise = new Promise(function(resolve, reject) {
      d.resolve = resolve;
      d.reject = reject;
  });
  return d;
};

const navigationDeferred = new Deferred()

class App extends Component {

  componentDidMount() {
    this.createNotificationListeners();
  }

  async createNotificationListeners() {
    /*
     * Triggered when a particular notification has been received in foreground
     * */
    this.notificationListener = firebase
      .notifications()
      .onNotification(notification => {
        NavigationService.navigate(notification._data.url);
      });

    /*
     * If your app is in background, you can listen for when a notification is clicked / tapped / opened as follows:
     * */
    this.notificationOpenedListener = firebase
      .notifications()
      .onNotificationOpened(async (notificationOpen) => {
        NavigationService.navigate(notificationOpen.notification._data.url);
      });

    /*
     * If your app is closed, you can check if it was opened by a notification being clicked / tapped / opened as follows:
     * */
    const notificationOpen = await firebase
      .notifications()
      .getInitialNotification();
    if (notificationOpen) {
      navigationDeferred.promise.then(() => {
        NavigationService.navigate(notificationOpen.notification._data.url);
      });
    }
    /*
     * Triggered for data only payload in foreground
     * */
    this.messageListener = firebase.messaging().onMessage(message => {
      //process data message
      console.log(JSON.stringify(message));
    });
  }

  render() {
    return (
      <Provider store={store}>
        <PersistGate persistor={persistor}>
          <Nav ref={navigatorRef => {
            NavigationService.setTopLevelNavigator(navigatorRef);
            navigationDeferred.resolve(navigatorRef);
        }} />
        </PersistGate>
      </Provider>
    );
  }
}

export default App;

@zashishz i have the same situation, i set up the code to push notification to my application, after that i dont know how to Navigate to specific screen when notification is clicked, this is my code `import React,{Component} from 'react';
import {Platform, StyleSheet, Text, View, Alert, AsyncStorage} from 'react-native';
import{ createAppContainer,	createSwitchNavigator, createStackNavigator, createBottomTabNavigator  } from 'react-navigation'
import AppNavigator from './components/navigation/Navigator'
import firebase from 'react-native-firebase';
import { MenuProvider } from 'react-native-popup-menu';
import {YellowBox} from 'react-native';
//const AppContainer = createAppContainer(AppNavigator);
//const App = () =>
export default class App extends Component {
constructor(props){
	super(props)
	this.levelsLoaded = false;
}

async componentDidMount() {
	// For push notifications
	this.checkPermission();
	this.createNotificationListeners();
}

componentWillUnmount() {
	this.notificationListener;
	this.notificationOpenedListener;
}

async createNotificationListeners() {

	/*
	* Triggered when a particular notification has been received in foreground
	*
	*/
	this.notificationListener = firebase.notifications().onNotification((notification) => {
		const { title, body } = notification;
		//this.showAlert(title, body);
		//Alert.alert(title, body)
		console.log('notification');

		const localNotification = new firebase.notifications.Notification({
    sound: 'sampleaudio',
	show_in_foreground: true,
  })
 .setSound('sampleaudio.wav')
 .setNotificationId(notification.notificationId)
 .setTitle(notification.title)
 .setBody(notification.body)
 .android.setChannelId('fcm_FirebaseNotifiction_default_channel') // e.g. the id you chose above
 .android.setColor('#000000') // you can set a color here
 .android.setPriority(firebase.notifications.Android.Priority.High);

 firebase.notifications()
   .displayNotification(localNotification)
   .catch(err => console.error(err));
	});

	const channel = new firebase.notifications.Android.Channel('fcm_FirebaseNotifiction_default_channel', 'Demo app name', firebase.notifications.Android.Importance.High)
.setDescription('Demo app description')
.setSound('sampleaudio.wav');

firebase.notifications().android.createChannel(channel);
	/*
	* If your app is in background, you can listen for when a notification is clicked / tapped / opened as follows:
	*
	*/
	this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
		const { title, body,} = notificationOpen.notification;
		console.log('onNotificationOpened: ');
		Alert.alert(title, body)

		//console.log("1notifOpen: " + notificationOpen)
		//console.log("1notif: " + notificationOpen.notification)
	});

	/*
	* If your app is closed, you can check if it was opened by a notification being clicked / tapped / opened as follows:
	*
	*/
	const notificationOpen = await firebase.notifications().getInitialNotification();
	if (notificationOpen) {
		const { title, body } = notificationOpen.notification;
		console.log('getInitialNotification: ');
		Alert.alert(title, body)

		//console.log("2notifOpen: " + notificationOpen)
		//console.log("2notif: " + notificationOpen.notification.title)
	}

	/*
	* Triggered for data only payload in foreground
	*
	*/
	this.messageListener = firebase.messaging().onMessage((message) => {
		//process data message
		console.log("JSON.stringify: ",JSON.stringify(message));
	});
}

// Alert message when a notification is received
/*
showAlert(title, body) {
	Alert.alert(
		title, body,
		[
		{ text: 'OK', onPress: () => console.log('OK Pressed') },
		],
		{ cancelable: false },
	);
}*/

async checkPermission() {
	const enabled = await firebase.messaging().hasPermission();
	if (enabled) {
		// Permission already given
		this.getToken();
	} else {
		this.requestPermission();
	}
}

async getToken() {
	let fcmToken = await AsyncStorage.getItem('fcmToken');
	if (!fcmToken) {
		fcmToken = await firebase.messaging().getToken();
		if (fcmToken) {
			// user has a device token
			await AsyncStorage.setItem('fcmToken', fcmToken);
		}
	}
	//alert("token: " + fcmToken)
	console.log("token: " + fcmToken)
}

async requestPermission() {
	try {
		await firebase.messaging().requestPermission();
		// User has authorised
		this.getToken();
	} catch (error) {
		// User has rejected permissions
		console.log('permission rejected');
	}
}

render() {
	const AppContainer = createAppContainer(AppNavigator);
	return (
		<MenuProvider>
			<AppContainer/>
		</MenuProvider>
	);
}

}
`

@zashishz i have the same situation, i set up the code to push notification to my application, after that i dont know how to Navigate to specific screen when notification is clicked, this is my code.
`
import React,{Component} from 'react';
import {Platform, StyleSheet, Text, View, Alert, AsyncStorage} from 'react-native';
import{ createAppContainer,	createSwitchNavigator, createStackNavigator, createBottomTabNavigator  } from 'react-navigation'
import AppNavigator from './components/navigation/Navigator'
import firebase from 'react-native-firebase';
import { MenuProvider } from 'react-native-popup-menu';
import {YellowBox} from 'react-native';
//const AppContainer = createAppContainer(AppNavigator);
//const App = () =>
export default class App extends Component {
constructor(props){
	super(props)
	this.levelsLoaded = false;
}

async componentDidMount() {
	// For push notifications
	this.checkPermission();
	this.createNotificationListeners();
}

componentWillUnmount() {
	this.notificationListener;
	this.notificationOpenedListener;
}

async createNotificationListeners() {

	/*
	* Triggered when a particular notification has been received in foreground
	*
	*/
	this.notificationListener = firebase.notifications().onNotification((notification) => {
		const { title, body } = notification;
		//this.showAlert(title, body);
		//Alert.alert(title, body)
		console.log('notification');

		const localNotification = new firebase.notifications.Notification({
    sound: 'sampleaudio',
	show_in_foreground: true,
  })
 .setSound('sampleaudio.wav')
 .setNotificationId(notification.notificationId)
 .setTitle(notification.title)
 .setBody(notification.body)
 .android.setChannelId('fcm_FirebaseNotifiction_default_channel') // e.g. the id you chose above
 .android.setColor('#000000') // you can set a color here
 .android.setPriority(firebase.notifications.Android.Priority.High);

 firebase.notifications()
   .displayNotification(localNotification)
   .catch(err => console.error(err));
	});

	const channel = new firebase.notifications.Android.Channel('fcm_FirebaseNotifiction_default_channel', 'Demo app name', firebase.notifications.Android.Importance.High)
.setDescription('Demo app description')
.setSound('sampleaudio.wav');

firebase.notifications().android.createChannel(channel);
	/*
	* If your app is in background, you can listen for when a notification is clicked / tapped / opened as follows:
	*
	*/
	this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
		const { title, body,} = notificationOpen.notification;
		console.log('onNotificationOpened: ');
		Alert.alert(title, body)

		//console.log("1notifOpen: " + notificationOpen)
		//console.log("1notif: " + notificationOpen.notification)
	});

	/*
	* If your app is closed, you can check if it was opened by a notification being clicked / tapped / opened as follows:
	*
	*/
	const notificationOpen = await firebase.notifications().getInitialNotification();
	if (notificationOpen) {
		const { title, body } = notificationOpen.notification;
		console.log('getInitialNotification: ');
		Alert.alert(title, body)

		//console.log("2notifOpen: " + notificationOpen)
		//console.log("2notif: " + notificationOpen.notification.title)
	}

	/*
	* Triggered for data only payload in foreground
	*
	*/
	this.messageListener = firebase.messaging().onMessage((message) => {
		//process data message
		console.log("JSON.stringify: ",JSON.stringify(message));
	});
}

// Alert message when a notification is received
/*
showAlert(title, body) {
	Alert.alert(
		title, body,
		[
		{ text: 'OK', onPress: () => console.log('OK Pressed') },
		],
		{ cancelable: false },
	);
}*/

async checkPermission() {
	const enabled = await firebase.messaging().hasPermission();
	if (enabled) {
		// Permission already given
		this.getToken();
	} else {
		this.requestPermission();
	}
}

async getToken() {
	let fcmToken = await AsyncStorage.getItem('fcmToken');
	if (!fcmToken) {
		fcmToken = await firebase.messaging().getToken();
		if (fcmToken) {
			// user has a device token
			await AsyncStorage.setItem('fcmToken', fcmToken);
		}
	}
	//alert("token: " + fcmToken)
	console.log("token: " + fcmToken)
}

async requestPermission() {
	try {
		await firebase.messaging().requestPermission();
		// User has authorised
		this.getToken();
	} catch (error) {
		// User has rejected permissions
		console.log('permission rejected');
	}
}

render() {
	const AppContainer = createAppContainer(AppNavigator);
	return (
		<MenuProvider>
			<AppContainer/>
		</MenuProvider>
	);
}

}
`

@zashishz i have the same situation, i set up the code of push notificatio, and i receive the notif in my app when i send it by postman, but i dont know how to navigate to specific screen when notification is clicked.
this is my code if can you help plz :
`import React,{Component} from 'react';
import {Platform, StyleSheet, Text, View, Alert, AsyncStorage} from 'react-native';
import{ createAppContainer, } from 'react-navigation'
import AppNavigator from './components/navigation/Navigator'
import firebase from 'react-native-firebase';
import { MenuProvider } from 'react-native-popup-menu';
import {YellowBox} from 'react-native';
export default class App extends Component {
constructor(props){
	super(props)
	this.levelsLoaded = false;
}
async componentDidMount() {
	// For push notifications
	this.checkPermission();
	this.createNotificationListeners();
}
componentWillUnmount() {
	this.notificationListener;
	this.notificationOpenedListener;
}

async createNotificationListeners() {
	/*
	* Triggered when a particular notification has been received in foreground
	*/
	this.notificationListener = firebase.notifications().onNotification((notification) => {
		const { title, body } = notification;
		//this.showAlert(title, body);
		//Alert.alert(title, body)
		console.log('notification');
		const localNotification = new firebase.notifications.Notification({
                sound: 'sampleaudio',
	                show_in_foreground: true,
  })
 .setSound('sampleaudio.wav')
 .setNotificationId(notification.notificationId)
 .setTitle(notification.title)
 .setBody(notification.body)
 .android.setChannelId('fcm_FirebaseNotifiction_default_channel') // e.g. the id you chose above
 .android.setColor('#000000') // you can set a color here
 .android.setPriority(firebase.notifications.Android.Priority.High);
 firebase.notifications()
   .displayNotification(localNotification)
   .catch(err => console.error(err));
	});
	const channel = new firebase.notifications.Android.Channel('fcm_FirebaseNotifiction_default_channel', 'Demo app name', firebase.notifications.Android.Importance.High)
.setDescription('Demo app description')
.setSound('sampleaudio.wav');

firebase.notifications().android.createChannel(channel);
/*
* If your app is in background, you can listen for when a notification is clicked / tapped / opened as follows:
/
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
const { title, body,} = notificationOpen.notification;
console.log('onNotificationOpened: ');
Alert.alert(title, body)
});
/
* If your app is closed, you can check if it was opened by a notification being clicked / tapped / opened as follows:
/
const notificationOpen = await firebase.notifications().getInitialNotification();
if (notificationOpen) {
const { title, body } = notificationOpen.notification;
console.log('getInitialNotification: ');
Alert.alert(title, body)
}
/
* Triggered for data only payload in foreground
*/
this.messageListener = firebase.messaging().onMessage((message) => {
//process data message
console.log("JSON.stringify: ",JSON.stringify(message));
});
}
async checkPermission() {
const enabled = await firebase.messaging().hasPermission();
if (enabled) {
// Permission already given
this.getToken();
} else {
this.requestPermission();
}
}
async getToken() {
let fcmToken = await AsyncStorage.getItem('fcmToken');
if (!fcmToken) {
fcmToken = await firebase.messaging().getToken();
if (fcmToken) {
// user has a device token
await AsyncStorage.setItem('fcmToken', fcmToken);
}
}
//alert("token: " + fcmToken)
console.log("token: " + fcmToken)
}
async requestPermission() {
try {
await firebase.messaging().requestPermission();
// User has authorised
this.getToken();
} catch (error) {
// User has rejected permissions
console.log('permission rejected');
}
}
render() {
const AppContainer = createAppContainer(AppNavigator);
return (

###

);
}
}`

@zashishz can you please attatch your all code releted other files for better understanding.
thank you :)


Add option to exit with non-zero exit code

Hey, and thanks for this useful package!
I'm using a yarn-version of this library (yarn-audit-html) myself in a CI-pipeline. I realized that with this version and the yarn-version, even if just basic audit (npm or yarn) command exits with code "1" when vulnerabilities were found, using either of these libraries ignore that exit code and instead the program exits with code "0" after creating the audit report. Exiting with code other than "0" could be useful in pipelines for example when determining if some script should be executed when vulnerabilities are found. This could also be optional with some flag given as a parameter.
My flow in the CI-job for example works like this (job is ran in an scheduled pipeline every week):

Install npm-audit-html as local dependency (not global)
Configure email-utilities in the CI-runner
Run npm audit --json | ./node_modules/.bin/npm-audit-html --output audit.html
If vulnerabilities are found (if exit code !== 0), send the audit.html report in an email to predetermined recipients. If not (if exit code === 0), just print "No vulnerabilities found."

I have a working implementation almost ready, and can make a pull request, if this feels like a useful feature.

This can be done already but simply running npm audit twice. Once to generate the report and once to check the exit code. I do this as a part of my CI pipeline so that it generates the report and then fails the job if there are vulnerabilities.
But, passing the exit code would probably be a more efficient method so if you have a working implementation, feel free to create a PR!

This can be done already but simply running npm audit twice. Once to generate the report and once to check the exit code. I do this as a part of my CI pipeline so that it generates the report and then fails the job if there are vulnerabilities.
But, passing the exit code would probably be a more efficient method so if you have a working implementation, feel free to create a PR!

Sure yeah, that was my initial thought as well! But this change seemed like a simple little enhancement to implement. :slightly_smiling_face: PR created!

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Difference between running the algorithm on browser and nodeJS

Node Version: 14.16.0
Face-api.js : master cloned
Chrome version :  89.0.4389.90 (Official Build) (64-bit)
I was running tests to see the difference between how the algorithm performs on the two platforms. For some reason, nodeJS is able to find images in the same image in which browser fails to find. An example of this would be : George_W_Bush_0137.jpg from the Labelled faces in the wild dataset.
Shouldn't the encoding algorithm be platform agnostic. Why exactly does this happen?
Standalone code to encode on browser:
<!DOCTYPE html>

  <input type="file" id="file" name="file"/>

    <button id = "run" onclick="run()">Run</button>

NodeJS:
//encodes one image, path of which is supplied

const fsPromises = require('fs/promises');
const path = require('path');
const process = require('process');

const faceapi = require('face-api.js')
const { canvas, faceDetectionNet, faceDetectionOptions } = require('./commons');

async function run(){

    //load models
    await faceDetectionNet.loadFromDisk('../../weights')
    await faceapi.nets.faceLandmark68Net.loadFromDisk('../../weights')
    await faceapi.nets.faceRecognitionNet.loadFromDisk('../../weights')

    const encoding = await calculateEncoding(process.argv[2]);

    console.log(encoding);

}

async function calculateEncoding(imagePath){

    const img = await canvas.loadImage(imagePath);

    //We want to detect the best face in each file
    const result = await faceapi.detectSingleFace(img, faceDetectionOptions)
    .withFaceLandmarks()
    .withFaceDescriptor()

    //only if face found
    if(result != undefined)
        return result.descriptor;
    else
        return undefined;

}

run();

what are actual detect options? in browser case, you're calling undocumented function getFaceDetectorOptions and in node case, you're importing from commons - neither is known.
also, why the difference in loading (plus mix&match methods)? use faceapi.nets.ssdMobilenetv1.load and faceapi.nets.ssdMobilenetv1.loadFromDisk

I've been using the examples provided. They point to the same code, but to make sure that wasn't the reason, here are the updated parts
nodeJS:
    await faceapi.nets.ssdMobilenetv1.loadFromDisk('../../weights')
    await faceapi.nets.faceLandmark68Net.loadFromDisk('../../weights')
    await faceapi.nets.faceRecognitionNet.loadFromDisk('../../weights')
-----

    //We want to detect the best face in each file
    const result = await faceapi.detectSingleFace(img, new faceapi.SsdMobilenetv1Options({ minConfidence }))
    .withFaceLandmarks()
    .withFaceDescriptor()

Browser:
    await faceapi.nets.ssdMobilenetv1.load('../../../weights')
    await faceapi.nets.faceLandmark68Net.load('../../../weights')
    await faceapi.nets.faceRecognitionNet.load('../../../weights')

    //We want to detect the best face in each file
    const result = await faceapi.detectSingleFace(img, new faceapi.SsdMobilenetv1Options({ minConfidence }))
    .withFaceLandmarks()
    .withFaceDescriptor()

The results are still the same.

This made me really curious...
I wrote a quick test and moved image loading and conversion to tensor out of FaceAPI to eliminate that part
And yes, Browser and NodeJS return different values
But in Browser, both WebGL and WASM return same values
So it's not a image loading and not backend specific
And it's not a different model as FaceAPI makes no distinction when running inference on browser vs node
So what's different? This is just a guess, but tf.image.resizeBilinear has different defaults in TFJS and TF
For example, property alignCorners is not specified by FaceAPI, so it's interpreted as false in TFJS and true in TF
It makes sense as when you look at result outputs, bounding box is slightly shifted (by about half a pixel)
And that's enough to create a small cascading differences in descriptor and elsewhere
Now, if there is an actual reason to "fix" this,
I can do that in my newer fork https://github.com/vladmandic/face-api
Otherwise, this will stay as curiosity

Yes, has me baffled for a couple of days.
I tried that. The flow doesn't even go in the conditional loop for the example image mentioned.
          if (imgTensor.shape[1] !== inputSize || imgTensor.shape[2] !== inputSize) {
            imgTensor = tf.image.resizeBilinear(imgTensor, [inputSize, inputSize], true);
            console.log("resizeBilinear alignCorners arg changed to true");
          }

But do check it on your end as I'm not familiar with the codebase and there might be something that I'm missing.
Don't you think fixing this or at least finding the root cause would be beneficial as it looks like the browser is underperforming. However, I've only found two instances (yet) so concluding that browser always underperforms might be naive. Yes, I did look at your fork. Kudos on the work!. Should I open an issue in your fork, so the problem can be resolved there.

yes, i was wrong. but at least i managed to find it at the end - seems its an actual bug in implementation of tf.conv2d
actual function in FaceAPI is pointwiseConvLayer which is literary first operation performed in mobileNetV1 model implementation - so this tiny change cascades down to eventually create a difference you're seeing.
see https://github.com/tensorflow/tfjs/issues/4843 for details

@mayankagarwal-cf
just closing the loop...
it seems that issue was conv2d implementation in old TF1 binaries which were used by tfjs-node
tfjs-node 3.5.0 finally ships with TF2 binaries and this issue is resolved


Improve the operability

New API
FloatingPanelController
Enable to cancel the scroll view tracking
- public func track(scrollView: UIScrollView) {
+ public func track(scrollView: UIScrollView?) {

FloatingPanelControllerDelegate
You can stop to begin dragging on the conditions. It's useful to handle other pan gestures or touches simultaneously with a floating panel.
+ public func floatingPanelShouldBeginDragging(_:)

FloatingPanelBehavior
Add  2 methods to configure the momentum projection
+ func shouldProjectMomentum(_ fpc: FloatingPanelController, for proposedTargetPosition: FloatingPanelPosition) -> Bool`
+ func momentumProjectionRate(_ fpc: FloatingPanelController) -> CGFloat

FloatingPanelFullScreenLayout
You can configure all insets of the surface from the superview(FloatingPanelController.view), not from the safe area.
Improvements
Core

Move the surface view by a top layout constraint, not by modifying the frame directly.
Should always recognize tap/long press gestures in parallel
Normalize the projected position
Modify disabling the bottom constraint on top overflow.

Layout/Behavior

Make the default animation interruptible by the pan gesture
Open the default layout/behavior

Samples

Add a sample of the advanced layout animation

Bugfixes

Fix #133: FloatingPanel can be dragged outside safe area (with new logic)

Rebase it by v1.3.3

[ ] Check regression of  #126

Fix #133

I extracted some major bug fixes from it to fix-interaction branch.


After Update to the latest version KeyError: 'allinone'

Hi there,
after I updated to the latest version I am getting the following error:
2024-05-13 15:40:22.136 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up monitor_docker platform for sensor

Traceback (most recent call last):

  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform

    await asyncio.shield(awaitable)

  File "/config/custom_components/monitor_docker/sensor.py", line 147, in async_setup_platform

    CONTAINER_MONITOR_LIST[CONTAINER_INFO_ALLINONE],

    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

KeyError: 'allinone'

I haven't changed anything in my config:
monitor_docker:
  - name: Docker
    switchenabled: false
    monitored_conditions:
      - state
      - status
      - image
      - allinone

Any ideas?

Same

Same for me: after the update, I have the following error:
Error while setting up monitor_docker platform for sensor
... with the following specification:
KeyError: 'allinone'

I can reproduce the error, but I do not have a direct working solution (I can remove the error, but allinone then still does not work). I need to debug more to figure out where it goes wrong.

I removed "allinone" and it worked again... thanks!

Fixed in 1.16, which I just published.


Odd visual artifact when one originally opens the Git Tool

It's the grey rectangle in the middle-ish of the screen, if one clicks on it it expands. When using the scene driller seems to be a GtGitDefinitionsElement that should be originally hidden if no repo is chosen.

Hey! This one has been on my list to investigate for a bit, but I haven’t gotten around to it and hadn’t opened an issue yet. Thank you!

This should be fixed now/in the next release :)


NTP-587: Update tutor training registration link

Changes proposed in this pull request
The Tutor Training link has changed.
Link to Jira ticket
https://dfedigital.atlassian.net/browse/NTP-587
Things to check

[x] Title is in the format "NTP-XXX: Short description" where NTP-XXX is the Jira ticket reference
[x] Code and tests follow the coding standards
[x] dotnet format has been run in the repository root
[x] Test coverage of new code is at least 80%
[x] All UI related acceptance criteria specified in the ticket have been added to the relevant cypress test feature file(s)
[x] Unless explicitly mentioned in the ticket, all UI work should have been tested as working on desktop and mobile resolutions with JavaScript on and off
[x] Database migrations can be applied to the current codebase in main without causing exceptions
[x] Debug logging has been added after all logic decision points
[x] All automated testing including accessibility and security has been run against your code
[ ] PR deployment has been signed off by wider team

https://dfedigital.atlassian.net/browse/NTP-587?focusedCommentId=48490


Getting a zero gradient from autograd after vectorising function

This post concerns a new problem that emerged from solving an issue I had opened here: https://github.com/google/jax/issues/1318.
I have a function, whose gradient I am trying to calculate using autograd. I had previously used autograd.grad() with success, but I need to speed this up, hence I turned to jax,grad(). Initially (see the above link), the function was not properly vectorised (there were many loops instead of vector operations), and hence jax.grad() was taking infinitely long to calculate the gradient, and often even killing the kernel.
PROBLEM:
After vectorising, I no longer get this problem. The gradient calculates smoothly, but instead, I get a zero gradient, using both autograd.grad() and jax.grad()! The scalar returned by the function, however, is still the same. So, something happened during the vectorisation procedure that prevents both autograd and jax from calculating the true gradient. Can someone please help me figure out what?
EXAMPLE CODE:
Here is a colab notebook containing a self-sufficient example: https://colab.research.google.com/drive/1VCPiRTLfxOflooDtTlqHI4VzYQkXzaUn
I have put in three scenarios.

The original code (pre-vectorisation), with gradient calculated using autograd.grad. This gives values for the scalar that I trust, and also a gradient that I feel that I can trust. At least, it's non-zero.
Vectorised code, using autograd.numpy and autograd.grad. I get back the same scalar values, but a zero gradient.
Vectorised code, using jax functions (jax.numpy, jax.vmap, jax.grad, etc.). Again, I get back the same scalar values, but a zero gradient.

Any update on this issue? I'm getting similar behavior after vectorizing my model.

I'm sorry we didn't get a chance to look at this issue before now. There are two bugs in your code.
The first is that jax.ops.index_update returns a new copy of the array, rather than updating in-place. See https://jax.readthedocs.io/en/latest/_autosummary/jax.ops.index_update.html#jax.ops.index_update
So you must write something like:
    curvVector = index_update(curvVector, 1, aVector[4]) # c12 = aVector[4]

The second is that in getCurvatures you wrote xyzInit where you probably meant xyz:
partialFunc = partial(getCurvature_triangle, xyzInit)

vs.
partialFunc = partial(getCurvature_triangle, xyz)

This bug means that there is no dependence of the xyz input on the output, so the gradient indeed is 0.
With these two issues fixed, a non-zero gradient is produced.
Hope that helps!


Dropbox Backup

Is it possible to make notes titles legible (preferably with the exact title name I created the note on Joplin)?
The backup plugin renames them to a random name, this way is very complicated to locate some specific note I'd like to save as a single file in my PC or send someone.

If RAW is selected as the Export format, this is completely normal, as this is the Joplin RAW data. MD frontmatter can still be selected and Joplin will create files with the note names.

Where can I find this setting? I tried and didn't find it

This Plugin is not availabile for Andorid, only Desktop. I thonk you are using the Sync and the Sync is no Backup and has nothin to do with this Plugin.

Yes, I mean the sync plugin, sorry about that.
So it's not possible to sync to dropbox with the normal title of the notes instead of the random titles?


Can't install on Centos 7.7

Error: This version of µWS is not compatible with your Node.js build:
Error: /lib64/libc.so.6: version `GLIBC_2.18' not found
How to fix ? i had tried but can't install glibc-2.18 on Centos 7.7

Install latest node.js version

i was tried with nodejs 13 but still the same error

It works with v15.11.0
npm install -g uNetworking/uWebSockets.js#v15.11.0
(before you must delete local uWebSockets.js)


Can one perform queries on multiple indices with this plugin?

I would like to create visualizations using data from different indices. Is that possible directly or do I need to use jquery and perform ajax calls?  Thanks for the super useful plugin.
Is there anyway to have user input with this plugin?

When selecting a Kibana index pattern, you can choose an index pattern containing multiple indices.  We suggest that indices that are queryable together should be named with a common prefix like logs-<app>-*  that way if you want to query all logs, you can create an index pattern called logs-*


Bumping to monaco 0.14.2

With adaptation for the changes in the symbol API

I've added the missing conversion

@Twinside it looks good, thank you. I would like to test new Monaco with Theia before merging to make sure that there is no any new UI quirks.

@akosyakov any update on your merging tests? Looking forward to get this PR merged so we can upgrade as well. A bunch of new cool features should be available with that.

Just published v0.8.0 with these changes.


Error gracefully

When KAlastatic is not found, tell the user to fix their face.

Fixed with https://github.com/kalamuna/kalastatic_dot_module/commit/90836c51a54f978d64974741f7ae1e236488f729


Drag and Drop is not working

I have downloaded the project and added npm modules. I see drag and drop is not working.
anything I'm missing? here package.json file
{
  "name": "react-forms-builder",
  "version": "0.0.3",
  "description": "A complete form builder for react.",
  "main": "lib/app.js",
  "scripts": {
    "test": "mocha --compilers js:babel-core/register --recursive",
    "start": "webpack-dev-server --hot --inline",
    "dist": "webpack -p --config webpack.production.config.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/blackjk3/react-form-builder.git"
  },
  "keywords": [
    "react",
    "react-component",
    "form",
    "builder",
    "ui",
    "drag",
    "drop"
  ],
  "author": "Jason Kadrmas",
  "license": "MIT",
  "dependencies": {
    "classnames": "^2.1.3",
    "fbemitter": "^2.0.0",
    "jquery": "^3.2.1",
    "moment": "^2.13.0",
    "react-anything-sortable": "^0.2.2",
    "react-bootstrap-native-slider": "2.0.1",
    "react-datepicker": "^0.27.0",
    "react-select": "^0.5.5",
    "react-signature-pad": "0.0.6",
    "react-sortable-items": "0.0.7",
    "react-star-rating": "git+https://github.com/blackjk3/react-star-rating.git",
    "react-textarea-autosize": "^2.3.1",
    "reflux": "^0.2.8",
    "xss": "^0.2.13"
  },
  "peerDependencies": {
    "react": "^0.14.0 || ^15.0.0"
  },
  "devDependencies": {
    "babel": "6.23.0",
    "babel-core": "6.24.1",
    "babel-loader": "6.4.1",
    "babel-preset-es2015": "6.24.1",
    "babel-preset-react": "6.24.1",
    "babel-register": "6.24.1",
    "canvas": "1.6.5",
    "css-loader": "^0.16.0",
    "draft-js": "^0.10.0",
    "draftjs-to-html": "^0.6.1",
    "immutable": "^3.8.1",
    "jsdom": "3.1.2",
    "mocha": "^3.3.0",
    "mocha-jsdom": "^1.1.0",
    "node-libs-browser": "^1.0.0",
    "node-sass": "^4.7.2",
    "react": "^0.14.7",
    "react-dom": "^0.14.7",
    "react-draft-wysiwyg": "1.7.0",
    "react-hot-loader": "^1.2.7",
    "react-tools": "0.13.3",
    "sass-loader": "^2.0.1",
    "source-map": "^0.5.6",
    "style-loader": "^0.12.3",
    "webpack": "^1.10.1",
    "webpack-dev-server": "^1.10.1"
  },
  "bugs": {
    "url": "https://github.com/blackjk3/react-form-builder/issues"
  },
  "homepage": "https://github.com/blackjk3/react-form-builder#readme"
}

This project is very old, I did not make everything work update D&D work with react-dnd with react v16 here https://github.com/Kiho/react-form-builder

Nice!!! @Kiho


Fix "EXDEV: cross-device link not permitted" error

It looks like this error was introduced in PR #1150. I'm currently developing on Windows from a D:\ drive, while my temp directory is on C:\.  It turns out that Node cannot do cross-device renames so a module, called mv, was created for that very purpose. I swapped in this module in place of rename from mz/fs and I'm now able to build.
Here are some references I came across while debugging this:
https://github.com/facebook/nuclide/pull/94
http://stackoverflow.com/q/37153666
http://stackoverflow.com/q/12196163

This looks really nice. Thanks.

Thanks for fixing!
IMO, this justifies an npm push asap, especially since the error is not only occurring on windows.
I'm currently using a mac but just bumped into this, as my work and temp folders are on different volumes.


Futhark does not work on Windows.

I tried it. The futhark-c cannot find a header file and futhark-opencl's parser goes into an infinite loop. To be honest I am not sure if running a Linux application is supposed to give an error message or if the Haskell compiler did try to produce a Windows binary - I am guessing it is the later - but it does not work at the moment.
It might be good to note this on the main page for the time being.

Thank you for the report.  I am not surprised that there are problems,
given that nobody here has tried to run it on a Windows machine, but I
am surprised at how they manifest themselves.
The generated C code includes headers that I think are POSIX-specific
(errno,h, sys/time.h, getopt.h, etc).  That can be fixed, or maybe
replaced with portable alternatives.
I am more surprised that futhark-opencl goes into an infinite loop
while parsing.  The Futhark compiler itself should not have any platform
dependent code, and the parser is exactly the same as in futhark-c.
Could you check that it's not actually the final linking stage (which
invokves gcc with possibly platform-dependent flags) that fails?
--
\  Troels
/\ Henriksen

Actually, could you provide the error message you get?  I'm not entirely sure which header file is missing.

Before I do that I have another question.
fact.c:18:21: fatal error: CL/cl.h: No such file or directory
   #include <CL/cl.h>

I am guessing that I am missing OpenCL which is why the above is failing on Ubuntu 14.04. Was OpenCL supposed to come with Cuda? When I installed 7.5 to run Tensorflow yesterday it actually crashed the OS and I had to scramble around to manually remove the offending packages. OpenCL might have gotten lost in the confusion. Or does it maybe come with a separate package? I cannot find anything with apt-get though.
I'll fetch the Windows error messages momentarily...

gcc failed with code 1:
fact.c:10:17: fatal error: err.h: No such file or directory
 #include <err.h>
                 ^
compilation terminated.

The above is for both futhark-c and futhark-opencl. I remembered incorrectly.
futharki goes into an infinite loop of...
Left Parse error: End of file
Left Parse error: End of file
Left Parse error: End of file
...

...error messages.

I have seen CUDA being installed in /usr/local before, in which case the include files are not in the default include path.  You can fix it by prepending /usr/local/cuda/include to your CPATH:
export CPATH=/usr/local/cuda/include:$CPATH

(I don't know why this varies between systems.)
With respect to futharki, yeah, the parser broke at some point.  Don't worry though, you're not missing much: the interactive form of futharki just spits out the AST of whatever expression you entered.  It was never actually finished as a useful REPL.  I'll make an issue for it.

Oh, and I'll try to think of a way to fix that Windows compilation issue.

I just realized that futharki is broken on Linux as well.

I just pushed a fix that removes the use of the nonstandard err.h header.  Could you check that it works on Windows?

Ok. Also your suggestion to add the Cuda directory to CPATH worked. Right now I am trying to wrap my head around some of the examples. I'll check whether it works on Windows.
Right now, Linux seems to be unstable so if Futhark could be made to work on Windows, I'd like it very much.

I also just pushed a fix for the futharki issue, but as mentioned, it's still not a usable tool.

Ok, futhark-c work on Windows now. futhark-opencl spits out this error message:
gcc failed with code 1:
fact.c: In function 'opencl_succeed':
fact.c:133:5: warning: implicit declaration of function 'errx' [-Wimplicit-function-declaration]
     errx(-1, "%s:%d: OpenCL call\n  %s\nfailed with error code %d (%s)\n",
     ^
fact.c: At top level:
fact.c:582:1: error: unknown type name 'suseconds_t'
 static suseconds_t reduce_kernel_97total_runtime = 0;
 ^
fact.c:585:1: error: unknown type name 'suseconds_t'
 static suseconds_t reduce_kernel_110total_runtime = 0;
 ^
fact.c: In function 'futhark_main':
fact.c:1533:13: error: unknown type name 'suseconds_t'
             suseconds_t time_diff_141 = time_end_140.tv_sec * 1000000 +
             ^
fact.c:1581:13: error: unknown type name 'suseconds_t'
             suseconds_t time_diff_146 = time_end_145.tv_sec * 1000000 +
             ^
fact.c: In function 'main':
fact.c:1974:5: error: unknown type name 'suseconds_t'
     suseconds_t total_runtime = 0;
     ^
fact.c:1975:5: error: unknown type name 'suseconds_t'
     suseconds_t total_runs = 0;
     ^

At first it could not find the cl.h file, but after I added it to path the above is happening. I am using the GCC 4.8.0 compiler.

I got rid of the final calls to errx() and replaced suseconds_t with int.  It might work now.

Hmmm, I can't synchronize my fork with this one. Give me a bit...

gcc failed with code 1:
c:/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lOpenCL
collect2.exe: error: ld returned 1 exit status

This is what I get now.

I tried adding C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64 where the OpenCL.lib is located to CPATH, but no such luck. Maybe I need to add the directory to some other variable?

I though that adding the directory to LD_LIBRARY_PATH might work, but no such luck. Is it trying to load the .so version of the library maybe?

I'm not sure what the Windows version of GCC looks for.  I'd guess a DLL.

There are some complicated instructions for how to link to OpenCL here: https://stackoverflow.com/questions/15185955/compile-opencl-on-mingw-nvidia-sdk
I have a hard time believing it's really supposed to be this complicated, though.

According to this guide, what you are doing should essentially work.  Are you sure that you modified CPATH correctly?  (I have no idea where that is done on Windows.)  Maybe there is an issue where the backslashes are interpreted by the shell, thus mangling the file name?

I'll give that guide a try. As to where I put the CPATH, it was in the environment variables. Windows has something similar to Linux in the system options. I'll double check it.

I followed the instructions in that guide and the program compiles. When I try to run it though, it crashes without any error message. I'll try going through it in a debugger, though I am not sure what to do at this point. Maybe I'll try compiling the example in Visual C++.

Maybe you have to log in and out for the environment variables to take effect.  It used to be that way in Windows XP I think - how much can things change in a mere fifteen years? (Also, double-check the quoting rules.)
I think to run the program, you need to make sure that the OpenCL DLL is available - for example by putting it in the same directory as the program.  There is probably also some sort of include path for DLLs, but this is beyond my knowledge of Windows.
Does futhark-c at least work properly?

Yes, futhark-c does.
Yeah, the debugger does give me proc_not_found, so maybe your idea of putting the OpenCL dll into the directory might have merit. In Windows 10, you do not need to log in and out, just apply the changes and restart the command prompt.
I'll look into locating the opencl.dll now.

As it turns out there are a few in my system, including the Windows directory and I have no idea why one the program is trying to use. It could be using the 32 bit version incorrectly for all I know. The OpenCL version used by Nvidia is apparently also out of date.
Erm, let me try to get anything in OpenCL working whether in VS or GCC and I'll trace my steps to here from there.

Right, NVIDIA only supports 1.2 or thereabouts.  That should not be a problem for the simple example program, and it is certainly not a problem for Futhark (our department only really has NVIDIA hardware, unfortunately).
It may be that the program runs succesfully (well, it always exit(1)s for some reason), but that it simply does not find any OpenCL devices, and thus produces no output.  OpenCL is really a wrapper library around things called "ICD"s, which are the real device-specific drivers.  On Linux, these ICDs are stored in /etc/OpenCL/vendors, but I have no idea where they may be on Windows.

I can confirm that the example in the guide compiles and runs just fine in Visual C++.
I tried putting in the fact.c produced by futhark-opencl into VC, but they aren't compatible. VC flags the implicit conversions from void * to char * as errors. I'll try looking around and asking on Stack Overflow next for lack of better option.

mrakgr<EMAIL_ADDRESS>writes:

I can confirm that the example in the guide compiles and runs just fine in Visual C++.
I tried putting in the fact.c produced by futhark-opencl into VC,
but they aren't compatible. VC flags the implicit conversions from
void * to char * as errors. I'll try looking around and asking on
Stack Overflow next for lack of better option.

Alright.  I'll see if I can find those casts and make them explicit.  I
guess they are because Visual C++ uses a C++ compiler, and C++ has
stricter type rules?
--
\  Troels
/\ Henriksen

I do not have much experience with GCC, but that is what I have read.
Also #include <sys/time.h> and #include <getopt.h> cannot be found, so the methods that use the stuff from that header are also flagged as type errors.

Well, I have pushed a patch that makes Futhark generate valid C++.  That may come in handy someday for other reasons.  However, if Visual C++ does not provide sys/time.h and getopt.h, then I am skeptical about getting it to work.  Replacing those would be much more work than the fixes I've committed so far.
I can only suggest finding out why the MinGW toolchain fails to build OpenCL programs.  As far as I can see, Futhark now does what it's supposed to do (although I'm not opposed to tacking on more compiler flags on Windows, if necessary).

I'll try using the reimp tool as soon as I figure out how to get it. That should work. It seems that MingW needs to compile directly against the dll or something like that.

Ok, I've tried everything from the first SO post. I've installed mingw-utils, found the reimp tool, tried to use it on the OpenCL.lib, but it failed unfortunately with an invalid or corrupt library error. After that I went for the alternative and used the dlltool on the .def file that I found in one of the posts. I finally figured out how to link to libOpenCL.a, but it seems that the library has changed in some way as I get the following error:
C:\futhark\examples>g++ -std=c++0x -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\include" main.cpp -L"C:\futhark\examples" -lOpenCL -o main.exe
C:\Users\Marko\AppData\Local\Temp\ccA4Tua5.o:main.cpp:(.text+0x10f): undefined reference to `clGetPlatformInfo'
C:\Users\Marko\AppData\Local\Temp\ccA4Tua5.o:main.cpp:(.text+0x165): undefined reference to `clGetPlatformInfo'
C:\Users\Marko\AppData\Local\Temp\ccA4Tua5.o:main.cpp:(.text+0x1b0): undefined reference to `clGetDeviceInfo'
c:/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Marko\AppData\Local\Temp\ccA4Tua5.o: bad reloc address 0x0 in section `.pdata$_ZNSt11char_traitsIcE6assignERcRKc'
collect2.exe: error: ld returned 1 exit status

So close and yet so far. That is cross platform development for you. I think I did all I could with my current knowledge. I think that I'll switch to asking around unless you have any good ideas.

Wow, that is pretty crazy.  That 'bad reloc address 0x0' sounds really
scary.  The OpenCL functions it complains about are very foundational,
so I have a hard time believing that they have not been included.
Thank you for not giving up yet!  There is in principle no reason why
Futhark should not work on Windows, and I'd very much like for it to be
the case.  I'll look around for more information on MinGW/OpenCL, but
I'm a bit hampered by no having a Windows system available.  I wonder if
I could Wine it...
--
\  Troels
/\ Henriksen

I did a post on MinW-Users mailing list, but just in case that falls through, would it be possible to rewrite the sys\time.h related stuff to use platform independent C++ functions?
Actually, there are two options: here is the stuff from the C standard library and here are the newer C++ template based clocks and timers.

That approach is unfortunately not feasible, since Futhark generates C,
not C++.  But maybe there is some standardised C stuff for timing now?
We can always embed a getopt.h-implementation in the generated code
instead of importing it - it's fairly simple code.
I have a fairly high tolerance for ugliness in generated code, but I
have a low tolerance for significant bodies of code that are only active
on one platform - especially when that platform is not part of our
automatic test suite.  If Travis supported Windows, this would be
different.
--
\  Troels
/\ Henriksen

The stuff in <ctime>/time.h should be standardized unless I am badly mistaken. Regarding getopt.h I already found a Windows implementation on the net. It did seem to be simple enough.

It looks like time.h is a useful substitute for sys/time.h.  I'll give
it a try.
--
\  Troels
/\ Henriksen

Hm, maybe not: time() only supports second-level granularity, and
clock() counts processor time, where we need wall time.
--
\  Troels
/\ Henriksen

How about the first answer to this question?

Yeah, I guess something like that is necessary.  I just have a really
bad feeling about #ifdef'd code that is never run on our test systems.
--
\  Troels
/\ Henriksen

I guess it's small enough that it may be robust... if I fix this and also include the moral equivalent of stdarg.h, do you think that's enough to support Windows?

I can't say, I do most of my programming in F# and the stuff there is mostly plug and play. I would really like to see Futhark succeeding because at the current time Cuda programming is such a major bottleneck in my own work. I think that for every line of F# that I write it would take an equivalent 30 lines of Cuda C++. A compiler library like Alea is definitely better than sending text string to NVRTC like I am doing now as it is integrated with the type system, but in the end it is still raw C with a polish.
If we can get this working on Windows, I promise that I'll do my part in testing it out and contributing to it.

Well, the best solution to that problem is probably to implement an F# backend for Futhark. :-) That's actually on my medium-term list, since we use F# at a bunch of courses at my department.
But I think we need to take a step back here wrt. to the C backend on Windows.  There are really two problems that must be solved:

Making futhark-opencl able to compile standalone Futhark programs on Windows.

Making the generated code compilable in Visual C++.

The former is more important in the short term.  To fix it, we don't need to fix the use of sys/time.h or getopt.h, but rather figure out what's necessary to make MinGW GCC able to link with OpenCL.  Of course, one solution (that I must admit I'm not a big fan of) is to change futhark-opencl to invoke the Visual C++ compiler instead of gcc.  I would find that an acceptable solution, although I would prefer to also support GCC.

Personally, although I would like to see Futhark on Windows, it is not that I prefer GCC over VC++ or vice versa. VC++ just happens to be working at and I have no idea how to get it running with GCC.
...I am kind of curious about what courses you are doing with F#? Is it compilers? I did two of those although they were relatively simple compared to Futhark. The first one was when for practice I did the entirety of the Compilers course last year (I am still waiting for that one to resume so I can submit the solutions and get some virtual points) and the second when I ported half of the Java based GVGAI library to Fsharp.
Although you joked about it, I really will create a backend for Futhark if I like it enough. I've done crazier things in programming so far.

We recently moved from SML to F# for introductionary programming, and
will move the compilers course likewise.
I also have no real strong opinion on GCC versus VC++ on Windows, except
that GCC is easier to obtain.  To be honest, I hope that you GCC
troubles are an isolated configuration problem.  I'll see about setting
up Windows in a virtual machine to see whether I can figure it out.
--
\  Troels
/\ Henriksen

You know, if you can come up with a command line for compiling OpenCL programs on Windows using the VC++ compiler, I'll just make futhark-opencl use that.

Hello, I'm just joining the conversation!
I have access to a fairly basic Windows 8.1 (no Visual Studio or IDE or anything much except a web browser installed), so I thought I would try to install Futhark on that.  I have succeeded using GCC, but OpenCL is still annoying.
Once I got ghc and futhark up and running through Stack, I installed MinGW and added its C:\MinGW\bin directory to the system PATH environment variable (this might not be necessary, but it enabled me to use MinGW's executables outside of MinGW's MSYS shell).  After these steps, I could run futhark-c with no problems, and also run the generated programs.
Then I went on to see if I could get futhark-opencl to work.
Initially GCC complained about missing headers, so I fetched cl.h and cl_platform.h from Khronos' website.  The computer uses a nVidia GPU with support for OpenCL 1.2, so I picked the headers from that version.  I created a new directory C:\MinGW\include\CL and put the two header files in there.
GCC then stopped complaining about missing headers.  Next up it yelled that there was no OpenCL library to be found.  I looked a bit around in C:\Program Files and found a directory named NVIDIA Corporation.  Inside that was a directory named OpenCL, which had a file named OpenCL.dll.  This sounded legit, so I copied it into C:\MinGW\lib.  (I'm not a Windows expert, but copying DLL files around seems about right.)
After all of these steps I was able to run futhark-opencl on several .fut files and run the generated executables and get the correct results.  The generated executables were faster than those generated with futhark-c, so it seems like they were actually running on the GPU.
In conclusion, it seems like I got it working with GCC, but only by manually downloading two header files into a manually created directory, and copying a DLL file.  This obviously isn't portable, but I don't know what could be done differently if we want to be independent of things like VC++.
(I also tried futhark-pyopencl, but apparently PyOpenCL requires Microsoft Visual C++, which apparently is not part of the Windows 8.1 I was using.)

@nqpz Thank you for trying. I tried to replicate what you did. I copied the relevant header files into C:\x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb\mingw64\include and the dlls into C:\x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb\mingw64\lib. I also added those two directories to CPATH and LD_LIBRARY_PATH respectively. I actually had no idea where Nvidia's OpenCL dlls were located or that they needed to be linked against directly. I only looked in the GPU computing toolkit directory as that is where all the libraries and the include were. I also missed it during the file search.
C:\futhark\examples>g++ -std=c++0x main.cpp  -o  main.exe -lOpenCL
c:/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../lib/OpenCL.dll when searching for -lOpenCL
...(This error message repeats 10 times before aborting)

There still seem to be some incompatibilities somewhere. Maybe it would be worth it for me to actually install the freshest GCC. Also, are using the 64-bit MingW or 32-bit. I'd be surprised if 32-bit was working.
One thing that is suspicious to me here is why is it trying to link against OpenCL.dll when OpenCL64.dll seems more sensible. Let me try that one....
Using platform: NVIDIA CUDA
Device 0: GeForce GTX 970

...Ah, it worked! I just changed -lOpenCL to -lOpenCL64 and now it is fine.
Also, it seems futhark-opencl is trying to link with the 32-bit OpenCL.dll on my system and it is giving me exactly the same error message as in the first code block - that it is skipping the incompatible dll.
With this, now it is entirely clear to me how to link against OpenCL and that particular issue seems solved.
The only thing that has left me wondering is why are the instructions in the guide working for the author when he is linking against the 32-bit library using a 64-bit version of the compiler. Maybe the newer GCC 5.1.0 is smarter about linking that 4.8.0?

Yes, GCC 4.8.0 does seem a little old.  Is it customary to suffix library name with 64 on Windows?  I do not think I have seen that before.
In any case, I am going to close this issue.  Futhark is able to generate code that runs on Windows, assuming sufficient configuration (or hacking...) of the Windows environment.  It does not seem like we can change Futhark to improve matters across all Windows installations - changing lOpenCL to -lOpenCL64 would probably break on @nqpz's install.  The best course of action is probably to add some documentation about this issue - either to the README, or to the docs themselves.
If VC++ support is still useful, you can open another issue.

Out of interest, I am doing some research into how to get this running on cl (VC++ compiler) from the command line and I'll probably open an issue with the instructions just for completeness. I'll also try installing the 32-bit MinW and seeing if that patches up the issue with the default dll. I think the later should work fine though.

I did it. Let me deposit it all together here. No need to open a separate issue.
First off come the batch script to easily invoke cl:
@echo off
%comspec% /c ""c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 && cl.exe %*"

Based on this SO post, I made a cl.bat file and put the above in. This allows me to easily invoke the cl.
Then I invoke the cl.bat using something like this from the command line:
cl main.cpp OpenCL.lib /EHsc /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" /link /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64"
main.cpp is the name of the file being compiled, OpenCL.lib is the 64-bit library, /link passes the /LIBPATH option to the linker. The include and the library path options can be defined in the INCLUDE and LIBPATH environment variables as well, similar to MingW.
/Ehsc is just a option for exception handling without which the compiler prints out a warning.

One thing the cl compiler warned me the first time around when is that it needs to compile in 64-bit mode to be compatible with OpenCL.lib. For Windows, it might be a good idea to pick the 64-bit OpenCL dll just to make sure that any unexpected bugs do not crop up.
Is it compiling 32-bit or 64-bit on Linux?

It is compiling in whatever gcc is.  32-bit on 32-bit systems, and 64-bit on 64-bit systems.  My intention has been to avoid getting the Futhark compiler too involved with exactly how the C code is being compiled, but maybe that's not an option on Windows.  I'm considering adding a --source flag that skips the final compilation stage, and leaves it up to the user to figure out how to get the generated C program to compile.

Could you add a flag to call -lOpenCL64 instead of '-lOpenCL' as well? That would solve the issue on my system. Right now I'll give it a shot using 32-bit GCC, but even if that works on the simple example, it might fail on larger ones.

I wouldn't like that very much, as it is a global solution to a local problem.  Would it help if you just renamed OpenCL64.dll to OpenCL.dll and made sure that your renamed version is the first one that is found?

Hm, do you think https://stackoverflow.com/questions/23275675/32-bit-gpu-and-64-bit-cpu-opencl is related?

Well, it probably related.
Also, I just finished trying it out with the 32-bit MingW. Now that I have it set up properly with the two dlls in the lib directory and the header files in include and the environment variables pointing to them, futhark-opencl works on the factorial example.
I should emphasize that this is not the correct behavior necessarily even though it works for @nqpz and myself.
The library that comes with Cuda is clearly 64-bit and incorrectly linking to the 32-bit dll is just asking for trouble. In fact rather than doing a flag, trying to link to the standard OpenCL.dll should be considered an error on Windows. OpenCL64.dll should be the default library.
Renaming the OpenCL64.dll to OpenCL.dll would be a solution, but if I was doing compiler, I'd rather not make the user go through such a convoluted step. The compiler should be smart enough to know which OS it is on and do it automatically.
On Linux, I just checked and found that there is only a single OpenCL.a file so there is no confusion there. I have no doubt that it is the 64-bit version.

That's because on Linux, the default linker path includes /usr/lib,
which contains only libraries of the native word size.  32-bit libraries
are all in /usr/lib32 (which is just called /usr/lib on a 32-bit
system).
I really am uncertain about how best to handle this.  For example, we
link succesfully with the math library on Windows using just -lm - no
-lm64 is necessary.  And what about Intel and AMD OpenCL SDKs - do these
also suffix 64 to the DLL name?  And isn't there also an OpenCL.dll
bundled with Windows (which is presumably 64-bit on 64-bit Windows)?
Why isn't that found instead of the one in the NVIDIA directory?
Since you are probably the only Futhark-on-Windows user, I'd be happy to
conditionally change -lOpenCL to -lOpenCL64 for now.  But I can't
promise it won't change if we at some point figure out exactly what is
going on. :-)
--
\  Troels
/\ Henriksen

I should note that there was indeed also a OpenCL64.dll file on my Windows 8.1.  I had downloaded the 32-bit version of MinGW for no particular reason, so I didn't use it, but in general it's probably true that you're going to use the 64-postfixed variant.  But I'm still not sure if it's only nVidia who produces OpenCL64.dll files, or if other GPU manufacturers use different naming schemes?  It seems a bit like the wild west on Windows when you don't use things like VC++.

Is that math library a .dll or an .a file? There is probably a difference between the two. I have no idea about the AMD and Intel SDKs. And I can confirm that there are OpenCL dlls in the Windows directory, but those are probably for the CPU.
I have to remind you that the way Nvidia intended OpenCL to be used on Windows is with the .lib file, not directly against the .dll like we are doing now. In fact, until @nqpz pointed it out, it did not even occur to me that static linking directly using dlls was even possible. So at this point linkage behavior is already anomalous.
On Windows, .dll are using for dynamic linking. Using dlls the program is supposed to invoke the functions inside at runtime.

It's the same on Linux - the Futhark compiler attempts to dynamically
link with OpenCL (that's what the -lOpenCL part does).  Is a Windows
.lib for dynamic or static linking?
Also, I've gotten a bit confused by all the details - would changing
-lOpenCL to -lOpenCL64 (on Windows) make your life appreciably easier?
If so, I'll do it.
--
\  Troels
/\ Henriksen

A windows .lib is definitely for static linking while a .dll is for dynamic. I am sure of this much. So Futhark is doing dynamic linking...
Well regardless, please change it to lOpenCL64 on Windows. Thank you.
This is to restrict it to 64-bit compilation. Cuda is 64-bit entirely by now, and most modern computers are 64-bit as well. Unless you want to explicitly support 32-bit OpenCL then this is the way to go. I do not think adding a flag for 32-bit OpenCL on Windows would be bad either, though I don't think anybody will use it.
Hopefully, after that I will be able to get back to actually studying the language instead of build behavior.

I have attempted to make this change, but I'm not entirely sure what
System.Info.os looks like on Windows.  Please try it out!  I'll be gone
for a few hours.
--
\  Troels
/\ Henriksen

It compiles and runs correctly, but the timing is a bit off. fact<PHONE_NUMBER> runs in 15m my machine instead of 7ms like on Linux and sometimes the time actually gets logged as 0ms for some reason.
I haven't tested the 32-bit version yet, so I cannot tell whether this is because it is compiling 64-bit. I'll give it a try.

@mrakgr did you make a typo there? Is that supposed to be 15m(inutes) or 15ms?

It was a year since that post so my memory is not too great, but I think it was 15ms. I think the issue we discussed here were the floating point errors on the lower end in the timing printouts. On Windows it would switch between 15ms and 0ms and exactly those values because the values would get clipped somewhere. This is unlike on Linux where I would get precise measurements.
We fixed this, I think? Tell us if we did not.


System.InvalidOperationException: 'Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.

I cannot reach the exact product page where to post this to.
I received suddenly this error by using docker compose.
System.InvalidOperationException: 'Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
I tried all solutions except the one on this page particular for docker compose. Why? Because I never had to and it worked for a couple of months out of the box.
Recreating the developer certificates did not work. So finally I deleted the docker-compose setup in the VS solution. I recreated it by add --> Container Orchestration Support. The running it in either debug and release mode worked again.
I see a lot of people struggling and why this is happening if fully unclear. Maybe you can post it on the right page.

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

ID: abf7806c-d9e4-1811-3308-b5efb6f159f0
Version Independent ID: 2117dfa1-9e6d-2bc2-2348-e792f3c81806
Content: Hosting ASP.NET Core image in container using docker compose with HTTPS
Content Source: aspnetcore/security/docker-compose-https.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @ravipal
Microsoft Alias: ravipal

I cannot reach the exact product page where to post this to.

@spboyer  can you help out?

I cannot reach the exact product page where to post this to.

@spboyer  can you help out?

https://docs.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker

https://docs.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker


Issue in downloading .NET interactive

Hello, I'm currently using Visual studio code now, but i can't install the Polyglot Notebooks, and it keeps saying Installing .NET interactive version 1.0.512901 and it runs over and over again, so i can't use Polyglot Notebooks, can you give me an instruction of how i fix this problem!

I had a similar issue, I resolved it by inspecting the extension logs and noticed the extension was attempting to acquire an auth token for a private NuGet package source I had installed in the Nuget.Config. I had to work around this by altering the install process to use "--interactive" and for add an extra output log to display the device code to complete the process. I don't know why it wasn't using the key already saved in the Nuget.Config...
This is still an issue and will prevent me from upgrading the extension in the future and is not the ideal solution. I hope his helps you get around it for now too.

Thank you, I will try your solution


Fixes/359 type error regex url pattern

This fixes #539  reported by @ilyaglar
Also fixes #537.

yes, this PR fixes #539 and #537

this will trigger the 0.10.1 release


Mongorestore not Working

Hi,
I have implemented mongo using docker on my plesk panel.
Everything works fine,
But when i try to restore the data in the mongodb using "mongorestore command"
it says like:"Failed: error connecting to db server: no reachable servers"

Hi,
I've installed mongo using plesk docker. so there is no command for that.
After that i used this mongorestore --host=<IP_ADDRESS> --port=27017 --db <dbName> --drop <dbPath>
When i try to restore it says "Failed: error connecting to db server: no reachable servers"

How/where are you running mongorestore?  Are you running that via docker exec, on the host running Docker, etc?  Did you publish any ports on the container when running via Plesk?

How/where are you running mongorestore? Are you running that via docker exec, on the host running Docker, etc? Did you publish any ports on the container when running via Plesk?

I try to install mongorestore but its not woking

That's odd -- I'm not sure what else to recommend.  I'd suggest trying a dedicated support forum, especially something specific to Plesk, but even something general like the Docker Community Forums, the Docker Community Slack, or Stack Overflow to help debug further.


Orthography profile

We've had this old profile:
https://github.com/lexibank/kraftchadic/blob/master/etc/orthography.tsv
Which has got a number of problems:
https://github.com/lexibank/kraftchadic/blob/master/TRANSCRIPTION.md and https://github.com/lexibank/kraftchadic/commit/09605838bad5d4f8db4d67ec50712c538e667d9a. Should we keep it and update it or release without, for now?

We should add a new profile. Who's the patron of this dataset? @tresoldi could you look into this? Or @chrzyki ?

I can, but what would be deadline?
It also brings back the topic of how to segment tonal languages which are not SEA, where we tend to have only one contrast. Should the general principle be something like "à/a"?

If they have regular tone, clts accepts this, right? I do not have strong opinions here, I just do á/a if it's not clear whether it's tone or not. But there's no particular deadline, just would be good to split work, as I just added some more orthoprofiles (tryonsolomon), so that we can slowly increase the number of data with segments for our purpose of global comparison.

Ok, I'll take care of it.

I have taken a long look at that, hoping to able to finish it today, it is a bit harder than expected (bibliographic work will also be needed). I will put it in my todo list and work on that in the following weeks.

Important: don't feel pressured to add this immediately, it's just an encouragement for everybody who's patron of a segmentable dataset in cldf, to work on this, to increase the amount of segmented data. There' s no urgency, but I would like every patron (and you'd be that for kraft, I suggest) should think of how and when things can be enhanced...

It was more about time management, as I noticed the problem was not the profile creation but my knowledge of the languages (which got me into bibliographic research etc.). It seemed a better idea to get back to the segmentation of WOLD, which is now over half done.
But I've added it the todo list, better than just have a vague idea "I should do it sometime" :wink:

Closed, thanks @tresoldi !

(I said I'd closed this, but obviously I didn't. 🥇


Adds Location and Length fields to the Swimming Pool preset

Closes #5300.
This implementation uses location=roof over location=rooftop since the location page indicates they're likely synonyms and roof has far more usage. "Rooftop" is used for the label, however, to make all the labels adjectives.

Looks great, thanks @quincylvania 👍


Composer 2.0.*

Could you create a tag for composer 2.0 which has been released on 24 of October. You may also consider tagging a version with composer 1 if it makes sense to you.
Since composer is added to the drupal-php image during the build process, and, the new default version of composer is 2.0.*, simply running the pipeline should do the trick?

Composer 2 is way faster on Drupal 8/9. I just tried it. Despite it using the installer url for Composer, the PHP tags still seem to ship with Composer 1. Has there been a tagged image since Oct 24th?
I was able to get around it on a test project and try out Composer 2 with:
ARG PHP_TAG
FROM wodby/drupal-php:${PHP_TAG}
USER root
RUN composer self-update --2
USER wodby

The speed is much much better (especially combined with Mutagen) and want to use it right away. For now it seems like I need to use my own Dockerfile to get it.
Will there be an update this week?

Currently tests fail with composer 2 because drupal console does not yet support it https://github.com/hechoendrupal/drupal-console-extend-plugin/issues/23

I usually add Drush via Composer to projects and don't use Drupal Console at all. Is it wise for this image to couple itself to Drupal Console? Commits are sporadic and as far as I understand it is not very active...

latest and 4.19.0+ now come with composer 2.0


How to set download PDF files instead of automatically opening them in Chromium with puppeteer ?

@Tanviw take a look to this post 3722


HIP-42: Beacon/Witness Ratio - Witness Reward Limit

Rendered View:
https://github.com/helium/HIP/blob/6811e0db95302fe68bea6d7deee651a7d8630519/0042-beacon-witness-ratio-witness-reward-limit.md

I'm still working on the Metabase Dashboard that will accompany this HIP I'll be sure to add it when it's done


Microsoft Defender for Cloud App: Update Analytic rule and Workbook

Change(s):

Updated entity mappings
Updated rule description
Corrected Typos in Workbook
Replaced usage of 'contains' with 'has' where it is looking for alert type 'ALERT_CABINET_DISCOVERY_NEW_SERVICE'

Reason for Change(s):

Verifying content

Version Updated:

Yes, 1.0.2

Testing Completed:

Yes, Deployment testing and functional testing

Checked that the validations are passing and have addressed any issues that are present:

Yes

Hi @devikamehra, please provide your feedback. Thanks


[RJSF] Add a Custom Object Field to fix validation errors | CU-3u6yyf2

Description
This PR adds a custom RJSF Object Field so that the Object level errors can be shown in the RJSF form. With the default RJSF Object Field, we were not able to propagate the errors into the Template Component, where we are showing metadata regarding the
Signed commits

[x] Yes, I signed my commits.

Task linked: CU-3u6yyf2 [Designer] Overzealous Design Validation

Editing the PR description...


English problem in FAQ

It says to "turn over" in the FAQ. It seems to me that this isn't very good English.

What is your suggestion?

I think you mean to say turn off. This could also be changed within the app.

After the stylized bell (or bowl) has been "turned over" its shown upside down, so "turn off" is not what is meant.

I don't see any upside down bowl; where is it shown?

aha I see an upturned bell when I expand the notification or mute it otherwise.

Perhaps it should be referred to as the status bar or notofication icon. I had that mostly disabled so it was less obvious.

Update FAQ and MindBell messages for clarification.

Update to message to be release with version 3.2.

There are still a few instances of turn over on the site.

From a another discussion I've learned that "turning over is about the movement itself" whereas "upsided down is about the exact position". So I came to the conclusion that there is no need to get rid of the verb "turn over" but to get rid of the state "turned over". The new title of this issue should reflect this conclusion. However, I've enriched the FAQ by some more screenshots and explanations.


Feature request: Download files in Downloads/MarkDownload/ folder

To increase the usability and speed of bookmarking, custom download folder where all MD downloads will be stored is extremely useful. By default it could be something like MarkDownload or MDClips stored in the default browser's Downloads folder.
For example, Obsidian.md uses folders as vaults. This is useful as could be directly integrated in Obsidian.md or transferred without having to search and select for MD files and their resource folders each time.

You can achieve something like this by adding slashes into your title template (e.g. MarkDownload/{title}).
Other than that, I can't make downloads happen outside the default downloads folder without using the SaveAs dialog

You can achieve something like this by adding slashes into your title template (e.g. MarkDownload/{title}).
Other than that, I can't make downloads happen outside the default downloads folder without using the SaveAs dialog

The PR for this was merged in and the functionality is available in 3.0.0

@deathau I'm observing issues when downloading images, the download is initiated, but always fails. Will investigate this when I have a bit of time


Migrate error on PostgreSQL

Pulse Version
1.0@beta
Laravel Version
10.2
PHP Version
8.1
Livewire Version
N/A
Database Driver & Version
PostgreSQL: 15.2
Description
After publishing assets
php artisan vendor:publish --provider="Laravel\Pulse\PulseServiceProvider"
when I ran php artisan migrate I got the error below
SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near ")"
LINE 1: ...(16) not null generated always as (unhex(md5(`key`))), "valu...
                                                             ^ (Connection: pgsql, SQL: create table "pulse_values" ("timestamp" integer not null, "type" varchar(255) not null, "key" text not null, "key_hash" char(16) not null generated always as (unhex(md5(`key`))), "value" text not null))

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:795
    791▕         // If an exception occurs when attempting to run a query, we'll format the error
    792▕         // message to include the bindings with SQL, which will make this exception a
    793▕         // lot more helpful to the developer instead of just the database's errors.
    794▕         catch (Exception $e) {
  ➜ 795▕             throw new QueryException(
    796▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    797▕             );
    798▕         }
    799▕     }

      +35 vendor frames

  36  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

From the docs it says PostgreSQL is supported? : Pulse's first-party storage implementation currently requires a MySQL or PostgreSQL database.
Side note: After publishing assets, the migration file was not copied to database/migrations
Steps To Reproduce
composer require laravel/pulse
php artisan vendor:publish --provider="Laravel\Pulse\PulseServiceProvider"
php artisan migrate

Thanks. Please let us know which beta you're using.

Thanks. Please let us know which beta you're using.

This is what I have it after running composer require laravel/pulse => "laravel/pulse": "^1.0@beta",

@taghwo we need to know the exact version installed, please. Can you run composer why laravel/pulse and let us know the output?

@jbrooksuk here laravel/pulse (v1.0.0-beta2)


ts types

hey george appreciate your work man,
really impressed by the code you wrote to generate a big sur styled gradient
any plans on adding typescript types ? i want to play around  with the code more

Came here to ask the same thing.
I'd be happy to implement TypeScript typings for you, either converting the codebase to TypeScript or adding a set of declaration files as to not disturb the source JS.

Hey folks! Thank you so much for your kind words and for using my library to make things <3
I'm actually considering a fairly intensive re-write of the library at the moment, as it seems people are using it for actual stuff... Part of that re-write, will likely be TS support. I don't know TS myself, and likely won't learn it for this project, but I really like the idea of having typings in separate files (I think I have this on my vb-canvas lib!).
Nearer the time, if either of you would be interested in helping i'll bump this issue then go from there?
Cheers!

nice! I'd sure like to help
I'll keep an eye on this

Also very interested.

Hi, George! do we have typescript types yet? Thank you!!

Hello! I know it's been a while since this issue was opened, but I wanted to give a brief update that I have finally started rewriting generative-utils — this time with a focus on type safety, bundle size, and test coverage. Stay tuned!


Add docker build and publish ci workflow

I haven't tested the publish part, but it is similar to one I have used previously.
Also wasn't sure on which events this should run (branch/push/schedule), and what schedule it should run, so any input here would be good.
The hardcoded default value of DB ?= nightly-220604 in the makefile ain't great, but date has very different flags for trying to print yesterday's date on linux vs mac, so I bumped it and left it for now.

So, here I are a couple of thoughts and questions as I'm unfortunately still rather unfamiliar with Docker:

If I understand this correctly, this will create a Docker container (is that the word?) with pack available. Will this also have the corresponding Idris compiler prebuilt and installed?
Package collection nightlies are created and tested daily at 1 am GitHub time (whatever that means; looks like the corresponding action runs around 5 am in the morning where I live, which is UTC +2 during summer time). This takes about half an hour, so I guess it would make sense to build the Docker container a couple of hours after that.
micropack should choose the latest nightly on its own. This is something I was planning to fix anyway.

So, I suggest I'll first fix micropack, so we will no longer have to hard-code the nightly to use. What do you think?

This will create a Docker container (is that the word?) with pack available. Will this also have the corresponding Idris compiler prebuilt and installed?

Correct, this will have both idris and pack built and installed. Word wise it's called a docker image. The thing that's running when you do docker run is a container, and containers are based on images.

created and tested daily at 1 am GitHub time

Github time seems to be UTC. Something seems odd if that's 5am for you, but I'm bad at timeszones 😅 Either way, if it's 1am github time if i set this to 5am it should be ok?

micropack should choose the latest nightly on its own. This is something I was planning to fix anyway.

Ah right! Well i need that YYMMDD var outside of micropack so that I can add the correct tag to the docker image, so maybe it's good to just specify it so we're sure the one micropack builds matches the tag... or were you referring to the value in the Makefile?

In that case, I'll leave micropack for the time being.

Github time seems to be UTC. Something seems odd if that's 5am for you, but I'm bad at timeszones sweat_smile Either way, if it's 1am github time if i set this to 5am it should be ok?

Yes, that's what I thought too, that's why I'm rather confused why the check runs so late. Well, important thing is that it runs at all.

Ok think I finally appeased the linter 😅
Just realised the timing I guess if I'm building yesterday's package set I have like 24 hours for it to run, so the timing should be ok. Could try build the latest nightly then it's a little more tight.

The current build failure is related to the changes regarding the package path I'm working. I think I fixed that by now, so a rebase should be enough to get this to pass, but lets wait for the collection test I'm running at the moment. This should show whether all is fine now.

Ah cool, will see how it behaves with that fix.
Just updated the schedule/date so that it runs with the latest nightly-* build. No point waiting 24 hours for our sweet new dependencies.

https://github.com/stefan-hoeck/idris2-pack/pull/83 am I right that after this micropack no longer accepts a DB param? If so I'll remove that from this PR. Would make a few things easier, though could happen that we end up with a docker image tagged with a day and a different package set is inside... which is technically correct in the sense that the docker image was built at the day it says it was, even if it then contains a package set from different day :D

#83 am I right that after this micropack no longer accepts a DB param? If so I'll remove that from this PR. Would make a few things easier, though could happen that we end up with a docker image tagged with a day and a different package set is inside... which is technically correct in the sense that the docker image was built at the day it says it was, even if it then contains a package set from different day :D

micropack still accepts a DB param, but this is now optional. The Makefile, however, no longer passes on the DB variable to micropack. We could reintroduce this, if you prefer it that way.
micropack had several issues, both with the current change to use shell wrappers with package paths set for executables like LSP or the compiler itself. But it was also unreliable, because the glibc version to use was "hardcoded", because a prebuilt version of libidris2_support.so was bundled with it.
I changed this, so that libidris2_support.so is now built at the installation site when invoking the makefile.
But here is another thought: Would it make sense to add this action to the pack-db project, where it could be run right after creating the nightly? Then the two things would always run in quick succession. Also, if checking the package collection fails (due to one or more failing packages), no new nightly is created at the moment (but STATUS.md is still updated). In that case, we wouldn't want a new docker image either, right?

I think I'm ok with not passing the DB param explicitly. Should that cause issues down the line we can change it.
As regards where this action should live, the main reason I put it here is for naming. Think when hosting the docker image on github the name has to match the repo name. So here we get a nice idris2-pack docker image name, whereas idris2-pack-db is a little unwieldy. You're right that it'd be much more convenient if it was in the idris2-pack-db repo though.

Fair enough. Do you think this is ready for merging then? We can still adjust it later on if there is any need.

Yeah, I think it's good to go. Will probably find some more issues but I can fix those as we run into them 👍

Thanks again for this.


filter by client ip combo box

please add filter by client ip combo box like in yacd/dashboard

also connection list missing "Sniff Host" column.
and sorting the columns in mobile view is very challenging.

Good idea, but maybe somewhat complicate to implement. So be patient, I'll find some time to take a overall look of this feature

thanks fam 🙏🏾


Typos found in tutorial

I found a few typos that block the html from loading effectively in the browser.

In Step 3 of Create A New Map, there's a missing comma between ("subscription-key": MapsAccountKey) and (center: [-118.2437, 34.0522],)
In Step 3 of Render Routes Prioritized By Mode of Travel, (tlas.service.geojson) should be (atlas.service.geojson) and (GeoJsonRouteDiraectionsResponse) should be (GeoJsonRouteDirectionsResponse)
The link in Render Routes to "Get route directions" leads to a 404 page.

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

ID: 73f6104b-2396-52bf-f6f1-44af69fb5b46
Version Independent ID: 7425e32f-f860-2005-8703-625baab53300
Content: Multiple routes with Azure Maps
Content Source: articles/azure-maps/tutorial-prioritized-routes.md
Service: azure-maps
GitHub Login: @dsk-2015
Microsoft Alias: dkshir

@RachelYang02 Thank you very much for the detailed feedback. I have assigned this to the content author to evaluate and update as appropriate.

@walsehgal Hey Waleed can you please look into this issue? Thanks.

@RachelYang02, the typos have been corrected. The link is working fine, can you give it another try and let me know if its working for you now?

I just checked, and the link works for me as well. Thank you for fixing it!

@RachelYang02 No worries, Thanks again for raising the issue and providing a detailed feedback.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Aggregate Continuation Tokens

Aggregate Continuation Tokens
Description
This change provides continuation token support for aggregate queries. Currently aggregate queries are not preempt-able, since we need to drain all the partial aggregate and emit the final result to the user. We also can't emit an partial aggregate, since the user is expecting a single result and does not want to aggregate the partial aggregates. The solution is to return empty pages with the partial aggregate in the continuation token. Since aggregates are done on a single grouping the continuation token is simply:
{
   "SingleGroupingPartialAggregate": <SingleGroupingPartialAggregate>,
   "SourceContinuationToken": <SourceContinuationToken>
}

Like all continuation token changes we need to be able to serialize the query operator state and resume from it.
A natural follow up item is to support GROUP BY continuation tokens, since it's just multiple groupings.
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

internal abstract class SingleGroupAggregator

CompositeAggregator

Refers to: Microsoft.Azure.Cosmos/src/Query/Core/Aggregation/SingleGroupAggregator.cs:16 in ab86e22. [](commit_id = ab86e22f14e1e1730f3f45c21d3b5728007c17df, deletion_comment = False)


How To Save The Endpoint!!!

Hello,
i cant save. i cant see a button to save my JSON. i think icant see now. maybe it is at very visible place :)

how to save to see output.

ctrl+ S  saves. if json is VALID


feat: add time to read on blog post

Description of change
This PR  solves #230 .
The human reading speed is around 220 words per minute.
Therefore, this PR implements a functionality of stripping the blog post details from HTML & style tags, and checking the total words of it divided by the human read words per minute.

Hello @mohammed786 could you please review the update? Thanks!


MB-8189 Update services counseling edit shipment URL

Description
When we were initially setting up the edit page, we didn't have the URL fully set. Now we do so this pr is to align with the decision.
Reviewer Notes
This is based on another branch at the moment rather than main because it depends on some constant variable renaming done in that PR. Once #6685 merges, this should go into main. I guess this one could also merge into the other one.
Setup

Run server & office client:
make server_run

make office_client_run

Log in as a services counselor.

Select an editable move (one that still needs counseling).

Click one of the "Edit shipment" buttons.

Note the URL now follows the new structure.

Code Review Verification Steps

[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story

Messages

:book:
:link: MB-8189

  Generated by :no_entry_sign: dangerJS against 52ebcdf4e98b61f96d155310eede3cd55a0e8e44

Ephemeral environment is deployed
• https://my-milmove-pr-6687.mymove.sandbox.truss.coffee
• https://admin-milmove-pr-6687.mymove.sandbox.truss.coffee
• https://office-milmove-pr-6687.mymove.sandbox.truss.coffee
• https://prime-milmove-pr-6687.mymove.sandbox.truss.coffee