Extended finite options or composability using filters (was debouncing option for useStorage)

I was looking into the debouncing option you raised for useStorage and I wanted to first see if the same can be achieved in a more flexible way.
Please take this as a dump of ideas and not a definite API. I thought about this while trying to design the API for other composables, and I want to share it in case it is useful in some way for vueuse.
The problem that I see with adding a denounce option is that we may also want to add a throttle one later (or pausable, or other ideas we may have later). We are adding complexity to the main composable, and users will need to pay for this even if they do not use it. There are other composables like useRefHistory where users may expect the same functionality.
So, what if the API lets the user define the filtering function to be used? I think you called it updater in the useDebounce implementation. I am using filter as the option name just because it is called like that in Rx, but I am not married with the name. The signature for filter is ( (fn) => void ) => void
const count = useStorage('counter', 0, { filter: debounceFilter(200) })

const count = useStorage('counter', 0, { filter: throttleFilter(300) })

const { filter, pause, resume } = pausableFilter()
const count = useStorage('counter', 0, { filter })

debounceFilter could be implemented as:
export function debounceFilter(delay = 200) {
  return (fn) => useDebounceFn(() => fn(), delay)
}

The idea is that inside useStorage, instead of a direct watch(data, commit, options) we use watch(data, filter(commit), options)
So, the filter option gives users the possibility to decide which triggered values to accept from the watch.
Also, if we have these filters in the lib, we can also implement useDebounceRef, useThrotleRef, etc using a more general useFilteredRef
export function pausableFilter() {
  const tracking = ref(true)
  function pause() {
    tracking.value = false
  }
  function resume() {
    tracking.value = true
  }
  function filter(fn) {
    return () => {
      if( tracking.value ) {
        fn()
      }
  }
  return { tracking, pause, resume, filter }
}

The filters are composable also, allowing users to create pausable throttled storage for example
const { filter, pause, resume } = pausableFilter()
const count = useStorage('counter', 0, { filter: filter(throttleFilter(300)) })

And they can actually create their own filters, pausing or delaying according to their app needs (using other app refs, etc)
I also wonder if we could simplify useRefHistory by removing the pausable part out of the main composable, and letting users choose if they want that functionality
const data = ref(0)
const { filter, pause, resume } = pausableFilter()
const { undo, redo } = useRefHistory(data, { filter })

It is also good that we are not adding an extra watch for every filter. Another possible API for composables that are watching an input ref is to expect the user to give us a filtered ref, something like:
const data = ref(0)
const { pausableRef, pause, resume } = usePausableRef(data)
const { undo, redo } = useRefHistory(pausableRef)

This only works with API that are tracking an input ref (so we can not use it in useStorage), but we could offer this possibility also.
I think there are other possible APIs we could explore. I thought about letting the user give us the watch function to be used, but then you may need to use the same options (flush, deep) in several places.
For common cases, we can also bundle filters for convenience like:
const data = ref(0)
const { undo, redo, pause, resume } = usePausableRefHistory(data)

implemented as
export function usePausableRefHistory(ref, options) {
  const { filter, pause, resume } = pausableFilter()
  return { ...useRefHistory(data, { filter }), pause, resume }
}

So we can still offer the general composable and specialized ones, and users will only pay for what they use. Take the pausable filter extraction as an example to extrapolate to other cases, because the current API allows users to commit using resume(true). There may be a better API to also support external triggers. Or the filter may also receive the value, so you can implement validation filters, remove values if they are negative, etc. Or that maybe another option orthogonal to this one.
What do you think? Is something like a filter option worth exploring so we do not need to implement debounce/throttle/pausable in each composable?
Disclaimer: I do not know if I can actually do this myself but looks interesting, so at least I wanted to share it 😃

I like this idea! It's definitely more flexible and I do feel the same about having debouncing and throttling at the same time. And I like the pausableFilter idea!
About the naming, I am not sure about filter as they would potentially be confused with array's filter, maybe eventFilter? WDYT?
About useRefHistory, I am not so sure about extracting pausableFilter as I think pause and resume are fundamental features, having useRefHistory and usePausableRefHistory can be confusing. Maybe we can reuse the logic internally to reduce duplicated code while exposing the eventFilter for debouncing or throttling.

Great! And I agree with leaving useRefHistory pause/resume as part of the core. We can still include a filter option there though for debouncing.
About the name, eventFilter is definitely better. Another option is triggerFilter, using the naming from Vue's reactivity
https://v3.vuejs.org/guide/reactivity-computed-watchers.html#watcher-debugging
https://v3.vuejs.org/api/refs-api.html#customref
The customRef example from Vue's doc could be implemented like this for example:
function useDebouncedRef(value, delay = 200) {
  const triggerFilter = debounceFilter(200)
  return customRef((track, trigger) => {
    return {
      get() {
        track()
        return value
      },
      set: (newValue) => {
        triggerFilter(() => {
          value = newValue
          trigger()
        }
      })
    }
  })
}

And now that I review how we would use this, it should not have been watch(data, filter(commit), options), but watch(data, () => { filter(commit); }, options)
I think we should find a way to pass the value (and maybe also the prevValue) to the filter or to another option, or at least think about it so that door is not closed later.
One possibility is to send the value as a second parameter, like:
function filter() {
  return (trigger,value) => {
    if( value > 0 ) {
      trigger()
    }
  }
}

But we could also think if the filter should receive the trigger function separately, and return a simpler (value,preValue) => void like curstomRef set does. In that case, we could write it as
function useDebouncedRef(value, delay = 200) {
  return customRef((track, trigger) => {
    return {
      get() {
        track()
        return value
      },
      set: debounceFilter(200)( (newValue) => {
        value = newValue
        trigger()
      })
    }
  })
}

And the previous positive numbers filter will be:
function filter(trigger) {
  return (value) => {
    if( value > 0 ) {
      trigger()
    }
  }
}

In the composable, it would be used directly as watch(data, filter(commit), options) now.
We could also implement resume(true) with it
export function pausableFilter() {
  return (trigger) => {
    const tracking = ref(true)
    function pause() {
      tracking.value = false
    }
    function resume(commit: true) {
      tracking.value = true
      if( commit ) {
        trigger()
      }
    }
    function filter() {
      if( tracking.value ) {
        trigger()
      }
    }
    return { tracking, pause, resume, filter }
  }
}

So, the signature of filters will be that of a filter factory, that receives a trigger (like customRef does) and returns a filter
But I do not know if this is already too complex. You will also need a pipe operator to combine filters, but maybe it is the right tradeoff.

Actually, to make this example from my previous comment work we will need that the filter will forward the value to us
function useDebouncedRef(value, delay = 200) {
  return customRef((track, trigger) => {
    return {
      get() {
        track()
        return value
      },
      set: debounceFilter(200)( (newValue) => {
        value = newValue
        trigger()
      })
    }
  })
}

like
export function debounceFilter(delay = 200) {
  return (trigger) => useDebounceFn((value) => trigger(value), delay)
}

This places more complexity on filter authors but it gives users more flexibility, and I think there may be some cases where it is needed so we do not have to access the watched value by reading other refs. And now that I see it, it is also needed if we want to access the prevValue in the trigger/commit function. For the pausable example, we could support trigger being called without parameters

I am actually working on the implementation. To me, use the customRef and watch might be overkill for this feature. My current implementation:
export type EventFilter = (invoke: () => void) => void

export interface ConfigurableEventFilter {
  eventFilter?: EventFilter
}

export const bypassFilter: EventFilter = (invoke) => {
  return invoke()
}

/**
 * Create an EventFilter that debounce the events
 *
 * @param ms
 */
export function debounceFilter(ms: number) {
  if (ms <= 0)
    return bypassFilter

  let timer: ReturnType<typeof setTimeout> | undefined

  const filter: EventFilter = (invoke) => {
    if (timer)
      clearTimeout(timer)

    timer = setTimeout(invoke, ms)
  }

  return filter
}

/**
 * Create an EventFilter that throttle the events
 *
 * @param ms
 * @param [trailing=true]
 */
export function throttleFilter(ms: number, trailing = true) {
  if (ms <= 0)
    return bypassFilter

  let lastExec = 0
  let timer: ReturnType<typeof setTimeout> | undefined

  const clear = () => {
    if (timer) {
      clearTimeout(timer)
      timer = undefined
    }
  }

  const filter: EventFilter = (invoke) => {
    const elapsed = Date.now() - lastExec

    clear()

    if (elapsed > ms) {
      lastExec = Date.now()
      invoke()
    }
    else if (trailing) {
      timer = setTimeout(() => {
        clear()
        invoke()
      }, ms)
    }
  }

  return filter
}

Made a draft PR: https://github.com/antfu/vueuse/pull/194

I really like this idea!
Now useDebounceFn is like:
export function useDebounceFn<T extends Function>(fn: T, ms = 200): T {
  return createFilterWrapper(
    debounceFilter(ms),
    fn,
  )
}

We can also make some utilities like pausableWatch via pausableFilter etc.
Please have a look at my PR and wondering what you think :P

Awesome! You already did it 😄 🎉
I think this is great, it will add a lot of flexibility to the library! And not vueuse could offer a complete suite of filters at one point.
My only caveat is about how to extend this in the future if we want to support value filters. Even if you do not add that feature now, it may be good to think about it. So:
export type EventFilter = (invoke: () => void) => void

Could be extended like:

passing the value to the event, as events from the browser give you this kind of info

export type EventFilter = (invoke: () => void,value) => void

separating this functionality to another option like valueFilter, that maybe is just a simple (value) => boolean

But looks like in both cases, this can be added later.
I think it is good to keep it simple for now 👍
Maybe the eventFilterFactory option is a vueuse v2 feature 😉

I am not sure what you mean for value, but I think we can pass the args[] as the second argument.
// `any` should be genertics, just for demo here
export type EventFilter = (invoke: () => void, fn: any, thisArg: any, args: any[]) => void

and invoke is essential a shorthand for
fn.apply(thisArg, args)

What will be eventFilterFactory? If a filter need to accept extra arguments, they can just make a function that creates a filter, just like debounceFilter already did.

With value, I mean the value that watch gives us and triggered the event (and we also have prevValue there available)
I wanted to see if we could implement filters like this also
function filter() {
  return (invoke,value) => {
    if( value > 0 ) {
      invoke()
    }
  }
}

So you can not only discard events because of timing (debounce/throttle) but also that take into account the value from the source, like https://www.learnrxjs.io/learn-rxjs/operators/filtering/filter, https://www.learnrxjs.io/learn-rxjs/operators/filtering/skipwhile, or any other validation.
About the eventFilterFactory, I mean the filter factory as described in this comment: https://github.com/antfu/vueuse/issues/192#issuecomment-723788660, the trigger is passed beforehand while constructing the filter and not at each event, so you can call it from the outside:
export function pausableFilter() {
  return (trigger) => {
    const tracking = ref(true)
    function pause() {
      tracking.value = false
    }
    function resume(commit: true) {
      tracking.value = true
      if( commit ) {
        trigger()
      }
    }
    function filter() {
      if( tracking.value ) {
        trigger()
      }
    }
    return { tracking, pause, resume, filter }
  }
}

I see. I thought is that the filter is not necessarily called by an watch or reactivity data. They could act as normal functions. Values could be accessed in args[]. For example:
const myFilter = (invoke, fn, thisArg, args) => {
  const event = args[0]

  if (event.x % 2 === 0) // only trigger when mouse.x is even
    invoke()
}

const onMousemove = createFilterWrapper(
  myFilter,
  (event: MouseEvent) => {
    // do something
  },
)

useEventListener(window, 'mousemove', onMousemove)

Pausable filter could be
import { useDeviceMotion } from "./packages/core/useDeviceMotion"

export function pausableFilter() {
  let tracking = ref(true)

  function pause() {
    tracking.value = false
  }
  function resume(commit: true) {
    tracking.value = true
  }

  const eventFilter: EventFilter = (invoke) => {
    if (tracking.value) {
      invoke()
    }
  }
  return { tracking, pause, resume, eventFilter }
}

const { eventFilter, pause, resume } = pausableFilter()

useDeviceMotion({ eventFilter })

pause()

Did you miss anything?

Nice! 🙌
I like a lot what you did with the invoke wrapper, so filter authors do not need to do that.
Interesting also that you also included the thisArg parameter, like in Array.map. Do you have a use case in mind for it? Maybe the users can just use bind in that case so you do not need it in the API?
Or I wonder if the order should be the other way around,
const myFilter = (invoke, fn, thisArg, args) => {
  const event = args[0]

  if (event.x % 2 === 0) // only trigger when mouse.x is even
    invoke()
}

with the (args, thisArg, fn) at the end so people that do not use it, do not have to add the param (I think that will be the common case)
const myFilter = (invoke, args) => {
  const event = args[0]

  if (event.x % 2 === 0) // only trigger when mouse.x is even
    invoke()
}

Interesting also that you also included the thisArg parameter,

This could be a common practice to make function wrappers. Passing this will make the wrapper more equal to the original function. You have no idea of how users use your wrapper. For example
class MyClass {
  state = 1

  update: debounced(function () {
	this.state += 1
  })

  call() {
    this.update()
  }
}

the order should be the other way around

Yeah I agree with you. But I am kinda in a dilemma. Having (args, thisArg, fn) just looks not natural. I was also thinking to make it an object and let users destructure it.
const myFilter = (invoke, { args }) => {
  const event = args[0]

  if (event.x % 2 === 0) // only trigger when mouse.x is even
    invoke()
}

WDYT?

Yeah, I understand that may be use cases when working with classes for example, but at least from what I see lately utility libraries like lodash are choosing to avoid dealing with this at the library level and leave the user use js features like bind or arrow functions. https://lodash.com/docs/4.17.15#debounce, https://lodash.com/docs/4.17.15#dropWhile, etc.
I think you forgot to pass this in your example to debounce, it is not trivial even if you allow users to give you the this argument. If we ask users to use arrow functions, then things works as spected and they are used to do this for event handlers anyways
class MyClass {
  state = 1
  update = debounced(() => {
	this.state += 1
  })

  call() {
    this.update()
  }
}

I think the API of vueuse would be simpler for the big majority of users if you do not deal with this at all.
About passing the fn, do you see an use case there? Because if not, the filter can be just the invoke and the args and we can spread them like a normal function, no extra array indirection
const myFilter = (invoke, event) => {
  if (event.x % 2 === 0) // only trigger when mouse.x is even
    invoke()
}

Because it is called like filter(invoke,...args)

About passing the fn, do you see a use case there?

I don't know, yet. invoke is something that "leave as it is" and I believe in most of the cases, users would only need invoke to make their filters. But think about more advanced usages, you may also want to alter the args passed to fn. I can't think about the usage yet, but I would prefer not to limit the possibility of doing things.
cosnt myArgs = args.slice(0, 1)

fn.apply(thisArgs, myArgs)

spread the args

Yeah, I do like it, this does make the code cleaner. However, it also makes you lose the ability to extend the signature to add more arguments in the future.

I think I would prefer to keep the object destructuring style as I would treat this API as an advanced one. It's not ideal for me to trade flexibility for "cleanness". Hope I made myself clear :p

Ya, totally, I also thought about that but the clean version was too tempting 😄
Also, users can also have an utility if they would want the other interface for their filters too
toFilter( (invoke,event) =>{
  if( event.x > 0 ) {
    invoke()
  }
}

like
function toFilter( fn ) {
  return (invoke,{ args }) => fn(invoke,...args)
}

So not a big deal 👍
Really cool to see the filters feature in the lib 🙌
That was a lot faster than I expected 🎉


ai-search-documents. Unable to build a model

Package Name: ai-search-documents
Package Version: 11.6.0b4 (happens on other versions)
Operating System: Windows
Python Version: 3.12

Describe the bug
A clear and concise description of what the bug is.
azure.core.exceptions.SerializationError: Unable to build a model: Unable to deserialize response data. Data: [<azure.search.documents.indexes._generated.models._models_py3.SemanticConfiguration object at 0x000002CC7C98CEF0>], [SemanticConfiguration]
Unable to serialize Semantic Configurations.
To Reproduce
Steps to reproduce the behavior:
fields = [
    SimpleField(name="Id", type=SearchFieldDataType.String, filterable=True),
    SearchableField(
        name="Title", type=SearchFieldDataType.String, filterable=True
    ),
    SearchableField(
        name="ChunkId",
        type=SearchFieldDataType.String,
        key=True,
        analyzer_name="keyword",
    ),
    SearchableField(
        name="Chunk",
        type=SearchFieldDataType.String,
        sortable=False,
        filterable=False,
        facetable=False,
    ),
    SearchableField(
        name="Keywords", type=SearchFieldDataType.String, collection=True
    ),
    SearchableField(
        name="Source",
        type=SearchFieldDataType.String,
        sortable=True,
        filterable=True,
        facetable=True,
    ),
]

semantic_config = SemanticConfiguration(
    name="semantic-config",
    prioritized_fields=SemanticPrioritizedFields(
        title_field=[SemanticField(field_name="Title")],
        content_fields=[SemanticField(field_name="Chunk")],
        keywords_fields=[SemanticField(field_name="Keywords")],
    ),
)

semantic_search = SemanticSearch(configurations=[semantic_config])

index = SearchIndex(
    name="index",
    fields=index_fields,
    semantic_search=semantic_search,
)
index_client.create_or_update_index(index)

Expected behavior
A clear and concise description of what you expected to happen.
Index should deploy with the semantic configuration.
If you apply the same configuration via the Portal, it works fine. But it does not work via the Python SDK.

Please use latest stable release 11.5.0: https://pypi.org/project/azure-search-documents/11.5.0/

/unresolve
Stable release doesn't support semantic search. Is there any eta on 11.6 stable release?

I looked into the code snippet.
Seems like the type of title_field should be SemanticField rather than List[SemanticField]
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py#L9278
Could you modify your code to
semantic_config = SemanticConfiguration(
    name="semantic-config",
    prioritized_fields=SemanticPrioritizedFields(
        title_field=SemanticField(field_name="Title"),
        content_fields=[SemanticField(field_name="Chunk")],
        keywords_fields=[SemanticField(field_name="Keywords")],
    ),
)

and see if it works?


storage dead

https://github.com/anisotropi4/kingfisher/blob/main/image/A/ABW-rail.png

I'm working on it. I've blown my GitHub LFS for free limit but will hopefully have a solution while this evening.

Please @3502 and @SimonTate can you have a look now? I have hopefully resurrected the site for now but I'm not sure for how long. I removed the LFS support and re-imported the images but I'm not sure how long this will last.

I can still see them this morning. Thanks!


Remove jaxb-api dependencies

Description
Due to changes in how we manage our external libraries, the jaxb dependencies appear to no longer be needed.
This PR takes them out so we can do additional testing without them.
Acceptance Criteria

No jaxb jar files in the lib dir
No errors when running the CLI, with or without a pro key
No errors when running update with an XML changelog
No errors when running Maven, with or without a pro key

Test Requirements
No new automated functional tests are required for this fix.
The Jenkins infrastructure running the tests need to use Java 12 or greater.

See internal Liquibase Jira ticket for more details.

Manual tests must be executed with Java 12 or greater.
Verify a fresh install of Liquibase using the installer does not include jaxb jars.
Verify upgrading from an older version of Liquibase removes the jaxb jars.

NOTE : This may not work! Speak with  if it does not to determine if it should be fixed with this ticket OR if we create a secondary ticket to address the issue.

Verify a CLI update using an XML changelog is successful.

Community
Pro

Verify a Maven liquibase:update using an XML changelog is successful.

Community
Pro

Fixes #1866
LB-1749

Further testing found we needed the libraries still, so closing this PR as "cannot do"


Adds requested questions without the  brackets

This is a corrected version of this pull request:
https://github.com/codybousc/hackerhours.org/tree/diy-questions
I had deleted the code and was unable to update the origin pull request.

Great, thanks for updating!


Skip binary files by default without the need to add the extensions in the allow list

Is your feature request related to a problem? Please describe.
I am working in security team and we run gitleaks across thousands of our company's repos. I often see gitleaks trying to scan some binary files unnecessarily. Some of them are pretty huge, such as the ML .model files. Since I'm not the owner of the repos and it's not easy to track down individual repo to ignore the binary files for each of them. I can add to the ignore (or allow in gitleaks' term) list some known binary extensions but 1) it's a continuous effort for maintenance and 2) it could still give false negatives, both in terms of scanning binary files with arbitrary extension and not scanning text files with binary-like extension.
Describe the solution you'd like
Can we do a quick check if a file is a binary file before we search through the file contents so the analyzer can skip all binary files by default?
Describe alternatives you've considered
allowlist is an existing way of doing it.
Additional context
Add any other context or screenshots about the feature request here.
cc @zricethezav

Could set this up similarly to behavior in ripgrep - where you need to pass a -b flag to search binaries: https://github.com/BurntSushi/ripgrep#why-should-i-use-ripgrep

Hi @jasikpark @khanhldt, a prior version of gitleaks actually did binary filtering using isTextFile. IIRC it had a large negative performance impact. I'm happy to add a feature making binary filtering option. Or if there is a performant way to do binary checking, implement that.
This isn't a top priority for me so I'd be happy to accept PRs for this


mark some slow tests (#6116)

Pull request opened by the merge tool on behalf of #6116

Merged into branches iso6 in 7d1358cd9ac8086469055ff9390044c7f18df610


Remove deprecated 'rule' command

Wait for 2.0 before merging this

What is the situation regarding the #require directive? It's weird we didn't have these regressions before rebasing this branch

What is the situation regarding the #require directive?

What do you mean by that? If you're asking whether we still want to support them then the answer is definitely yes!
Not sure why those regression showed up but I'll look into it once we have compat with 4.13 merged!

On last test is KO on some versions (no idea why some are passing but that's not the purpose), mdx-test-require-local-package, @NathanReb do you remember the purpose of this test and if it's still makes sense after the rule command is removed?

Have you tried without the %{bin:...} change. That's the only thing I can think of here.
It looks like it's looking for the other binary in the wrong place or that it's not built.

Ah wait, was that the only failing test? In that case that's perfectly normal and it's because it needs the (package mdx) dep, as mentioned in the comment above!

Have you tried without the %{bin:...} change. That's the only thing I can think of here.
It looks like it's looking for the other binary in the wrong place or that it's not built.

I reverted this, it can be done in another PR anyway.


How i can add hidden input column with visibility hidden?

I want to populate existing records from database table and update them from jexel.
So, I need the primary key of each record should be hidden.

You can use type: hidden when defining your column type.


Gernerting signed apk build error

Execution failed for task ':react-native-get-music-files:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:7: error: resource android:attr/colorError not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:11: error: resource android:attr/colorError not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values\values.xml:2711: error: resource android:attr/fontStyle not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values\values.xml:2712: error: resource android:attr/font not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values\values.xml:2713: error: resource android:attr/fontWeight not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/fontVariationSettings not found.
  C:\Users\HD\Documents\ReactNative\Nuuruliman\node_modules\react-native-get-music-files\android\build\intermediates\res\merged\release\values\values.xml:2715: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

@muhammadashfaq
please provide more information.
Is your app running in development environment? which version are you using? are you installing via github or npm?
Also please reproduce the issue if possible.

react-native-cli: 2.0.1
react-native: 0.59.4
using npm 6.4.1

@muhammadashfaq
Does your app work in development environment?
I was not able to reproduce this issue, please reproduce it so we can take a closer look.

yes app is in development process.     I've uninstalled it from project and then apk generated successfully .

@muhammadshafaq
Please reproduce the issue in a public repo.

Sorry to say  i don't know how to reproduce issue in public repo.  can you tell me how to do it

Create a new app, add this module to the app, test it if it still doesn't work, if that was the case, push it to a public GitHub repo then share the link to that repo here. 🙂

Hi
Same problem here,
react-native-cli: 2.0.1
react-native: 0.59.8
npm: 6.9.0
android ./gradlew assembleRelease

Configure project :react-native-get-music-files
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '27.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, /home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/android/app/build/generated/assets/react/release/index.android.bundle
info Done writing bundle output
info Copying 4 asset files
info Done copying assets

Task :react-native-get-music-files:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':react-native-get-music-files:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values/values.xml:2711: error: resource android:attr/fontStyle not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values/values.xml:2712: error: resource android:attr/font not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values/values.xml:2713: error: resource android:attr/fontWeight not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values/values.xml:2714: error: resource android:attr/fontVariationSettings not found.
/home/philippe/PROJETS/RN_0.59/MinimalCarDashboard/node_modules/react-native-get-music-files/android/build/intermediates/res/merged/release/values/values.xml:2715: error: resource android:attr/ttcIndex not found.
error: failed linking references.

@BlunT76
Are you installing this module via npm?
( Please note that RNAndroidAudioStore is not implemented in the npm version so if you are installing via npm you shouldn't register this class)
This is one of those issues that is really hard to figure out without access to the source code.
As I couldn't reproduce the issue, please help by sharing your code or reproducing the issue.

@Drazail
I first installed via npm, re installed via npm install https://github.com/cinder92/react-native-get-music-files.git --save
Same result...
Here is my code: https://github.com/BlunT76/cardash

@BlunT76
it seems to be working as intended.
I could generate an apk and run the app on both emulators and real devices. you can find the full project on the pull request I made into the master branch of your repo.
the issue is most probably related to build.gradle file, check those in the android project of the pull request.

@Drazail
Thanks for the pull request, i merged it, pull, but always same problem.
As you said, problem come from gradle, but i don't know how to solve it...

@BlunT76
Android studio should have prompted you to update compileSdkVersion and buildToolsVersion to 28 if your project uses resources added in API level 28. Android studio can be weird like that at times .
unfortunately due to legacy support these parts of the modules should usually be updated manually according to the project's needs.

@Drazail
Yes, probably related as i updated android studio today, and installed many sdk

@BlunT76  what was the issue exactly? I am also having the same error.
Please document clearly how can I fix this.

@shubhamdeol
Bump compileSdkVersion and buildToolsVersion to the latest.


Level validation Rust implementation (RFC 76)

Description of changes
Rust implementation of Level validation (RFC 76: https://github.com/cedar-policy/rfcs/pull/76)
@aaronjeline is working on Lean changes.
Example error messages:

Issue #, if available
RFC 76 (https://github.com/cedar-policy/rfcs/pull/76)
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):

[x] A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

I confirm that this PR (choose one, and delete the other options):

[ ] Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

[ ] Requires updates, and I have made / will make these updates myself. (Please include in your description a timeline or link to the relevant PR in cedar-spec, and how you have tested that your updates are correct.)

This is slightly different the lean impl. In the lean impl Level 0 is the level that can't be de-referenced. I think they should align on that.

That's my understanding too. Each node's level gives the number of allowable dereferences. 0 means no dereferences are allowed. A negative number means we've already done more dereferences than allowed. None means infinite dereferences allowed. Is there a place where I'm not following this?


Move CheckBase print statements to CheckResult

Investigate moving the CheckBase term.p_pass and term.p_fail statements to the CheckResult database.

In 1.0.0, implemented a new CLI drawing system that resolved this feature request. Fixed in commit a4cda735343c1899f834db874d4619bcfeb2691d.


fix incorrect link for type-writer

Changes

fix incorrect link for type-writer

Checklist

[x] Read the contribution guide and accept the
code of conduct
[x] Readme and docs (updated or not needed)
[x] Tests (added, updated or not needed)

💀 oops


Should RenderParagraph.getBoxesForSelection assert for debugNeedsLayout?

This is more of a learning question.
I'm implementing a RenderEditableParagraph which extends RenderParagraph and adds logic similar to that of RenderEditable. I then use this class as part of a rich-text editor where it's responsible for rendering a single paragraph block.
Similarly to how EditableText works I have a text selection overlay to show selection handles and react to user gestures. And this is where I found one inconsistency.

RenderEditable provides getEndpointsForSelection which does not have assert(!debugNeedsLayout).
RenderParagraph provides getBoxesForSelection which does have assert(!debugNeedsLayout).

So when in my selection overlay I'm trying to find position for the handle I get assertion errors after hot reloads and some other transitions.
The question is: both methods use the same API, namely TextPainter.getBoxesForSelection and also both trigger text layout. Should RenderParagraph's method still be doing this assert or can it be more friendly as its counterpart in RenderEditable?
I'm currently using this workaround, which I suspect is probably a bad practice?
    if (block.debugNeedsLayout) {
      // Workaround for getBoxesForSelection throwing assert error on rebuilds
      Timer.run(() {
        setState(() {
          // no-op, we just need to schedule a refresh and try to render again
          // with render block hopefully not being dirty anymore.
        });
      });
      return null;
    }

I will be open sourcing my code pretty soon so that might help to better understand my use case, but for now I'd really appreciate any advice on what's the best way to handle such scenarios.

I think I have better understanding now. In order to get selection boxes this method uses constraints to layout TextPainter, but constraints are only initialized on first layout and before that they are null, which makes layout of TextPainter impossible.
This is probably why in RenderEditable there is an assert for constraints explicitly.
I've implemented a bit more involved solution to avoid using "dirty" render objects which seems to have resolved this issue for me (still looks like a workaround a little bit though).
As for my original question I think I found my answer, so closing this.


feat: ignore warnings via .nsci-ignore file

Resolve issue #4 (Milestone 1).
You'll be able to ignore warnings with a .nsci-ignore file:
{
  "warnings": {
    "unsafe-stmt": ["lodash.difference", "regenerator-runtime"]
  }
}

Definitely not my definitive version, but I'd like to have the first review.

Made corrections cc @antoine-coulon
Let's add e2e tests now, and enrich existing ones.
Then we should be good for milestone 1.

LGTM

I'll make a finally review, to see if I didn't have duplicated stuff, magic numbers etc...
Before that I have two remaining question marks:

I think we should have a consistent naming convention for RC and ignore file, WDYT

.nsci-ignore & .nsci-rc
.nodesecureignore & .nodesecurerc

@antoine-coulon could you take a look at how I log stuff in getIgnoreFile function and tell me if I'm good or not... I think that use something that should be dedicated to reporting. Let me know. In case I'll create a logger abstract that we could share across the codebase and that won't output in the context of test env.

I'll make a finally review, to see if I didn't have duplicated stuff, magic numbers etc...
Before that I have two remaining question marks:

I think we should have a consistent naming convention for RC and ignore file, WDYT

.nsci-ignore & .nsci-rc
.nodesecureignore & .nodesecurerc

You're completely right, I would go for the latest one, .nodesecureignore & .nodesecurerc.

@antoine-coulon could you take a look at how I log stuff in getIgnoreFile function and tell me if I'm good or not... I think that use something that should be dedicated to reporting. Let me know. In case I'll create a logger abstract that we could share across the codebase and that won't output in the context of test env.

In my humble opinion it's fine to directly use reporting utils instead of creating a dedicated reporter abstracting that, as it appears that the logged stuff is really light.
However for the output part in the context of tests you're right, it should not appear. One way of fixing without two much overhead would be using some sort of dependency injection directly in the getIgnoreFile function. Consequently with DI you could do a test implementation that prints nothing for each of the reporter's methods.
Ideally, this should be done at an higher application level to control and inject all other reporters the same way but it's clearly out of the scope of the PR.

Finally ready for the big jump @antoine-coulon

@all-contributors please add @tony-go for code, doc


Feature/add watch dir option

Adding an option to point to a folder to watch changes.  Trying to resolve issue where @import inside of scss files don't necessarily cause rollup to watch those files.

Isn't it possible to get a list of files from node-sass and watch them automatically?
stats.includedFiles from https://github.com/sass/node-sass#result-object


Use the editor, not the terminal, when writing a commit message

Actually we can use the terminal to write multiline commit message by just not closing the double quotes and hitting any number of new lines as you like and close it with the double quotes.

True, and this is why the style guide says "[...] encourages a mindset [...]" instead of "forces you to write". However it is not as convenient as writing a message from a text editor, especially when we consider the common case of multiline messages where you have to go back and forth many times to edit/copy/paste/indent snippets (plus you don't usually have things like auto-wrapping or column rulers in your terminal).


bad link: "Oops! That page doesn’t exist or is private."

The hint link is broken on this challenge:
https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator

Thanks. Fixed.


Asana reporting unsupported browser

Bug description:

After adding Asana and connecting, Asana reports that the browser is not supported
Steps to reproduce:

Connect Asana and log in
Presented with screen reporting unsupported browser

Screenshots

Environment:

Operating System: Windows 10

Ferdi Version: 5.5.0

Server: Using without an account

Debug information:
Copying debug information also fails to copy anything to clipboard

Adding a me too. Same OS variables as OP.
I was getting this message for a while when I first signed into Asana but the page would refresh and would load. But starting this week it no longer loads at all anymore.

Bug description:
After adding Asana and connecting, Asana reports that the browser is not supported
Steps to reproduce:

Connect Asana and log in
Presented with screen reporting unsupported browser

Screenshots

Environment:

Operating System: Windows 10
Ferdi Version: 5.5.0
Server: Using without an account
Debug information:
Copying debug information also fails to copy anything to clipboard

@YourWishes I was able to fix this by replacing the Ferdi recipe with the Franz recipe found here https://github.com/meqabayt/franz-recipe-asana.  Now loading correctly for me

Just tried it out, logging in to Asana works flawlessly for me with https://github.com/getferdi/nightlies/releases/tag/v5.6.1-nightly.33
There have been a lot of code changes and also Electron upgrades since the creation of this ticket, please let me know if you can still reproduce this.

Closing due to inactivity.


Middleware Chaining utility

Is your feature request related to a problem? Please describe.
As we add more packages that use middlewares to rewrite urls and add headers, it becomes harder to chain them together. It would be nice idea if the project had some default way to chain middlewares together.
Describe the solution you'd like
This is the code I am using in my own project to Chain Middlewares:
import "server-only";

import { NextRequest, NextResponse } from "next/server";

type Middleware = (
  request: NextRequest
) => NextResponse | Response | Promise<Response>;

export async function chainMiddleware(
  middlewares: Middleware[],
  request: NextRequest
) {
  let response: ReturnType<Middleware> = new NextResponse(
    request.body,
    request
  );
  for (const middleware of middlewares) {
    const awaitedResponse = await response;
    const url = new URL("", request.url);
    const newRequest = new NextRequest(url, awaitedResponse);
    response = middleware(newRequest);
  }
  return response;
}

And used in the code:

const middlewares = [securityHeaders, I18nMiddleware];

const Middlewares = (request: NextRequest) => {
  return chainMiddleware(middlewares, request);
};
export default authMiddleware(async (auth, request) => {
  return Middlewares(request)
}

This is my implementation, it seems to work as intended in my project, but I may be wrong. I would appreciate some input to see if this is useful or not for the project.

This is very important as we start to make each package self-maintaining i.e. #332

My previous implementation was flawed, as I was not forwarding the headers to the next requests.
I settled for now on this implementation:
import "server-only";

import { type NextRequest, NextResponse } from "next/server";

type Middleware = (
  request: NextRequest
) => NextResponse | Response | Promise<Response>;

export async function chainMiddleware(
  middlewares: Middleware[],
  request: NextRequest
) {
  if (middlewares.length === 0) {
    return undefined;
  }
  // console.info("request", request);
  let response: ReturnType<Middleware> = new NextResponse();
  const mergedHeaders = new Headers();

  for (const middleware of middlewares) {
    const currResponse = await middleware(request);
    currResponse.headers.forEach((val, key) => mergedHeaders.set(key, val));

    // const headersEntries = Array.from(currResponse.headers.entries());

    response = new NextResponse(null, {
      headers: mergedHeaders,
      status: currResponse.status,
      statusText: currResponse.statusText,
    });
  }

  return response;
}

I think this is good enough for now, but if you do url rewrites I have noticed some inconsistent behavior with next-international. I am most likely doing something wrong here. Eventually when each package is self-maintaining, it would be a good idea to revisit this issue


The page.setCookie method should also accept raw cookies

Steps to reproduce
Tell us about your environment:

Puppeteer version: 1.12.2
Platform / OS version: macOS 10.14.3
URLs (if applicable):
Node.js version: 10.15.0

What steps will reproduce the problem?
await page.setCookie('foo=bar');

What is the expected result?
It works.
What happens instead?
It doesn't.

Not being able to set raw cookies is very inconvenient. There are multiple situations where it would be useful:

Copy-pasting cookies from DevTools.
Accepting cookies as user input in a command-line tool.
Getting cookies from a server request, for example in Express where you read the cookie header, and then pass them to Puppeteer.

Yes, I could find an npm package for this, but the ones I found are not very good (tough-cookie included). I also think it's such a basic thing that a big percentage of Puppeteer users will need, that it should be supported by Puppeteer natively.

@sindresorhus isn't evaluate sufficient?
await page.evaluate(() => document.cookie = 'foo=bar');

@aslushnikov I need to set the cookie before the page has loaded.

@sindresorhus in this case page.evaluateOnNewDocument would probably work as a workaround.
But I guess what you really want is a browserContext.setCookie(url, 'foo=bar') method.

But I guess what you really want is a browserContext.setCookie(url, 'foo=bar') method.

👍

Hello, there googler!!
I used the 'EditThisCookie' extension that has a nice feature export, it will export cookies as JSON, in a perfect format so the puppeteer can consume without any transformation.

const cookies = require('./cookies.json')

async function main() {
 const browser = await puppeteer.launch()
 const page = await browser.newPage()
 await page.setCookie(...cookies)

 await page.goto('https://www.reddit.com')
 await page.screenshot({ path: 'reddit.png' })
 await browser.close()
}

main().catch(console.error)

Please keep this open.

Please keep this open.


Update README to add more detailed information about running the example locally.

I've updated the README to include more detailed information about running the example in your own machine. I spent some time (and brain resources) finding what to do after installing Elm in my machine (I know there's a big link from "Install Elm" to "Get Started", but I've missed it the first time) instead learning the syntax or elm language concepts.
I know there's a similar pull request, but I think this one is clear (no external links, just the information). In fact, this is what I would have liked to find when I looked this package to quick-start with Elm.

Hi, finally I understand why this package is stalled: because the 0.17 release. Thats nice!, but since not all the sources are correctly updated and this repo is intended for newbies, a warning message would be very useful.

I added the warning. Thanks!

Thanks. Appreciate. I understand the effort to the 0.17 release. Good luck
and thanks!
On Mon, May 16, 2016 at 10:00 PM, Evan Czaplicki<EMAIL_ADDRESS>wrote:

Closed #50 https://github.com/evancz/start-app/pull/50.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/evancz/start-app/pull/50#event-662096108


Revert "Upgrade to ruby 2.2"

Reverts alphagov/whitehall#2388
This still uses URI from the stdlib, which is too strict in parsing URIs. We need to replace the usage of URI with addressable.

:+1:


audio.png > audio.svg

Updated to audio.svg
Have a good day :)

Wow thanks @eee4 for still trying to contribute to this long forgotten project.


[#518] Update yarn-berry to v3.1.1 - releases/4.15

Addresses # 518
Description
This PR fixes an issue with the current version of yarn-berry causing the CI pipeline to fail when checking dependencies for the JS SkillV3 bot.
Detailed Changes

Updates yarn-berry to the latest 3.1.1 version.
Updated the yarn.lock file.

Testing
The following image shows the CI pipeline finishing successfully.

Promoted https://github.com/microsoft/BotFramework-FunctionalTests/pull/530


Format Errors with Caddy JSON

I confirm issues with Caddy JSON too. I'm new to the project and my first experience is that it's not working.
goaccess -V
GoAccess - 1.5.5.
OS:
Ubuntu 22.04.2 LTS
Command:
goaccess /docker/caddy/log/myLog.log --no-ip-validation --log-format CADDY
Relevant part of the Caddyfile
        log {
                output file /var/log/myLog.log
                format json
        }

Output:
Cleaning up resources...
==2851435== GoAccess - Copyright (C) 2009-2020 by Gerardo Orellana
==2851435== https://goaccess.io -<EMAIL_ADDRESS>==2851435== Released under the MIT License.
==2851435==
==2851435== FILE: /docker/caddy/log/myLog.log
==2851435== Parsed 10 lines producing the following errors:
==2851435==
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435== IPv4/6 is required.
==2851435==
==2851435== Format Errors - Verify your log/date/time format

I just updated as described on the Readme and the error still remains the same:
goaccess -V
GoAccess - 1.9.1.

Thanks for giving me the heads up on this. Sounds like the default log format isn't quite right. Bummer that I missed it in today's v1.91 release. I'll make sure to include it in the next one. This probably ties into #2601. Anyway, are you able to submit a PR with the right format for this? The relevant lines are here and here. Thanks a bunch!

I was setting up GoAccess for Caddy today and ran into this as well, but only when configuring Caddy's global log option and asking GoAccess to read it. If you setup only access logging on your domains it should work, and I think GoAccess's default Caddy configuration only expects these logs.
Example Caddyfile:
{ #Global Options
	log {
		# Don't configure your access log here...
	}
}
example.com {
	log {
		# Configure your access logs here.
		output file /var/log/caddy/access.log
	}
	# ...
}

If you have multiple domains, you can use snippets to make things easier.
Then read the log with goaccess:
sudo goaccess /var/log/caddy/access.log --log-format=CADDY

Tested with Caddy v2.7.6 and GoAccess 1.9.1. If the above still gives you any trouble, it might be helpful to include your Caddy version as well.
I don't think this is related to #2601 exactly, which is its own issue that originates with Caddy receiving first-class support for logging client IPs (such as from 'X-Forwared-For' headers) where the typical user might want to see the client_ip instead of remote_ip in the "Visitor Hostnames and IPs" table.

Hey @Teqed, thanks for catching that and providing the details. I'm thinking, should we consider adding another predefined option for when it's configured globally, like maybe CADDY_GLOBAL? Thoughts?

actually, looking at my response again, the global approach might be trickier since it doesn't appear to be a valid JSON string, as far as I can tell?

I attached a censored example entry from a debug level log.
The JSON seems pretty valid to me:
{
    "level": "debug",
    "ts":<PHONE_NUMBER>.5637116,
    "logger": "http.handlers.reverse_proxy",
    "msg": "upstream roundtrip",
    "upstream": "xxxx:8080",
    "duration": 0.00726643,
    "request": {
        "remote_ip": "<IP_ADDRESS>",
        "remote_port": "51987",
        "client_ip": "<IP_ADDRESS>",
        "proto": "HTTP/2.0",
        "method": "GET",
        "host": "xxxxx.xx",
        "uri": "/config",
        "headers": {
            "Referer": [
                "https://xxxx.xxxxxxx.xx/"
            ],
            "Sec-Fetch-Dest": [
                "empty"
            ],
            "X-Forwarded-For": [
                "<IP_ADDRESS>"
            ],
            "Sec-Fetch-Site": [
                "same-origin"
            ],
            "Te": [
                "trailers"
            ],
            "Accept": [
                "application/json, text/plain, */*"
            ],
            "X-Forwarded-Host": [
                "xxxxx.xx"
            ],
            "Dnt": [
                "1"
            ],
            "X-Clientapp": [
                "web_client"
            ],
            "X-Forwarded-Proto": [
                "https"
            ],
            "Accept-Encoding": [
                "gzip, deflate, br"
            ],
            "Sec-Gpc": [
                "1"
            ],
            "Sec-Fetch-Mode": [
                "cors"
            ],
            "User-Agent": [
                "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"
            ],
            "Accept-Language": [
                "en-US,en;q=0.5"
            ]
        },
        "tls": {
            "resumed": false,
            "version": 772,
            "cipher_suite": 4865,
            "proto": "h2",
            "server_name": "xxxxx.xx"
        }
    },
    "headers": {
        "Date": [
            "Wed, 07 Feb 2024 02:23:47 GMT"
        ],
        "Content-Length": [
            "657"
        ],
        "Content-Type": [
            "text/plain; charset=utf-8"
        ]
    },
    "status": 200
}

I attached a censored example entry from a local debug level log.
The JSON seems to have the same format as the previous one?
{
    "level": "info",
    "ts":<PHONE_NUMBER>.4037006,
    "logger": "http.log.access.log0",
    "msg": "handled request",
    "request": {
        "remote_ip": "<IP_ADDRESS>",
        "remote_port": "45873",
        "client_ip": "<IP_ADDRESS>",
        "proto": "HTTP/1.1",
        "method": "GET",
        "host": "xxxxx.xx",
        "uri": "xxxx/xxxxx/xxxxx",
        "headers": {
            "Connection": [
                "close"
            ],
            "User-Agent": [
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0"
            ],
            "Accept": [
                "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
            ],
            "Accept-Language": [
                "en-us,en-gb,en;q=0.7,*;q=0.3"
            ],
            "Accept-Encoding": [
                "gzip"
            ]
        },
        "tls": {
            "resumed": false,
            "version": 772,
            "cipher_suite": 4865,
            "proto": "http/1.1",
            "server_name": "xxxxx.xx"
        }
    },
    "bytes_read": 0,
    "user_id": "",
    "duration": 0.002669453,
    "size": 3436,
    "status": 200,
    "resp_headers": {
        "Accept-Ranges": [
            "bytes"
        ],
        "Last-Modified": [
            "Fri, 07 Jul 2023 10:33:07 GMT"
        ],
        "Cache-Control": [
            "public, max-age=0"
        ],
        "Content-Length": [
            "3436"
        ],
        "Server": [
            "Caddy"
        ],
        "Alt-Svc": [
            "h3=\":443\"; ma=2592000"
        ],
        "Content-Type": [
            "text/html; charset=UTF-8"
        ],
        "Date": [
            "Wed, 07 Feb 2024 02:31:19 GMT"
        ],
        "Etag": [
            "W/\"d6c-1892fe9a07a\""
        ]
    }
}

As seen in my example I kinda compare oranges and apples. One is a debug level event the other one an info level event.
My guesswork would be that there are some entries (especially in debug logging) which maybe disturbs the parser. But that the "regular" entries working fine. Tbh I have no clue what goaccess does in the background.

@Robert-Ernst, I was looking at this and noticed some differences between fields like resp_headers vs headers. But it seems like it should work fine for both entries for the most part (see screenshot). The default GoAccess format for CADDY is indeed the 'local/info' format, as you mentioned. However, if necessary, you can customize the log format that GoAccess uses to align with your specific configuration. Making this adjustment is relatively simple.
Are you still encountering any issues in the latest version?

It works for me in the local info format.
Not with the global one. But that is fine.
I would recommend adding this information to the documentation and this should be fine.
As Teqed suggested it's possible to create snippets and thus local configuration is easily customizable in Caddy.
After the documentation has been created, you can close this ticket.

I was using goaccess 1.7.1 with domain json log (not global) and it was working perfectly fine.
Today I upgraded to 1.9.1 with the same config, same log file and now it fails with "IPv4/6 is required" and "Format Errors - Verify your log/date/time format" errors.
Adding  --log-format '{"ts":"%x.%^","request":{"remote_ip":"%h","proto":"%H","method":"%m","host":"%v","uri":"%U","headers":{"User-Agent":["%u"],"Referer":["%R"]},"tls":{"cipher_suite":"%k","proto": "%K"}},"duration": "%T","size": "%b","status": "%s","resp_headers":{"Content-Type":["%M"]}}' it works again.

Appreciate the feedback. I've made the necessary updates to both the man page and the documentation on the website regarding the log-format configuration.
Closing this, feel free to reopen it if necessary.

While it's on my mind, I wanted to mention that I think there may be a way to configure logs globally the way we're expecting by including only access log events:
# Globals
{
	log global_access {
		output file /var/log/caddy/access.log
		include http.log.access
	}
}

By using the include directive only available at the global log level, we're able to filter to only the log format we expect, and are able to log across all domains without individually configuring each. I haven't ran this for more than a few minutes to make sure it works at expected, but assuming it does, this is probably the solution most people will want.
It might also be useful for someone to consume Caddy's non-http.log.access events -- which often describe application status, SSL certificate negotiations, configuration reloads, etc. -- but making use of Caddy's complete log would be a different dashboard serving a different purpose.

"client_ip" is missing when using caddy < 2.7.0. The issue was fixed in the 2.7.0 release:
https://github.com/caddyserver/caddy/commit/05e9974570a08df14b1162a1e98315d4ee9ec2ee
I was able to reproduce this using my own logs:
$ grep \"client_ip\" access.log |head -n 1|jq .ts
1696963002.4146495
$ date -d @1696963002
Tue Oct 10 08:36:42 PM CEST 2023
$ grep caddy /var/log/pacman.log
...
[2023-10-10T20:33:53+0200] [ALPM] upgraded caddy (2.6.4-1 -> 2.7.4-1)
...

Hey @juergenhoetzel, thanks for bringing that up. So, just to make sure I understand correctly, prior to version 2.7.0, Caddy didn't include the client_ip field in its logs, but starting from version 2.7.0, it does, right? Currently, this is the log format for Caddy in GoAccess here. I wonder if we should have two different log formats to accommodate the change... Thoughts?

Hi @juergenhoetzel , Are you intentionally combining caddy < 2.7 (Aug '23) with goaccess >= 1.9.2 (Apr '24) or did you come across this combination incidentally? Caddy's latest recommended release is v2.7.6 and you can review the deprecations for v2.7 here.
If you do have a use-case for this combination, you can make a quick edit to your goaccess.conf file, usually found in /etc/goaccess/goaccess.conf
time-format %s
date-format %s
...
# CADDY JSON Structured
-log-format {"ts":"%x.%^","request":{"client_ip":"%h","proto":"%H","method":"%m","host":"%v","uri":"%U","headers":{"User-Agent":["%u"],"Referer":["%R"]},"tls":{"cipher_suite":"%k","proto": "%K"}},"duration": "%T","size": "%b","status": "%s","resp_headers":{"Content-Type":["%M"]}}
+log-format {"ts":"%x.%^","request":{"remote_ip":"%h","proto":"%H","method":"%m","host":"%v","uri":"%U","headers":{"User-Agent":["%u"],"Referer":["%R"]},"tls":{"cipher_suite":"%k","proto": "%K"}},"duration": "%T","size": "%b","status": "%s","resp_headers":{"Content-Type":["%M"]}}

Hi @juergenhoetzel , Are you intentionally combining caddy < 2.7 (Aug '23) with goaccess >= 1.9.2 (Apr '24) or did you come across this combination incidentally? Caddy's latest recommended release is v2.7.6 and you can review the deprecations for v2.7 here.

I have deliberately used version 2.7.0 here to show that it is the first version adding the  client_ip  field.


"Extensions > List revisions" demos the wrong endpoint

The DEFINITION and EXAMPLE RESPONSE are for GET /companies?filter[org_id]=EQ%203DB07B845A7DE2990A494126@AdobeOrg.
The  EXAMPLE REQUEST seems to be curl-ing the right endpoint, though.

api/reference/1.0/extensions/revisions.md references extensions.list_the_revisions_of_an_extension, and
api_specification.json does contain that scenario, and
that scenario does include an access to the right endpoint (/extensions/:unrevised_extension_id/revisions)
but the wrong EXAMPLE RESPONSE data is being interpolated into api/reference/1.0/extensions/revisions.md

https://git.corp.adobe.com/reactor/kessel/pull/31/files#diff-9e2326293499df35fa2f009def940f09R53


Docker Build Doesn't contain latest version

I would like to use the Dockerized version of the app, however I need messageAttribute support and the docker version points to an old version of the app.
Thanks.

Done yesterday!


🤯 Implement CONSTRUCT query over triple store

Purpose
Implement the CONSTRUCT query over the triple store in the cognitarium smart contract, allowing to retrieve a set of triples serialized in a specific format (turtle, rdf/xml, ...).
This way of querying is particularly relevant for the purpose of Governance evaluation because it allows the retrieval of triples that constitute an RDF graph. Indeed, this graph seamlessly integrates with Prolog due to the inherent equivalence between an RDF triple and a Prolog predicate. This approach enables us to harness the semantics of ontological knowledge while maintaining its essence during interpretation within a Prolog program.
Notes:

See  W3C Sparql CONSTRUCT specification for an inspiration.

Todo

[x] Specify the contract messages
[ ] Implement the query

FYI @antho31


[Ruby 2.5] rescue/else/ensure are allowed inside do/end blocks

https://bugs.ruby-lang.org/issues/12906

@eregon done

@andrykonchin I'll review this on Thursday, I'm away until then.


Switch to whisper with mlx

Nice. I'll take a look and perhaps update the README file.

This is an official example from Apple: https://github.com/ml-explore/mlx-examples/tree/main/whisper
The folder has been forked from the official repository and includes some additional patches: https://github.com/ml-explore/mlx-examples/pull/12

Thanks!


Profile picture

Description
Fixes # (issue)
Type of change
Please delete options that are not relevant.

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

Change Status

[ ] Complete, tested, ready to review and merge
[X] Complete, but not tested (may need new tests)
[X] Incomplete/work-in-progress, PR is for discussion/feedback

How Has This Been Tested?

[ ] Test A
[ ] Test B

Checklist

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[ ] My code has been reviewed by at least one peer
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] There are no merge conflicts

well, there's no conflicts but i am getting same error in loading it up locally as i did initially, the path undefined error.


Request to help

Hi, I would like to help the development of this client.
I have mid-high java knowledge. My past project was a meteorclient addon, where a few friends joined in to make it go. https://github.com/AntiP2WDevelopment/AntiP2W-Addon
Since I play 2b2t and like the idea of this client, I want to help just to cure boredom.
Is there a way where I can officially contact you, discord or smth?
Thanks, ItsMeTomTom

Hey man! So sorry, just saw this request now, 2 weeks late haha!
Message me on discord at 8342 (GlowskiBroski)


[BACKPORT] kinetis:Ethernet fixed & better interrupt management

When any error was detected the buffers descriptors were
blindly initialized. This caused the TX of the MAC to
be in a bad state. The correct thing to do, we disable
the MAC, init the bufffers and re-eanable the MAC.
The interrupts were being throlled at the NVIC. This been
cleaned up.

Best I can tell we tested this and I forgot to back port it.


Add Actix audit file to registry

I've started an audit log for all Actix first-party and some third-party ecosystem crates.

manually managed

Totally get the concern and happy to recreate this file purely with the cargo vet commands before telling more people about it.

some audits were removed from the file in previous changes

yes, i'd learned about wildcard-audits and that seemed like an obvious improvement for the self-certify cases

stability requirements of an importable audits.toml file (e.g. never removing an audit from the file)

yes, very reasonable requirement and will certainly uphold it going forwards


Generate some automatic testing

Make unit tests based off of the current WhoBPyT examples that doesn't require visual inspection

@sbastiaens has examples to use as a reference

@Andrew-Clappison would the testing be more qualitative (i.e., does the code run properly?) or quantitative (i.e., how well it fits data, etc.)?

At this point, I'm implementing simple verification of parameter fitting in terms of making sure that the ones we indicated as free parameters are changing while the rest are not.
The fitting status for the parameters can be found in the Model_fitting object, where the intent to fit or not is within Model_fitting.model.params and the actual fitted params are found in Model_fitting.trainingStats.fit_params
code here
example notebook here
(there's an error due to pandas version that I haven't figured out yet)
Not sure if this is the direction we're looking at, don't want to commit to it too hard before getting some input from others.

@tmorshed is still working on that PR #138


[semantic-arc-opts] Enable by default.

@swift-ci smoke test and merge

Can you remove EnableMandatorySemanticARCOpts?

I will remove it in a subsequent commit. I don't want to restart this build.

@swift-ci please benchmark


ARROW-2066: [Python] Document using pyarrow with Azure Blob Store

Original question:
https://github.com/apache/arrow/issues/1510
Improvement story:
https://issues.apache.org/jira/browse/ARROW-2066

@xhochy Uwe - can you review?

@rjrussell77 do you have an Apache JIRA id so I could assign https://issues.apache.org/jira/browse/ARROW-2066 to you?

@xhochy Regarding your question about my Apache JIRA id - try this: rob_PTL

Thanks @rjrussell77 -- I added you as a contributor and assigned the issue to you


[MLLIB] [SPARK-2222] Add multiclass evaluation metrics

Adding two classes:

MulticlassMetrics implements various multiclass evaluation metrics
MulticlassMetricsSuite implements unit tests for MulticlassMetrics

@avulanov You have added a class called MulticlassMetrics, but I do not understand how it operates on multiclass classification? I would understand the usage if it accepts RDD[(Vector, Vector)], but it uses RDD[(Double, Double)] and that seems to me like binary classification?
Can you give me an example for... say: the MNIST dataset (10 output neurons). Thanks!

@tolgap As documentation suggests, MulticlassMetrics accepts predictionAndLabels, an RDD of (prediction, label) pairs, where prediction is the predicted class/label, label is the actual class/label.
For example:
import org.apache.spark.mllib.util.MLUtils
import org.apache.spark.mllib.classification.ANNClassifier
import org.apache.spark.mllib.evaluation.MulticlassMetrics

/* load mnist data */
val data = MLUtils.loadLibSVMFile(sc, "mnist_file_in_svm_format")
val split = data.randomSplit(Array(0.9, 0.1), 11L)
val training = split(0)
val test = split(1)
/* train ANN with hidden layer of 32 neurons */
/* (input and output layer sizes will be derived from the data) */
val model = ANNClassifier.train(train, Array[Int](32), 40, 1.0, 1e-4)
val predictionAndLabels = test.map( lp => (model.predict(lp.features), lp.label))
val metrics = new MulticlassMetrics(predictionAndLabels)
println("Accuracy:" + metrics.precision)

@avulanov How many neurons does the output layer have in this case? 1 or 10? Because my current implementation has an output layer of 10 neurons, e.g:
val output = Array[Double](7.466E-4, 4.16464E-9, 0.0, 0.0, 0.99462, /*..*/)

In this case, this example has the highest probability of being the digit 4 (fifth element has highest probability).

@tolgap ANNClassifier will create 10 output neurons for mnist, 10 is the number of distinct labels derived from the data. Each class usually is encoded with a separate output neuron, especially when there are no explicit relations (or ordering) between classes.


SoundSwitch

Description of the new feature / enhancement
It would be interesting to integrate a feature that allows you to switch audio profiles from your computer keyboard like the soundswitch software does. In one click via a keyboard shortcut, you switch from external speakers and external microphone to headphones and its microphone. very practical on a daily basis.
Scenario when this would be used?
In one click via a keyboard shortcut, you switch from external speakers and external microphone to headphones and its microphone. very practical on a daily basis.
Supporting information
https://soundswitch.aaflalo.me/

/dup #4964


Obtain IRS publication 334 (Tax Guide for Small Business)

Easy PDF download from IRS website.
Quick review completed. Saved in Business Resources folder https://drive.google.com/drive/folders/1oBefslx-WxMxBQT8rKrd5BATm8Bmu-mo


.NET Core 3.1

May I retarget the samples and whatever else is necessary to .NET Core 3.1?

Sounds great; as long as it's possible to preserve the existing targets of the Sprache package itself 👍

@faso Technically, it should target netstandard2.1 not netcoreapp3.1.

The samples are EXEs, IIRC, so netcoreapp3.1 would be the norm, there.

@nblumhardt Yes, the lib should add netstandard2.1 and the sample should use netcoreapp3.1
The reason why its good to target netstandard2.1 is due to the craziness that is ASP.NET and the diamond dependencies that form when you try to load a project with Sprache and ASP.NET dependencies into the same context.  By targeting netstandard2.1, you can avoid weird PackageReference resolution behavior.  <-- THIS TOOK ME THREE YEARS TO UNDERSTAND...

@jzabroski 😆  ... I know the feeling!
There are still a couple of package dependencies in netstandard2.1 which are part of the framework reference in netcoreapp3.1, so I've thrown up my hands and used it as a library target in a few places.
I can't help but feel we're heading for a new norm of including netstandard2.0 for platform reach, and net5 (or whatever its TFM is) for full features. The unification of .NET Fx, Core, and Mono makes high-version .NET Standard TFMs a bit redundant IMO.
Agreed netstandard2.1 is a fine choice for the library portion of Sprache, though 👍

The change from #153 included not needed dependencies for .net Standard 2.x, those are only required for ns1.x.

Can this be fixed?


Handling multiple datas

Handling multiple SkinnedMeshRenderers and multiple materials. RenderChunk need manage submesh and materials.

this function do not need this case


Set up the project for project-level testing

make test and xargo test commands from the project root now work
properly.
It's not pretty or perfect - xargo test fails when given the intermezzos
target, and I don't know why - but it's a start.

This is still getting
= note: /usr/bin/ld: /home/travis/build/intermezzOS/kernel/target/debug/build/intermezzos-326b00bff3368bc8/out/libboot.a(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC

which i still haven't figured out how to solve :/

This is still getting
= note: /usr/bin/ld: /home/travis/build/intermezzOS/kernel/target/debug/build/intermezzos-326b00bff3368bc8/out/libboot.a(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC

which i still haven't figured out how to solve :/

guh. sorry that i am the worst and let this sit for over a year. I feel terrible. I'm trying to get back to a clean slate here, so sadly, i need to close this. I hope you got something out of this, sorry for failing you :(


Weighted means for RM

As discussed, please implement a parallel structure for calculating weighted means of the RM, similar to the one that exists for Unknowns.  This will be a separate Interpretations/RM menu item from the one that already exists - the existing one should be renamed "Calibration Constant", this new one "Weighted means".

All the same functionality from the Unknowns weighted mean window should be there (Calc WM from:, Sorted Ascending by: Save WM stats to file, Show WM in expressions and To SVG).
There will therefore be a need for a "RM Weighted Mean Plot and Sort" report template.
The "Filter by min. Prob. should be REMOVED for the RM window.
Instead the same "Auto-reject" and 'plot reject buttons should be included.
The WM stats report should be called WeightedMeanReportForRM_samplename.csv

Isn't the weighted mean by definition going to be the reference age/ratio?

It is for the 6/38 age/ratio, but I want to output things like the average UO/U for the RM to compare the the average UO/U of my unknowns. Or even the average 7/6 age to track things long term.

@NicoleRayner - haven't forgotten you and am now working on this ;-).

see version 1.8.1


Compile time error for get() if T not in type list?

Should get<double>() generate a compile time error in the following case?
variant<int> v = 1;
auto x = v.get<double>()

because get<double> can never work.
Note that this is different than
variant<int, double> v = 1;
auto x = v.get<double>()

which can work if there is something else in between the lines that changes v into a double.

fixed in c117592337cc20c238d4ce9f9d8847aff0cd55ab

cool, upgrading


Cannot implement ViewRef unless element type implements Clone

ViewRef is a subtrait of View, which requires Self::T to implement Clone. However, it makes sense to implement ViewRef and ViewMut even when Self::T does not implement Clone. Options:

Move the requirement that Self::T implements Clone onto the View::at() method.
Factor out a supertrait ViewBase from View, leaving just the at() method in View.
Another idea?

I have tried this and it seems to be another legit idea:
diff --git a/src/view.rs b/src/view.rs
index 0fba000..3c7a5df 100644
--- a/src/view.rs
+++ b/src/view.rs
@@ -118,7 +118,7 @@ pub trait View: Sized {
     type I: Index;

     /// The element type.
-    type T: Clone;
+    type T;
:...skipping...
diff --git a/src/view.rs b/src/view.rs
index 0fba000..3c7a5df 100644
--- a/src/view.rs
+++ b/src/view.rs
@@ -118,7 +118,7 @@ pub trait View: Sized {
     type I: Index;

     /// The element type.
-    type T: Clone;
+    type T;

     /// The size of the array.
     fn size(&self) -> <Self::I as Index>::Size;
@@ -845,7 +845,7 @@ impl_ops_for_view!(Enumerate<V>);
 #[derive(Debug, Copy, Clone)]
 pub struct Diagonal<V: View>(V, V::T);

-impl<V: View> View for Diagonal<V> {
+impl<V: View> View for Diagonal<V> where V::T: Clone {
     type I = (V::I, V::I);
     type T = V::T;
     #[inline(always)]
@@ -856,14 +856,14 @@ impl<V: View> View for Diagonal<V> {
     }
 }

-impl<V: View> ViewRef for Diagonal<V> where V: ViewRef {
+impl<V: View> ViewRef for Diagonal<V> where V: ViewRef, V::T: Clone {
     #[inline(always)]
     fn at_ref(&self, index: Self::I) -> &Self::T {
         if index.0 == index.1 { self.0.at_ref(index.0) } else { &self.1 }
     }
 }

-impl<V: View> ViewMut for Diagonal<V> where V: ViewMut {
+impl<V: View> ViewMut for Diagonal<V> where V: ViewMut, V::T: Clone {
     #[inline(always)]
     fn at_mut(&mut self, index: Self::I) -> &mut Self::T {
         if index.0 == index.1 { self.0.at_mut(index.0) } else { &mut self.1 }

That's basically my second idea above. Thanks for the recommendation. 🙂


Remove Windows Store Python testing from CI

The underlying API to download this Python is no longer available to GitHub runners
RE: https://github.com/beeware/.github/pull/65

PR Checklist:

[X] All new features have been tested
[X] All new features have been documented
[X] I have read the CONTRIBUTING.md file
[X] I will abide by the code of conduct

note: merge restrictions don't seem to be in place for this repo

FWIW - the lack of merge restrictions is intentional; we need them off so we can rebuild and push the app binary direct to main. Mark that up as one more reason binaries shouldn't be in the repo.


Add missing class constants causing arc submit to fail

Error message are like,
Fatal error: Undefined class constant 'REFTYPE_BOOKMARK' in /.../ArcanistSubmitWorkflow.php on line 225

@sundargates I think --onto triggered specific branch of logic hence hitting this issue. No context to dig into the issue but it's a clear and straightforward fix to me.


Performance on Xeon Scalable

Hello everyone, we are seeing slower than expected inference times on one of our CPU node with Intel(R) Xeon(R) Platinum 8362 CPU @ 2.80GHz with following instruction sets:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg rdpid fsrm md_clear flush_l1d arch_capabilities

With latest version of neuralchat_server and neural-speed in combination with intel-extension-for-transformers with following config:
host: "<IP_ADDRESS>"
port: 8000
model_name_or_path: "/root/Intel/neural-chat-7b-v3-3"
device: cpu
tasks_list: ["textchat"]

optimization:
  use_neural_speed: true
  optimization_type: weight_only
  compute_dtype: fp32
  weight_dtype: int8

We are seeing extremely slow time to first token with example prompts like Tell me about Intel Xeon Scalable Processors.
With following measured times :

Weight Precision
Max Tokens
Response Time

Int8
unset
73s

Int8
128
69s

Int4
unset
73s

Int4
128
65s

Without neural-speed compression of said model, we got inference times to only around 20s.
Is there any misconfiguration on our part?
I would love to hear your feedback and appreciate any help.

could you try neural-speed alone with this model? it may not be an issue of neural-speed.


how clap_app support number parameter

Rust Version
rustc 1.24.1 (d3ae9a9e0 2018-02-27)
Affected Version of clap
clap 2.31.1
Expected Behavior Summary
code:
clap_app!(
                test =>
                    (author: crate_authors!())
                    (version: crate_version!())
                    (about: "test.")
                    (@arg v2: -2 "use version 2")
 ).get_matches()

I need
cargo build ok and app support -2 input parameter

Actual Behavior Summary
cargo build occur error:
error: no rules expected the token `-`

Because the macros go by the Rust ident rules (i.e. what you can name a variable), you can't use a number. You can only do this with the builder pattern, usage strings, or YAML.
However, you can use a hybrid approach where everything is defined in the macro and then use the builder for just that one arg.
play pen link

@kbknapp  thx a lot!


JPG decode fails with ArduCAM 2MP coz xdensity and ydensity is 0 in jpeg buffer

Background:

I connected 2MP Plus ArduCAM to Arduino Nano BLE as per the photo in this issue https://github.com/ArduCAM/Arduino/issues/442

I installed ArduCAM library in the Arduino IDE.

I uncommented  #define OV2640_MINI_2MP_PLUS in memorysaver.h

I am using ArduCAM_Mini_2MP_Plus_functions.ino as an example.

SPI interface get's detected reliably. OV2640 gets detected reliably as well.
See the log output:
23:13:45.876 -> ACK CMD ArduCAM Start! END
23:13:46.075 -> ACK CMD SPI interface OK. END
23:13:46.075 -> ACK CMD OV2640 detected. END
23:13:46.075 -> ACK CMD switch to OV2640_320x240 END

In the read_fifo_burst function(), I try and print the temp value which is essentially the bytes being read from ArduCAM buffer.

23:14:23.472 -> temp is D8
23:14:23.472 -> temp_last is FF
23:14:23.472 -> temp is D8
23:14:23.472 -> ACK IMG END
23:14:23.472 -> ⸮⸮temp is FF
23:14:23.472 -> ⸮temp is E0
23:14:23.472 -> ⸮temp is 0
23:14:23.472 -> temp is 10
23:14:23.472 -> temp is 4A
23:14:23.472 -> Jtemp is 46
23:14:23.472 -> Ftemp is 49
23:14:23.472 -> Itemp is 46
23:14:23.472 -> Ftemp is 0
23:14:23.472 -> temp is 1
23:14:23.472 -> temp is 2
23:14:23.472 -> temp is 2
23:14:23.472 -> temp is 0
23:14:23.472 -> temp is 0
23:14:23.506 -> temp is 0
23:14:23.506 -> temp is 0
23:14:23.506 -> temp is 0
23:14:23.506 -> temp is 1
23:14:23.506 -> temp is FF
23:14:23.506 -> ⸮temp is B6
23:14:23.506 -> ⸮temp is 0
23:14:23.506 -> temp is 86
23:14:23.506 -> ⸮temp is 0
...
...
...
Problem statement:
The byte stream looks like
FF D8   --> Header
FF E0  -- APP0 Marker
0 10   -- len
4A 46 49 46 0  -- JFIF Identifier
1  -- density
2 2 -- version
0 0  -- Xdensity
0 0  -- Ydensity
0 -- Xthumbnail
1 -- YThumbnail
According to JPEG wikipedia link, Xdensity and Ydensity cannot be ZERO.
This is causing the jpeg decoder to fail in decoding the jpeg stream from ArduCAM.
Has anyone run into this issue or have any idea how to resolve it?

Hi，
From your description, it is obvious that there is a problem with the data of the JPEG image.
Without modifying our example, there are usually the following possible reasons.

The wire is too long, resulting in unstable data transmission
The SPI speed is too fast, and there is an error in the transmission data.

I tried both 921600 (which is default in the code) and also 115200. I don't see any difference in the result. Below is how I changed it. let me know if this is ok or are there some other settings required to change the baud rate.
#if defined(SAM3X8E)
Wire1.begin();
Serial.begin(115200);
#else
Wire.begin();
Serial.begin(115200); --> Changed the value in this line.
#endif

as for the wire being too long, i am using the wire that came with the arducam via a breadboard and the Arduino nano is directly plugged into the breadboard. please see the picture.

Hi，
The first thing you modify is the baud rate of the serial port, not the SPI rate.
Secondly, can you try the following figure to connect the wire directly to the BLE pin? Don't pass the breadboard.

Another point, try to replace the power supply interface instead of using the hub to supply power.

I am facing a similar problem but unsure if the problem is the exact same. I am capturing faulty image data and transferring them over the usb serial. Arducam Host App not showing anything. I've emailed support for help. Hopefully theres a quick fix.


"Uplink" table (5) missing from OVS windows documentation

The Windows design documentation (https://github.com/vmware-tanzu/antrea/blob/master/docs/windows-design.md) should probably be updated a bit to account for changes in https://github.com/vmware-tanzu/antrea/pull/943. It should mention the "Uplink" table, which is specific to the Windows datapath.

I think this has been addressed


Add Visual Studio Build Tools 2017 on README

Added Visual Studio Build Tools 2017 link as suggested for Windows.

Launch cmd, npm config set msvs_version 2017

Checklist

[x] npm install && npm test passes
[x] tests are included
[x] documentation is changed or added
[x] commit message follows commit guidelines

Description of change

I sense that narrowcasting on 2017 misses the point:
https://github.com/nodejs/node-gyp/blob/master/gyp/pylib/gyp/MSVSVersion.py#L442-L451

Closing because this section has all been rewritten.


fixdecimal and datetime literal comparison should compare datatype too

pick from master https://github.com/apache/doris/pull/36055
Issue Number: close #xxx

run buildall


⚠ Thumbnails API Endpoint has degraded performance

In 6d3e632, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 5123 ms

Resolved: Thumbnails API Endpoint performance has improved in 1e7967b after 3 minutes.


Error on login after Nubank API changes

They are requiring now the attribute client_secret to login to the API.

I submitted the PR above to fix this issue.


Docs: New Getting Started Page

(docs): Adding the first draft of the new Getting Started page along with the new structure (draft).

Hey @PazYanoverr, this PR introduces a new Getting Started page draft that reorganizes our documentation structure. The proposed changes include:

New overview page highlighting key platform engineering capabilities
Restructured "Getting Started" sidebar section that will feature quickstart (first service creation), dedicated example services section, and In-depth Application introduction serving as documentation table of contents/roadmap

What are your initial thoughts on this first draft and this direction for the getting start sidebar re-structuring?

@dericksozo - The "overview" page looks good! I added a few comments.
Regarding the sidebar - I wish it reflects quickly Amplication major capabilities and advantages. A roadmap and examples are nice, but I think we need to "get to the point" much faster here. I.e. have here pages mostly about our live templates, technical debt handling, and - maybe- plugins + private plugins. I believe these pages can also appear as part of the "regular" menu, but these issues should be emphasized in the documentation - i.e. in the sidebar menu, in the top menu etc.
WDTY?

Hello @PazYanoverr,
I implemented the feedback into the Getting Started page. I added a new "Core Platform Features" section to the sidebar, showcasing Platform Console and Private Plugins pages. Once Live Templates and Service Catalog PRs are merged, they will be added to this section. We should also consider creating a dedicated Technical Debt Management page to complete the core feature documentation.
Thoughts?

@dericksozo - Sounds good. In addition- I fully agree regarding the Technical Debt Management page that should be created. Let's add it as a new task.
One small comment: I think that the Documentation title should "hold" all the pages, not only the two pages of Overview and "Create your first..." -


Accessible version info

We need a __version__ in ino, as well as possibly a --version flag. I ended up having to dive down the "rabbit hole" into my python lib directory to take a peek at the egg dir to see if I had the latest version.
If desired, I can fork and make a PR as I have time.

:+1:


Custom cell click event

Hi,
I just want to set the Custom cell click event in the "advanced" dataviewjs block like it does in the basic behavior.
But in the docs there is only one example that opens the global search.
How do I set this to work like in basic (modal) code? (attachment)

It's a function I'm looking for, so I wrote it while looking through the source code.
It's not a perfect answer, but I hope it helped.
const data = dv.pages('#note/calendar/daily')
	.groupBy(p => p.file.ctime.toFormat('yyyy-MM-dd'))
	.map(entry =>{
		const items = entry.rows
			.map((item) => {
				const label = item.file.path;
				const value = 0;
				const source = {
					"type": "temp"
				}

				return {
					label: label,
					value: value,
					link: {
						href: item.file.path,
						className: "internal-link",
						rel: 'noopener'
					},
					open: (e) => app.workspace.openLinkText(
						item.file.path, item.file.path
					),
				};
			})
			.array();

		return {
			date: entry.key,
			value: entry.rows.length,
			items: items
		}
	})

const calendarData = {
    days: 364,
    title: "Tracking Results",
    titleStyle: {
	    textAlign: 'center',
	    fontSize: '17px',
    },
    cellStyleRules: [
	    {
		    color: "#f1d0b4",
		    min: 1,
		    max: 999,
	    },
    ],
    data: data,
    mainContainerStyle: {
	    backgroundColor: "#ffffff"
    },
}

I'm also waiting for this answer!

Thank you very much ggm1207,
very fine!
What do I have to change, so that the search does'nt open?
the click at the link opens the file, thats completely sufficient for me.

Erase the onCellClick in const calendar Data
like below:
const calendarData = {
    days: 365,
    title: 'Contributions in the last 365 days ',
    data: data,
//    onCellClick: (item) => {
//	    const key = `["tags":project] ["createTime":${item.date}]`
//		app.internalPlugins.plugins['global-search'].instance.openGlobalSearch(key)
//    },
    cellStyleRules: [
	    {
		    min: 1,
		    max: 2,
		    text: '🌲'
	    },
	    {
		    min: 2,
		    max: 3,
		    text: '😥'
	    },
	    {
		    min: 3,
		    max: 4,
		    text: '✈'
	    },
	    {
		    min: 4,
		    max: 99,
		    text: '✈'
	    }
    ]
}

Ah, fine, thank you for your patience!
the dot on the i and the day would be perfect, if you also could tell me, how I do this click event
in my other issue (https://github.com/vran-dev/obsidian-contribution-graph/issues/93)
were the appropriate field is a list (array)
The Code I use:
const data = dv
	.pages("")
	.filter((p) => p.modified)
	// core, we should flatmap modified values, because  modified property is list
	.flatMap((p) => {
		if (!Array.isArray(p.modified)) {
			return [{
				time: p.modified,
				page: p
			}]
		}
		return p.modified.map((t) => {
			return {
				time: t,
				page: p,
			};
		});
	})
	.groupBy((p) => p.time.toFormat("yyyy-MM-dd"))
	.map((entry) => {
		return {
			date: entry.key,
			value: entry.rows.length,
		};
	});

const calendarData = {
	data: data,
	days: 365,
};

renderContributionGraph(this.container, calendarData);


Add a LicenseBadge component

A GitHub repository can have a license badge rendered on top of the README.md to allow contributors / users to quickly understand which license the current project is using.
Would you be willing to help with a PR?
[X] Yes, absolutely
[ ] Yes, with some guidance
[ ] Unfortunately no time :'-(
Describe the solution you'd like
This is what the badge should look like in its most basic form:

It should be accessible as <LicenseBadge pkg={pkg} />.
Since Shields.io has autogenerated license badges: https://img.shields.io/github/license/<Github-Username>/<Repository>, perhaps the badge component will default to autogenerated license badges, and can have an optional prop that renders the appropriate license badge based on the license field on package.json.
Additional context
The badges example and links can be found here.
For autogenerated sheilds badge, see here.

I like it! If you want, feel free to go ahead :)

Makes sense! Let's continue the rest of the discussion in the PR.


Setting specific date for default date

Hi, I tried to set a specific date to show when click the box of datePicker.
but by default, it has set today date.
I wanna change it. what do i do.

But in Calendar i catched an error, i try to auto prop in vscode, there is no prop "currentDate"


Better error handling

What's the problem (or question)?

I would prefer a less-detailed, and better-formatted error message in case of failures/exceptions.
How can we reproduce the issue?
When you run subfinder with subfinder -d domain.com, you might sometimes see the following errors:
Running enumeration on domain.com

dnsdb: Unexpected return status 503

crtsh: json: cannot unmarshal array into Go value of type crtsh.crtshObject

dnsdumpster: Post https://dnsdumpster.com: net/http: TLS handshake timeout

archiveis: Get http://archive.is/*.domain.com: dial tcp <IP_ADDRESS>:80: connect: operation timed out

waybackarchive: unexpected EOF

sitedossier: net/http: request canceled (Client.Timeout exceeded while reading body)

baidu: net/http: request canceled (Client.Timeout exceeded while reading body)

Most people don't care about these messages. The ones that do can enable the verbose mode and get the detailed messages. I would suggest improving the way the information gathering phase is currently presented.
While a source is being processed, you can show a loading animation with an ASCII spinner. Something like this might work. Once the processing is over for a source, you can display a tick or an X mark based on the status.
Running Source: Ask                               [✓]
Running Source: Archive.is                        [✓]
[...]
Running Source: WaybackArchive                    [✘]
Running Source: Yahoo                             [✓]

What are the running context details?

Program version (see banner): v1.1.3

Hi @amalmurali47 ,
This is a very good issue, I've just got the time to work on this project, will keep you updated about new developments.
Thanks for this.

Hey, hopefully this has been fixed in the latest edition. Check it out!