hooks.js example causes a build error

Describe the bug
When the following hooks.js file exists, npm run build throws an error. (However npm run dev works without error and the site runs perfectly.)
To Reproduce

Add src/hooks.js

export async function handle(request, render) {
  const response = await render(request);

  return {
    ...response,
    headers: {
      ...response.headers,
      'x-custom-header': 'potato'
    }
  };
}

Run npm run build.

The command will throw this error:
✓ 38 modules transformed.
.svelte/output/server/app.js      193.07kb
.svelte/output/server/style.css   7.76kb

Run npm start to try your app locally.

> Using @sveltejs/adapter-node
TypeError: Cannot read property 'headers' of undefined
    at Object.handle (file:///Users/me/sveltekit-demo/.svelte/output/server/app.js:1890:19)
    at async ssr (file:///Users/me/sveltekit-demo/.svelte/output/server/app.js:1677:12)
    at async visit (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:531:20)
    at async prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:682:5)
    at async Builder.prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:743:4)
    at async adapt (/Users/me/sveltekit-demo/node_modules/@sveltejs/adapter-node/index.js:26:4)
    at async adapt (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:765:2)
    at async file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/cli.js:598:5
> 500 /about
Error: 500 /about
    at error (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:523:11)
    at visit (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:574:5)
    at async prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:682:5)
    at async Builder.prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:743:4)
    at async adapt (/Users/me/sveltekit-demo/node_modules/@sveltejs/adapter-node/index.js:26:4)
    at async adapt (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:765:2)
    at async file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/cli.js:598:5
npm ERR! code 1
npm ERR! path /Users/me/sveltekit-demo
npm ERR! command failed
npm ERR! command sh -c svelte-kit build

about.svelte is nothing special:

About this site

TODO...

svelte.config.cjs contains adapter as: adapter: node(),.
Information about your SvelteKit Installation:
  System:
    OS: macOS 11.2.2
    CPU: (8) arm64 Apple M1
    Shell: 5.8 - /bin/zsh
 npmPackages:
    @sveltejs/kit: next => 1.0.0-next.64
    svelte: ^3.35.0 => 3.35.0

Severity
Minor

Ah, yep, this makes sense. In the prerender step, nothing gets returned from render for non-prerenderable pages. Not 100% sure what the right move is here — it's easy enough to just add an if (response) block but it feels a bit leaky since something is always returned normally. It could return a 404 response but that doesn't feel totally correct either. Hmm...

Ran across an issue with the prerender step because I have a handle function that is doing some basic checks to ensure only authorized users can access a page.
hooks.ts:
import { ensureAdmin } from '$lib/ensureAdmin.ts';

export async function handle(request, render) {
	const { path, headers } = request;

	if (/\/admin/.test(path) && !ensureAdmin(request)) {
		return { status: 403 };
	}

	return render(request);
}

I tried looking at the different environments from $app/env but it did not seem appropriate to key off of any of the current ones.
Maybe if there was an env for prerendering / adapting?

Yeah, I think import { prerender } from '$app/env' is a great idea

I was poking around in the code adjacent to the import.meta.env and it seems like most of that is hoisted from the Vite process. Vite exposes additionally MODE flag which is production for the build (https://github.com/vitejs/vite/blob/77971eda77db3cdaf07880bf19846b184de62466/docs/guide/env-and-mode.md), but that is not entirely helpful for this issue.
If I am grokking the codebase correctly it seems like this would be the first env flag that would be unique to SvelteKit runtime.
It looks like  the adapt function could be a good place to update that env flag. https://github.com/sveltejs/kit/blob/8805c6daa6b11a46d2d373c3db890227b27e660d/packages/kit/src/core/adapt/index.js#L9-L19
Though, it does not look like the  $app/env exports are reactive, so it might be better placed in the CLI build function.
https://github.com/sveltejs/kit/blob/24fab19fc801a57fe714d4f9940edf608316fc5e/packages/kit/src/cli.js#L100-L104
Any thoughts? I'm happy to make a pull request.

In the process of trying to figure out how we'd tackle this, I ended up writing the code, so I took the liberty of opening a PR: https://github.com/sveltejs/kit/pull/833

That's awesome, thanks for taking the time to move this along!

I'm assuming this was fixed since https://github.com/sveltejs/kit/pull/833 was merged, but let me know if that's incorrect. I was having a bit of a hard time following whether there were two things being discussed here or just one

I have to investigate if my problem is actually this... but, i updated to ^1.0.0-next.69 and this error persists for me (TypeError: Cannot read property 'headers' of undefined)

yeah, the issue isn't fixed, #833 just enables a workaround. There's a couple of solutions I can think of:

Document that render may not return a response if we're prerendering
Return a simple response with a 204 code for 'this page was not prerenderable', and attach a header that the prerenderer understands so that it knows a) not to write anything to disk and b) not to fail the build

I think I prefer 2:
if (!page_config.prerender) {
  return {
    status: 204,
    headers: {
      'x-svelte-kit-prerendered': 'false'
    }
  };
}

Now that I think about it, using a header like this would be a neat way to avoid the undocumented dependencies array that accompanies some page responses (indicating which resources were fetched and need to be emitted as static assets). That would prevent the breakage I foresee from people doing this:
export async function handle(request, render) {
  const response = await render(request);
  return {
    status: response.status,
    headers: response.headers,
    body: transform(response.body)
    // oops, omitted the 'dependencies' array, you just broke prerendering
  };
}

Is x- an appropriate prefix to use for these sorts of headers?

Yeah, having an undocumented top-level key in the response object that people need to carry along without knowing about seems risky.
Sticking that somewhere  in headers seems safer, as people are more likely to use a rest/spread there to just carry along the headers they don't care about.
For these secret API things, what about using a key name that's not a valid HTTP header name, just to make it clear that something special is happening here, and to avoid any sort of conflict?

According to https://stackoverflow.com/a/3569667, which is a summary of the relevant IETF RFC, the following characters are invalid HTTP header names:
( ) < > @ , ; : \ " / [ ] ? = { }

So we could do something like @sveltekit-prerender: false and @sveltekit-dependencies: {...}

That sounds reasonable to me. :+1:

Sorry to be annoying, but I'm still getting the same error with ^1.0.0-next.70
exmple hooks/index.js file:
export async function handle(request, render) {
  const response = await render(request);
  console.log('response', response);
  return {
    ...response,
    headers: {
      ...response.headers
    }
  };
}

shows:
response undefined
TypeError: Cannot read property 'headers' of undefined

Similar to the above comment, I get an error about headers now when running npm run build:
> Using @sveltejs/adapter-node
TypeError: Cannot read property 'headers' of undefined
    at Object.handle (file:///Users/me/sveltekit-demo/.svelte/output/server/app.js:1924:19)
    at async ssr (file:///Users/me/sveltekit-demo/.svelte/output/server/app.js:1711:12)
    at async visit (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:531:20)
    at async prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:682:5)
    at async Builder.prerender (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:743:4)
    at async adapt (/Users/me/sveltekit-demo/node_modules/@sveltejs/adapter-node/index.js:26:4)
    at async adapt (file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/chunks/index5.js:765:2)
    at async file:///Users/me/sveltekit-demo/node_modules/@sveltejs/kit/dist/cli.js:604:5
> 500 /about
Error: 500 /about

Using:
SvelteKit: 1.0.0-next.70
adapter-node: 1.0.0-next.12

Can confirm that this is still happening on 1.0.0-next.71.
This issue should unlock the first steps to the CSP problem I think. I haven't tackled the CSP functionality, but we'd be able to set other headers that are important for security ( example: https://gist.github.com/acoyfellow/d8e86979c66ebea25e1643594e38be73 )

I am also encountering this issue. It happens at build time. The functions getContext, getSession and handle are being called after build. And I don't have export const prerender = true; in any routes. Don't know why it should run these functions if there is no pre-rendering specified in any route.
One more side-effect of this issue. I am initializing my DB Connection at the top of the hooks.ts file. So, after svelte-kit build, my build process does not quit/exit, because the db connection stays open and prevents the process from exiting (maybe). I am also trying to execute some post-build scripts. But since the process is not exiting, my scripts are not starting 😄.

I'm happy to report that i'm now able to build.
Same version.. So something I was doing was triggering this.
I don't know enough about the internals of SK, but I have a hunch it has to do with this bug - because once I cleaned up all the instances of this, I tried the hooks handle() again, and it built.

Same. Seems to be fixed in "@sveltejs/kit": "^1.0.0-next.71",.

config.kit.ssr has been removed — use the handle hook instead: https://kit.svelte.dev/docs#hooks-handle.
how can i resolve this issue

config.kit.ssr has been removed — use the handle hook instead: https://kit.svelte.dev/docs#hooks-handle. how can i resolve this issue

hi, I've solved restarting from the svelte@next boilerplate:
hooks.ts
// import cookie from 'cookie';
// import { v4 as uuid } from '@lukeed/uuid';
import type { Handle } from '@sveltejs/kit';

export const handle: Handle = async ({ event, resolve }) => {
	// const cookies = cookie.parse(event.request.headers.get('cookie') || '');
	// event.locals.userid = cookies.userid || uuid();

	const response = await resolve(event, {ssr: false});

	// if (!cookies.userid) {
	// 	// if this is the first time the user has visited this app,
	// 	// set a cookie so that we recognise them when they return
	// 	response.headers.set(
	// 		'set-cookie',
	// 		cookie.serialize('userid', event.locals.userid, {
	// 			path: '/',
	// 			httpOnly: true
	// 		})
	// 	);
	// }

	return response;
};


Tensorflow Still Trying to use CUDA even when Session Created with device_count={'GPU': 0}

System Information
Using the tensorflow/tensorflow:1.0.1-devel-gpu Docker image.
('v1.0.0-65-g4763edf-dirty', '1.0.1')
Host: Driver Version: 367.57, 3.13.0-57-generic
Issue
If I Set compute mode to EXCLUSIVE_PROCESS on the Nvidia device (sudo nvidia-smi -c 1), then even though I tell the Session not to use GPUs (config=tf.ConfigProto(device_count={'GPU': 0})), Tensorflow attempts to use the GPU resulting in an inability to create session:
InternalErrorTraceback (most recent call last)
<ipython-input-1-cabf26c1451a> in <module>()
      1 import tensorflow as tf
      2 from tensorflow.python.framework import ops
----> 3 with tf.Session(config=tf.ConfigProto(device_count={'GPU': 0})) as sess:
      4     pass

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in __init__(self, target, graph, config)
   1174
   1175     """
-> 1176     super(Session, self).__init__(target, graph, config=config)
   1177     # NOTE(mrry): Create these on first `__enter__` to avoid a reference cycle.
   1178     self._default_graph_context_manager = None

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in __init__(self, target, graph, config)
    550     try:
    551       with errors.raise_exception_on_not_ok_status() as status:
--> 552         self._session = tf_session.TF_NewDeprecatedSession(opts, status)
    553     finally:
    554       tf_session.TF_DeleteSessionOptions(opts)

/usr/lib/python2.7/contextlib.pyc in __exit__(self, type, value, traceback)
     22         if type is None:
     23             try:
---> 24                 self.gen.next()
     25             except StopIteration:
     26                 return

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.pyc in raise_exception_on_not_ok_status()
    464           None, None,
    465           compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 466           pywrap_tensorflow.TF_GetCode(status))
    467   finally:
    468     pywrap_tensorflow.TF_DeleteStatus(status)

InternalError: Failed to create session.

This can be demonstrated by running:
import tensorflow as tf
from tensorflow.python.framework import ops
with tf.Session(config=tf.ConfigProto(device_count={'GPU': 0})) as sess:
    pass

when another process is using CUDA and the exclusive process mode is set.
If exclusive process mode is not set, then the session is created but using nvidia-smi, I see that the process is using GPU ram (and CUDA):
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      2237    C   /usr/bin/python                                 61MiB |

The issue seems limited to TF trying to lock the CUDA device (an allocate ~61MB memory). Subsequent computations do happen correctly on the CPU.

You want either export CUDA_VISIBLE_DEVICES= or alternatively a virtualenv with non-GPU TensorFlow. See also: https://github.com/tensorflow/tensorflow/issues/2175#issuecomment-215977173

I'm not sure why the face approach I outlined doesn't work and why the only suggestion is to set an env vsr. It seems like this is either a documentation issue or an issue. Setting the configuration as I did seems to partially work (ie prevent usage of the gpu for the graph) but not totally ie it locks device.

@jart Any thoughts on the above questions / comments?

@zheng-xq Our friend @cancan101 believes it would be less astonishing for our users if tf.ConfigProto(device_count={'GPU': 0}) also implied export CUDA_VISIBLE_DEVICES="". That doesn't sound unreasonable to me. What are your opinions on this feature request?

I am experiencing the same issue with TF and I too believe tf.ConfigProto(device_count={'GPU': 0}) should imply export CUDA_VISIBLE_DEVICES="". I'd like to be able to use my GPU for specific tasks without setting up a second env.

I'm also have the same problem. Will be very happy if this could be supported.

Why is this issue closed?

@TimZaman
It's not, but it really isn't a priority as you can (I know it's ugly)
os.environ["CUDA_VISIBLE_DEVICES"] = ''

# Code that uses Tensorflow without GPU

os.environ["CUDA_VISIBLE_DEVICES"] = '0'

If you want you could also wrap the whole thing in a decorator:
import os

def cpu_only():
    def _method_wrapper(function):
        def wrap(*args, **kwargs):
            os.environ["CUDA_VISIBLE_DEVICES"] = ''
            ret = function(*args, **kwargs)
            os.environ["CUDA_VISIBLE_DEVICES"] = '0'
            return ret
            wrap.__doc__ = function.__doc__
            wrap.__name__ = function.__name__
        return wrap
    return _method_wrapper

Someone might work on it one day but I wouldn't hold my breath

@Belval hehe yeah that makes me feel like I want to take a shower.
But I love how you wrapped that turd in a beautiful decorator! 🤣  Fair enough for now, I can see how this is not top prio.

Hi @cancan101 ! 1.x issues are not supported any more. You can use tf.device to switch between CPU and GPU in 2.x versions. Thank you!


The application don't displays an alert message when don't complete all the required spaces or use a invalid email (without @)

Env:
Device: MacBook Pro
Google Chrome Version 61.0.3163.100 (Official Build) (64-bit)
Safari
Mozilla
IE
REPRODUCIBILITY LEVEL:
Always
STEPS:
Steps

Open the Crafter studio with the Zentro Restaurant blueprint.
Go to "Contact Us"
Complete the spaces "Description" and "Message"
Click on the button send (The application don't display any message)
Complete the "Email" space with this email "test#test.com"
Click on the button send (The application don't display any message from the invalid email)

CURRENT RESULT:
The application don't displays an alert message
EXPECTED RESULT:
The application displays an alert message when the required spaces are uncompleted or with an invalid email

Tested in local environment


[Map] DM-TheMatrix

Dear Sir/Madam,
I am Danilo Di Mascio and this is not one of my old levels. Could you please delete the file or change the author's name?
Thank you for your kind attention.
Kind regards,
Danilo

URL: https://unrealarchive.org/maps/unreal-tournament/deathmatch/T/dm-thematrix_feb6e0d3.html
Hash: feb6e0d38830d450a5780e3c286b84e214fc82dd
Current name: DM-TheMatrix

Fixed


[ TC-AUDIOOUTPUT-1.8] Test case is failing due to featuremap attribute value mismatch

From chip-certification-tool created by Rajashreekalmane: CHIP-Specifications/chip-certification-tool#988
Describe the bug
As per test-plan step 2, Test case is failing due to FEATURE-MAP attribute value mismatch.
Steps to reproduce the behavior

From the Test-Harness user interface loaded the Media.xml PICS file to select the test cases.
Selected the TC-AUDIOOUTPUT-1.8 Automated test case to executed.
Executed the below mentioned command to put DUT into a commissionable state, ./chip-tv-app
Click the Start button on Test-Harness user interface.

Expected behavior
TC should execute successfully without error
Log files
UI_Test_Run_2023_10_06_17_33_51(1).log
PICS file
Media Cluster Test Plan.txt
Screenshots

Environment
Version: TH Fall2023
Sha: 3f84bff5
Additional Information
No response

@Rajashreekalmane fixed in PR 29747 please verify and close the ticket.


React Native feature branch?

Any plans for this? Or any idea what the best way to go about it would be? Think this would be an awesome addition for trying to get a shared codebase together, maybe similar to https://github.com/benoitvallon/react-native-nw-react-calculator ?

Hey @eurobob!
Thanks for your interest in this project. :)
Hmmm, I don't have any experience with React Native myself.  From what I have heard on podcasts it sounds like it's quite a different tooling architecture from a web application. I am not sure this starter could/should be adapted to support both forms.
To be honest my ideas for the project is to push it to be a progressive web application base at the same time.  Making the use of responsive design you should be able to achieve a decent experience for mobile apps.
If you experiment with this concept though please do keep me in touch. :)

I am open for PR's here, but for now I am going to close this.
Also, look at create-react-native-app

@eurobob I'm curious where you ended up with this?
@ctrlplusb Have you considered react-native-web for one of the feature branches? That could be a useful stepping stone for folks, especially as react-primitives and react-native-web take off more..


Add api code (and scripts.py) to mypy type checking

Description
Adding api code and scripts.py to mypy type checking in the Circulation Manager. Ran mypy on the excluded files and resolved issues.
Motivation and Context
This is part 2 of the effort to have full type checking coverage in the CM:
https://www.notion.so/lyrasis/Get-Mypy-doing-type-checking-against-all-the-code-in-circulation-24f41995c1f74aec9963cb8b3d7b5238
How Has This Been Tested?
Removed the files from the excluded list in the pyproject.toml and ran the mypy.
Checklist

[ ] I have updated the documentation accordingly.
[x] All new and existing tests passed.

@pcustic now that @io7m changes have gone in, there are some conflicts here. Can you resolve them, then we can get this code reviewed and in.

@jonathangreen conflicts resolved in https://github.com/ThePalaceProject/circulation/pull/652/commits/a05ac3daa283b4a1521c1670d7b4fdab574d97e5

@jonathangreen thanks for the comments added changes in https://github.com/ThePalaceProject/circulation/pull/652/commits/edf2b8ecd8daa4ae3804e6edb3888744226c3fef.

@jonathangreen There were some failed tests with latest commits so I fixed those. Regarding that change with adding dummy __init__ of BaseCirculationApi - all of the inherited classes have the constructor with two parameters but the base class is used directly in the tests so I added those dummy parameters to the tests. I'm not sure that is the best solution since we are adding dummy code to the class and the tests just to pass the tests and type checking. Let me know what you think.

I'm not sure that is the best solution since we are adding dummy code to the class and the tests just to pass the tests and type checking. Let me know what you think.

I'm personally fine with this. I see this as a good example of the application of types exposing an inconsistency in the codebase.

@jonathangreen I updated this branch with the code from main, resolved all the conflicts and fixed errors that were introduced with the new code.


Release build crashes on RN 0.49+

Awesome work on the library!
Steps to reproduce the behavior

RN49+
Setup as usual

Expected behavior
Release build should not crash
Actual behavior
Release build crashes on launch
React Native 0.49 changes the JS entry point of RN App
So we have single index.js instead of separate index.android.js and index.ios.js
This breaks the generated scripts since it expects index.ios.js as the entry point.
The fix would be to add index.js on the generated build phase script

Would be great if this is documented somewhere 👍

nvm I'm using the older version of the library for some weird reasons


[NO QA] Fix proptypes warning in MenuItemWithTopDescription

Details

Fix MenuItemWithTopDescription receiving an invalid style prop and pass an empty array instead.
Fixed Issues

$ https://github.com/Expensify/App/issues/14385
Tests

Navigate to settings.
Open the console and then click on your Avatar.
Verify there are no console warnings related to proptypes.

Offline tests

N/A.
PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos
I'm only adding Web chrome here as this is just fixing a proptypes warning and it should work in all platforms.

Web

https://user-images.githubusercontent.com/9680864/213719163-bfb4b36f-9ba6-4951-bc42-4728c40b3dc3.mov

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.2.58-1 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.2.58-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


[query] Is it not possible to run ollama python library on a colab notebook ?

Hi , I am getting some error while running ollama python library in colab notebook . Is it not possible to do so ?  I am getting connection error
Perhaps it is not meant to be like that ?

I think the intention is that Ollama is run locally on your machine. If you are using colab, then you would need to initialize a client that is connected to a running ollama model that has external connections.
I assume that running ollama on a server would involve some challenges to secure for open internet access. But assuming it is running somewhere, you could do:
from ollama import Client
client = Client(host='https://YourExternalClient.com')
response = client.chat(model='llama2', messages=[
  {
    'role': 'user',
    'content': 'Why is the sky blue?',
  },
])

This library is intended to be the client library. It requires an running ollama instance to function. If that's what you're interested in, there's an example notebook in the ollama/ollama repo you can checkout: https://github.com/ollama/ollama/tree/main/examples/jupyter-notebook
Otherwise, it is as @connor-makowski says above.


CPU frequency limits are too slow (tlp)

https://github.com/secureblue/secureblue/issues/109
Haswell laptop with SecureBlue:
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
900000
Haswell laptop with Fedora Kinoite:
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
3000000
Same with my Alder Lake laptop, which should boost to 4.7GHz but is limited to 2.1
This is an issue across all cpufreq governors, I've tested them all :')
I wouldn't have noticed had I not tried to use my Haswell laptop, which is horrendously slow at 900MHz.
CPU_MAX_PERF_ON_BAT=30
Is just too low for most laptops, especially older ones that can't clock to at least ~1.6GHz with 30%

Ok, is there something you want to do about this? Keep in mind that bling is for optional parts for custom images, config is for main images.

Ok, is there something you want to do about this? Keep in mind that bling is for optional parts for custom images, config is for main images.

Even if optional, a more sensible default would be
CPU_MAX_PERF_ON_BAT=70
Instead of 30, huge improvement that makes the laptop much more usable but still conserves energy and limits heat output.

FYI, this might actually be buggy and not just a question of preference:

Error in configuration at INTEL_GPU_MIN_FREQ_ON_AC="100": frequency invalid or out of range (see 'tlp-stat -g').

(for a card with 360mhz min)

Hi! It was me that made that "laptop" option. I just copied the whole TLP config from the ublue-os/framework configs. Maybe having that as a general option wouldnt be great. We could just split the laptop option onto: laptop-framework laptop-asus and laptop options with each of them with their own frequencies and everything

This issue was addressed on https://github.com/ublue-os/bling/commit/85d3b6b8fd365b22dd8b343b1918b44454630833
I hope this is a better configuration for you all, if not, please make another issue or just comment on this one!


I'm on the upload white list  now it says I've hit my upload limit and need to contact the Zooniverse

I should be on the white list on all my projects, it says the same message

This is a front end issue. Closing and will open issue there.


MPRIS: Allow {dynamic} format to be changed

I wish to control the order of {artist}, {album}, {title} and {length} as well as the separator(s) used between them.

I have updated with the Wiki with this information after reading the C+ source.


Add LoongArch architecture definition

LoongArch is a newish ISA that was introduced by Loongson, who previously made MIPS64r2 processors.
LoongArch is essentially a fork of MIPS64r5 with some RISC-V influences added alongside Loongson's previous proprietary MIPS extensions.
The apk architecture name for this architecture is 'loongarch64', while the OCI architecture name is 'loong64'.
This change allows apko to build images for the Alpine loongarch64 port.

bump ?


Updates chalk to 1.0.0.

Updates Chalk to latest version, 1.0.0. See the releasenotes for the changes.
This is the first major version, and the API can now be considered stable.
This commit and PR is auto-generated. Please merge with care. My apologies if it's undesirable.
Made with ♥ by Sindre, Joshua, and all our wonderful contributors.

Merged into next.
Thanks a lot!


Package content tests - add exists / not_exists

Sometimes you want to check that a file is there and sometimes the inverse.
We had ideas to use ~ foo.txt to say 'not exists' but people were against it.
Instead, let's use a dictionary like so:
package_content:
  include:
    exists:
      - foo.hpp
    not_exists:
      - baz.hpp

Note: this reflects includes and excludes from the regular "glob" places.


Adding solution of Arithmetic Subarrays

Pull Request Template

Problem Name : Arithmetic Subarrays

Summary : We have been asked Q queries. Every query has a range l and r and we have to tell whether the array elements from l to r form an Arithmetic Sequence. The idea is to find the maximum and minimum element of the sub array for every query and divide the difference of maximum and minimum element into (maximum - minimum)/x equal parts, where x is the size of the sub array.
Now we jump to every part and check whether the given part is present in the sub array. For this we can use a hash set, I have used index based hashing in the array to save some time.  :smile:

Difficulty : Medium

Description
Please include a summary of the problem and about the approach to solve the solution. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Put check marks:
Have you made changes in README file ?

[x] Added problem & solution under correct topic.
[x] Specified Space & Time complexity.
[x] Specified difficulty level, tag & Note(if any).

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

[x] Test A
[x] Test B

Make sure all below guidelines are followed else PR will get Reject:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code so that it is easy to understand
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules

Hey @GouravRusiya30,
We can add a block of editorial or summary of the solution for the Problem in the code file as well. Because, simply looking at the code solution won't help the beginner programmers much. If there is a gist or an idea of how the problem can be approached and solved then it would help others a lot.
I have tried to put my editorial for the Problem in the solution code as comments.

@SauravP97
I totally Agree with your point !!!
Infact that;s what @lokendra1704 Also suggested initially & he always put the editorial in the solution code as comments.
Please suggest if you have some template for the editorial for our git repo.
Once again thanks Saurav for Contributing !!!

@SauravP97
I totally Agree with your point !!!
Infact that;s what @lokendra1704 also suggested initially & he always put the editorial in the solution code as comments.
Please suggest if you have some template for the editorial for our git repo.
Once again thanks Saurav for Contributing !!!

Okay @GouravRusiya30 ,
I will look into it. If I find anything worth sharing, I will let you know,
P.S. Sorry I accidentally closed the PR, I have reopened it now !

@SauravP97
No problem !!!
I will be happy to discuss that & feel free to join our telegram group - https://t.me/codedecksgrp
I will be Happy if you want to be part of that grp :)

Sure @GouravRusiya30, I would love to be a part of the group :grinning:


restoring back-link-href and back-link-text properties

Not sure how this happened, but these 2 properties were accidentally deleted last July. Restoring them.

Out of curiosity Does the version need to change whenever a UI component is modified?

Yes. When this merges, I'll increment the patch version, then BSI will need to pull in that version for it to appear in the LMS.


check_duplicates() returning also non duplicates and indicator=True should show which ones had a duplicate that had been dropped

At least a flag, possibly a count
Currently all rows have False, pretty useless

implemented, possibly worth looking at adding a counter of some sort, keeping open for a while to review if this is possible


Possible solution for translations

Hi,
In a recent project I've used this sweet plugin. Great work!
I needed the weather status in a different language then the Yahoo API provides. This is not supported (as stated in the docs). The solution I used to fix this, is to translate the status codes myself into my native language (Dutch), and save it in an object. This could probably also be a JSON file.
var weatherstatus_nl = { 	0 : 'Tornado', 	1 : 'Tropische storm', 	2 : 'Orkaan', 	3 : 'Zware onweersbuien', 	4 : 'Onweersbuien', 	5 : 'Regen en sneeuw', 	6 : 'Regen en ijzel' 	// and so on... };
When displaying the status, I'm using the weather.code variable to get the corresponding status from the translation.
html += '
'+weatherstatus_nl[weather.code]+'
';
Maybe this helps others in using this plugin in their native language.

Thanks for this. A few others have been doing translations the same way and I believe it's the best way to do it.


Beatmaps won't download

Describe the bug
beatmaps don't download
To Reproduce
Steps to reproduce the bug (be as detailed as possible, otherwise it much harder for me to fix it):

Try to download a beatmap from webosu

Expected behavior
The beatmap downloads.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Arch Linux; KDE Plasma
Browser: chromium
Version: 122.0.6261.94

Additional context
if it can't be reproduced then it's probably something on my end

skill issue

found out it was because of the managed network I was on :p

i was already assuming that type of thing because we do seem to get blocked off a lot of network content management at this point and i don't like that a bit xd

blame fortinet and fortiguard


[OTHER]: Gitter link not working

What would you like to share?
Gitter link is giving as error 404 not found.
https://24pullrequests.com/about
Additional information
No response

Thanks for reporting, no idea what happened to Gitter, maybe it should just be removed

Maybe replace Gitter with your GitHub Discussions.

@andrew Gitter has now been fully incorporated into Matrix/Elements.  This has only just recently happened:
https://blog.gitter.im/2023/01/16/gitter-is-going-fully-native-matrix-in-feb-2023/

The room is still there, and you can access it via:
https://app.gitter.im/#/room/#24pullrequests_24pullrequests:gitter.im

Thank you for sharing! @gep13


Flame throws exception in Web / Chrome  on Restart

What happened?
Minimal Flame example throws Exception in Flutter Web with message "Trying to render a disposed EngineFlutterView." (to reproduce see below). Tested with Flame 1.20 and 1.19 / Flutter 3.24.3 / VSCode on Mac with Chrome
What do you expect?
No exception thrown
How can we reproduce this?

Flutter -> New Project  -> Empty Application

Select Chrome / Web

Run / Debug

Open Javascript console

Restart (try a few times)
--> Exception is not thrown

In Terminal flutter pub add flame

replace contents of main.dart with

import 'package:flame/game.dart';
import 'package:flutter/widgets.dart';

void main() {
  final game = FlameGame();
  runApp(GameWidget(game: game));
}

(same as https://docs.flame-engine.org/latest/tutorials/bare_flame_game.html)

Restart (try a few times)
--> Exception is thrown

What steps should take to fix this?
Hmmmmmmmmmmmmm
Do have an example of where the bug occurs?
see above
this error does not occur in the zap.run environment which does not implement restart
Relevant log output
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
js_primitives.dart:28 The following assertion was thrown during a scheduler callback:
js_primitives.dart:28 Assertion failed: org-dartlang-sdk:///lib/_engine/engine/window.dart:102:12
js_primitives.dart:28 !isDisposed
js_primitives.dart:28 "Trying to render a disposed EngineFlutterView."
js_primitives.dart:28
js_primitives.dart:28 When the exception was thrown, this was the stack:
js_primitives.dart:28 dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 296:3     throw_
js_primitives.dart:28 dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3      assertFailed
js_primitives.dart:28 lib/_engine/engine/window.dart 102:13                                           render
js_primitives.dart:28 packages/flutter/src/rendering/view.dart 353:7                                  compositeFrame
js_primitives.dart:28 packages/flutter/src/rendering/binding.dart 607:19                              drawFrame
js_primitives.dart:28 packages/flutter/src/widgets/binding.dart 1164:13                               drawFrame
js_primitives.dart:28 packages/flutter/src/rendering/binding.dart 468:5                               [_handlePersistentFrameCallback]
js_primitives.dart:28 packages/flutter/src/scheduler/binding.dart 1397:7                              [_invokeFrameCallback]
js_primitives.dart:28 packages/flutter/src/scheduler/binding.dart 1318:9                              handleDrawFrame
js_primitives.dart:28 packages/flutter/src/scheduler/binding.dart 1176:5                              [_handleDrawFrame]
js_primitives.dart:28 lib/_engine/engine/platform_dispatcher.dart 1408:5                              invoke
js_primitives.dart:28 lib/_engine/engine/platform_dispatcher.dart 310:5                               invokeOnDrawFrame
js_primitives.dart:28 lib/_engine/engine/initialization.dart 187:36                                   <fn>
js_primitives.dart:28 dart-sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart 188:27  _callDartFunctionFast1

Execute in a terminal and put output into the code block below
Output of: flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-x64, locale
en-GB)
• Flutter version 3.24.3 on channel stable at
/Users/m/root/dev/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/m/Library/Android/sdk
• Platform android-34, build-tools 35.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.94.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0
[✓] Connected device (2 available)
• macOS (desktop) • macos                     • darwin-x64     • macOS
15.0.1 24A348 darwin-x64
• Chrome (web)    • chrome                    • web-javascript • Google
Chrome 129.0.6668.101
! Device emulator-5562 is offline.
[✓] Network resources
• All expected network resources are available.
Affected platforms
Web
Other information
Haven't seen this before
Are you interested in working on a PR for this?

[ ] I want to work on this

Note the pure Flutter app does not throw, only with Flame (see reproduce steps)

Yeah I noticed that, it can still be a Flutter issue though.

I would need to install something to manage multiple flutter versions, what do you recommend? Or use flutter downgrade?

If Flutter downgrade takes you far enough back that works, otherwise I'd recommend https://fvm.app

OK, this is pretty weird. I am seeing the same error on my Windows machine with Flutter 3.19.6. But this time it also throws in the Flutter app, not just with Flame.

@crcdng does this also happen on the newly released Flutter 3.27.0?

it's gone. closing.


Containerapp-compose Release 0.2.1

New version for containerapp-compose
v0.2.1

Fix bug where location parameter was not being passed to containerapp environment creation
Make memory/cpu resolution more resilient and improve warning messages

This checklist is used to make sure that common guidelines for a pull request are followed.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

container app

@zhoxing-ms This PR should be ready for review.  There are just a few bug fixes and error message improvements, so it shouldn't be too bad to review.  Let me know what else we may need to get this merged.  Thank you!


fix(): "Add no-choice tag in select2-multiple template"

Missing no-choice tag in select2/select-multiple.tpl.html

Hmm what happens if user isn't using no-choice but $select.items.length == 0 I feel like the original condition is there intentionally so it doesn't display empty drop down.


Welcome: Loss of focus after "More" button in the editor title

Environment Details:
VSCode Version : 1.24.1
OS Version : Win10
Additional Details:
MAS Violated: MAS2.4.3
Repro Steps:

Launch VS Code
Click on Help from the menu bar--> Click on Welcome
Press tab key till More button.

Actual:
Loss of focus found after "More" button and before New File link.
Expected:
After More Button, focus should move to new File link.
Recommendations:
Refer below link which is repository of bug fixes code snippets:
https://microsoft.sharepoint.com/teams/msenable/mas/pages/browse-fixes.aspx
MAS Reference
https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={0de7fbe1-ad7e-48e5-bcbb-8d986691e2b9}
Attachment for Reference:

Does this issue occur when all extensions are disabled?: Yes

Invalid. After more we focus the whole window, and after that we focus the first item in the weclome again. Just like in any other editor.
This is just how focus works in the browsers and this is expected behavior.
fyi @bpasero


eBay API URI inconsistencies causing problems with sandbox

Firstly, thanks for writing this! I am trying to implement it, although my needs are probably slightly different as I am working on a web-based app so I have to get my credentials and refresh token in another way and then hack them while creating the API instance... (also I have to replace _refresh_user in Token, since I need to get an access code from a stored refresh token rather then running through the whole authorization process again, but then you should probably do that too...)
Anyway, I am trying to use the Finances API, and that has API endpoints of the form apiz.ebay.com and apiz.sandbox.ebay.com, which means the replacement of 'api.ebay.com' with 'api.sandbox.ebay.com' in _get_swagger_method in a_p_i.py (line 367) doesn't work; you probably need to match 'apiz.ebay.com' as well?
Thanks again :) hopefully I can contribute something back to this project.

As it happens, I am currently reworking user token management. So please answer a few questions so that I can better understand your needs.

Do you have one set of application credentials and multiple sets of user credentials?

Instead of storing credentials in ebay_rest.json, do you want to supply parameters when instantiating an API object?

Outside of ebay_rest, do you want to acquire a user token and then supply it to ebay_rest as a parameter when instantiating an API object?

Which calls within the Finances API do you plan to use? Perhaps I will add one to the unit tests to provide a working example for you and others.
Posting issues is one way to contribute to the project, and thanks for being the first to do that! I'm still learning about GitHub best practices. I've noticed that some projects make issues for each contribution opportunity. Do you recommend this or some other approach to making it easier for others to get involved?

Hi,

I have one set of application credentials (app ID, dev ID, cert ID, RU name) and one set of user credentials personally (this app is only used by our company); more specifically, I acquire through my app a refresh token for production and sandbox (which are of course different eBay accounts, so technically I guess I do have multiple users).
We use ebay_sdk for the trading API side, so previously we have stored credentials in the ebay.yaml file it uses, but that's not as convenient for the OAuth APIs where you need to go through the authorization flow to get a refresh token, so being able to supply these when instantiating the API object would be more convenient (in my current testing I have them stored in the database).
Yes (in fact I am already doing that, and dropping it into ebay_rest via some hackery setting the attributes, tokens, scopes etc. in the Token class, and monkey-patching _refresh_user for now although I'm assuming it will all evolve so this is temporary).

I think it would be good to be able to pass a refresh token (together with the matching scopes(?) and RU name) to the API, and have that be persistent in Token (or CredentialUtil).
We are trying to get access to the Finances API (sell_finances), so I've been trying to play with get_transactions. I did briefly get it working in the sandbox (with a lot of hackery); there are issues with user_access_token being set wrong by the process_api_cache script. I'm trying to work out how to fix it. I think it is a pain since Swagger only seems to import one thing from the components/securitySchemes in the JSON which doesn't really help, so will have to be something like what you do with base_path to get it from the JSON and then doing it manually. I think you need to look at what scope each call is making and then choose the appropriate authentication?


[BUG] Got TLS handshake error by chance

Describe the bug

What are you trying to do?

We customize micro api tool with a plugin to enable client TLS connection:
func (p *tlsPlugin) Init(ctx *cli.Context) error {
	if !p.insecure {
		err := client.DefaultClient.Init(
			client.Transport(
				transport.NewTransport(transport.Secure(true)),
			),
		)
		if err != nil {
			return err
		}

		log.Info("TLS is enabled.")
	} else {
		log.Warn("TLS is disabled. INSECURE")
	}

	return nil
}

Then, we start the customized micro api with rpc handler:
micro --registry=etcd api --handler=rpc --enable_rpc

And we have a micro servcie run with TLS:
func newService() micro.Service {

	// Create a new service. Optionally include some options here.
	svcOpts := []micro.Option{

		micro.Transport(
			// create new transport
			transport.NewTransport(
				// set to automatically secure
				transport.Secure(true),
			),
		),
	}

    svc := micro.NewService(svcOpts...)

	return svc
}

We run all the services with Docker and Docker Compose.
$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:34 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:29:19 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

$ docker-compose version
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j  20 Nov 2018

We tried to invoke an API with Postman:

What did you expect to happen?

It should response with a correct API response data or customized API error.

What happens instead?

If we call the API quickly and repeatedly, there's an error occurs by change, not every time:
{
    "id": "go.micro.client",
    "code": 500,
    "detail": "connection error: tls: first record does not look like a TLS handshake",
    "status": "Internal Server Error"
}

How to reproduce the bug:
Repeatedly and quickly call any API. It would get such error by chance. It happens on both macOS and Ubuntu.
Environment:
Go Version: please paste go version output here
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/skyjia/Library/Caches/go-build"
GOENV="/Users/skyjia/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY="github.com/jinmukeji/*"
GONOSUMDB="github.com/jinmukeji/*"
GOOS="darwin"
GOPATH="/Users/skyjia/go"
GOPRIVATE="github.com/jinmukeji/*"
GOPROXY="https://goproxy.io,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/skyjia/Workspace/JinMu/repo/partner-web-api/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7x/hzwnrksj3v78rjxmrdn03sdw0000gn/T/go-build744793299=/tmp/go-build -gno-record-gcc-switches -fno-common"

go.mod
	github.com/micro/cli v0.2.0
	github.com/micro/go-micro v1.18.0
	github.com/micro/go-plugins v1.5.1
	github.com/micro/micro v1.18.0

Please advise.

set micro api run with TLS
call **https**://localhost:8080/rpc
# micro --help | grep TLS
   --enable_tls                    Enable TLS support. Expects cert and key file to be specified [$MICRO_ENABLE_TLS]
   --tls_cert_file value           Path to the TLS Certificate file [$MICRO_TLS_CERT_FILE]
   --tls_key_file value            Path to the TLS Key file [$MICRO_TLS_KEY_FILE]
   --tls_client_ca_file value      Path to the TLS CA file to verify clients against [$MICRO_TLS_CLIENT_CA_FILE]

@Astone-Chou
We just want to enable TLS for micro api default client only to access backend micro service.
We also tried to enable TLS server and access via HTTPS from Postman as you mentioned, it has the same issue.

We find out the cause.  There is another micro service that has a gRPC plugin enabled and the same FQDN with the one mentioned above.  This error only occurs when they are running at the same time.


Taerobee

Update and rename Taerobee.frozen to Taerobee.netkan

url's
Author's ? (Baele and zer0Kerbal)
version
license updated to CC BY-ND 3.0 Unported

https://github.com/zer0Kerbal/Taerobee

FYI, that license change is probably not allowed by the "ShareAlike" clause:

The license has been changed to accomodate @Beale's desire - it is now CC BY-ND 3.0

OK, took a look into it (Beale seems to be @Tantares on GitHub rather than "beale", so we probably wouldn't have gotten a reply from that tagging), and the forum thread went through a few stages...
Abandonment:

Deletion:

More forceful abandonment w/ ARR:

Acceptance:

So based on that, one possible interpretation is that Beale as the owner has granted @zer0Kerbal the rights that were previously reserved, including assigning a new license. It would be nice to have that as a formal license rather than having to make up my own dubious legal case (and technically there could still be problems if the adopted content had contributions from other authors), but the main thing is making sure that the original/previous author(s) are happy. :+1:

I have the documentation to back up your assertations.  Since it was via direct message I will not post unless legally necessary and legally prudent.

Sounds good, I'm fine with that. :+1:

@zer0Kerbal, the release is missing the ZIP file:
https://github.com/zer0Kerbal/Taerobee/releases/tag/<IP_ADDRESS>-adoption

I have the documentation to back up your assertations. Since it was via direct message I will not post unless legally necessary and legally prudent.

For what it's worth, the scenario I want to avoid is:

The original author of a CKAN-indexed mod with a restrictive license goes quiet
Someone else shows up claiming to have received private permission to adopt
We update the netkan to track the new fork
Six months later, the original author appears and says, "No, I never gave them permission to do that, they've been violating the license this whole time"

That could be a big mess for CKAN, with a lot of fence-mending and metadata pruning and user announcements to take care of. If we can point to a public announcement by the original author supporting the new maintainer's claims, as we (mostly) can in this case, then that's a pretty solid defense, as few people will knowingly argue against themselves once presented with such receipts. But if we look back and it turns out that we just took the word of someone when it wasn't appropriate to do so, that would look pretty bad.


URL scheme for Google Calendar

Hi @Dreamersoul,
thanks for this great project!
I want to ask,  is there a way to pass the event detail info to Google Calendar by the scheme?  I've searched for a long time but no useful result was found. (Google Maps provide one : https://developers.google.com/maps/documentation/urls/ios-urlscheme , but not good for the calendar).
I try my luck here, any advise will be appreciated.
Thanks again.

Greetings! This project is mainly an effort by @mazyod he deserves all the credit!
The thing is we had a hard time finding iOS schemes! If you find that we are missing any please let us know! Thank you

Hey,
We took Google Calendar scheme from here
@vin-zhou I hope this will help.


Tiny change: Fix log level

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: santoshx sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


extraGroups not working

Issue description
Any changes to users' extraGroups does not appear in /etc/group.  It used to work for me; I'm not sure what changed since adding my last group.  nixos-rebuild does not report any issues.
Steps to reproduce
Add any new group to users.users.myuser.extraGroups and do a nixos-rebuild switch.
Technical details

system: "x86_64-linux"
host os: Linux 4.9.86, NixOS, 17.09.3189.fd016e362da (Hummingbird)
multi-user?: yes
sandbox: no
version: nix-env (Nix) 1.11.16
channels(root): "nixos-17.09.3189.fd016e362da"
channels(kyndig): ""
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

I was trying to add my user to the adbusers group and it turns out the group doesn't actually get created unless you set programs.adb.enable = true.  Setting extraGroups doesn't actually create a group, nor does it complain that the group doesn't exist when running nixos-rebuild.

I ran into this -- note that despite running nixos-rebuild switch, one may need to re-login for groups to take effect in the given session.


python 3.6 - conda install cvxopt is not working

Hi, I am trying to install cvxopt using anaconda, but I am getting the following error:
`PackageNotFoundError: Package missing in current win-64 channels:

cvxopt`

I also tried  conda install -c conda-forge cvxopt and pip install cvxopt , still getting some error. Could you please help me with this issue.
Thanks,

That's expected. As noted in the README of the feedstock, we don't currently build cvxopt for Windows. Sorry. 🙁
While it's certainly reasonable to request Windows packages, it's simply not easy to achieve given that most of the dependencies also don't support Windows at this time. Plus getting them to build on Windows is not trivial. So this is not likely to get completed any time soon without significant community engagement.
In the interim, I'd suggest using a Linux Docker container or possibly the Windows Subsystem for Linux (on Windows 10).

Thanks for your response @jakirkham. You mean there is no way to install it for Windows, even if I move to python 2.7?
Thanks,

That's correct.

FWIW the situation has gotten better as glpk and gsl do have Windows builds. However we would still need to address fftw and suitesparse. The former has seen a bit of progress towards Windows support. However suitesparse is a different story.

Thanks, so still it is not gonna happen in a few days, right?
BTW, I am not that experienced in Linux. So if I want to use Linux Docker or Windows subsystem for Linux as you suggested, do I need to install Anaconda again in the subsystem? or I can use it to install and use cvxopt?

Thanks, so still it is not gonna happen in a few days, right?

Correct. Was more noting that this use to be totally impossible, but it is looking better in the long run.

...if I want to use Linux Docker or Windows subsystem for Linux as you suggested, do I need to install Anaconda again in the subsystem?

So these are totally different things IIUC.
With the Docker container, I'd recommend getting something that has been prebuilt with Miniconda or Anaconda installed. The condaforge/linux-anvil has Miniconda on it. Also the Continuum Docker images would work as long as the conda-forge channel is given higher priority than defaults. As another option Jupyter's docker-stacks, have preloaded Docker images with the Jupyter notebook and everything needed to make function plus relevant additions. Any of these would be a good starting place and it should be relatively easy to install cvxopt within this containers. Could also build your own container that extends from anyone of these and installs cvxopt as part of the container build. That way it is just ready to go.
I'm a little less clear on how the Windows subsystem for Linux works as I have not used this personally, but have heard good things from others who have tried it. My guess would be that you would need to install Miniconda or Anaconda in that environment. That said, it shouldn't be too difficult to do. Though this could be simply my lack of understanding/overly cautious response, it looks like they might work together.

HI @jakirkham!
I am trying to install cvxopt on a linux server, but still, I am getting the following error:
conda install cvxopt
Fetching package metadata ...
CondaHTTPError: HTTP None None for url <https://conda.anaconda.org/conda-forge/linux-64/repodata.json>
Elapsed: None

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/linux-64/repodata.json (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fa78a554da0>: Failed to establish a new connection: [Errno 101] Network is unreachable',))",),)

Could you please help me with this error? Thank!

Are you able to ping google (i.e. ping www.google.com)?

This is what I get.
ping www.google.com
PING www.google.com (<IP_ADDRESS>) 56(84) bytes of data.


rename TypeKind::Named to TypeKind::TypeParam

fixes https://github.com/rust-lang-nursery/rust-bindgen/issues/914. r? @fitzgen
I made the changes and cargo build and cargo test run ok.  However, "testing generated bindings" fails.  I checked and it seems to be failing even before my changes?
$ cd tests/expectations
$ cargo test

However, "testing generated bindings" fails. I checked and it seems to be failing even before my changes?

Huh. Our CI is still passing, and I can run them locally just fine, so I suspect this is a build env issue. Do you have the LIBCLANG_PATH var set while running these tests as well?

thanks for the review!  I will update the pull request soon.
Yup, I ran the tests with LIBCLANG_PATH set.  I couldn't find libclang.so even searching recursively through that directory, so I didn't set DYLD_LIBRARY_PATH.

tests_expectations output
   Compiling tests_expectations v0.1.0 (file:///Users/annaliao/repos/rust-bindgen/tests/expectations)
error: unions are unstable and possibly buggy (see issue #32836)
  --> tests/layout_mbuf.rs:90:1
   |
90 | / pub union rte_mbuf__bindgen_ty_1 {
91 | |     /// < Atomically accessed refcnt
92 | |     pub refcnt_atomic: rte_atomic16_t,
93 | |     /// < Non-atomically accessed refcnt
94 | |     pub refcnt: u16,
95 | |     _bindgen_union_align: u16,
96 | | }
   | |_^
error: unions are unstable and possibly buggy (see issue #32836)
--> tests/layout_mbuf.rs:124:1
|
124 | / pub union rte_mbuf__bindgen_ty_2 {
125 | |     /// < L2/L3/L4 and tunnel information.
126 | |     pub packet_type: u32,
127 | |     pub __bindgen_anon_1: rte_mbuf__bindgen_ty_2__bindgen_ty_1,
128 | |     bindgen_union_align: u32,
129 | | }
| |^
error: unions are unstable and possibly buggy (see issue #32836)
--> tests/layout_mbuf.rs:458:1
|
458 | / pub union rte_mbuf__bindgen_ty_3 {
459 | |     /// < RSS hash result if RSS enabled
460 | |     pub rss: u32,
461 | |     /// < Filter identifier if FDIR enabled
...   |
467 | |     bindgen_union_align: [u32; 2usize],
468 | | }
| |^
error: unions are unstable and possibly buggy (see issue #32836)
--> tests/layout_mbuf.rs:477:1
|
477 | / pub union rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 {
478 | |     pub __bindgen_anon_1: rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
479 | |     pub lo: u32,
480 | |     bindgen_union_align: u32,
481 | | }
| |^
error: unions are unstable and possibly buggy (see issue #32836)
--> tests/layout_mbuf.rs:641:1
|
641 | / pub union rte_mbuf__bindgen_ty_4 {
642 | |     /// < Can be used for external metadata
643 | |     pub userdata: *mut ::std::os::raw::c_void,
644 | |     /// < Allow 8-byte userdata on 32-bit
645 | |     pub udata64: u64,
646 | |     bindgen_union_align: u64,
647 | | }
| |^
error: unions are unstable and possibly buggy (see issue #32836)
--> tests/layout_mbuf.rs:675:1
|
675 | / pub union rte_mbuf__bindgen_ty_5 {
676 | |     /// < combined for easy fetch
677 | |     pub tx_offload: u64,
678 | |     pub __bindgen_anon_1: rte_mbuf__bindgen_ty_5__bindgen_ty_1,
679 | |     bindgen_union_align: u64,
680 | | }
| |^
error: aborting due to 6 previous errors
error: Could not compile tests_expectations.
Build failed, waiting for other jobs to finish...
error: build failed

Thanks for the guidance to fix the remaining "named" occurrences.
I ran "rust fmt" and it flagged a bunch of line length issues, some in files that I didn't modify.

I couldn't find libclang.so even searching recursively through that directory

Ok, that's (one of?) the issue(s?). LIBCLANG_PATH needs to point to the directory that contains libclang.so or else bindgen is going to have a bad time.

error: unions are unstable and possibly buggy (see issue #32836)

Have you run rustup update stable in the last few weeks? The latest stable release enabled unions.

I ran "rust fmt" and it flagged a bunch of line length issues, some in files that I didn't modify.

That's fine, don't worry about it.

:umbrella: The latest upstream changes (presumably #916) made this pull request unmergeable. Please resolve the merge conflicts.

Thanks for the review @fitzgen!  I squashed the commits, but I'm not sure if I handled the merge conflicts correctly.
Regarding the libclang.so, I ran rustup update stable and still not finding libclang.so along the directory tree where I'd expect it.  I'm trying a full search to see if it is somewhere else.

:umbrella: The latest upstream changes (presumably #922) made this pull request unmergeable. Please resolve the merge conflicts.

Thanks @anna-liao ! I reworded the commit message to be a little more descriptive (you're still marked as author ;) ), and it is landing in https://github.com/rust-lang-nursery/rust-bindgen/pull/924
Thanks again!


Joe Danger 1: Runs uncapped at display rate

Joe Danger 1 recently started working on deck thanks to proton Experimental, but the game has an issue where the framerate is determined by your devices refresh rate. It works fine at 60 fps on an LCD Deck, but on an OLED Deck running at 90 fps, this makes the game go turbo since the game speed is tied to the framerate.
https://www.pcgamingwiki.com/wiki/Joe_Danger
Software information
Joe Danger 1
System information

GPU: AMD Van Gogh
Driver: Mesa 23.1.3
Wine version: 9.0
DXVK version: Unsure what version is being used in proton

Apitrace file(s)

For instructions on how to use apitrace, see: https://github.com/doitsujin/dxvk/wiki/Using-Apitrace
Log files
Please attach Proton or Wine logs as a text file:

When using Proton, set the Steam launch options for your game to PROTON_LOG=1 %command% and attach the corresponding steam-xxxxx.log file in your home directory.
When using regular Wine, use wine game.exe > game.log 2>&1 and attach the resulting game.log file.

steam-229890.log.txt

@waspennator this game uses OpenGL instead of DirectX

@waspennator this game uses OpenGL instead of DirectX

I thought it used directx looking at the system requirements,  still it would be nice if there could be some way of limiting the framerate to 60 outside of doing it through the Steam deck ui or locking it through the launcher.

It's opengl: https://www.pcgamingwiki.com/wiki/Joe_Danger#Other_information
system reqs will just mention directx a lot of the time because that's what people know.
DXVK can't do anything about framerate limits in opengl games.

It's opengl: https://www.pcgamingwiki.com/wiki/Joe_Danger#Other_information system reqs will just mention directx a lot of the time because that's what people know. DXVK can't do anything about framerate limits in opengl games.

On second thought yeah just disregard this report, I'm dumb and dunno how I missed that.

It's opengl: https://www.pcgamingwiki.com/wiki/Joe_Danger#Other_information system reqs will just mention directx a lot of the time because that's what people know. DXVK can't do anything about framerate limits in opengl games.

I totally didn't just add that to the page after you wrote it was OpenGL :no_mouth:

The game has a builtin FPS locker if you click on Custom settings (but only 30 FPS):

So far I haven't faced issues playing it at 75hz.


Add a CMake macro to automatically create wrapper nodes

Defines a CMake macro swri_nodelet_add_node(NODELET_NODENAME NODELET_TYPE) that automatically generates the c++ code for a node wrapper with node name NODELET_NODENAME that wraps the nodelet of type NODELET_TYPE and makes a CMake target to build the node.

The node wrapper is based on this template from Clearpath.

Example usage:
cmake_minimum_required(VERSION 2.8.3)
project(my_project)
find_package(catkin REQUIRED COMPONENTS
    nodelet
    swri_nodelet
)

catkin_package(
  LIBRARIES ${PROJECT_NAME}_nodelets
  CATKIN_DEPENDS nodelet
)

include_directories(include)

## Declare nodelet library
add_library(${PROJECT_NAME}_nodelets
  src/nodelets/my_nodelet.cpp
)
target_link_libraries(${PROJECT_NAME}_nodelets ${catkin_LIBRARIES})

## Generate a node from the nodelet
swri_nodelet_add_node(my_node my_project/my_nodelet)

I recommend a different node wrapper.  This is what I typically use:
namespace PACKAGE_NS {
boost::shared_ptrnodelet::Nodelet createMyNodelet();
}  // namespace PACKAGE_NS
int main(int argc, char **argv)
{
ros::init(argc, argv, "map_registration");
nodelet::M_string remappings;
nodelet::V_string my_argv;
auto nodelet = PACKAGE_NS::createMyNodelet();
nodelet->init(ros::this_node::getName(), remappings, my_argv);
ros::spin();
return 0;
}
It does have the downside that you have to define the createMyNodelet function in the cpp file containing the nodelet definition:
boost::shared_ptrnodelet::Nodelet createMyNodelet()
{
return boost::make_shared();
}
}  // namespace PACKAGE_NS
but is has the benefit that it still works when your nodelet plugin XML file is wrong and more importantly, it catches missing function definitions at compile time.  Otherwise, the typical compilation succeeds but then the nodelet crashes at runtime with a missing symbol error.

it catches missing function definitions at compile time

That's a major plus in my book.

It does have the downside that you have to define the createMyNodelet function in the cpp file containing the nodelet definition

I dislike that, because it means it doesn't work on a bog-standard nodelet.

it has the benefit that it still works when your nodelet plugin XML file is wrong

I'd actually call that a downside, because it means you can be testing with the wrapped node and everything works, but then you switch to the nodelet and suddenly things are broken.
I think I might be able to find a way to synthesize these two methods together into something with the advantages of both...

I can't think of a way to do this that doesn't require defining that factory function. With that in mind, I'm not sure which approach I favor. I definitely like the advantage of linking at compile time, but I would like this macro to be usable on arbitrary nodelets.
If we end up going with the factory function/pointer approach, I think it should be accompanied by a compile-time checker for the plugin XML file, but that would probably be a good thing to have anyway.
Alternatively, a third approach would be to make a macro for creating a nodelet library. You give it a list of c++ files and it autogenerates a c++ file with the factory functions,  generates the library target, then generates the c++ and targets for all of the wrapper nodes. I like that approach, but it might be inappropriate to put that much magic in a build system.

Tagging @akgoins and @Jmeyer1292 because I think we would find this useful.

I just came up with another idea, so here are the 4 approaches I've thought of

The approach used in this PR. Advantages are that it can be used on any nodelet, and that it will succeed or fail in the same way as a nodelet. It has the disadvantage that, like nodelets, it won't generate compile-time linker errors.
@elliotjo's approach. This approach has the advantage of generating compile-time linker errors. It has the disadvantages that it requires you to define a factory function and that, since it doesn't use dynamic loading, it doesn't expose dynamic loading errors.
Use elliotjo's approach, but provide a C++ macro to generate the factory function. Instead of PLUGINLIB_EXPORT_CLASS(example_pkg::MyNodeletClass, nodelet::Nodelet), declare the nodelet with SWRI_NODELET_EXPORT_CLASS(example_pkg::MyNodeletClass, nodelet::Nodelet), which would wrap PLUGINLIB_EXPORT_CLASS() and also generate the factory function.
Provide a CMake macro for nodelet library generation. You give it a list of c++ files and it autogenerates a c++ file with the factory functions, generates the library target, then generates the c++ and targets for all of the wrapper nodes. The primary disadvantage of this is that it's very complex and puts a lot of magic in the build system.

Of those options, I like 3 the best, followed by 1, then 4. 2 is a subset of 3 since the developer could  choose not to use the macro and just write the factory themselves. I think options 2-4 would benefit from some checks to ensure that dynamic loading is set up correctly and working.
I'm going to start implementing 3, but if anyone has anymore input, I'd appreciate it.

I've implement number 3 above. In the nodelet's c++ file use the following code for the class list macro:
#include <swri_nodelet/class_list_macros.h>
SWRI_NODELET_EXPORT_CLASS(namespace, ClassName);

This exports the nodelet class as usual and also creates a factory function boost::shared_ptr<nodelet::Nodelet> createClassName(); for the nodelet.
In the CMakeLists, to create a wrapper node, use the CMake macro:
swri_nodelet_add_node(node_name namespace ClassName)
target_link_libraries(node_name library_name)

This creates a node executable with the specified node_name using @elliotjo's wrapper.
One feature that's still missing is a test that the node is dynamically loadable. Since the node wrapper uses a shared pointer to load the nodelet, there's no coverage for dynamic loading, so if the nodelet isn't specified in the plugin XML file, it would work in the node wrapper but not as a nodelet.
I've updated the tests to cover the new macros, and all tests are passing. I think this request is ready for review and merge.

Looks great, nice work!


Sort images by tags

The sorting of the versions on the website is a bit random, this is an attempt to fix it

Hello! This invalid order of versions makes me unhappy too, but we cannot just sort tags in lexicographic order.
At least semver-friendly comparator should be used (splitting tags by '.' and comparing slices is enough), but I haven't yet come up with an idea of what to do with tags 'head', 'latest', and other non-semver tags.
It would be perfect if DockerHub provided us with the image tag creation date, but there is no such information (refer to the parsed dockerhub response).
I thought about hardcoding supported non-semver image tags (like 'latest', 'head', 'latest-alpine', 'head-alpine') and putting them at the beginning of the list of tags, but haven't yet decided if this is a good idea.

I made a new comparator, maybe it is a bit bulky, but overall it seems like it does the job: https://go.dev/play/p/Lm1PMLCsD3e

Implemented it in #21, thanks for the idea.
curl 'https://fiddle.clickhouse.com/api/tags' -s | jq . | head -n 20
{
  "result": {
    "tags": [
      "head-alpine",
      "head",
      "latest-alpine",
      "latest",
      "<IP_ADDRESS>-alpine",
      "<IP_ADDRESS>",
      "22.11.2-alpine",
      "22.11.2",
      "<IP_ADDRESS>0-alpine",
      "<IP_ADDRESS>0",
      "22.11.1-alpine",
      "22.11.1",
      "22.11-alpine",
      "22.11",
      "<IP_ADDRESS>-alpine",
      "<IP_ADDRESS>",
      "22.10.4-alpine",


Tesla Cockpit

Fixes #7

@ovbm do you know how I can generate 1x, 2x, and 3x icons from https://apps.apple.com/gb/app/tesla/id582007913 ?

I do it with sketch:
tesla.zip

@corradio
Can you improve the script to pull data if the global status of the car is Awake ? This will guarantee the car is not asleep and should not be awake.
I found my car awake this morning and I do not wake up by my phone. I can help if needed :)

Hi @RSickenberg this is probably best done on TeslaCockpit's side, as we merely get data from them but do not communicate directly with the car.


Don't focus the Add feature button on Tab if save sidebar is open

When saving edits, I always use Ctrl-S, type my message, and then Tab my way over to the Upload button and hit Enter.  This was super fast and efficient, but with the new Add feature option being selected on Tab, I have to use my mouse.
For most Tab operations, the Add feature bar isn't focused, but when switching over from Cancel to Upload, the bar is focused, interrupting the flow.

I've been thinking a lot about the use of the Tab hotkey and I fear that lots of little workflows like this will be messed up. I recommend we try switching to the ` key for adding features and use a different key for collapsing the sidebar.


Can't call service thermiq_mqtt.write_id

Version of the custom_component
v.1.2.3
Configuration

thermiq_mqtt:
  mqtt_node: ThermIQ/ThermIQ-mqtt-bb
  thermiq_dbg: False

Describe the bug
When calling the service thermiq_mqtt.write_id with the provided example values the value is'nt change on the pump and the Core log gives me an error.
How I call the service:
service: thermiq_mqtt.write_id
data:
  register_id: sensor.thermiq_rum_bor2
  value: 20
  bitmask: 2

Debug log

ERROR (MainThread) [custom_components.thermiq_mqtt] no value message sent due to faulty reg:[rum_bor2]

Starting from v1.1.x all registers have changed names and you no longer find the pseudo swedish ones. Plewase check i.e the Lovelace card for all sensors


Uncaught (in promise) TypeError: Cannot read property 'prototype' of undefined(…)

From https://github.com/cytoscape/cytoscape.js/issues/1147
--
Firstly its an awesome layout extension....it works so perfectly on my local .....
but when I access it with my minified code (not the minified spread layout / cytoscape). It gives me the below error.
Uncaught (in promise) TypeError: Cannot read property 'prototype' of undefined(…)
protoreq @ cytoscape.js:7070
fnAsRequire @ cytoscape.js:7121
(anonymous function) @ cytoscape.js:7195
$$.Promise.then._p.running @ cytoscape.js:7194
$$.fn.thread.run @ cytoscape.js:7185
SpreadLayout.run @ layout.js:266
$$.fn.core.layout @ cytoscape.js:8667
callback @ cytoscape.js:8238
My minified code works with breadthfirst layout fine.

Same error here using Meteor

The issue is that Foograph dependency isn't good.  It is one object, yet it makes references to itself as if it were a separate object / global.  It has several prototypes jammed into one object.
Foograph is an old lib, and I didn't write it.  Making it global seems to fix the issue, as global variable names can not be minified.
It would be nice if it didn't have to be a global, but I have lots of higher priority things to do than refactor Foograph.


[Feature][Connector-V2][Kafka]Kafka source supports data deserialization failure skipping

Search before asking

[X] I had searched in the feature and found no similar feature requirement.

Description
Kafka supports blocking or skipping to continue consumption after data deserialization fails
Usage Scenario
When there is abnormal data in Kafka, control blocking consumption or skip to continue consumption
Related issues
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

#4364


As of update 1.5.0, inventory viewer doesn't work

As of updating to 1.5.0, the inventory viewer plugin does not function.
Runelite 1.5.0
Windows 10

works perfect for me. when does it not work?

It does not work when it is turned on or off, the inventory viewer window just doesn't appear. I've tried with gpu both on and off

Never mind. I am monkey. It just doesn't appear when nothing is in your inventory.


python312Packages.whirlpool-sixth-sense: 0.18.8 -> 0.18.9

Diff: https://github.com/abmantis/whirlpool-sixth-sense/compare/refs/tags/0.18.8...0.18.9
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 318886 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.whirlpool
python311Packages.whirlpool-sixth-sense
python311Packages.whirlpool-sixth-sense.dist
python312Packages.whirlpool-sixth-sense
python312Packages.whirlpool-sixth-sense.dist

Result of nixpkgs-review pr 318886 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.whirlpool
python311Packages.whirlpool-sixth-sense
python311Packages.whirlpool-sixth-sense.dist
python312Packages.whirlpool-sixth-sense
python312Packages.whirlpool-sixth-sense.dist


Bug: cURL upload set videos mimetype as application/octet-stream

What happened?
When trying to upload an MP4 video file with cURL command, video uploads as "application/octet-stream" instead of "video/mp4" and is not visible in "Files" panel unless "Show non-media files" is toggled on.
The command I use:
curl -H "Content-Type: multipart/form-data" -H "authorization: $ZIPLINE_TOKEN" -F file=@$VIDEO_PATH $ZIPLINE_UPLOAD_URL

Version
latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)
What browser(s) are you seeing the problem on?
No response
Zipline Logs
No response
Browser Logs
No response
Additional Info
No response

you can try the UPLOADER_ASSUME_MIMETYPES=true variable (sorry this isn't documented rn), which will use the filename extension (in your case it might be video.mp4) and map it to a common mimetype like video/mp4

you can try the UPLOADER_ASSUME_MIMETYPES=true variable (sorry this isn't documented rn), which will use the filename extension (in your case it might be video.mp4) and map it to a common mimetype like video/mp4

Thank you for the response, variable did work however videos don't play back when uploaded with curl despite showing correct mimetype. If same video is uploaded through webgui - no problem at all.
Uploaded with cURL
same file uploaded with webgui

Gave it a try myself, and I wasn't able to reproduce it. I tried downloading the video from the "uploaded with curl" link and opened with mpv:
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
Failed to recognize file format.

the problem is probably with the file instead?
heres the video I uploaded via curl, and it loads in the browser, and dashboard (not shown in the screenshot)


Stool emoji

Stool, a chair without backrest. Since :seat: is a cushy seat, a simple Chair and a Table would also make sense.
Petitions

change.org

Chair is a Candidate for Emoji 12.0 (2019).

🪑 Chair


[Documentation Issue]  Styling Side Bar

Page Name: index
Release: 0.12.0
Grey stops showing after one scrolls down a bit in webpage.

Thanks for the heads up @cobookman . We're working on a bigger-picture way to sort this out where we export docs as JSON and then use a shared Angular app (see https://github.com/GoogleCloudPlatform/gcloud-common/tree/master/site)
I'm going to close this out, but not because it's not broken -- only because we're fixing it another way.
Thanks again for filing the issue :)

Yup. We also had #1028 for this but closed it for the same reason.


feat(rx): add repeat operator (#189)

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

35 of 42 (83.33%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.2%) to 70.245%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

rx/observable-operator.go
35
42
83.33%

Totals

Change from base Build<PHONE_NUMBER>:
0.2%

Covered Lines:
2264

Relevant Lines:
3223

💛  - Coveralls

merge conflict occured (??), so squash & merge required instead of the usual rebase and merge.


[Challenge] Sum Arrays

Sum Arrays
Given an array of values, return the sum of the values.
Business Rules/Errata

Input must be an array.
The array may be nested more than one level.
All values must be integers.
Solutions shall not use built in methods to flatten the array to one-dimension.

Examples
One dimension:
sum_of_array([1,2,3,4,5]) => 15

Two dimensions:
sum_of_array([1,2,[1,2,3],4,5]) => 18

n dimensions:
sum_of_array([1,[1,2,[3,4],5],[6,7]]) => 29

Ah man, this one is really hard! (Assuming you use a statically typed language that doesn't natively support arbitrarily nested arrays).

Ah man, this one is really hard! (Assuming you use a statically typed language that doesn't natively support arbitrarily nested arrays).

That's an interesting point. Perhaps it's for later or for a subset of languages.

It should be fun!


Extend NodeEnvironment to avoid side effect methods

Based on jest-puppeteer-example it would be great to extend NodeEnvironment similar to this
for example, this will avoid differencify.launchBrowser() and differencify.cleanup() on this example
(async () => {
  await differencify.launchBrowser();
  const target = differencify.init({ testName: 'Differencify simple unchained', chain: false });
  const page = await target.newPage();
  await page.goto('https://github.com/NimaSoroush/differencify');
  await page.setViewport({ width: 1600, height: 1200 });
  await page.waitFor(1000);
  const image = await page.screenshot();
  const result = await target.toMatchSnapshot(image);
  await page.close();
  console.log(result) // True or False
  await differencify.cleanup();
})();

@xfumihiro: Anything to add?

Hi @NimaSoroush I'm Qing, I found out the cause of the issue I reported to you earlier over slack: when Differencify is instantiated in a sub class of NodeEnvironment, it can't access expect for some reason. So the isJest() call returns false and the tests are run in valina node mode (test names are set to test 1, test 2 etc. and jest-reporter can't insert results into the generated html).
One thing I don't understand is that even though differencity.init() is called in separate tests it still can't detect expect, to made it work I had to remove my custom NodeEnvironment and instantiate differencity in the test file.

Hi @yq314 , That is interesting! Is there anything else we can use in NodeEnvironment that would help us with detecting the Jest environment?

@NimaSoroush when it's running in NodeEnvironment or its subclass would indicate that it's already running in jest environment? So we could always set isJest() to true ?

Yep, but we need an automated way of detecting the environment! another way to tackle this would be to introduce an aditional flag that could manually tell differencify is running on Jest
const differencify = new Differencify({ testRunner: 'jest' });

That's a good idea indeed!

Do you mind adding a PR for that?

I'd love too, but I want to get clarification on something first. As pointed out here https://github.com/NimaSoroush/differencify/issues/62#issuecomment-355450912 we should do launchBrowser() and cleanup() in the global startup and teardown script, however the differencify instance needs to be created somewhere else, because instance created in global startup script can't be accessed in test scripts.
possible to make differencify a global instance so I don't need to new it?
Similar to puppeteer:
const puppeteer = require('puppeteer');

It would be easier if we have:
const differencify = require('differencify');

And in this case we wouldn't need a NodeEnvironment, so the manual setting of isJest would be unnecessary too.

I have never tried that but that seems to be possible but needs a little bit of extra work. I know puppeteer provides a way of pointing to chrome instance path through browserWSEndpoint. that might be the way to achieve it. Differencify already support that through lunch options https://github.com/NimaSoroush/differencify/blob/master/src/index.js#L21
Is that something you looking for?


psutil version -- cpu_count()

I just found the version of psutil (5.7.2) that installs with anaconda using the environment.yml file doesn't report the correct number of physical CPU cores on my linux machine (I have 20, but it reports 10). It's currently the latest version of psutil that's available through anaconda.
>>> import psutil
>>> psutil.cpu_count(logical=False)
10

If I uninstall the psutil package, and re-install using the latest version from pypi (5.8.0). It reports the correct number.
This may be a short term issue, but it will give a huge hit to the performance using the default settings.

Jordan, I wasn't able to get psutil=5.8.0 to install from conda. Otherwise, I think we could just modify the environment.yml file to be "psutil>=5.8.0".
Am I doing something wrong?

Jordan, I wasn't able to get psutil=5.8.0 to install from conda. Otherwise, I think we could just modify the environment.yml file to be "psutil>=5.8.0".
Am I doing something wrong?

Somehow for me conda isn't showing versions available later than 5.7.2, for example from conda search psutil or conda update psutil.  If I put psutil>=5.8.0 in environment.yml I get a package not found error.  I can install psutil 5.8 using pip, but not conda. Maybe I'm missing something..

Somehow for me conda isn't showing versions available later than 5.7.2, for example from conda search psutil or conda update psutil.  If I put psutil>=5.8.0 in environment.yml I get a package not found error.  I can install psutil 5.8 using pip, but not conda. Maybe I'm missing something..

A solution is to move psutil to a pip install inside environment.yml like this:
name: svmbir
dependencies:
  - python>=3.6
  - numpy
  - matplotlib
  - ruamel.yaml
  - pytest
  - scikit-image
  - Cython
  - pip
  - pip:
    - psutil

A solution is to move psutil to a pip install inside environment.yml like this:
name: svmbir
dependencies:
  - python>=3.6
  - numpy
  - matplotlib
  - ruamel.yaml
  - pytest
  - scikit-image
  - Cython
  - pip
  - pip:
    - psutil

resolved

resolved


changed for carton upgrade to v1.0.15

Made changes to support the carton upgrade to v1.0.15 to upgrade locally run the following command:
$ cpan -if MIYAGAWA/Carton-v1.0.15.tar.gz

can you remove this comment if it is not needed?
traffic_ops/install/bin/build_trafficops_perl_library line 141
#$result = execCommand ("/usr/bin/cpan", "-if", "MIYAGAWA/Carton-v1.0.12.tar.gz");

removed comment


Bizbundle new update ?

Hello we just want to ask about the difference between bizbundle version number 4.2.0-22 and your published Tuya app difference.
below you can see a picture for the same device from biz bundle 4.2.0-22

and adding the same device in the Tuya app, gives more options and features.

we specifically needed the two gateway switch feature which we noticed that is missing from the latest biz bundle update.
our app versions are
    tuya_version = '4.0.2'
    bizbundle_version = '4.2.0-22'

would you please help us to know if there are any new updates for the biz bundle library or we need to do something from our side to enable such features in the device control panels

@Ezaldeen99 Sorry, our current UIBizbUndle is only partially open.


Remove the unused skip-priority-workload flag from the documentation.

What type of PR is this?
/kind documentation

What this PR does / why we need it:
Remove the unused skip-priority-workload flag from the documentation.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Follow up for https://github.com/kubernetes-sigs/kueue/pull/3537#discussion_r1846155674.
Does this PR introduce a user-facing change?

NONE

cc: @mwysokin

/lgtm

cc @mwysokin

/approve


Add userToken for slack integration

From documentation:
This resource requires a PagerDuty user-level API key. This can be set as the user_token on the provider tag or as the PAGERDUTY_USER_TOKEN environment variable.
https://github.com/PagerDuty/terraform-provider-pagerduty/blob/master/pagerduty/config.go#L110
Description of your changes
define user_token for terraform provider, need for slack integration, without it you got authorization error when create connection object
How has this code been tested
I built binary and ran in my environment

Can you add DCO ? Thanks ;)

Added )


livetest fails with docker jupyter/scipy-notebook:5cb007f03275

Currently

livetests fail to login to jupyter nb, see screenshot

Expected

livetests continue to work
ensure docker-compose up continues to work for regular installations

closed as per release-0.15.1