text:
CSS doesn't work

I have imported css as import '@nosferatu500/react-sortable-tree/style.css'; but it does not work. When i import css from original repo (react-sortable-tree/style.css) it works.

With v5 release, you will no longer need to import additional .css files.
npm i @nosferatu500/react-sortable-tree@5.0.0-alpha.5

@nosferatu500 is there a timeline for the v5 release?

I was planning to re-implement the tree behavior from scratch for v5. it was about a few month ago and work is done about 10%. So, “when will v5 come out?” Idk, I have my regular muggle job and I just don't have time for this project.


text:
Typescript error

I'm getting this error when importing the lib.
Could not find a declaration file for module 'cleave-zen'. '~/node_modules/cleave-zen/dist/cleave-zen.module.js' implicitly has an 'any' type.
  There are types at '~/node_modules/cleave-zen/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'cleave-zen' library may need to update its package.json or typings.ts(7016)

Thanks for testing on early stage.
I can't seem to reproduce, I have this example build working: https://github.com/nosir/cleave-zen-examples/blob/main/examples/standard/src/index.ts
and nodejs example also works: https://github.com/nosir/cleave-zen-examples/blob/main/examples/nodejs/src/index.ts
What's the version you installed? The latest published is 0.0.10
Also it could be TypeScript version, but I've tested TypeScript 4.0.0 and the latest 5.2.2.

It's a nextjs project. Lemme tell you the version in my package.json
Node: v20.10.0
Typescript: 5.1.6
Maybe there is a issue in cleave-zen package.json

Thanks. It must be then, l will look into this this tmr.

Actually, I've published the change, let me know if 0.0.11 works for you, otherwise I will setup nextjs to test this during the weekend.

source: gharchive/issue

authors: maykon-oliveira nosir

repo: nosir/cleave-zen

license: MIT

license_type: permissive

license_source: github-api


text:
Add tpc (Cancel teleport)

I didnt test it

yea no i already see a bug i put "tpn" instead of "tpc" lmao sry lemme fix rq

source: gharchive/pull-request

repo: nothub/SafeTPA


text:
Missing resources

strings.xml is missing min_friction_text
dimension.xml is missing max_friction_steps
So right now it isn't compiling until you add those :)

Hi!
These values are added dynamically during gradle build (they are initialized in build.gradle script). So, you have to sync with gradle the sample project in order for them to be generated.

Ahh ok. Thanks I am in the middle of porting to Xamarin.Android, didn't really think about looking for those in gradle :)
Will post when the port is up :)

Wow! Keep us up-to-date)

@noties hey, I've made the port, but there is something wrong with it.
Flinging the view seems to work, it locks to the Tabs in the top of the view. However, if I then try to scroll the ScrollView, ListView or whatever is under. Nothing happens.
Also if I scroll slowly it pushes the tabs up and a white area occurs after the ScrollView or whatever view is under the Tabs. Maybe you have some pointers on what would be going wrong here?

Hi Cheesebaron,
Are you done for xamarin on this lib?
Thank you!

I think it is on one of my computers somewhere. Didn't finish it all up. If you are interested in the code, I can look at digging it up.

authors: Cheesebaron hoangwy noties

repo: noties/Scrollable

license_source: bigquery


text:
Body validation fail when using TimestampLastEditedTimeFilter in DB querry.

The issue:
When querying a database with the TimestampLastEditedTimeFilter, body validation fails as the Timestamp value should contain "last_edited_time" instead of "last_modified_time".
To reproduce:
var dateFilter = new DateFilter("When", onOrAfter: DateTime.Now);
var editedFilter = new LastEditedTimeFilter(onOrAfter: DateTime.Today);
var queryParams = new DatabasesQueryParameters { Filter = new CompoundFilter(and: new Filter[] {dateFilter, editedFilter}.ToList()) };
 var pages = await client.Databases.QueryAsync(databaseId, queryParams);

https://github.com/notion-dotnet/notion-sdk-net/blob/f5c40c6d4f958649ff216fcbf82de760f22efafc/Src/Notion.Client/Models/Filters/TimestampLastEditedTimeFilter.cs#L42
Fix:
Replace "last_modified_time" with "last_edited_time".
It works for me.

Do you think it has something to with the Notion-Version we use? I wonder if that field was renamed recently. Would you like to submit a PR?

I ran into the same issue. If you are interested in a fix, please see my pull request: https://github.com/notion-dotnet/notion-sdk-net/pull/369

@Dmitry-VF Thank you for providing the fix. I will try to take a look at this following weekend. I'm just not able to spend time on this project for the past few months.

This has been released as part of 4.2.0

authors: Dmitry-VF KoditkarVedant adrianhrinko

repo: notion-dotnet/notion-sdk-net


text:
Excessive Power Consumption when Running Notion

I've been using Notion for a couple days now and my battery life has significantly dropped when running it. I even checked it using powertop and found wattage for just notion to be almost 15 W. Anyone know why this is happening? I'm currently running Pop OS and installed it via apt

t.

Happened to me too on Windows, to the point it crashed other Chrome windows. Didn't happen with vanilla, is there any way I can throw a log with more info? (or any info that could be useful in that matter)

it's a combination of things like https://github.com/notion-enhancer/desktop/issues/333 and https://github.com/notion-enhancer/desktop/issues/584, which mean it's possible for there to end up being multiple/hidden windows with a number of memory leaks in each one.
debugging it specifically has been difficult in the past and isn't worth worrying about anymore @lihuelworks, as v0.11.0 has been rewritten from scratch with a number of optimisations and changed behaviours to avoid this happening again. it's just a matter of waiting for release - it might be out sometime around late december or january.

authors: Siddapa dragonwocky lihuelworks

repo: notion-enhancer/notion-repackaged


text:
Rewrite NovelRT::Animation::SpriteAnimator to NovelRT::Animation::ValueAnimator

At this current moment in time, we have NovelRT::Animation::SpriteAnimator which is hard-coded to update an ImageRect in a certain fashion based on the engine delta, like so:
  void SpriteAnimator::constructAnimation(double delta) {
    switch (_animatorState) {
      case AnimatorPlayState::Playing: {
        if (_currentState == nullptr) {
          _currentState = _states.at(0);
          _currentState->getFrames()->at(_currentFrameIndex).FrameEnter();
        }

        auto transitionPtr = _currentState->tryFindValidTransition();

        if (transitionPtr != nullptr) {
          _currentState = transitionPtr;
          _accumulatedDelta = 0.0f;
          _currentFrameIndex = 0;
          _currentState->getFrames()->at(_currentFrameIndex).FrameEnter();
        }

        if (_currentState->getFrames()->size() > _currentFrameIndex && _currentState->getFrames()->at(_currentFrameIndex).getDuration() <= _accumulatedDelta) {
          _accumulatedDelta = 0;
          _currentState->getFrames()->at(_currentFrameIndex++).FrameExit();

          if (_currentState->getShouldLoop() && _currentFrameIndex >= _currentState->getFrames()->size()) {
            _currentFrameIndex = 0;
          } else if (_currentFrameIndex >= _currentState->getFrames()->size()) {
            return;
          }

          auto newFrame = _currentState->getFrames()->at(_currentFrameIndex);
          newFrame.FrameEnter();
          _rect->setTexture(newFrame.getTexture());
        }

        _accumulatedDelta += delta;
        break;
      }
    }
  }

The proposed rewrite would allow for a lot of this logic to be defined by T, which we would assert inherits ValueAnimatorDefinition. This new abstract type would (roughly) look something like this:
class ValueAnimatorDefinition {
public:
  void validateInitialState() = 0;
  void runAnimationStep(float delta, int32_t frameIndex) = 0;
}

Then a rough implementation for sprites of those two methods would probably look like:
void validateInitialState() {
  if (_currentState == nullptr) {
    _currentState = _states.at(0);
    _currentState->getFrames()->at(_currentFrameIndex).FrameEnter();
}

void runAnimationStep(float delta, int32_t frameIndex) {
  if (_currentState->getFrames()->size() > _currentFrameIndex && _currentState->getFrames()->at(_currentFrameIndex).getDuration() <= _accumulatedDelta) {
  _accumulatedDelta = 0;
  _currentState->getFrames()->at(_currentFrameIndex++).FrameExit();

    if (_currentState->getShouldLoop() && _currentFrameIndex >= _currentState->getFrames()->size()) {
    _currentFrameIndex = 0;
    } else if (_currentFrameIndex >= _currentState->getFrames()->size()) {
      return;
    }

  auto newFrame = _currentState->getFrames()->at(_currentFrameIndex);
  newFrame.FrameEnter();
  _rect->setTexture(newFrame.getTexture());
}

Then the animator would create an instance of T and use it to figure out how to manage the animation state machine.
A similar implementation might exist for specific value tweens such as Transform._position that generates the std::vector<ValueAnimatorFrame> based on the duration of the ValueAnimatorState, it may just ignore it completely and use delta to achieve a similar effect to a basic tweener that I am introducing (soon tm).
If we did do this, at the very least, it would make the actual animator testable, which would be great for code coverage.
I personally think this is a "nice to have" and probably won't happen for quite some time, but as another "thought I had while on the train home", I figured it would be good to share my thoughts.

This probably needs a bit of additional design work to make it what I envisioned fully? And I imagine there will also be questions, but this would be a good feature ticket for @FiniteReality as a nice break from CMake stuff for a while.

repo: novelrt/NovelRT


text:
feat: set new envvar at elk initialization

Set AWS_LAMBDA_EXEC_WRAPPER environment variable at Elastic APM initialization.

Essa variável precisa estar definida antes do início da execução do código Python, por isso este ajuste não surtiria o efeito desejado e será rejeitado.

repo: noverde/serpens


text:
.NET Core 3.0 Preview 8 incompatibility

.NET Core 3.0 Preview 8 incompatibility

Here is what I'm getting
System.TypeLoadException: 'Could not load type
'Microsoft.EntityFrameworkCore.Query.Pipeline.IQueryableMethodTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.'

Here is what I'm getting
System.TypeLoadException: 'Could not load type
'Microsoft.EntityFrameworkCore.Query.Pipeline.IQueryableMethodTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.'

Same here, sorry i did not paste error.

I'm sure this is a known error. It's probably fixed in Dev branch if I were to venture a guess. I haven't taken the time yet to clone dev branch and just add a project reference vs the nuget package reference to confirm

Preview8 of the Npgsql provider has not been released yet - you can't use EF Core preview8 with an older version of the provider. The preview8 version will be released very soon.

authors: filipbekic01 jsheely roji

license: PostgreSQL


text:
I created an NPM package. Why are the headings displaying in red?

Readme code
react-native-send-direct-sms
React Native Send SMS is a JavaScript library for React Native applications that provides a convenient way to send SMS messages programmatically. It enables developers to integrate SMS functionality into their mobile apps, allowing them to send text messages to specified recipients directly from the app. This can be useful for implementing features like SMS-based authentication, notifications, or any other communication that requires sending SMS messages.
Installation
npm install react-native-send-direct-sms

Android Setup
It's crucial to ask for permission in your AndroidManifest.xml file if you need to use Send Message directly.
Please add this line to your AndroidManifest.xml before using this example:

In android/app/src/main/AndroidManifest.xml add the following lines:

<uses-permission android:name="android.permission.SEND_SMS"/>

Usage
import { SendDirectSms } from 'react-native-send-direct-sms';
// ...

function sendSmsData(mobileNumber, bodySMS) {
  SendDirectSms(mobileNumber, bodySMS)
    .then((res) => console.log("then", res))
    .catch((err) => console.log("catch", err))
}

Example

import * as React from 'react';

import { StyleSheet, View, Text, TextInput, TouchableOpacity } from 'react-native';
import { SendDirectSms } from 'react-native-send-direct-sms';

export default function App() {
  const [mobileNumber, setMobileNumber] = React.useState('');
  const [bodySMS, setBodySMS] = React.useState('Hello World');

  function sendSmsData(mobileNumber: string, bodySMS: string) {
    SendDirectSms(mobileNumber, bodySMS)
      .then((res: any) => console.log('then', res))
      .catch((err: any) => console.log('catch', err));
  }

  return (
    <View style={styles.container}>
      {/*<Text>Result: {result}</Text>*/}
      <Text style={styles.titleTextsmall}>
        Enter Recipients Number
      </Text>
      <TextInput
        value={mobileNumber}
        onChangeText={
          (mobileNumber) => setMobileNumber(mobileNumber)
        }
        placeholder={'Enter Mobile Number'}
        keyboardType='numeric'
        style={styles.textInput}
      />
      <Text style={styles.titleTextsmall}>
        Enter SMS Body
      </Text>
      <TextInput
        value={bodySMS}
        onChangeText={(bodySMS) => setBodySMS(bodySMS)}
        placeholder={'Enter SMS body'}
        style={styles.textInput}
      />
      <TouchableOpacity style={styles.sendButton} onPress={() => sendSmsData(mobileNumber, bodySMS)}>
        <Text style={styles.sendButtonLabel}>Send SMS</Text>
      </TouchableOpacity>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    paddingHorizontal: 32,
  },
  box: {
    width: 60,
    height: 60,
    marginVertical: 20,
  },
  sendButtonLabel: {
    fontSize: 16,
    color: '#FFFFFF',

  },
  sendButton: {
    width: '100%',
    backgroundColor: '#22C674',
    borderRadius: 4,
    opacity: 1,
    justifyContent: 'center',
    alignItems: 'center',
    paddingVertical: 10,
    marginTop: 30,
  },
  titleTextsmall: {
    marginBottom: 8,
    marginTop: 16,
    fontSize: 16,
    alignSelf: 'flex-start',
  },
  textInput: {
    paddingLeft: 16,
    fontSize: 14,
    borderWidth: 1,
    borderColor: '#3F44511F',
    borderRadius: 4,
    height: 44,
    color: '#000000',
    opacity: 0.75,
    width: '100%',
  },
});

Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
Or open up an issue.

Discussion and Collaboration
In addition to the GitHub Issues page.
License
MIT

Made with create-react-native-library

I'm not seeing that.

@wraithgar only my package show like that why my package link

I see it too; the first line of your readme should have one #, not two, but otherwise maybe it’s that your image on the first line is missing square brackets around the ! part?

This is something happening only "new" readmes (i.e. readmes being rendered recently) and it is being looked into.

This is due to a change in the README html structure from some API changes. I am working on a fix now. I'm going to close this issue since it is not an issue on the documentation site, but I will be updating https://github.com/npm/feedback/discussions/1010 when it is fixed.

@ljharb I started one #, but It's not appearing then I changed two# and I think in my case we don't want square brackets in image's first line

@wraithgar @lukekarrys Thank you for the update

authors: Kajanan02 ljharb lukekarrys wraithgar

repo: npm/documentation


text:
net: pkt_filter: Introduce additional hooks for pkt_filter

The additional hooks provide infrastructure to construct rules on another network stack levels. Main benefit of this approach is packets are pre-parsed and e.g. IP filter is easier to implement. These hooks are equivalent of prerouting and local_in in linux's netfilter.

Also, I'm missing the concept of the filter priority from the original concept, will it be added?

I answer in order:

Yes, and do you think we need one more hook instead of this https://github.com/nrfconnect/sdk-zephyr/blob/743f99947369088ecba6820a720ede8054893866/subsys/net/ip/net_core.c#L436. If answer is yes, then please help me choose correct place
No, in this approach (small steps) I believe user will prepare all rules in one place and then use functions for append or prepend. In future we can consider add priority, what is your opinion?

One more thing, I want to add additional argument to test function https://github.com/nrfconnect/sdk-zephyr/blob/743f99947369088ecba6820a720ede8054893866/include/zephyr/net/net_pkt_filter.h#L38C1-L38C74. This argument will be a pointer to void:
typedef bool (npf_test_fn_t)(struct npf_test *test, struct net_pkt *pkt, **void* data**); and allow to pass additional data from hooks, e.g. ip header. For backward compatibility NULL is also acceptable and data validity must be done directly in test function. Do you think it will be acceptable for zephyr community?

Yes, and do you think we need one more hook instead of this https://github.com/nrfconnect/sdk-zephyr/blob/743f99947369088ecba6820a720ede8054893866/subsys/net/ip/net_core.c#L436
If answer is yes, then please help me choose correct place to 'throw in hook'.

I think you need to elaborate, I don't think I follow. I was asking about send hooks and here we have recv one.

No, in this approach (small steps) I believe user will prepare all rules in one place and then use functions for append or prepend. In future we can consider add priority, what is your opinion?

If it's not needed (for now) I see no point adding it at the moment.

This argument will be a pointer to void:
typedef bool (npf_test_fn_t)(struct npf_test *test, struct net_pkt pkt, void data);
and allow to pass additional data from hooks, e.g. ip header. For backward compatibility NULL is also acceptable and data validity must be done directly in test function. Do you think it will be acceptable for zephyr community?

I don't see a problem with that, but it should be well documented on what kind of data to expect at what level. Although, is that really needed - at least in terms of IP header? Couldn't the header be read directly from the net_pkt?

Yes, and do you think we need one more hook instead of this https://github.com/nrfconnect/sdk-zephyr/blob/743f99947369088ecba6820a720ede8054893866/subsys/net/ip/net_core.c#L436
If answer is yes, then please help me choose correct place to 'throw in hook'.

I think you need to elaborate, I don't think I follow. I was asking about send hooks and here we have recv one.

Sorry, my mistake, I thought about this hook: https://github.com/nrfconnect/sdk-zephyr/blob/743f99947369088ecba6820a720ede8054893866/subsys/net/ip/net_if.c#L341

No, in this approach (small steps) I believe user will prepare all rules in one place and then use functions for append or prepend. In future we can consider add priority, what is your opinion?

If it's not needed (for now) I see no point adding it at the moment.

This argument will be a pointer to void:
typedef bool (npf_test_fn_t)(struct npf_test *test, struct net_pkt pkt, void data);
and allow to pass additional data from hooks, e.g. ip header. For backward compatibility NULL is also acceptable and data validity must be done directly in test function. Do you think it will be acceptable for zephyr community?

I don't see a problem with that, but it should be well documented on what kind of data to expect at what level. Although, is that really needed - at least in terms of IP header? Couldn't the header be read directly from the net_pkt?
Now I'm not sure what is enough, but I want to know if additional argument can be a issue or not to get correct development direction

Looks reasonable. For upstream PR, I'd recommend to move tests to a separate commit.

Separate commit in separate PRs, or separate commits in the same PR?

Looks reasonable. For upstream PR, I'd recommend to move tests to a separate commit.

Separate commit in separate PRs, or separate commits in the same PR?

Same PR, 2 commits.

Looks reasonable. For upstream PR, I'd recommend to move tests to a separate commit.

Separate commit in separate PRs, or separate commits in the same PR?

Same PR, 2 commits.

Done.

authors: MarGasiorek rlubos

repo: nrfconnect/sdk-zephyr


text:
[nrf fromlist] openthread: align changes

Align with upstream OpenThread changes.

authors: edmont lemrey


text:
Installation and inclusion via composer

Hi there,
I installed the predis lib via composer. Can you tell me how can I include it with the "use" statement (like use Predis\Autoloader ...) I cannot figure out how to include it.
Thanks.

Hi,
After installing the package using composer make sure you require the autoload.php file in php script you are running. The autoload.php should be generated by composer for you. Most of the times it is in vendor/autoload.php.
If you have that one included (require-ed) you can start using predis with:
use Predis\Client;
and follow the samples from the readme (https://github.com/nrk/predis/blob/v1.0/README.md)

authors: SpacePossum gioialorusso

repo: nrk/predis


text:
Add redis 4.0 profile

The latest profile in predis-1.1.1 is for redis 3.2.0.
Please add profile for redis 4.0.

the same hope

Same here.

Same here.

Just evaluating redis 4.0.2, is there a change needed to support it in this package?

Redis 4.0 doesn't ship with relevant changes or new additions to its commands API so there's no pressing need for a dedicated profile (e.g. the new variadic nature of HSET in Redis 4.0 will already work with Predis, while new commands such as UNLINK will indeed require to use Predis\Client::executeRaw() but you can just inject your own implementation in the profile to overcome this).
Obviously pull requests (with proper tests) are still welcome if anyone really needs a new dedicated profile for Redis 4.0 shipped with Predis ASAP.

Redis 4.0 will already work with Predis

Is Redis 4.0 "officially" supported? README doesn't mention 4.0 at all.

Support for different versions of Redis (from 2.0 to 3.2) using profiles.

Same here.

@skliarie: Can you submit a PR?

authors: JindrichPilar juneszh leandrocostam nrk skliarie sn01615 tillkruss tristanbailey zuohuadong


text:
Drop Badger and Redis support

It was recently discovered that our node with BadgerDB backend has some problems with mainnet processing:
2021-08-13T10:58:11.957+0300    WARN    blockQueue: failed adding block into the blockchain     {"error": "onPersist failed: VM has failed: at instruction 0 (SYSCALL): failed to invoke syscall 2478627630: voters count not found", "blockHeight": 4304, "nextIndex": 4305}

And I'm not sure what's the problem. Updating to some newer version doesn't help (see #2084 also). The backend itself hasn't changed in a long time, so I'm also not sure when it broke. But it looks like no one is using it, otherwise we'd know it earlier.
At the same time:

recent optimizations make the node perform nice with LevelDB and BoltDB, Badger always gave some 5-10% more, but this advantage is probably less than that now
I'm not sure what's going on with v3 and in general with versioning there

So if there are no known justified use cases for it and we're not sure how long it's gonna take to fix it we can just drop it as well which is what proposed here. If anyone has any objections, please tell us (or better yet just fix the damn thing).
There is a similar proposal for Redis that we also currently have in our codebase. I've not seen it being used for a long time and I'm not sure it works at all. There is #2088 for it also.
This issue will stay there for at least one release and then if there is nothing new we'll drop both DBs in some subsequent one.

Side note: dropping these DBs makes the node binary 2MB smaller.

repo: nspcc-dev/neo-go


text:
Video improvements

The following improvements where made to the plugin regarding video support:

[x] 1. Added options for chooser to determine what to show in the file picker (showImages / showVideos). Both default to true.
[x] 2. Fixed video orientation for Android
[x] 3. Selecting video on ios now works and returns path to a locally saved copy of the video
[x] 4. Made the newly added  chooser option depend on enableVideo option
[x] 5. Normalise enableVideo in between ios and android
[x] 6. Update documentation

@bradmartin regarding point number 5: Before this PR, enableVideo was taken from different places, depending on the platform. For Android, the options was taken from the properties passed to the camera instance. On iOS, it was taken from the static property of the CamerPlus class.
Do you want to keep both possibilities to set enableVideo, or deprecate one of them ?

@bradmartin This is ready for review 😌

repo: nstudio/nativescript-camera-plus


text:
Blank plotly 3D plots

Description:
I followed this tutorial to plot the 3D scatter plot. But seems like it cannot render 3D plots properly.

As shown on the figure above, the hover text is properly displayed but no data points are shown.
However, when I tried to do 2D line chart, it render properly.

Steps to Reproduce:

Copy the code of "Basic 3D Scatter Plot" in 3D Scatter Plots in Python
Run, 3D scatter plot does not work properly.
Copy the code of "Simple Line Plot" in Line Charts in Python
Run, line chart will be rendered properly.

Versions:
Mac OS 10.12.6
Atom    : 1.22.1
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0
plotly: 2.2.2
Logs:
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-swz/ljTjUNUGwUQTCdL2vZS/ni77MS56012RAz3iLBk='), or a nonce ('nonce-...') is required to enable inline execution.
This error is shown when I run plotly.offline.init_notebook_mode(). But same error appeared when I plotted the 2D line plots therefore I think it might not related to the issue.

This looks like a CSS issue.

I haven't tested it, but I'm pretty confident that this line introduces the problem:
https://github.com/nteract/hydrogen/blob/09bacb3556dbd9ee3b85d8cbc28a0b62eeb9defc/styles/hydrogen.less#L46-L48

By canceling the background-color in developer tool, it solve this problem. Thanks a lot :)

Is there any workaround I can use to solve this problem without have to open the dev tool? (e.g. adding some snippets when starting up or somethings). Sorry for not really familiar with CSS syntax.
Thank you!

We should better scope
https://github.com/nteract/hydrogen/blob/09bacb3556dbd9ee3b85d8cbc28a0b62eeb9defc/styles/hydrogen.less#L46-L48
This line is mostly there to ensure a white background for SVG plots rendered with matplotlib or similar but unfortunately breaks plotly 3D plots.
Personally I'd be OK with removing this line at the cost of not having a white background for matplotlib SVG plots.
I'm going to label this as a good first issue if someone wants to dig into it and find a better solution.

authors: lgeiger yuchaz

repo: nteract/hydrogen

license: mit


text:
Move email back to Inbox

Anyone know how to move an email back to the Gmail inbox with this gem (or with Net:IMAP)?  We successfully move emails out of the Inbox by copying them to another mailbox, then setting the 'delete' flag on the copy in the Inbox.  We'd like the user to be able to revert tagging errors, but when we reverse the steps and tell Gmail via IMAP to copy the email from a user-created mailbox back into the Inbox, it does not work -- we get a success flag, but the email does not show up in the Inbox, even after it is deleted from the user-created mailbox so that it has no tags on it.  Suggestions welcome!

I believe this is just a matter of setting the appropriate label (Inbox) on the message. Closing issue as it is very old.

This issue was moved to gmailgem/gmail#63

authors: johnnyshields ksnyder


text:
🛑 Secret Site BIS is down

In 7352f22, Secret Site BIS ($SECRET_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Secret Site BIS is back up in 157cc1f after 27 minutes.


text:
🛑 Difesa is down

In 0f795e9, Difesa (http://www.difesa.it/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Difesa is back up in 321e6d2.


text:
🛑 Guardia di Finanza is down

In 8963b27, Guardia di Finanza (https://www.gdf.gov.it) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Guardia di Finanza is back up in 284d9d9 after 13 minutes.


text:
Enable build cache on GitHub Actions workflow

ref
https://docs.docker.com/build/ci/github-actions/cache/

Cache on workflows is working successfully.
https://github.com/nukopy/ubuntu-texlive-ja/actions/runs/6681301417

The step for clearing cache work improperly and unnecessary old cache remains. Cache clearing should be done every time a workflow run.
https://github.com/nukopy/ubuntu-texlive-ja/actions/caches

repo: nukopy/ubuntu-texlive-ja


text:
🛑 Sisfo is down

In 7aa8bad, Sisfo (https://sisfo.binadarma.ac.id) was down:

HTTP code: 503
Response time: 1474 ms

Resolved: Sisfo is back up in 29bd03e after 25 minutes.


text:
🛑 Elearning2 is down

In f8fae83, Elearning2 (https://elearning2.binadarma.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Elearning2 is back up in 4acf755.


text:
NULLSTACK_SERVER_PORT being ignored

NULLSTACK_SERVER_PORT is not working, however yarn start -p 3000 works

I would like to work on this please.

Awesome @ManishBansiwal29
few tips from a quick debug session:

The file scripts\index.js needs to conditionally check if we have a port before assigning the value to the env variable
The commander should not have a default value assigned to the option as that is overriding the server default

hey @Mortaro I have made some changes.
Can you let me know how do i test them?

You can set the port on tests .env to use 6969 and if it does not break the tests its working, you can also use a test similar to the scripts test to run with yarn npx nullstack start -p 5000 and watch the console for the output containing :5000 to test the command line case

@ManishBansiwal29 heyo, i'll spend the weekend doing some open issues. Ill be available to pair this weekend if you need help on this one! (o゜▽゜)o☆

hey @Mortaro, I'm sorry for the inactivity. I'm currently in the middle of university exams and I would not be able to put my efforts on the issue this weekend.

repo: nullstack/nullstack


text:
feat: new edge path

Fixes #1807

Edges changed from right angle to curved lines

Edge will be highlighted when hovered over

Increased the selection area for the edge

Increased readability for Node and Edge Tooltip

Watermark and Pending messages appear when hovered over edge

Top and Bottom for horizontal edge

Left and Right for curved edge

Back Edge and Self Edge

Curved edges for side inputs as well

Nice improvement!

repo: numaproj/numaflow


text:
docs: debug with tracing

Closes: https://github.com/numaproj/numaflow/issues/479

I think @ashwinidulams wanted to add trace commands in the code path.

authors: vigith whynowy


text:
searchsorted with dtype datetime64 stopped working in njit mode going from 0.58.1 to 0.59

Reporting a bug

[x] I have tried using the latest released version of Numba (most recent is
visible in the release notes
(https://numba.readthedocs.io/en/stable/release-notes-overview.html).
[x] I have included a self contained code sample to reproduce the problem.
i.e. it's possible to run as 'python bug.py'.

Using numpy.searchsorted() with dtype datetime64 does not work in njit mode in version 0.59. This works fine in version 0.58.1.
I guess this is related to the recent changes to the function. #9189
Reproducible sample:
import numpy as np
from numba import njit

@njit
def foo(a, v):
    return np.searchsorted(a, v)

arr = np.asarray(
    ['2022-03-09 06:45:00', '2022-03-09 06:50:00', '2022-03-09 06:55:00'],
    dtype=np.dtype('datetime64[ns]')
)
print(foo(arr, arr[-1]))

Output:
---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
Cell In[37], line 12
      6     return np.searchsorted(a, v)
      8 arr = np.asarray(
      9     ['2022-03-09 06:45:00', '2022-03-09 06:50:00', '2022-03-09 06:55:00'],
     10     dtype=np.dtype('datetime64[ns]')
     11 )
---> 12 print(foo(arr, arr[-1]))

File ~/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/dispatcher.py:468, in _DispatcherBase._compile_for_args(self, *args, **kws)
    464         msg = (f"{str(e).rstrip()} \n\nThis error may have been caused "
    465                f"by the following argument(s):\n{args_str}\n")
    466         e.patch_message(msg)
--> 468     error_rewrite(e, 'typing')
    469 except errors.UnsupportedError as e:
    470     # Something unsupported is present in the user code, add help info
    471     error_rewrite(e, 'unsupported_error')

File ~/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/dispatcher.py:409, in _DispatcherBase._compile_for_args.<locals>.error_rewrite(e, issue_type)
    407     raise e
    408 else:
--> 409     raise e.with_traceback(None)

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<function searchsorted at 0xffff645c9ee0>) found for signature:

 >>> searchsorted(array(datetime64[ns], 1d, C), datetime64[ns])

There are 2 candidate implementations:
      - Of which 1 did not match due to:
      Overload in function 'searchsorted': File: numba/np/arraymath.py: Line 3805.
        With argument(s): '(array(datetime64[ns], 1d, C), datetime64[ns])':
       Rejected as the implementation raised a specific error:
         TypingError: Failed in nopython mode pipeline (step: nopython frontend)
       No implementation of function Function(<function _searchsorted.<locals>.impl at 0xfffd3a10df80>) found for signature:

        >>> impl(array(datetime64[ns], 1d, C), array(datetime64[ns], 1d, C))

       There are 2 candidate implementations:
         - Of which 2 did not match due to:
         Overload in function 'register_jitable.<locals>.wrap.<locals>.ov_wrap': File: numba/core/extending.py: Line 161.
           With argument(s): '(array(datetime64[ns], 1d, C), array(datetime64[ns], 1d, C))':
          Rejected as the implementation raised a specific error:
            TypingError: Failed in nopython mode pipeline (step: nopython frontend)
          No implementation of function Function(<function _less_than at 0xfffd3e842d40>) found for signature:

           >>> _less_than(datetime64[ns], datetime64[ns])

          There are 2 candidate implementations:
                - Of which 2 did not match due to:
                Overload in function 'register_jitable.<locals>.wrap.<locals>.ov_wrap': File: numba/core/extending.py: Line 161.
                  With argument(s): '(datetime64[ns], datetime64[ns])':
                 Rejected as the implementation raised a specific error:
                   TypingError: Failed in nopython mode pipeline (step: nopython frontend)
                 No implementation of function Function(<built-in function isinstance>) found for signature:

                  >>> isinstance(datetime64[ns], Function(<class 'complex'>))

                 There are 2 candidate implementations:
                       - Of which 2 did not match due to:
                       Overload in function 'ol_isinstance': File: numba/cpython/builtins.py: Line 748.
                         With argument(s): '(datetime64[ns], Function(<class 'complex'>))':
                        Rejected as the implementation raised a specific error:
                          NumbaTypeError: isinstance() does not support variables of type "datetime64[ns]".
                   raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/cpython/builtins.py:778

                 During: resolving callee type: Function(<built-in function isinstance>)
                 During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3729)

                 File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3729:
                 def _less_than(a, b):
                     if isinstance(a, complex) or isinstance(b, complex):
                     ^

            raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091

          During: resolving callee type: Function(<function _less_than at 0xfffd3e842d40>)
          During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3753)

          File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3753:
              def impl(a, v):
                  <source elided>

                      if func_1(last_key_val, key_val):
                      ^

         raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091

       During: resolving callee type: Function(<function _searchsorted.<locals>.impl at 0xfffd3a10df80>)
       During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3830)

       File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3830:
               def impl(a, v, side='left'):
                   return _impl(a, np.array([v]))[0]
                   ^

  raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091
      - Of which 1 did not match due to:
      Overload in function 'searchsorted': File: numba/np/arraymath.py: Line 3805.
        With argument(s): '(array(datetime64[ns], 1d, C), datetime64[ns])':
       Rejected as the implementation raised a specific error:
         TypingError: Failed in nopython mode pipeline (step: nopython frontend)
       No implementation of function Function(<function _searchsorted.<locals>.impl at 0xfffd3c92e520>) found for signature:

        >>> impl(array(datetime64[ns], 1d, C), array(datetime64[ns], 1d, C))

       There are 2 candidate implementations:
         - Of which 2 did not match due to:
         Overload in function 'register_jitable.<locals>.wrap.<locals>.ov_wrap': File: numba/core/extending.py: Line 161.
           With argument(s): '(array(datetime64[ns], 1d, C), array(datetime64[ns], 1d, C))':
          Rejected as the implementation raised a specific error:
            TypingError: Failed in nopython mode pipeline (step: nopython frontend)
          No implementation of function Function(<function _less_than at 0xfffd3e842d40>) found for signature:

           >>> _less_than(datetime64[ns], datetime64[ns])

          There are 2 candidate implementations:
                - Of which 2 did not match due to:
                Overload in function 'register_jitable.<locals>.wrap.<locals>.ov_wrap': File: numba/core/extending.py: Line 161.
                  With argument(s): '(datetime64[ns], datetime64[ns])':
                 Rejected as the implementation raised a specific error:
                   TypingError: Failed in nopython mode pipeline (step: nopython frontend)
                 No implementation of function Function(<built-in function isinstance>) found for signature:

                  >>> isinstance(datetime64[ns], Function(<class 'complex'>))

                 There are 2 candidate implementations:
                       - Of which 2 did not match due to:
                       Overload in function 'ol_isinstance': File: numba/cpython/builtins.py: Line 748.
                         With argument(s): '(datetime64[ns], Function(<class 'complex'>))':
                        Rejected as the implementation raised a specific error:
                          NumbaTypeError: isinstance() does not support variables of type "datetime64[ns]".
                   raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/cpython/builtins.py:778

                 During: resolving callee type: Function(<built-in function isinstance>)
                 During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3729)

                 File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3729:
                 def _less_than(a, b):
                     if isinstance(a, complex) or isinstance(b, complex):
                     ^

            raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091

          During: resolving callee type: Function(<function _less_than at 0xfffd3e842d40>)
          During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3753)

          File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3753:
              def impl(a, v):
                  <source elided>

                      if func_1(last_key_val, key_val):
                      ^

         raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091

       During: resolving callee type: Function(<function _searchsorted.<locals>.impl at 0xfffd3c92e520>)
       During: typing of call at /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py (3830)

       File "../../../.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/np/arraymath.py", line 3830:
               def impl(a, v, side='left'):
                   return _impl(a, np.array([v]))[0]
                   ^

  raised from /home/ec2-user/.cache/pypoetry/virtualenvs/indefatigable-XRADjY79-py3.11/lib/python3.11/site-packages/numba/core/typeinfer.py:1091

During: resolving callee type: Function(<function searchsorted at 0xffff645c9ee0>)
During: typing of call at /tmp/ipykernel_12047/1166298884.py (6)

File "../../../../../tmp/ipykernel_12047/1166298884.py", line 6:
<source missing, REPL/exec in use?>

Thanks for the report. This reproduces and is indeed, unfortunately, a regression.

I just hit this issue too. The compiler takes quite a while to throw the error which seems strange to me.

authors: ehsantn stuartarchibald zansibal

repo: numba/numba


text:
Display a warning if parallel=True is set but not possible.

This patch makes it such that if a user:

decorates a function with parallel=True but the function
does not contain parallel semantics
has the environment variable NUMBA_WARNINGS set to non-zero

then a warning is displayed referring to the decorated function
informing the user that the parallel tranforms have failed.
Closes #2461.

Codecov Report

Merging #2493 into master will increase coverage by <.01%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master    #2493      +/-   ##
==========================================
+ Coverage   86.54%   86.54%   +<.01%
==========================================
  Files         316      316
  Lines       61458    61484      +26
  Branches     6772     6774       +2
==========================================
+ Hits        53189    53212      +23
- Misses       7198     7199       +1
- Partials     1071     1073       +2

authors: codecov-io stuartarchibald


text:
Minor documentation fixes for numba.cuda

Hi! I was reading through the documentation for numba.cuda today and noticed a few minor typos and wording issues. This PR attempts to improve those!

Codecov Report

Merging #3570 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3570      +/-   ##
==========================================
+ Coverage   80.69%   80.69%   +<.01%
==========================================
  Files         393      393
  Lines       80425    80425
  Branches     9160     9160
==========================================
+ Hits        64896    64899       +3
+ Misses      14109    14107       -2
+ Partials     1420     1419       -1

authors: StanczakDominik codecov-io


text:
Move to llvmlite 0.32.*

As title.

Can we keep allowing 0.31.0? CI has been testing against llvmlite 0.31.0. Supporting 0.31.0 will allow me to release numba wheel first. I have yet to automate the llvmlite wheel building pipeline.

Can we keep allowing 0.31.0? CI has been testing against llvmlite 0.31.0. Supporting 0.31.0 will allow me to release numba wheel first. I have yet to automate the llvmlite wheel building pipeline.

I expect this will be ok. Specifically, which bits do you think ought to change to accept this, guess __init__.py and setup.py, and then update the readme?

Hm.. or should it be <0.33 so that it pick up all the 0.32.*?

ok, here's how we should check:

In [10]: from packaging import version

In [11]: version.parse("0.31") <= version.parse("0.31.0") < version.parse("0.33")
Out[11]: True

In [12]: version.parse("0.31") <= version.parse("0.32.0") < version.parse("0.33")
Out[12]: True

In [13]: version.parse("0.31") <= version.parse("0.32.10") < version.parse("0.33")
Out[13]: True

In [14]: version.parse("0.31") <= version.parse("0.32.0dev0") < version.parse("0.33")
Out[14]: True

In [15]: version.parse("0.31") <= version.parse("0.33.0dev0") < version.parse("0.33")
Out[15]: True

In [16]: version.parse("0.31") <= version.parse("0.33.0rc1") < version.parse("0.33")
Out[16]: True

In [17]: version.parse("0.31") <= version.parse("0.33.0") < version.parse("0.33")
Out[17]: False

@sklam are the suggested made on the diff valid with respect to https://github.com/numba/numba/pull/5455#issuecomment-606853691, they seem ok, until we say break an API in 0.33.0dev0?

This made the public CI green again so I am merging this now on the empirical basis that it does seem to fix things.

authors: esc sklam stuartarchibald


text:
R&D: Deploy Whisper

Deploy a Speech-to-Text model
These works are focused on Whisper.
What's whisper?
Whisper is a Transformer-based model developed by OpenAI, specializing in Speech-to-Text (STT) tasks, also known as Automatic Speech Recognition (ASR).

Whisper was among the biggest breakthroughs in the field. Released by OpenAI in 2022, it has gained significant attention for its accuracy and versatility in speech recognition.

(source). For more information, you can explore the official Whisper page by OpenAI.
The latest release, Whisper-large-v3 on Hugging Face, is the most advanced version provided by the OpenAI team.
Hugging Face is a popular platform for sharing and collaborating on AI models. It functions as a repository where developers and researchers can publish, discover, and utilize machine learning models.
How does it work?
It takes an audio source, and processes the sound to identify and transcribe spoken words into text. The model was trained on either English-only data or multilingual data. It's capable of automatic language detection to ensure accurate transcription across multiple languages.
In Python, you can load the model directly from HF using their Transformers library. This library leverages state-of-the-art deep learning frameworks to load models and perform inferences efficiently. (it also supports training or fine-tuning pre-trained models, but that's out of scope).
PoC
I've wrapped a whisper-large-v3 model in a FastAPI api, and deployed it to the cloud. My POC has a single endpoint /transcribe which accepts a file. The file is copied to a temporary one in the container, and then processed by the Whisper model. The model's output is returned to the client.
I was forced to add a visual interface to post data to /transcribe endpoint. Don't pay attention to the static files served by FastAPI they are definitely dirty.
It takes roughly 8s with a small T4 GPU to process a 3-min-long audio.
The code is "quick-and-dirty", same goes for the commits' history; Everything is versioned to a repo managed by HF here. I enable the T4 hardware whenever I need to avoid paying too much.
Building the correct Docker image was quite challenging. The container needs to use the appropriate version of CUDA based on the available hardware, along with the corresponding version of PyTorch. Consequently, PyTorch is installed directly from its wheel rather than through the requirements.txt file.
I added more layers than necessary to my Docker image to cache installations and troubleshoot the steps that were breaking. However, having so many layers is not a good practice.
My afternoon cost me only $0.13.
Hardware considerations
GPUs are the standard choice of hardware for machine learning because they are optimized for memory bandwidth and parallelism, unlike CPUs.
Running Transformer or AI models on a CPU often results in suboptimal performance, both in terms of accuracy and latency, as CPUs are not well-suited for the parallel computations required by these models, leading to slower inference times.
In contrast, GPUs excel at parallelism, providing significant acceleration during model inference due to their ability to handle multiple operations simultaneously. While GPUs are available through most cloud providers (such as AWS, GCP, etc.), they can be expensive. Additionally, securing GPUs on smaller private cloud providers, like Outscale, can be more challenging.
For my researches, I leveraged Hugging Face Spaces
Hugging Face "Spaces" allows you to build and deploy custom Docker containers to serve a FastAPI server. FastAPI is a rapidly growing framework for developing lightweight, asynchronous Python APIs, and is particularly popular for deploying AI models via simple APIs.
On Hugging Face Spaces, you can access various GPU types and pay on an hourly basis (e.g., small T4 GPUs are approximately $0.40/hour). This flexibility is excellent for prototyping and deploying APIs in the short term.
Looking ahead, our goal is to deploy our AI services on Kubernetes (K8s). To achieve this, we will need to discuss setting up new K8s nodes on virtual machines equipped with sufficiently powerful GPUs.
(Scaling AI models on K8s can be challenging, we should not underestimate it).
Inference optimizations
Two famous Whisper optimizations share the world:

insanely-fast-whisper by Hugging Face
faster-whisper

While working on my POC, I've discovered recent works from the creator of insanely-fast-whisper, which offer new optimizations to try, especially using Distillation technics. Stay tuned.
Insanely-fast-whisper is based on Flash attention 2, which optimizes data manipulation in memory when making inference. Unfortunately, Flash Attention 2 is not implemented for all type of GPUs. It supports only Ampere ones (e.g. A100) and not Turing GPUs (e.g. T4, the cheapest one).
My next steps would be to deploy a distilled Whisper with the few optimizations recommended by Vaibhavs10 in his latest works.
Next steps
To-do:

[ ] Investigate recent works from Vaibhavs10.
[ ] Try deploying the PoC on Dieter's Hardware.
[ ] Follow-up with Jacques / Outscale / Léo Guillaume on deploying a PoC on K8s.
[ ] Push a clean version of my code and Docker Image.

Discussion with Fun:
They use Softcatala/whisper-ctranslate2, which is the CLI of faster whisper.
Whisper is used as a CLI by the Peer Tube runner.
Peertube has made a package.
Everything run ONLY on CPU. It's not yet in production, still WIP. They use C2-30 machines from OVH (30Go Ram 8 vCore 200Go SSD)

A POC was deployed by the German team, accessible on a VM through ssh. It builds a transcription + summarization pipeline and exposes it though API.

Live streaming example  to be investigated.

repo: numerique-gouv/meet


text:
Debugging Java on VSCode

Introduction
Welcome to this quick reference on debugging your Java code using VSCode. Now, before the Vim enthusiasts come at me, let me just say this: I know the main guideline here is to embrace the Vim, and you should definitely learn how to use it.
But I mean, if by chance your code goes wrong, and you're not sure why, VSCode is just sitting there on your computer, quietly whispering, "Hey, I can edit and debug, you know."  ¯\ _ (ツ) _ /¯

I'm not saying you should use VSCode for debugging, but rather simply you can use it. There are multiple debuggers works (IntelliJ etc). Use whatever tickles your fancy.

Context
Now, a bit of context. Ever since Lab 1, I have set out on a quest to simulate the command java Main < 1.in in the program, through variable manipulation to I/O editing, though none has been successful (Thanks TA for putting up with my questions). I then started searching up the command structure, which ultimately leads me to this. Equipped with that knowledge, I was able to figure out a way to pass in the input files for the debugger!
Requirements

Visual Studio Code
Visual Studio Code Extension Pack for Java
Git

Procedures

We first need to set the console environment to Unix environment (similar to msys). After you have opened your folder location, you should see a bottom window showing "Problems, Output, Debug Console...". Select on Terminal (or you can press "Ctrl + `"). Click on the arrow beside the "+" icon, and select "Select Default Profile". The default would be set to Powershell.

You should then see these pop up at the top of the screen. Select "Git Bash" to change to Unix terminal.

With our environment changed, we now need to setup the launch config for our debugger session. Here's the current one which worked for me:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Current File",
            "console":"internalConsole",
            "request": "launch",
            "mainClass": "${file}",
            "args": ["<", "${workspaceFolder}/1.in"]
        },
        {
            "type": "java",
            "name": "Main",
            "request": "launch",
            "mainClass": "Main",
            "projectName": "Lab", //change this to whatever is generated for you.
            "args": ["<", "${workspaceFolder}/1.in"]
        }
    ]
}

And that's it! You'll be able to run the debugging session. Hope this helps you as much as it helps me! Honestly the debugging configuration doesn't look perfect, but I'm just winging it at this point. You know the saying:

If it ain't broken, don't fix it.

Here's a homage to whatever I've been doing so far:

1: this won’t work for JShell scripts.
How then?
Create a test class then! Put your functions in it, set some breakpoints, and make it go!
2: I only use it for CS2030
lol no, CS2040 will make heavy use of the Debugger, so better learn what VSCode can do or else have fun printing statements.
VSCode: Say “GOOD BYE!EVERYONE!” to Print Debugging.
Also note this applies to other IDEs, like JetBrain IntelliJ line of IDEs.

Adding print after every line is basically me doing lab[🃏]

Adding print after every line is basically me doing lab[🃏]

and forgetting to remove a hidden print in the mountain of codes is what caused me 2hours of pain getting F grade on CodeCrunch...

…which is why you use a debugger outside the lab.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Graceee @.>
Sent: Sunday, March 17, 2024 12:48:05 AM
To: nus-cs2030/2324-s2 @.>
Cc: Zhang Hao Dong @.>; Comment @.>
Subject: Re: [nus-cs2030/2324-s2] Debugging Java on VSCode (Issue #137)
Adding print after every line is basically me doing lab[🃏]
and forgetting to remove a hidden print in the mountain of codes is what caused me 2hours of pain getting F grade on CodeCrunch...
—
Reply to this email directly, view it on GitHubhttps://github.com/nus-cs2030/2324-s2/issues/137#issuecomment-2002043127, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BBRJ5GRNQWTXIKMS737JFB3YYRZULAVCNFSM6AAAAABD3R3D2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGA2DGMJSG4.
You are receiving this because you commented.Message ID: @.***>

BONUS
Sick and tired of constantly passing checkstyle *.java?
Go install the Checkstyle extension from the VSCode marketplace

Then set up your extension as follows:
...
    "checkstyle.configurationPath": "...\\cs2030_checks.xml",
    "checkstyle.checkstylePath": "...\\checkstyle-10.3.3-all.jar",
...


text:
[W5.11][W13-2]Terrence Tan

Added a "Edit Phone" function. On top of "edit name" function with team mate

@TTTaus
Some comments added. Please take note and close the pull request.

authors: TTTaus okkhoy


text:
Update package-lock.json

Currently, npm install causes a diff in package-lock.json.

Thanks

repo: nushell/tree-sitter-nu


text:
Update CI configs

CI configs should be separated into stages for building / testing and deployment.

Closed by #4

repo: nut-tree/libnut


text:
Install 'php-mbstring' package.

Package include functions like 'mb_strlen' which is required by syspass.
PHP Fatal error:  Uncaught Error: Call to undefined function mb_strlen() in /var/www/html/sysPass/inc/BaseFunctions.php:67\nStack trace:\n#0 /var/www/html/sysPass/inc/themes/material-blue/inc/Icons.class.php(46): __(
[...]

Thanks for your contribution!
The update will be available shortly (I need to compile the sphinx files)

authors: fbarbeira nuxsmin

repo: nuxsmin/sysPass-doc

license: unlicense


text:
Cannot read property 'preference' of undefined inside Storybook

Version
@nuxtjs/color-mode: ^2.0.3
nuxt: ^2.14.12
@nuxtjs/storybook: ^3.3.1
Steps to reproduce
Install nuxt with @nuxtjs/color-mode and @nuxtjs/storybook.
What is actually happening?
I run nuxt as target: static. Everything works fine with yarn dev.
I can launch Storybook and got it at localhost:3003, but inside the main frame of Storybook, there is this error:
Cannot read property 'preference' of undefined.
I tried everything related in #21 and #25 without success...

I think I just fixed this issue, but I made many change on the storybook config, so I'm not sure how I did...
I set a custom storybook config as explained here.
But maybe it's work just only with this file .storybook/preview-head.html:
<script>
  var data = {}
  window['__NUXT_COLOR_MODE__'] = {
    preference: 'light',
  }
</script>

@nuxtjs/storybook executes plugin scripts after the plugin import and this cause the issue. And  color-mode uses global variable on import. The leads to undefined error.

@Atinux i have the same issue after upgrading from 2.0.5 to 2.0.7
my settings is
nuxt.config.js
colorMode: {
  storageKey: 'color-mode',
  preference: 'system',
  fallback: 'dark',
  classSuffix: '',
}

and in my tailwind.config.js i have
darkMode: 'class'

I'm having the same problem, I used the 2.0.8 version but the error still occurs in Storybook, any idea?

Yes I did, I was workinf with 2.0.10, then I downgrade and same thing. This error was gone when I applied what @ManUtopiK  mention

@Atinux is there a cleaner way as to not have to eject and keep using the module way of doing things with nuxtjs. while the solution provided by @ManUtopiK works it forces us to have the config in the .storybook folder.

@gimyboya  Using color-mode@v2.0.8 + nuxt-storybook > 4.0.0 should work without any issues.
New versions of module is not compatible with Storybook because it uses vue-renderer hook to inject script and nuxt-storybook does not support renderer hooks. https://github.com/nuxt-community/color-mode-module/blob/master/lib/module.js#L31

authors: BennaceurHichem ManUtopiK farnabaz gimyboya kgnfth

repo: nuxt-community/color-mode-module


text:
[NEXT] Cannot find module vue-i18n.mjs

Version
@nuxtjs/i18n: 8.0.0-beta.3
nuxt: 3.0.0-rc.13
vue-i18n: "^9.2.2"
Steps to reproduce
Start nuxi dev
What is Expected?
Starting dev
What is actually happening?
Cannot start nuxt:  Cannot find module 'nuxt\node_modules\vue-i18n\dist\vue-i18n.mjs'

Thank you for your reporting!
I seem this issue is same #1568
We need minimum reproduction with github repo or stackbliz, so to resolve this issue.
Could you give us to it please? 🙏

Its an issue with npm with yarn it works.

Thanks!

vue-i18n: "^9.2.2"

I noticed vue-i18n is installed un-expected version
nuxtjs/i18n will install vue-i18n v9.3 beta version
Could you try to re-install (e.g. rm -rf node_modules package-lock.json) please?

Now i get Cannot find module '@intlify/vue-i18n-bridge/lib/index.mjs'  with npm i.
With yarn it still works

I've just fixed and release edge version @nuxtjs/i18n-edge@8.0.0-beta.4-27812700.b832f07
Please check it!

For me, the i18edge-version you just released fixes the issue.

authors: DaniGTA ahoiroman kazupon


text:
v6.14.0 breaks yarn upgrade/install

Version
nuxt-i18n: 6.14.0
nuxt: ^2.13
Nuxt configuration
mode:

[ ] universal
[x] spa

Nuxt-i18n configuration
i18n: {
    locales: [
      {
        code: "it",
        file: "it.js",
      },
    ],
    lazy: true,
    langDir: "lang/",
    defaultLocale: "it",
    vueI18n: {
      fallbackLocale: "it",
    },
    vuex: {
      moduleName: "i18n",
      syncLocale: true,
      syncMessages: true,
      syncRouteParams: true,
    },
  },

Reproduction Link
Not necessary
Steps to reproduce

Add nuxt-i18n v6.1.4.0 as dependency
Run yarn or yarn upgrade

What is Expected?
Yarn should complete the installation/upgrade process
What is actually happening?
Yarn outputs this at the end of the build
[4/4] Building fresh packages...
error \path\to\my\app\node_modules\node_modules\nuxt-i18n: Command failed.
Exit code: 1
Command: cd docs && yarn && cd ..
Arguments:
Directory: \path\to\my\app\node_modules\nuxt-i18n
Output:
The system cannot find the path specified.

This does not happen if I downgrade to nuxt i18n v6.13.12

Thanks for a quick reaction. v16.14.1 should fix it.
It was a postinstall script that only worked during development.

@rchl no problem I was messing around with the edge branch of the project where I try to install the latest and greatest and this popped out of nowhere


text:
Non-cookie token storage

Is your feature request related to a problem? Please describe.
I am implementing an Ionic app using @nuxtjs/ionic. I'd like to use Supabase as my API, but that means I need a way to store authentication tokens using the native plugins.
Describe the solution you'd like
Being able to have my own (async) getter and setter methods in the config would allow me to do this.
Describe alternatives you've considered
I can use cookies, though I worry that they won't be as durable as using dedicated local storage.
Additional context
I am happy to make/work on the change if that's useful!

If you create your own storage, you can pass that into your config.
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  // ...
  supabase: {
    client: {
      auth: {
        storage: YourCustomStorage
      }
    }
  }
}

See https://github.com/supabase/gotrue-js/blob/master/src/lib/local-storage.ts for a generic implementation of getItem setItem and removeItem. Replace the code inside of each method with your own.

If you create your own storage, you can pass that into your config.
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  // ...
  supabase: {
    client: {
      auth: {
        storage: YourCustomStorage
      }
    }
  }
}

See https://github.com/supabase/gotrue-js/blob/master/src/lib/local-storage.ts for a generic implementation of getItem setItem and removeItem. Replace the code inside of each method with your own.

I should have mentioned, I tried this strategy, but because the nuxt config gets serialized to JSON, this way doesn't work.

@dts well that stinks. That's a good reason why they should have the dev create the client - even if it's via a library-provided function. Then you can pass in your custom storage. This is how other auth helpers do it.

Well, I thought other auth helpers used to support custom storage. Maybe it was only the storageKey. The SvelteKit one doesn't support either these, so I was wrong.

I've just gone down this rabbit hole today myself, trying to implement a custom storage mechanism for Ionic.
@dts what did you eventually use as an alternative?
In a previous project a few months ago I chose not to use this nuxt plugin and just used Supabase directly, I then used Pinia with a localStorage adapter. However, I'd love to reduce the number of moving parts and just use this module for my Ionic builds.

🙈 ```import { Preferences } from "@capacitor/preferences";
export async function getItem(key: string): Promise<string | null> {
const v = (await Preferences.get({ key })).value;
return v;
}
export async function setItem(key: string, value: string): Promise {
return await Preferences.set({ key, value });
}
export async function removeItem(key: string): Promise {
return await Preferences.remove({ key });
}
window.NUXT.config.public.supabase.client.auth.storage = {
getItem,
setItem,
removeItem,
};
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook("app:beforeMount", () => {});
});

authors: dts j4w8n pjhartin

repo: nuxt-modules/supabase


text:
fix: error The URL must be of scheme file

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Relative issue: ERROR The URL must be of scheme file

node_modules/.pnpm/@nuxt+icon@1.5.2_magicast@0.3.5_rollup@4.24.0_vite@5.4.8_@types+node@22.7.4_terser@5.34.1__vu_doozlyzg5foozuctodqw74f4k4/node_modules/@nuxt/icon/dist/runtime/components/index
ERROR  The URL must be of scheme file                                                                                4:21:21 PM
at fileURLToPath (node:internal/url:1393:11)
at fileURLToPath (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:1971:25)
at pathToFileURL (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:1974:26)
at resolve (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2108:10)
at resolveSync (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2111:10)
at resolvePathSync (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2121:24)
at useComponentMetaParser (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/nuxt-component-meta@0.8.2_magicast@0.3.5_rollup@4.24.0_webpack-sources@3.2.3/node_modules/nuxt-component-meta/dist/parser.mjs:45:22)
at /E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/nuxt-component-meta@0.8.2_magicast@0.3.5_rollup@4.24.0_webpack-sources@3.2.3/node_modules/nuxt-component-meta/dist/module.mjs:184:16
at async /E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/nuxt@3.13.2@parcel+watcher@2.4.1_@types+node@22.7.4_eslint@9.11.1_jiti@2.1.2__ioredis@5.4.1__q4lkefjuuissmqbutznpt6mt2i/node_modules/nuxt/dist/index.mjs:2385:7
at async generateApp (/E:/DevCodes/JsProjects/landing2/node_modules/.pnpm/nuxt@3.13.2_@parcel+watcher@2.4.1_@types+node@22.7.4_eslint@9.11.1_jiti@2.1.2__ioredis@5.4.1__q4lkefjuuissmqbutznpt6mt2i/node_modules/nuxt/dist/index.mjs:5250:3)

what is this error ?

what is this error ?

This issue has been resolved, please update version to v1.5.3

repo: nuxt/icon


text:
fix: including .npmrc for the basic template

If { exhaustive: true } is not set in import.meta.glob, files starting with .* are not included by default, so I manually added .npmrc.

Would ../templates/basic/**/.* work?

Yes, but it may also including .DS_Store or other .* files which inside .gitignore
The better solution may be enable the exhaustive: true option and ignore files by reading .gitignore file?

Yeah we could do that for now. Ideally we might write our own plugin to glob them later.

authors: antfu serkodev


text:
window is not defined

I feel there must be more to this error than what is described in the docs. I have spent a long time trying to get various scripts to work in Nuxt, and each time have failed to get passed the window is not defined error, despite adding:
if (process.BROWSER_BUILD) {
  require('external_library')
}

I won't list all the scripts I tried here, but I'll give one example: Vue.Isotope
nuxt.config.js
build: {
  vendor: [ 'vueisotope'],
}

.vue file
if (process.BROWSER_BUILD) {
  require('vueisotope')
}
import isotope from 'vueisotope'
export default {
  components: {
    isotope
  }
}

Hi , I tried your example component .
I have interest . especially I will use Isotope layout near future.
I provide my try for your reference
yarn add vueisotope

index.vue
<template lang="pug">
section
  vueisotope(:list="list",id="root_isotope",class="isoDefault",:options='option')
    div(v-for="element in list", @click="selected=element", :key="element.id")
      | {{element.name}}
      br
      | {{element.id}}

</template>
<script>
const vueisotope = process.BROWSER_BUILD ? require('vueisotope') : '';

export default {
  data() {
    return {
      list: [{ name: 'John', id: 25 },
      { name: 'Joao', id: 7 },
      { name: 'Albert', id: 12 },
      { name: 'Jean', id: 100 }],
      selected: null,
      option: {
        getSortData: {
          id: 'id',
        },
        sortBy: 'id',
      },
    };
  },
  head() {
    return {
      title: 'sitename',
    };
  },
  components: {
    vueisotope,
  },
};
</script>

I used eslint-config-airbnb-base , so , I need use global import here.
but I got some error message .
ERROR in ./~/isotope-layout/js/layout-modes/masonry.js
Module not found: Error: Can't resolve 'masonry/masonry' in 'C:\Users\ausir\nuxt-axios-exercise\node_modules\isotope-layout\js\layout-modes'
 @ ./~/isotope-layout/js/layout-modes/masonry.js 12:4-16:15
 @ ./~/isotope-layout/js/isotope.js
 @ ./~/vueisotope/dist/vue_isotope.min.js

so I tried find source , and I found this
http://isotope.metafizzy.co/extras.html#webpack
masonry.js
define( [
        '../layout-mode',
        'masonry/masonry'
      ],

so, I add 2 alias in nuxt.config..js
build: {
    /*
    ** Run ESLINT on save
    */
    extend(config, ctx) {
      config.resolve.alias['masonry'] = 'masonry-layout';  // <-- this
      config.resolve.alias['isotope'] = 'isotope-layout';  // <-- and this
      if (ctx.isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/,
        });
      }
    },
  },

vueisotope is work !
but I didn't try generate func yet ..

Thanks for the info @ausir0726
So it looks like the key difference is
const vueisotope = process.BROWSER_BUILD ? require('vueisotope') : '';

VS
if (process.BROWSER_BUILD) {
  require('vueisotope')
}
import isotope from 'vueisotope'

Maybe the former should be in the docs?

import need in first ( head ) line
then follow require .
but import will have error for SSR
so we need if ( process.BROWSER_BUILD )
but import can't use in if condition
so we just can use require
but for my eslint-config-airbnb-base rules
require also can't write in if(){} condition ( global-requrie )
so , I need wirte const vueisotope = process.BROWSER_BUILD ? require('vueisotope') : '';
then I can pass airbnb-base linter .
if you just use eslint-config-standard
I think you can just write require in if condition
if (process.BROWSER_BUILD) {
  const isotope  = require('vueisotope');
}

It should be work ...

for some library you don't a variable or import
but usually need require assign variable
like. sweetalert2  smoothscroll-polyfill

Thank you @ausir0726 for your help
In the upcoming release, we are adding an ssroption in the plugins key of the nuxt.config.js, so you will be able to integrate Vue.Isotope this way @smth:
nuxt.config.js
module.exports = {
  plugins: [
    { src: '~plugins/vue-isotope.js', ssr: false }
  ],
  build: {
    vendor: ['vueisotope'],
    extend (config, { isClient }) {
      if (isClient) {
        config.resolve.alias = Object.assign(config.resolve.alias, {
          'masonry': 'masonry-layout',
          'isotope': 'isotope-layout'
        })
      }
    }
  }
}

plugins/vue-isotope.js
import Vue from 'vue'
import isotope from 'vueisotope'

Vue.component('isotope', isotope)

This option ssr: false is required until Vue.Isotope becomes compatible with SSR.
In the meantime, you will have this warning from Vue:

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.

It still doesn't work when using generate! Please reopen issue
ERROR in ./node_modules/isotope-layout/js/layout-modes/masonry.js
Module not found: Error: Can't resolve 'masonry/masonry' in '/nuxt-examples/node_modules/isotope-layout/js/layout-modes

Sorry, I fix it already. I had a wrong condition in nuxt.config if (ctx.dev && ctx.isClient) so it was working only in Dev.

authors: Atinux ausir0726 iamdubx smth


text:
Nuxt build error

#7091 # Versions

nuxt: v2.13.3
node: v12.14.0

Reproduction

run ```yarn build``` cause  Nuxt build error

PS D:\dev\nuxtapp> yarn build
ERROR in D:/dev/nuxtapp/node_modules/@nuxt/types/app/index.d.ts
ERROR in D:/dev/nuxtapp/node_modules/@nuxt/types/app/index.d.ts(119,18):
119:18 Interface 'NuxtApp' incorrectly extends interface 'Vue'.
Types of property '$loading' are incompatible.
Type 'NuxtLoading' is not assignable to type '(options: LoadingServiceOptions) => ElLoadingComponent'.
Type 'DefaultNuxtLoading' is not assignable to type '(options: LoadingServiceOptions) => ElLoadingComponent'.
Type 'DefaultNuxtLoading' provides no match for the signature '(options: LoadingServiceOptions): ElLoadingComponent'.
117 | }

119 | export interface NuxtApp extends Vue {
|                  ^
120 |   $options: NuxtAppOptions
121 |   $loading: NuxtLoading
122 |   context: Context

FATAL  Nuxt build error                                                                                16:20:04
at WebpackBundler.webpackCompile (node_modules@nuxt\webpack\dist\webpack.js:5472:21)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at WebpackBundler.build (node_modules@nuxt\webpack\dist\webpack.js:5421:5)
at Builder.build (node_modules@nuxt\builder\dist\builder.js:5629:5)
at Object.run (node_modules@nuxt\cli\dist\cli-build.js:107:7)
at NuxtCommand.run (node_modules@nuxt\cli\dist\cli-index.js:2798:7)
╭─────────────────────────────╮
│                             │
│   ✖ Nuxt Fatal Error        │
│                             │
│   Error: Nuxt build error   │
│                             │
╰─────────────────────────────╯
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to reproduce
What is Expected?
What is actually happening?
node_modules@nuxt\types\app\index.d.ts
Interface "NuxtApp" error extension interface "Vue".
The type of property "$loading" is incompatible.
Cannot assign type "NuxtLoading" to type "(options: LoadingServiceOptions) => ElLoadingComponent".
Cannot assign type "DefaultNuxtLoading" to type "(options: LoadingServiceOptions) => ElLoadingComponent".
The content provided by type "DefaultNuxtLoading" does not match the signature "(options: LoadingServiceOptions): ElLoadingComponent"

@hjdtl would you please check installed versions of nuxt, @nuxt/types and @nuxt/typescript and also recreate yarn.lock? Setup guide has been slightly changed: https://typescript.nuxtjs.org/guide/setup.html#installation

It might be related to https://github.com/nuxt/typescript/issues/49, which has no known solutions cause frameworks are conflicting each others.

authors: hjdtl kevinmarrec pi0


text:
What is the reason for this_ Resource file missing in _nuxt dir?  请问什么原因会导致发布后_nuxt下资源文件丢失？

Discussed in https://github.com/nuxt/nuxt.js/discussions/9488

Originally posted by AbyssWang June 27, 2021
It's like this:
At present, I have two servers, one can directly connect to the Internet, the other intranet server can not directly connect to the Internet, so I need to forward through the Internet server for Internet connection access.
My project is deployed on the Internet server and can be accessed normally by using the domain name. When my project is deployed on the intranet server, the access is abnormal. I use the chrome developer panel to view the sources of the two and find that the_ All the resource folders in the “_nuxt" directory are lost, without fonts and img folder

情况是这样子的：
目前我有两台服务器，一台可以直接连接互联网，另一台内网服务器无法直接连接互联网，需要通过互联网服务器转发来进行互联网连接访问。
我的项目部署在互联网服务器上，使用域名可以正常访问，而当我的项目部署在内网服务器上的时候，访问异常，我使用Chrome开发者面板查看二者的Sources，发现内网服务器的"_nuxt"目录下的资源文件夹全部丢失，没有fonts，没有img，请问这个可能是什么原因造成的？

Closing in favour of the discussion.

authors: AbyssWang danielroe


text:
useCookieSearch: get cookies by RegExp or string

Describe the feature

TL;DR;
I want to be able to get the value and key of a cookie using a regular expression, in cases where the key is dynamic.

I want to use useCookie for API authorization during SSR.
Something like:
const authenticationCookies = {
  session: useCookie('session').value,
};

MyAPIFactory.setAuthenticationCookies(authenticationCookies);

But there is a problem: I need 2 cookie values: session and dynamic_auth_token_97d27b10d0f3e4f435310ec3081ec3171aa2
The problem is that the hash at the end of dynamic_auth_token_ is random.
I would like to be able to get cookies by mask.
Something like this:
const session = useCookie('session').value;
const dynamicAuthToken: {
   key: string | undefined
   value: string | undefined
} = useCookie(/^dynamic_auth_token_*/).value;

if (session && dynamicAuthToken.value)
   MyAPIFactory.setAuthenticationCookies({
     session: session.value,
     [dynamicAuthToken.key]: dynamicAuthToken.value,
   });

https://github.com/nuxt/nuxt/blob/802cf7a1e91b24ea9b4105658fd75660455aee0c/packages/nuxt/src/app/composables/cookie.ts#L30

There is a problem with this implementation: what to do if multiple keys are found?
Then you need to add a parameter that determines whether to return an array of matches or just the first one.
Also, returning different types for one function will complicate working with types, and different types of useCookie function arguments may affect code execution optimizations on V8 engines.
Therefore, I think it would be more appropriate to add a new composable function that is focused on receiving cookies.
For example, useCookieSearch.
interface SearchResult {
  key: string;
  value: string;
}

function useCookieSearch(key: string | RegExp): SearchResult[];

Under the hood, it will receive normalized cookies ({ [key: string]: string }), extract the keys and check them for a match in a loop.
When passing a string, there is a simple check using the key.
A simple function that is easy to cover with tests.
Then the search code will be much more declarative and safer:
const session = useCookie('session').value;
const dynamicAuthToken = useCookieSearch(/^dynamic_auth_token_.*/).value[0];

if (session && dynamicAuthToken)
  MyAPIFactory.setAuthenticationCookies({
    session: session.value,
    [dynamicAuthToken.key]: dynamicAuthToken.value,
  });

Additional information

[X] Would you be willing to help implement this feature?
[ ] Could this feature be implemented as a module?

Final checks

[X] Read the contribution guide.
[X] Check existing discussions and issues.

After long time, i find solution)
use useRequestHeaders
const serverAuthedData = await useFetch(
  `${BASE_API_URL}/api/auth`,
  {
    headers: useRequestHeaders(['cookie']),
    key: 'api-auth',
  }
);

repo: nuxt/nuxt


text:
fix(schema): transpile nuxt/app by default

🔗 Linked issue
resolves #19005
❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
This adds nuxt/app to the transpile by default, which should resolve issues when users are importing from the subpath instead of from #app, which we prefer (and recommend).
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Nice fix. Only since this is an internal of nuxt, i would add nuxt/app to transpile from nuxt/core itself where we initialize instance instead of schema


text:
针对不同的接口传递不同的响应时间

Mock.setup 指定被拦截的 Ajax 请求的响应时间  这个是全局的吧.
我想每个不同的接口设置不同的时间.  能实现吗

试试这个看看行不行:
如果要延迟后端已经存在的接口
proxy: {
  '/api/user': {
      mid (req, res, next) {
        setTimeout(next, 5000)
      },
  },
}

如果要延迟自己写的模拟接口
api: {
  '/api/user' (req, res) {
    setTimeout(() => {res.json({msg: 'ok'})}, 5000)
  },
}

参考:

如何延迟后端接口的响应时间

repo: nuysoft/Mock


text:
withCredentials 冲突

页面引入 mock.js 后,  jquery ajax 配置 withCredentials = true 是不起作用的, 去掉 mockjs 后 withCredentials 才会起作用. 猜测 mockjs 在劫持底层 xhr 后导致不兼容 withCredentials
我的使用场景比较特殊, 一部分数据是用 mockjs 模拟, 另一部分数据来自跨域请求

我也是部分mock部分跨域。 看了下源码, 初始化MockXMLHttpRequest时withCredentials的参数写的是false

authors: janeluck speedornothing


text:
[FEA]: Add unittests for developer guide examples

Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Low (would be nice)
Please provide a clear description of problem this feature solves
The code for the developer guides is currently not being tested, it would be nice to get unittests for these to ensure our documentation does not go out of date.
Describe your ideal solution
Add tests
Describe any alternatives you have considered
No response
Additional context
relates to #993
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I have searched the open feature requests and have found no duplicates for this feature request

Closing since tests have been added for the developer guide

authors: dagardner-nv mdemoret-nv

repo: nv-morpheus/Morpheus


text:
Move the logic inferring the value of CMAKE_INSTALL_PREFIX to it's own function

Description

The morpheus_utils_initialize_package_manager needs to be called prior to calling project, however the CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT isn't defined until after project has been called.
Moves CMAKE_INSTALL_PREFIX logic to a new function named morpheus_utils_initialize_install_prefix
This change is needed for nv-morpheus/morpheus#1776

Checklist

[x] I am familiar with the Contributing Guidelines.
[x] New or existing tests cover these changes.
[x] The documentation is up to date with these changes.

/merge

repo: nv-morpheus/utilities


text:
Add support for Python 3.10 and 3.11

Python 3.10 was released on 2021-10-04:

https://discuss.python.org/t/python-3-10-0-is-now-available/10955

Drop the dot in pytest:

https://twitter.com/pytestdotorg/status/753767547866972160

Update min Python 3 version required in README to 3.5 to match setup.py.
Add python_requires to help pip.

This looks good?

Yeah, it's actually time to start testing 3.11 beta (3.11-dev), but I guess one thing at a time :)
https://discuss.python.org/t/python-3-11-0b1-is-now-available/15602?u=hugovk

Closing this year old PR due to lack of interest, but happy to re-open if wanted.

Thanks for the finishing touches!

This looks good?

authors: Adawntoremember djh82 hugovk scorphus

repo: nvbn/thefuck


text:
Implement Accelerometer APIs

What would you like to be added:
Support for the Windows.Devices.Sensors.Accelerometer
Why is this needed:
Commonly used device capability
For which Platform:

[x] iOS
[x] Android
[x] WebAssembly
[ ] Windows

Anything else we need to know?

I will implement it :-)

Lovely, thank-you.

authors: MartinZikmund ghuntley

repo: nventive/Uno


text:
🛑 Kubeflow ML Platform is down

In b0ccf3b, Kubeflow ML Platform (https://kubeflow.lab.novaglobal.com.sg) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Kubeflow ML Platform is back up in e6616c9.

repo: nvgsg/lab-upptime


text:
🛑 Kubeflow ML Platform is down

In 84b15e8, Kubeflow ML Platform (https://kubeflow.lab.novaglobal.com.sg) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Kubeflow ML Platform is back up in 3fad6d1.


text:
Session load failure

I use this plugin with a session manager
I found the plugin will set
		vim.o.winwidth = 1
This will cause an error as winwidth is smaller than minium winwidth. (winminwidth)
Why the number is set to 1? could you set it to a value no less than winminwidth ? thanks!

Can you please try the https://github.com/nvim-focus/focus.nvim/tree/refactor branch?

Note the config of the refactor branch has changed, so you need to adjust the config!

It seems to have the same issue! 🫠

Fixed in current master/main.

I'm facing this problem with persisted.nvim. The most noticeable result is the bufferline of https://github.com/romgrk/barbar.nvim is not visible, and in a rare time it was visible but the active buffer was not detected even after moving to another buffer.
Thanks!

authors: Martin1887 cryptomilk piersolenski ray-x


text:
Merging whatever changes they added to kickstart i dunno

NOTE
Please verify that the base repository above has the intended destination!
Github by default opens Pull Requests against the parent of a forked repository.
If this is your personal fork and you didn't intend to open a PR for contribution
to the original project then adjust the base repository accordingly.

misclick


text:
Error when loading directory preview

Description
Error happens when loading directory preview
Neovim version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1710088188

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info

Operating system and version
macOS 14.4.1
Steps to reproduce

nvim -nu minimal.lua
:Telescope file_browser

Expected behavior
Telescope should show directory preview
Actual behavior
Error executing luv callback:
...yung/.repro/plugins/plenary.nvim/lua/plenary/scandir.lua:7: E5560: vimL function must not be called in a lua loop callback
stack traceback:
        [C]: in function 'has'
        ...yung/.repro/plugins/plenary.nvim/lua/plenary/scandir.lua:7: in function 'flatten'
        ...yung/.repro/plugins/plenary.nvim/lua/plenary/scandir.lua:214: in function 'scan_dir_async'
        ...yung/.repro/plugins/plenary.nvim/lua/plenary/scandir.lua:623: in function 'ls_async'
        ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:148: in function 'handle_directory_preview'
        ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:271: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:266>
Press ENTER or type command to continue

Minimal config
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
endm

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "nvim-telescope/telescope-file-browser.nvim",
    dependencies = {
      "nvim-telescope/telescope.nvim",
      "nvim-lua/plenary.nvim",
    },
    config = function()
      require("telescope").setup({})
      require("telescope").load_extension("file_browser")
    end,
  },
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

I have the same problem since a recent update running on Macbook Pro M1 (Sonoma 14.4.1).
Neovim version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1710088188

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info

I've been getting the same problem starting today after updating the plugins
NVIM v0.10.0-dev-2066+g1813661a6
Build type: RelWithDebInfo
LuaJIT 2.1.1703358377
Run "nvim -V1 -v" for more info

Looks like an issue upstream in plenary related to the recent neovim 0.10 API breaking changes fix.
I'll try to create a ticket for it over on plenary and link it here later today.
Until that's merged, the easiest thing might be to downpatch neovim to pre-release neovim 0.10 (or stick with 0.9.5) and freeze plenary 2 commits back.

Looks like it got fixed by https://github.com/nvim-lua/plenary.nvim/pull/589

authors: GeorgiChochev Mmasson-01 gmmyung jamestrew


text:
release-please needs more permissions

@mochaaP I think this needs to be done on an organizational level.
Here's what I see in settings > actions > general I need to change that greyed out setting so that gh actions can create pull requests.

https://github.com/nvimtools/none-ls.nvim/blob/main/.github/workflows/docs.yml#L2-L3
Add this to the top of the workflow and it should be good to go.

@mochaaP that permission is already there in the release-please yml file. I think you just need to go an click the setting box on github, or someone has to change the organization setting to allow for that, I'm not too familiar with this.

Done. ✅

perfect, job ran. thank you!

authors: benlubas mochaaP


text:
Corepack and Yarn isolation in an nvm-managed environment

My system has only two versions of Node.js installed and managed by nvm: the default is 20, which I use for almost all of my projects; the other one is 16. There is no other version of Node.js on this system, regardless of how it is installed. Both only have Corepack and NPM installed globally, each at the latest supported version.
The issue I come to discuss is that Corepack does not activate Yarn in isolation, i.e., every time a certain version of Yarn is activated in one of the Node.js versions, it is also activated in the other version. Therefore, I cannot, for example, use the latest version of Yarn on Node.js 20, as it is not compatible with 16.
Is there a way to isolate Yarn or this is the way Corepack works?
I use nvm with Z shell in a macOS v14.5.

That seems like the way corepack works - if it's not designed to do per-shell tool selection, then it won't work well with nvm's per-shell design.
You may want to file a corepack issue about it - it's still experimental.

Okay, I'll do that. Thanks!

authors: ljharb marlondecol

repo: nvm-sh/nvm