public PackageName and ServiceName as constant (like PathPrefix)

I'm writing a custom middle-ware function for propagate tracing context from HTTP headers.
Hooks cannot be use in my case because the context not contains any headers.
Currently I use PathPrefix const as the root span... which is OK but it seem better to have PackageName and ServiceName since they already properly injected to the context.
Something like this:
const HaberdasherPathPrefix = "/twirp/twirp.example.haberdasher.Haberdasher/"
const HaberdasherPackageName = "twirp.example.haberdasher"
const HaberdasherServiceName = "Haberdasher"

func (s *haberdasherServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
	ctx := req.Context()
	ctx = ctxsetters.WithPackageName(ctx, HaberdasherPackageName)
	ctx = ctxsetters.WithServiceName(ctx, HaberdasherServiceName)

@nvcnvn Are you trying to set values on the response headers, or get values from the request headers?
If you're trying to set response headers, I think you should be able to do this with ServerHooks by using twirp.SetHTTPResponseHeader:
hooks := &twirp.ServerHooks{
  RequestRouted: func(ctx context.Context) (context.Context, error) {
    pkg, _ := twirp.PackageName(ctx)
    svc, _ := twirp.ServiceName(ctx)
    method, _ := twirp.MethodName(ctx)

    h := make(http.Header)
    h.Set("X-Tracing-Server", pkg + ":" + svc + ":" + method) // or whatever
    twirp.SetHTTPResponseHeader(ctx, h)
  },
}

If you're trying to read request headers, you can do it with HTTP middleware:
var tracingIDCtxKey = new(int)

func TracingID(ctx context.Context) string {
  v, _ := ctx.Value(traceingIDCtxKey).(string)
  return v
}

func WithTracingID(base http.Handler) http.Handler {
  return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    reqID := r.Header.Get("X-Tracing-Request-ID")
    ctx := context.WithValue(r.Context(), traceHeaderCtxKey, reqID)
    r = r.WithContext(ctx)
    base.ServeHTTP(w, r)
  })
}

Could you say more about what you are trying to do? I hope it is possible already.

Sorry, I found myself confusing with my original example:D
In your example of reading request headers with HTTP middleware, for some reason I need the service name.
func WithTracingID(base http.Handler, serviceName string) http.Handler {
  return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    spanCtx, _ := b3propagation.SpanContextFromRequest(req)
    ctx, _ := trace.StartSpanWithRemoteParent(req.Context(), serviceName, spanCtx)
    req = req.WithContext(ctx)
    base.ServeHTTP(w, r)
  })
}

haberdasherHandler := haberdasher.NewHaberdasherServer(&haberdasherserver.Server{}, nil)
// good if we can have HaberdasherServiceName here... maybe
http.ListenAndServe(":9990", WithTracingID(haberdasherHandler, haberdasherserver.HaberdasherPathPrefix))

I just think maybe the service name and package name can be exposed,

It seems like you should be able to extract the trace ID from the HTTP request header within HTTP middleware, and then create a new context.Context value that contains that data. At that point, a ServerHooks implementation could read that trace ID and metadata about the Twirp RPC from the context value in order to create a new trace span. Please feel free to comment on this issue if this needs additional discussion.


Make Status Pages more responsive. I.e. multi column viewing

⚠ Please verify that this feature request has NOT been suggested before.

[X] I checked and didn't find similar feature request

🏷 Feature Request Type
UI Feature
🔖 Feature description
It would be awesome if the statuses on the status page would have a fixed width, allowing for multiple status to be next to each other, depending on the width of the screen. If i have many status i need to scroll to see the status of all services.
✔ Solution
I plaid around in the browser's inspector and with a sprinkling of display:flex here and there, it is easily possible. I am not sure if this is something you would like, but might be an idea.
❓ Alternatives
No response
📝 Additional Context
No response

i see but i don't kown i can help you

I think this is a duplicate of https://github.com/louislam/uptime-kuma/issues/1844
If you agree, could you please close this Issue, as duplicates only create immortal zombies and are really hard to issue-manage?
If not, what makes this issue unique enough to require an additional issue? (Could this be integrated into the issue linked above?) ^^
Note that our contribution guide can be found here and that we are open to contributions if you adhere to this


fix return error if schema changed in complex types

Proposed changes
Check the column type of complex type to prevent core dump in BE. ColumnReader will throw segmentation fault in the following case:
Change complex types in hive:
hive> create table struct_test(
           id int,
           sf struct<f1: int, f2: map<string, string>>) stored as parquet;

hive> insert into struct_test values
          (1, named_struct('f1', 1, 'f2', str_to_map('1:s2,2:s2'))),
          (2, named_struct('f1', 2, 'f2', str_to_map('k1:s3,k2:s4'))),
          (3, named_struct('f1', 3, 'f2', str_to_map('k1:s5,k2:s6')));

hive> alter table struct_test change sf sf struct<f1:int, f2: map<string, string>>;

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


TypeError: Cannot redefine property: ontrack

Browsers and versions affected
Google Chrome
Version 63.0.3239.132
<EMAIL_ADDRESS>Description
57 |     unwrappedCb]);
58 | };
59 |
60 | Object.defineProperty(proto, 'on' + eventNameToWrap, {
61 |   get: function() {
62 |     return this['_on' + eventNameToWrap];
63 |   },
I think requried check proto here: https://github.com/webrtc/adapter/blob/master/src/js/utils.js#L60
Steps to reproduce
Expected results
Actual results

the same problem .. Chrome update fixes this (why??), and what about users with not latest Chrome version

@flippo, hi!
Chrome 63.0.3239.132 version:
There is no 'ontrack' property in window.PTCPeerConnection.prototype.
Usually it's there, and with configurable: true, so your utils.js can redefine this.
And in this case, utils.js(line: 60) will create NEW property for this prototype, without configurable: true, I think it's wrong.
And if something tries to redefine ontrack... you know, TypeError...
(Same problem in some Safari versions, I heared from my clients)
I used for testing: https://www.chrome-portable.com/ (GoogleChromePortable64_63.0.3239.132_online.paf.exe)

@goldreich if problem is actual, i do reopen issue/

And if something tries to redefine ontrack... you know, TypeError...

What is redefining ontrack?

Same problem here:

I have no idea what you are doing but looking at the chrome shim code https://github.com/webrtc/adapter/blob/650507360b2a57cea5e663cae1d27c78765cd3d2/src/js/chrome/chrome_shim.js#L21 it will only shim if it does not exist.

I actually ran into this on a project using puppeteer for tests on chrome 62. It's not that line that causes it, it falls down to the else, here which does not have the same check.

@xdumaine is shimOnTrack called twice?

I'm having same problem on my production website. Any solutions to this issue?

@fippo yes, it's also called from here: https://github.com/webrtc/adapter/blob/master/src/js/adapter_factory.js#L73

@xdumaine and where else?

Sorry, yes, that's the only place. Error is if adapter is included twice on the page. But I do think that that call (https://github.com/webrtc/adapter/blob/master/src/js/chrome/chrome_shim.js#L122) will be problematic if it's ever hit - this is saying if ontrack is in the prototype, then call wrapPeerConnectionEvent, which redefines it. Any time that else block is hit, this error will occur.

Optional solution is to use configurable: true here - https://github.com/webrtc/adapter/blob/master/src/js/utils.js#L60

Error is if adapter is included twice on the page.

ah... that makes sense. I would not recommend doing it.
Adding configurable: true seems like the right thing to do since
Object.getOwnPropertyDescriptor(RTCPeerConnection.prototype, 'ontrack')

shows both configurable and enumerable as true

Please reopen, I have same error on adapter-6.3.0.min.js but not on chrome , just on electron


App not routable on workflow-beta3

I git pushed the example-dockerfile-http app using to a workflow-beta3 chart cluster. The push succeeded and the output of deis ps after the success is as follows:
ENG000656:example-dockerfile-http aaronschlesinger$ deis ps
=== dftest Processes
--- cmd:
dftest-v2-cmd-vpoqx up (v2)

Additionally, there is a pod present for the app:
ENG000656:example-dockerfile-http aaronschlesinger$ k get po --namespace=dftest
NAME                  READY     STATUS    RESTARTS   AGE
dftest-v2-cmd-vpoqx   1/1       Running   0          1h

And there is a service running for the app:
ENG000656:example-dockerfile-http aaronschlesinger$ k get svc --namespace=dftest
NAME      CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
dftest    <IP_ADDRESS>   <none>        80/TCP    1h

And it appears to be marked as routable:
ENG000656:example-dockerfile-http aaronschlesinger$ k get svc dftest -o yaml --namespace=dftest
apiVersion: v1
kind: Service
metadata:
  annotations:
    router.deis.io/domains: dftest
  creationTimestamp: 2016-04-27T18:44:58Z
  labels:
    app: dftest
    router.deis.io/routable: "true"
  name: dftest
  namespace: dftest
  resourceVersion: "1054631"
  selfLink: /api/v1/namespaces/dftest/services/dftest
  uid: 244aff36-0ca8-11e6-9205-42010af000dc
spec:
  clusterIP: <IP_ADDRESS>
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 5000
  selector:
    app: dftest
    heritage: deis
    type: cmd
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

However, when I attempt to curl the app, I get the following:
ENG000656:deis aaronschlesinger$ curl dftest.<IP_ADDRESS>.nip.io

<title>502 Bad Gateway</title>

502 Bad Gateway

nginx/1.9.6

... which generates the following router logs:
2016/04/27 19:58:29 [error] 16#0: *103 connect() failed (111: Connection refused) while connecting to upstream, client: <IP_ADDRESS>, server: ~^dftest\.(?<domain>.+)$, request: "GET / HTTP/1.1", upstream: "http://<IP_ADDRESS>:80/", host: "dftest.<IP_ADDRESS>.nip.io"
[27/Apr/2016:19:58:29 +0000] - <IP_ADDRESS> - - - 502 - "GET / HTTP/1.1" - 328 - "-" - "curl/7.43.0" - "~^dftest\x5C.(?<domain>.+)$" - <IP_ADDRESS>:80 - dftest.<IP_ADDRESS>.nip.io - 0.001 - 0.001

Note that in an attempt to solve this problem, I restarted the router pod and tried the curl again, but got the same result. Unfortunately, I was unable to isolate the issue any further than this.

cc/ @krancour

the issue is not with the router its with the controller….some how the controller is not able to get the default port exposed by the image. The docker file exposes port 1500

@kmala the Dockerfile exposes port 80 (https://github.com/deis/example-dockerfile-http/blob/master/Dockerfile#L17), possible that could be the source of the problem?

with the help of @helgi and @kmala I found this error in the controller:
ENG000656:workflow-manager-api aaronschlesinger$ kd logs deis-controller-670qe | grep "Failed to find"
DEBUG Failed to find port for Docker image home/gotest:git-4d9a7378/push/slug.tgz, defaulting to 5000
DEBUG Failed to find port for Docker image home/gotest:git-681bf567/push/slug.tgz, defaulting to 5000
DEBUG Failed to find port for Docker image home/gotest:git-40ea0fcb/push/slug.tgz, defaulting to 5000
DEBUG Failed to find port for Docker image dftest:git-2e2054e7, defaulting to 5000

Since this is a controller, not a router issue, I'm moving this to deis/controller

Closing in favor of https://github.com/deis/controller/issues/677

Nice sleuthing @arschles @kmala @helgi


Daily note commands don't seem to work

I've been trying to make my daily notes pop up at specified time, but run into the problem that the command doesn't seem to do anything in the plugin. The interval is set to 1 minute. The job has a name, is scheduled for "* * * * *" or for "[minutes] [hour] * * *" where anything in [] is replaced with appropriate numbers. The commands tried are "daily-notes", "daily-notes:goto-next", "daily-notes:goto-prev", and "workspace:open-in-new-window". The last one works every time, others don't. The job is set to run. It is a fresh install of Obsidian.

Nevermind, for some reason a lock got put onto the job without me clicking on it. Probably because job was tasked to run while I was modifying it.

@RomanQrr if you can figure out a good way to reproduce this I'd love to put some safe guards in place :)


Finished integration into main CLI tool

I had to pin some of the package versions in setup.py due to conflicts with random other packages


add some utility applications

add some useful applications such as a database "mariadb", a web database administrator "phpmyadmin" and a web framework for creating bolgs "ghost".

@LinkLeong  I know we have discussed this pr before and there are many mistakes in the content. But please point out the problems and then close this PR.

your problem, your submission does not meet our specifications so we can not merge your request for the time being, we will publish the specific field descriptions later


Intellisense not showing descriptions

The intellisense doesn't shows the descriptions of any microsoft .NET assemblies or other external assemblies. For example for the sentence "string.Empty" visual studio shows the following two lines:
	(field) string string.Emtpy
	Represents the empty string. This field is read-only.

but RoslynPad only shows the first line and doesn´t shows the second line that contains the description.

On my system it appears that Intellisense is showing both lines correctly. @aelij Did you already fix this or could this be a configuration issue on @pablonardone system?

This happened to me in Visual studio.

For those experiencing this problem can you provide me some details regarding your setup?  Which OS version, including bitness and which version of VS are you using?

Closing as it seems to be working in latest


Modify for china region can not download keycloak-metrics-spi from gi…

Can not download keycloak-metrics-spi.jar from github in china region, so I put it in the project.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Hi @hanrobyn , thanks for the PR! This jar adds metrics Prometheus-scrapeable endpoints to Keycloak and is a jar we included following best practices in Keycloak. At this time the metrics are not actually used, so this PR can be changed to remove the jar entirely.
First, can you provide more detail on why the jar cannot be downloaded from GitHub in China region? What restrictions are there on downloads? It appears that you are able to download jars from Maven, since you were able to build the project. If this same binary were hosted at a different location, would the download succeed?

The connection from China region to Github is slow and unstable, So download the whole jar always cause a timeout error, but the access to Maven is ok.
But I can not find this jar in Maven.

close it for clear branch.
and create a new pr for it: https://github.com/awslabs/aws-saas-boost/pull/422


test  use proptest

Description
Update unit tests to use proptest for property-based testing.

test: ☑ switch to proptest for property-based testing
ci: 🐝 update GitHub workflows

Type of change

[x] Testing

How Has This Been Tested?

[x] cargo test run with all tests passing
[x] unit tests updated and passing

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Codecov Report
Attention: Patch coverage is 78.12500% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 35.23%. Comparing base (8c04826) to head (4795d63).

Files
Patch %
Lines

src/parse.rs
83.33%
10 Missing :warning:

src/main.rs
0.00%
4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   39.59%   35.23%   -4.37%
==========================================
  Files           4        4
  Lines        1240     1141      -99
==========================================
- Hits          491      402      -89
+ Misses        749      739      -10

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Confusing error message when passing single dashed option to executable

Can this be improved?
$ hlint -cpp-include include/ .
Could not read, expected one of: never always auto

You would imagine it could say at least got: pp-include which should give you a hint as to why it has failed.

Using cmdargs-0.10.6 as a dependency I get:
C:\Neil\hlint>hlint -cpp-include include/ .
Could not read "pp-include", expected one of: never always auto

Does that seem sufficient?

Are never always auto valid arguments to -c? If so this is great, otherwise still a big improvement!

They are indeed valid arguments to --color, and -c is the short flag of that.

Thanks you Neil!


(fix): use to_delayed and from_delayed to submit gram matrix jobs

I think doing this for the other job submissions as well could be beneficial but it is also possible this is somehow causing a slowdown. I'll have to check.  I would definitely try this on the Charité cluster because Helmholtz's is sometimes a little screwy.
So it's possible it's just that.

Using map_blocks is blocked by https://github.com/dask/dask/issues/11201


Add different Python versions testing daily

Link to profiles tests: https://github.com/fal-ai/fal/runs/6233303974?check_suite_focus=true


Revert "CLOUDP-280230: Network peering translation layer (#1884)"

This reverts commit 7b11f5360f756d430af389334fad9e4535382bb5.
All Submissions:

[X] Have you signed our CLA?

No need to revert, seems the proper fix is #1945


Add More Docs

Most of the endpoints that are newly added  are not documented. Needs more concise documentation. One can obtain information by referring to the code and inline comments in /api/routes.js file. Thanks

i would like to work on this issue,Could you assign me this.

@cyberdad68 sure man. Let me know if you need any help.
Don't forget to star the repo and follow me.


Forgot password

Is your feature request related to a problem? Please describe.
Allow users to change password if they have forgotten their old one.
Describe the solution you'd like
Send an email to their registered account giving them a link to change their password
Additional context
looking into it

@UdeshUK I need a suggestion after thinking a lot on it I have two options to store the reset password token one create a separate model for it containing the user._id, the resetPasswordToken the expiration time and the status whether the user has applied for reset password before or add the same columns in the user table itself. What do you suggest?


Support for monotype font

Please add support for a monotype font like the system notepad. There could be an option to switch between serif, sans-serif or monotype, or even a complete font selector, including size, to select the preferred text rendering.

@ikarago This is by far the most important feature request. Monospace for the win :)
Personally, I vote for either Source Code Pro or Consolas fonts.

I've added a temporary option for it in commit 84551921f5ac2cb363b1a86e4bb92ecf5d57a745, it doesn't save the changes (so it'll revert these back to default when you close the window) but I didn't want to let you guys wait any longer on this. :)
Please let me know what you think of it! :)

Thank you @ikarago! Do you have build instructions available, or is this commit published to Microsoft Store?

The build instructions are pretty easy; just make sure that you've downloaded and installed VS2017 with UWP SDK 16229 and 17763 and that you've downloaded this repo and you should be good to go. :)
I'm currently building the packages for the Store and here as we speak, so they should be available pretty soon as well (available here tonight, available on the store whenever MS publishes the changes). ;)


modified footer open space.

**Aligning "Med Space", "About", "Services", "Contact Us", and "Follow Us On" in the same line using flex.
**Each section's content is displayed under its respective heading.
**Changed the background color to a lighter blue gradient.
**Added black box-shadow above the footer.
I am facing with the favicon issue I guess in the deployment.

@vidhi-github Attach relevant screenshots of the changes done with issue number too.

Issue no: 499.
I think I am facing some favicon issue in my project due to which I am getting 404 error.
I had done these changes in my branch::
Aligned "Med Space", "About", "Services", "Contact Us", and "Follow Us On" in the same line using flex.
**Each section's content is displayed under its respective heading.
**Changed the background color to a lighter blue gradient.
**Added black box-shadow above the footer.

@vidhi-github  mention issue no.

Issue no is 499.


[WIP] Fix sidecar annotations

What this PR does / why we need it:
Sidecar annotations were incorrectly specified as deployment annotations, not pod annotations.
ref:

https://github.com/kumahq/kuma/blob/3ee310d1e1b924483c0b0850e52f08c40290391b/pkg/transparentproxy/kubernetes/kubernetes.go#L63 (for kuma)
https://istio.io/latest/docs/reference/config/annotations/#:~:text=traffic.sidecar.istio.io/includeInboundPorts (for istio)

Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] PR is based off the current tip of the next branch and targets next, not main
[x] New or modified sections of values.yaml are documented in the README.md
[x] Commits follow the Kong commit message guidelines

Branches tangled, please hold :)


Carthage bootstrap step runs for all lanes

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description
I have a repo with Carthage. It is nice to see Fastlane running carthage bootstrap when building the app.
However, the Carthage step is run every time, for every lane, even if the lane has nothing to do with the project or Xcode.
For instance, consider this lane:
desc "Display number of commits"
lane :commit_number do
  puts number_of_commits
end

It will still run the carthage bootstrap step.
I would like to know a way to skip the Carthage step entirely (if the repo is already bootstrapped, for instance). A way to configure it would be great too, for instance, specifying to always use the cache: carthage bootstrap --cache-builds to use cached builds when possible.
Complete output when running fastlane, including the stack trace and command used
$ fastlane commit_number
[08:37:53]: fastlane detected a Gemfile in the current directory
[08:37:53]: however it seems like you don't use `bundle exec`
[08:37:53]: to launch fastlane faster, please use
[08:37:53]:
[08:37:53]: $ bundle exec fastlane commit_number
[08:37:53]:
[08:37:53]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[08:37:56]: -------------------------------------------------
[08:37:56]: --- Step: Verifying required fastlane version ---
[08:37:56]: -------------------------------------------------
[08:37:56]: Your fastlane version 2.64.0 matches the minimum requirement of 2.64.0  ✅
[08:37:56]: ------------------------------
[08:37:56]: --- Step: default_platform ---
[08:37:56]: ------------------------------
[08:37:56]: Driving the lane 'ios commit_number' 🚀
[08:37:56]: ----------------------
[08:37:56]: --- Step: carthage ---
[08:37:56]: ----------------------
[08:37:56]: $ carthage bootstrap
...
[08:40:23]: -------------------------------
[08:40:23]: --- Step: number_of_commits ---
[08:40:23]: -------------------------------
[08:40:23]: $ git rev-parse HEAD
[08:40:23]: ▸ 102c00e8177d8e93f311a960f4a10f5bd38b22f8
[08:40:23]: $ git rev-list HEAD --count
[08:40:23]: ▸ 97
[08:40:24]: 97

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | carthage                            | 147         |
| 4    | number_of_commits                   | 0           |
+------+-------------------------------------+-------------+

[08:40:24]: fastlane.tools finished successfully 🎉

TLDR: Getting the number of commits took almost 2 minutes and 30 seconds.

Adding a manual Carthage step to the lane seems to run Carthage twice:
desc "Display number of commits"
lane :commit_number do
  carthage(cache_builds: true)
  puts number_of_commits
end

Nevermind, I must be blind. Seems like the autogenerated Fastfile included a carthage step in 'before_all':
before_all do
  # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
  # cocoapods
  carthage
end

Probably a bad idea to add that as a default during set up, since it might not be required for all lanes.


Training maple on multi-class (image-caption) dataset

Thank you for this great work and the clear detailed implementation
I was wondering if it's possible to train maple on "scene" images like MS-COCO images.
1- What would be an appropriate preprocessing steps? I noticed that in all train/test datasets you worked with you have one folder per class. That won't be possible to duplicate in the case of multi-class images.
2- What changes can be made in the code to adapt the model on multi-class classification during training ?
Thank you again for this amazing contribution!

HI @AhmedBourouis,
Thank you for showing interest in our work.
Yes it is possible to train MaPLe on image-caption pair dataset like COCO-Captions dataset.

1- What would be an appropriate preprocessing steps? I noticed that in all train/test datasets you worked with you have one folder per class. That won't be possible to duplicate in the case of multi-class images.

You do not need to manually do the folder preprocessing. Mainly you would need to implement a custom data-loader, that will return image-caption pairs using which you can train MaPLe further. You can refer to this great tutorial  on coming up with a data-loader in pytorch that provides image-text pairs to train CLIP like model.
As MaPLe is based on Dassl Library, you will need to dig a bit inside there as well as this part of the code where you will need to implement your custom loader.

2- What changes can be made in the code to adapt the model on multi-class classification during training ?

In order to classify the given image into multiple classes, you can perform one of the following:

Implement multiple heads with each head representing a single class/task, e.g via a linear layer. You will need to further use sigmoid for classification and binary-cross entropy for each head during training. (you can look into a sample reference code on using various heads for multi-label classification at this link.
Or simply you can use cross-entropy on top of the cosine multiplication of image and text embeddings and maximize the image-text embeddings of all positive classes at once.

Kindly let me know if that helps to solve you issue.
Thank you and kind regards.

Thank you for the clear and detailed answer!
You fully answered my question so I'm closing this now.

@AhmedBourouis Could you please the training notebook if you have it handy?


Cleans up list workflows

Closes #688 (If this is not required, #688 should also be rejected as won't do. Feel free to, I promise I won't cry)
Changes the order of main.py argument processing:

if list_workflows:

List workflows (and end points), then quit

list_workflows doesn't require the workflow param to be set, but it should be set for all other purposes, so after this return, assert a valid workflow is named

if list_last_stages:

list last stages for the current workflow (this feels redundant with list_workflows already providing this information), then quit

For all other uses, assert that a valid workflow is defined, and continue as usual

This is a super low priority change, I don't think either of these flags are used by anybody, but maintaining a special case of --workflow list is odd.

This will be discarded when we fracture off individual workflows


can't $ref to local definitions if the schema is referred from a file

Have an schema with
"definitions":{
"something":{...}
}
in the root of the schema, if that schema is included as a javascript variable i can ref to #/definitions/something and it links ok but if i link the schema file using href
schema: {
$ref: "nameofschema.json"
}
The linkage does not work to me.

Yeah, I just ran across this. Loading the JSON file via AJAX as in the example:
          editor = new JSONEditor(document.getElementById('editor_holder'),{
            ajax: true,
            schema: { $ref: "schema2.json" },

failed. (Any $ref failed to resolve)
But manually loading the file first with AJAX and then doing:
            schema: schema

worked fine.

Thanks for posting the solution. Manually loading the file worked for me.


Tests fail occasionally with "No mapping between account names and security IDs was done."

The LocalPrincipalManager tests fail occasionally with the above error.
I believe it is related to some eventual consistency in Windows with creating a new user, and then trying to add that user to a security group.  The error suggests that the failure was in mapping a username to a SID.
We should consider polling (in the code) to ensure that the user exists and can be mapped to a SID, before continuing and trying to use the new user.

Here is an example stack trace:
Test Name:    IronFoundry.Container.Utilities.LocalPrincipalManagerTests.AddedUserAppearsInWardenGroup
Test FullName:    IronFoundry.Container.Utilities.LocalPrincipalManagerTests.AddedUserAppearsInWardenGroup
Test Source:    c:\git\if\if_warden\IronFoundry.Container.Test\Utilities\LocalPrincipalManagerTests.cs : line 62
Test Outcome:    Failed
Test Duration:    0:00:00.164

Result Message:    System.Runtime.InteropServices.COMException : No mapping between account names and security IDs was done.
Result StackTrace:
at System.DirectoryServices.PropertyValueCollection.PopulateList()
  at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
  at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
  at System.DirectoryServices.AccountManagement.QbeMatcher.Matches(DirectoryEntry de)
  at System.DirectoryServices.AccountManagement.SAMQuerySet.MoveNext()
  at System.DirectoryServices.AccountManagement.FindResultEnumerator`1.MoveNext()
  at System.DirectoryServices.AccountManagement.PrincipalSearcher.FindOne()
  at IronFoundry.Container.Utilities.LocalPrincipalManager.AddUserToGroup(PrincipalContext context, String groupName, UserPrincipal user) in c:\git\if\if_warden\IronFoundry.Container.Shared\Utilities\LocalPrincipalManager.cs:line 151
  at IronFoundry.Container.Utilities.LocalPrincipalManager.InnerCreateUser(String userName) in c:\git\if\if_warden\IronFoundry.Container.Shared\Utilities\LocalPrincipalManager.cs:line 136
  at IronFoundry.Container.Utilities.LocalPrincipalManager.CreateUser(String userName) in c:\git\if\if_warden\IronFoundry.Container.Shared\Utilities\LocalPrincipalManager.cs:line 59
  at IronFoundry.Container.Utilities.LocalPrincipalManagerTests.AddedUserAppearsInWardenGroup() in c:\git\if\if_warden\IronFoundry.Container.Test\Utilities\LocalPrincipalManagerTests.cs:line 63

Error Code for this is: 0x80070534


Fixes problem with undo and redo buttons in Firefox

Fixes #9947.
cc @javitonino

Tested and it works, thank you!


Clarivate icon not displaying in academicons

Preliminary Checks

[X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/wowchemy/wowchemy-hugo-themes/issues?q=is%3Aissue
[X] This issue is not a question, feature request, or anything other than a bug report directly related to Wowchemy. Please post those things on Discord: https://discord.gg/z8wNYzb

Description
Most other icons render perfectly for my website hosted on Netlify.
However, when I try "clarivate", it does not display. If I replace "clarivate" with "publons", it works perfectly.

https://jpswalsh.github.io/academicons/

I tried to see if I need to update the icon pack but the relevant line in the code seems to be pulling the icon pack directly from the above website.

In params.toml:
[icon.pack]
  ai = true  # Academicons icon pack https://jpswalsh.github.io/academicons/

Has anyone come across this issue?
Reproduction Link
https://github.com/wowchemy/wowchemy-hugo-themes/
Steps to Reproduce

display:
header: false
link: http://www.webofscience.com/wos/author/record/ABD-2323-2021
icon_pack: ai
icon: clarivate

Expected Result
The icon "clarivate" on https://jpswalsh.github.io/academicons/ should be displayed on the webpage.
Actual Result
Nothing is displayed on the webpage.
What Hugo Module versions does your site use?
module github.com/wowchemy/starter-academic
go 1.15
require (
github.com/wowchemy/wowchemy-hugo-modules/netlify-cms-academic v0.0.0-20201230224646-25e0b0627f09 // indirect
github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201230224646-25e0b0627f09
)
What operating system(s) are you seeing the problem on?
Windows, Android
What browser(s) are you seeing the problem on?
Chrome
Which Wowchemy template are you using?
Academic Template for Hugo
What version of Hugo are you using?
0.79.1

Wowchemy currently uses v1.9.2 of the Academicons icon library.
If you require a different version of Academicons, you can change it by overriding the file at https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/modules/wowchemy/data/assets.toml - see the Docs on how to override files


Testing the new CORS implementation

Adding a new static file
Automated submit by PRB0t

Nice job @M3kH! Just used this pen to submit a PR.

Feel free to close this.


merge multiple pdfs with the help of python.lib used - PyPDF2

bro, your repo not participated in hacktoberfest 2020? coz my PR is set ineligible as your repo is not taking part.....

please check #1429


CZ-191 Analisar como gerar arquivo ABI no Neo BOA

What current issue(s) from Github does this address?
CityOfZion/neo-boa#124
What problem does this PR solve?
Implement the generation of the .abi.json needed to Neo Visual DevTracker provide a better developer experience for invoking smart contracts
How did you solve this problem?
I implemented two decorators to identify the methods that should be included in the .abi.json with the information about parameters and return type:

@abi_method(types) to identify the methods that should be included
@abi_entry_point(types) to identify which method is the entry point

Are there any special changes in the code that we should be aware of?
When a decorator is used, the previous implementation didn't get the code of the method because it was used the first element in self.block in method.py. I implemented a method to get the index of the block with the code. Changes here and here.
Is there anything else we should know?
The @abi_entry_point(types) can be used only once. If any @abi_method(types) decorator is used, it must have @abi_entry_point(types) decorator

@melanke e ai merimbo, aprovável?

Aprovado


ANC details screen

IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #286
Type
Choose one: (Feature)
Checklist

[ ] I have written Unit tests for any new feature(s) and edge cases for bug fixes
[x] I have added any strings visible on UI components to the strings.xml file
[ ] I have updated the  CHANGELOG.md file for any notable changes to the codebase
[x] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
[x] I have built and run the fhircore app to verify my change fixes the issue and/or does not break the app

Pull Request Test Coverage Report for Build #355

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 45.286%

Totals

Change from base Build #352:
0.0%

Covered Lines:
317

Relevant Lines:
700

💛  - Coveralls

@ellykits please review this PR.


Avalonia error AVLN:9999: Member 'System.Nullable`1' is declared in another module and needs to be imported.

Describe the bug
After moving a large number of views from one project to another (within the same solution) and adjusting namespaces, the build fails with:

Avalonia error AVLN:9999: Member 'System.Nullable`1' is declared in another module and needs to be imported [/path/My.Project.csproj]

But there is no obvious error in the change set.
To Reproduce
Build error was observed on different computers, but there is no way to create a minimal project to reproduce.
Expected behavior

dotnet build should just work without error.
If there is a problem, the error message should contain more details (to identify the source).

Avalonia version
11.0.11
OS
Windows, Linux
Additional context
The same code compiles fine, when using 11.1.0-rc2 instead of 11.0.11 so it might be fixed with the next version, but I assume there might be other workarounds (like disabling a compiled binding) which can't be found, if the problem arises in a big change set but with no location information.
Note: System.Nullable was not used in the moved views (or the whole target project) directly.

Sorry, can't really help here without having a repro.
We do have various improvements in type handling in 11.1 release, so you can test it.
But nothing of these changes is planned to be backported to 11.0.

Of course. I mainly was asking for improving the error message to contain more context (and I assume this might help in other cases as well - especially for AVLN9999).

If 11.1.0 is fine, imo the issue can be closed.

Agreed.


Read Only Tooltip displays outside the container in first row

monaco-editor version: 0.15.6
Browser:Chrome, Firefox, Safari
OS: Mac OS Mojave, Windows 10, Ubuntu
Steps or JS usage snippet reproducing the issue:
These are the steps to reproduce the issue:

Configure the read-only option as true in the editor
Go to the first or second row and try to write something, the editor doesn't allows you to do this 'cause it's in read only but a tooltip with this info should appear.
The tooltip that displays " Cannot edit in read-only editor" doesn't appears or just a single part of it appears there.

Attached you'll find a screenshot.

Here's a small video with the same behavior in the playgrounds (https://microsoft.github.io/monaco-editor/playground.html):
MonacoTest.mov.zip
The expected behavior may be to display this tooltip on the bottom of the line instead of the top if we're in the first rows of the editor.

It's actual problem

Duplicate of #1140


Add Compactable class

A port of https://hackage.haskell.org/package/Compactable-<IP_ADDRESS>/docs/Control-Compactable.html
Compactable doesn't require a Functor. In fact, some data types without a Functor instance can have a Compactable instance (e.g. Set).
Compactable provides compact and a method I'm currently calling separate. These are equivalent to Filterable's filtered and partitioned, respectively.
The intention with this PR is to make Compactable a superclass of Filterable.
The functions defined below the compactable instances are simply the result of adding constraints in the monad hierarchy (plus Traversable) and a few show up under different names in Filterable and Witherable with the following equivalences:

mapMaybe -> filterMap
mapEither -> partitionMap
traverseMaybe -> wither
traverseEither -> wilt

The functions that result from applying the other constraints (Apply and Bind) suggest other possible classes that could find a home in this library.

@LiamGoodacre I think this is ready to look at.


Added missing values to DirectoryState enum

Description
https://github.com/workos/workos-dotnet/issues/173 - Added missing values to DirectoryState enum.
Documentation
Documentation is missing some state values https://workos.com/docs/reference/directory-sync/directory (not sure how to raise a PR for this)

Thanks for this! Can you let me know where the docs are missing values? It looks like the missing state values are there for me:

My bad my bad (didnt notice there were two columns lol). Thanks for reviewing guys!


ModalExample name is updated

Updated wrong variable name. Now it's not confusing. 🤓

Ah thanks @mucahit!


Any ideas on changing API interface for a major semver update?

This package is planned do a major semver update and we've got a chance to change public functions, interfaces, etc. To make full use of this update we developers can list our expected changes in this issue, maintainers will check all changes before finally do a update. Hope the package will be better after discussing and accepting contributions with our ideas.
I simply propose some rules on how to use this issue and welcome to comment on both rules and ideas:

the deadline of posting expected changes is 3 weeks later, which is Dec-17-2022
everyone can comment in this issue or open another issue and link this one, I will edit the description of this issue to make a summary
no other one will make sure they would implement your idea! You should do it yourself if you really want it

[ ] canal EventHandler expose more information on callback https://github.com/go-mysql-org/go-mysql/pull/740

I randomly pick up some developers from recent PR, ptal @atercattus @blazz @GMHDBJD @mcuelenaere @tech-sumit @skoef @shizhx @btoonk @nisainan @bingoohuang
You can turn off notification by click "Unsubscribe" button, sorry to bother you :P

One piece of feedback I have, is that go-mysql-org/go-mysql is allocating lots of memory (which gets freed very soon afterwards), when reading binlogs. In our production app, over 62% of all allocations (average of 1000 profiles taken in the last week) and 73% of all allocated memory are coming from BinlogParser.Parse.

Maybe having some kind of reusable pool of BinlogEvent/RowsEvent objects could help here, but that would require the interface to change as the consumer has to explicitly release these events after being done using them.
Also, more specifically for our usecase, it seems that quite a bit of those allocations are spent on JSON decoding, while actually we are not doing anything with those JSON objects. Maybe having an option to leave the raw JSON []byte as-is could help here.

@mcuelenaere
we encountered a similar problem and came up with a solution, I guess we can also solve your unneeded JSON parsing issue in this way
Our problem is we are only interested in a part of tables in binlog, don't want to waste time parsing uninterested tables, so we add a function injection configuration to let user implement their customized parsing function, like skipping parsing based on table name.
https://github.com/go-mysql-org/go-mysql/pull/737
so maybe you can use a customized function to only skip JSON columns?


NIFI-4528 The ref attribute in the request to view content sent by th…

…e client will now be inspected for the proxy context path. If found, it will be removed so the request can be successfully made within the cluster.
To test this PR:
Start a NiFi cluster
Start a proxy that points to one of the nodes in the NiFi cluster
From the NiFi UI, create a flow with a GenerateFlowFile processor creating text flowfiles sent to a downstream processor.  No need to start the downstream processor.
List the queue contents
Click the info icon of a flowfile in the queue
Click View
You should successfully see the content of the flowfile in the Content Viewer UI.

+1 Looks good and verified this addresses the problem, will merge to master


340 physical medium

https://github.com/uwlib-cams/MARC2RDA/blob/main/Working Documents/3XX.csv

340 $n is the "font size" subfield. In this subfield catalogers enter phrases like "giant print," point size measurements like "36 point," or some combination of those: "giant print (36 point)."
In RDA there are two elements for font size:
(1) hasFontSize
(2) hasFontPointSize
The best solution seems to just make all 340$n values the values of rdam:hasFontSize.
Will this result in errors or bad RDA?

A question has arisen while working on MARC 340: if a particular mapping is not necessarily lossy but only potentially lossy, should it be marke status = loss or somethng else, like status = first pass?
Specific to the 340: all 340 fields with ( ($0 | $1) AND ($* > 1) ) might require all 340$0 and 340$1 rows in the spreadsheet to have status = "loss." (Actually it's not all subfields, i.e. $*, but most.) This is because we don't know which subfield should be paired with the given $0 or $1 value. It is not a necessary loss, just potential loss.

The subfields $b $f $h and $i need a close review. $h for example is "location within medium" -- the location, that is, of the material entered in one of the other subfields. The note created for $h, for example, is very poor right now and would be improved by designing it in combination with a single subfield. In that case, as with $0 and $1, if there are multiple subfields, the subfield will require some generic note. So @gerontakos do review these fields again.

Mapping 340 $n to rdam:P30199 "has font size" is not an error. rdam:P30306 "has font point size" was introduced to allow numeric values to be computed for, say, limiting searches by end-users with visual requirements. The MARC 21 manual does not indicate any regular syntax for adding the point size, so it would be very difficult to parse it out; the value is fine if it is left as part of the more general statement on font size.

NOTE FOR THE REVIEWER OF FIELD 340 REGARDING 340$b. 340$b without 340$a is not expected. We are not giving the dimensions of the manifestation but, rather, whatever is specified in 340$a. Current mapping clarifies this by appending the value of 340$a to the value of 340$b as a parenthetical qualifier. The official RDA/MARC alignment recommends an alignment with 340$b and the properties rdam:hasDimensionsOfCartographicImage and rdam:hasDimensionsOfStillImage but the value of 340$a should not be either the content type cartographic image or the content type still image, so the current mapping deletes those properties. Finally, it is possible that the presence of $0, $1, or $3 without $a allows a mapping of $b; however, the current mapping recommends "do not map" if there is no $a.

Seems that "base material", "applied material", and "mount" have been soft deprecated in favor of "material". http://rdaregistry.info/Elements/m/P30304

@pennylenger
Hi Penny! For $b, if there is no $a do we still map it? I'm seeing records where $a is not present with $b in this field.

@pennylenger
Also, should we map $3 for subfields b, f, h, and i? I'm not seeing them in the mapping sheet. Thank you.

@pennylenger Hi Penny! For $b, if there is no $a do we still map it? I'm seeing records where $a is not present with $b in this field.

I now see Theo's recommendation on $b is to only map when $a is present.

Hi Cypress,
Thank you for asking.  I have added $3 to $b, f, h, and i. I hope it is
clear, if not, please help revise them. Thank you !
I find *$f - Reduction ratio value is missing in the sheet now.  Should I
add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED,
2022] [REDEFINED, 2022]
Penny
On Wed, Jul 17, 2024 at 1:21 PM Cypress @.***> wrote:

@pennylenger https://github.com/pennylenger Hi Penny! For $b, if there
is no $a do we still map it? I'm seeing records where $a is not present
with $b in this field.
I now see Theo's recommendation on $b is to only map when $a is present.
—
Reply to this email directly, view it on GitHub
https://github.com/uwlib-cams/MARC2RDA/issues/149#issuecomment-2234205367,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4RYKL77XBAJNKNDLL4HOCTZM3G6FAVCNFSM6AAAAABLBGGMV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZUGIYDKMZWG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

I do not agree with Theo's recommendation.
There are many records in the LC file that I have, with:

$a $b, etc.
340    $a vinyl $b 12 in. $2 rda
340    $a plastic $a metal $b 4 3/4 in. $f 1.4 m/s $j mass-produced
$a only
340    $a vinyl $2 rdamat
$b only
340    $b 12 in.
$a and separate $b:
340    $a vinyl $2 rdamat
340    $b 12 in.

It appears that the subfields (or at least the $b) can appear alone or in combination with other subfields.
My advice is to map the values of the subfields whether they are given alone or in combination with other subfields.
Note that the data values in some these subfields will often also be provided in 300$b or $c

Hi Cypress, Thank you for asking. I have added $3 to $b, f, h, and i. I hope it is clear, if not, please help revise them. Thank you ! I find *$f - Reduction ratio value is missing in the sheet now. Should I add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED, 2022] [REDEFINED, 2022] Penny

Apologies, I had marked that row 'delete' because it did not map to any property, but I have moved it back to 'reviewed' although it is still a blank row. Was this just not mapped yet?

Hi Cypress, Thank you for asking. I have added $3 to $b, f, h, and i. I hope it is clear, if not, please help revise them. Thank you ! I find *$f - Reduction ratio value is missing in the sheet now. Should I add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED, 2022] [REDEFINED, 2022] Penny

Apologies, I had marked that row 'delete' because it did not map to any property, but I have moved it back to 'reviewed' although it is still a blank row. Was this just not mapped yet?

No worries. I have added the mapping. The value is supposed to be structured, so I didn't write the transformation note. But I now think it should be unstructured because I don't know how it can be recorded in structured description. And I added $3 for this.

Hi Cypress, Thank you for asking. I have added $3 to $b, f, h, and i. I hope it is clear, if not, please help revise them. Thank you ! I find *$f - Reduction ratio value is missing in the sheet now. Should I add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED, 2022] [REDEFINED, 2022] Penny

Apologies, I had marked that row 'delete' because it did not map to any property, but I have moved it back to 'reviewed' although it is still a blank row. Was this just not mapped yet?

No worries. I have added the mapping. The value is supposed to be structured, so I didn't write the transformation note. But I now think it should be unstructured because I don't know how it can be recorded in structured description. And I added $3 for this.

Hi Penny! Should the obsolete mapping be deleted now that we've updated the mapping for $f?

Hi Cypress, Thank you for asking. I have added $3 to $b, f, h, and i. I hope it is clear, if not, please help revise them. Thank you ! I find *$f - Reduction ratio value is missing in the sheet now. Should I add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED, 2022] [REDEFINED, 2022] Penny

Apologies, I had marked that row 'delete' because it did not map to any property, but I have moved it back to 'reviewed' although it is still a blank row. Was this just not mapped yet?

No worries. I have added the mapping. The value is supposed to be structured, so I didn't write the transformation note. But I now think it should be unstructured because I don't know how it can be recorded in structured description. And I added $3 for this.

Hi Penny! Should the obsolete mapping be deleted now that we've updated the mapping for $f?

Hi Cypress, I think the obsolete subfield should still be mapped and transformed because some old records may use this subfield and we need to keep the data in that field.

Hi Cypress, Thank you for asking. I have added $3 to $b, f, h, and i. I hope it is clear, if not, please help revise them. Thank you ! I find *$f - Reduction ratio value is missing in the sheet now. Should I add it back? There is a obsolete one *$f - Production rate/ratio [RENAMED, 2022] [REDEFINED, 2022] Penny

Apologies, I had marked that row 'delete' because it did not map to any property, but I have moved it back to 'reviewed' although it is still a blank row. Was this just not mapped yet?

No worries. I have added the mapping. The value is supposed to be structured, so I didn't write the transformation note. But I now think it should be unstructured because I don't know how it can be recorded in structured description. And I added $3 for this.

Hi Penny! Should the obsolete mapping be deleted now that we've updated the mapping for $f?

Hi Cypress, I think the obsolete subfield should still be mapped and transformed because some old records may use this subfield and we need to keep the data in that field.

I realize it is difficult to differentiate an old $f and a new $f. They are both $f.

Since there will be values for both old $f and new $f, would it be best to map to 'has note on manifestation'?

I agree. I have updated the mapping.

@AdamSchiff @CECSpecialistI @tmqdeborah
Will $1s (and $0s) only be used when there is one other subfield (not including $2 and $3)?
i.e. will a $1 be used if there are multiple subfield $a's or multiple different subfields such as $a and $b? If so, there is no way to know which one relates to the $1 and what property to use.
I know that it is preferred to use a separate field for each unique term, but I don't know if we can assume that every record we process will follow that. In the case that multiple terms appear in the same field, do we need to account for the possible presence of a $0 or $1 as well?

If a subfield is repeatable, we can expect to find records with that.  We can also expect to find some repeated $0s or $1s.   The $0/$1 should not be repeated if there are multiple controlled subfields since it's impossible to know what goes with what.  That's true of the same subfield or different ones.  But I can't guarantee that all records will follow this best practice.
When the Authority Toolkit adds URIs, if a field has multiple subfields it breaks them up into separate fields, each with just one vocabulary subfield and then it adds the $0 and/or $1 for that term.
Adam L. Schiff
Principal Cataloger
University of Washington Libraries
Box 352900
Seattle, WA 98195-2900
aschiff @ uw.edu

From: Cypress @.>
Sent: Thursday, July 18, 2024 6:01 PM
To: uwlib-cams/MARC2RDA @.>
Cc: Adam L Schiff @.>; Mention @.>
Subject: Re: [uwlib-cams/MARC2RDA] 340 physical medium (Issue #149)
@AdamSchiffhttps://urldefense.com/v3/__https://github.com/AdamSchiff__;!!K-Hz7m0Vt54!ls2fi3DZJWqrY8bbOAcbgryT_DUgi5MkYcCe1yOUwgN4Jal6J5lkrRsakqqpksPrN1b65JH3EZb63Al-vejyIn0$ @CECSpecialistIhttps://urldefense.com/v3/__https://github.com/CECSpecialistI__;!!K-Hz7m0Vt54!ls2fi3DZJWqrY8bbOAcbgryT_DUgi5MkYcCe1yOUwgN4Jal6J5lkrRsakqqpksPrN1b65JH3EZb63Al-ZoI5lAw$ @tmqdeborahhttps://urldefense.com/v3/__https://github.com/tmqdeborah__;!!K-Hz7m0Vt54!ls2fi3DZJWqrY8bbOAcbgryT_DUgi5MkYcCe1yOUwgN4Jal6J5lkrRsakqqpksPrN1b65JH3EZb63Al-zOKO1K8$
Will $1s (and $0s) only be used when there is one other subfield (not including $2 and $3)?
i.e. will a $1 be used if there are multiple subfield $a's or multiple different subfields such as $a and $b? If so, there is no way to know which one relates to the $1 and what property to use.
I know that it is preferred to use a separate field for each unique term, but I don't know if we can assume that every record we process will follow that. In the case that multiple terms appear in the same field, do we need to account for the possible presence of a $0 or $1 as well?
—
Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/uwlib-cams/MARC2RDA/issues/149*issuecomment-2237828639__;Iw!!K-Hz7m0Vt54!ls2fi3DZJWqrY8bbOAcbgryT_DUgi5MkYcCe1yOUwgN4Jal6J5lkrRsakqqpksPrN1b65JH3EZb63Al-W8WUqbw$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ADFBVBYVNZJ4K72KUREU55DZNBQMVAVCNFSM6AAAAABLBGGMV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXHAZDQNRTHE__;!!K-Hz7m0Vt54!ls2fi3DZJWqrY8bbOAcbgryT_DUgi5MkYcCe1yOUwgN4Jal6J5lkrRsakqqpksPrN1b65JH3EZb63Al-Zht1SEE$.
You are receiving this because you were mentioned.Message ID: @.***>

It seems to me that we can only use a $0 or $1 value when there is only one other subfield (not including $2, $3, $6 or $8). In this case we know what property to use because there is only one subfield that the IRI provided in a $0 or $1 could go with.
When there are multiple subfields, we can't know what property to map the $0 or $1 to since we do not know which subfield the $0 or $1 goes with. In this case, I think we have to discard the $0 or $1 value and process each subfield instead.

If we're talking about 340 here, maybe...  this gets too complicated.  I suspect $0 or $1 would be used for same purpose as $2 - to link to  the value vocabulary used.  One of the examples in the MARC document:
340  ##$3teacher edition$lcase binding$2rdatb
that's gotta be  http://www.rdaregistry.info/termList/#RDATypeOfBinding, in a $0 or $1 it would only be applicable to $l Binding so if there were other subfields you'd know which it pertained to.
But for this pass through the mapping, I think it'd be too much to try to build something like that into the logic.  Maybe it could be noted in our documentation and thought about for a future phase if it turns out to be a problem and we're dropping too many $0/$1's .

Yes, I agree.  The field should be split up into multiple fields, each with a $0 or $1 when there are multiple subfields with controlled values, whether it is the same subfield repeated, or diffferent subfields.
Adam
Adam L. Schiff
Principal Cataloger
University of Washington Libraries
(206) 543-8409
@.***

From: Cypress @.>
Sent: Monday, July 22, 2024 11:39 AM
To: uwlib-cams/MARC2RDA @.>
Cc: Adam L Schiff @.>; Mention @.>
Subject: Re: [uwlib-cams/MARC2RDA] 340 physical medium (Issue #149)
It seems to me that we can only use a $0 or $1 value when there is only one other subfield (not including $2, $3, $6 or $8). In this case we know what property to use because there is only one subfield that the IRI provided in a $0 or $1 could go with.
When there are multiple subfields, we can't know what property to map the $0 or $1 to since we do not know which subfield the $0 or $1 goes with. In this case, I think we have to discard the $0 or $1 value and process each subfield instead.
—
Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/uwlib-cams/MARC2RDA/issues/149*issuecomment-2243583902__;Iw!!K-Hz7m0Vt54!jIpbtyiLQzy01_ewJjV8l6DJrCf4TPCQzY6oeHCdUbBEkAlXvj3au--p81hKGMz7WsKXZCe9h4rasLvLU8dednM$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ADFBVB7IQY54M2KW7DE5NJLZNVGUJAVCNFSM6AAAAABLBGGMV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTGU4DGOJQGI__;!!K-Hz7m0Vt54!jIpbtyiLQzy01_ewJjV8l6DJrCf4TPCQzY6oeHCdUbBEkAlXvj3au--p81hKGMz7WsKXZCe9h4rasLvLPB_SB-o$.
You are receiving this because you were mentioned.Message ID: @.***>

For $0s and $1s, I have this coded so that they are only used if there is only one subfield containing a vocabulary term (a subfield that is not subfields b, f, h, i, 2, 3, 6, 8). Other subfields that may contain vocabulary terms make it impossible to know which subfield the 0 or 1 is related to and thus which property to use, so the 0 or 1 should be ignored.


tf.eye is OOM when num_rows is over 10**5

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information

TensorFlow version (you are using): 2.3.0
On google colab free GPU
Are you willing to contribute it (Yes/No): I want to try.

Describe the feature and the current behavior/state.
element_count = 10**5
eye_tf = tf.eye(element_count, dtype=tf.float32)

This code will be OOM. The error is here.
ResourceExhaustedError: OOM when allocating tensor with shape[100000,100000] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:MatrixDiagV3] name: diag

Will this change the current api? How?
No.
Who will benefit with this feature?
I want to calculate huge array (the num_rows is over 10**8) using tesorflow parallel processing.
This change extend the possibility of tensorflow calculation.
Any Other info.

I have tried in colab with TF 2.3 , nightly version (2.5.0-dev20201110) and was able to reproduce the issue. Please, find the gist here.Thanks!

@RyosukeMatsushima how much memory are you asking for this to Colab GPU?
https://datascience.stackexchange.com/questions/72870/how-to-find-the-size-of-a-tensor-in-bytes

@RyosukeMatsushima how much memory are you asking for this to Colab GPU?
https://datascience.stackexchange.com/questions/72870/how-to-find-the-size-of-a-tensor-in-bytes

@bhack sorry for the late response. Calculate according to your link, memory of eye_tf $ = 1052$elements $\times 4bytes$(float32) $= 40$GB.
Is it possible for tensorflow to calculate a tensor over GPU memory size?. The size of Colab GPU memory is 12GB.
!free -h

  total        used        free      shared  buff/cache   available
Mem:            12G        544M         10G        960K        1.9G         11G
Swap:            0B          0B          0B

I'm so glad if tensorflow can calculate huge array over memory.

I think you can close this and upvote/follow https://github.com/tensorflow/tensorflow/issues/29840

Thank you!
It seems that this issue will be solved by #29840 and I close this.


Fix Translation for Bahasa Indonesia and Add It to the Translations List

Overview
TL;DR
Fix and add translation for Bahasa Indonesia as mentioned at #565.

Next Steps
We need to review the translation before got merged.
Review
Calling all Indonesian peoples.

The commit message should be 'Fix bahasa translation' or 'Improve...' , not 'Add ..' as the translation already exists, and is 'OK', but not complete.

@jayvdb I'll change the commit message after implement some reviews

@wisn We're so thrilled that you've been jumping into all of these translations! Please let us know if there's anything we can do to help out!

@hollenberry No worries. I will makes sure this PR finished tomorrow.

Hi @wisn! 👋 Is there anything I can do to help with this pull request?

@brianamarie Sorry too busy to touch this PR. I will spare my time on Sunday and I will make sure to finish this~

Ok

@pamungkaski  Please review my fixes. This PR ready after his approval.

Okey From me, the Translation is much proper by now

Thank you so much, @wisn and @pamungkaski! I will merge this PR now. 🎉 ✨ 🎈
It will take a bit of time before these changes are reflected on the site.


[Bug] 1st hotbar slot not interactable with wireless crafting grid

When using the wireless crafting grid in a curios slot, and opening it with the keyboard shortcut, the first hotbar slot is not interactable (can't move items to or from the slot)
RS version: 1.9.15
RSA version: 0.7.3
(Playing Enigmatica 6 v0.5.9)

Seeing same thing here.
Also, the hotbar slot that gets blocked varies depending on which curio slot the grid is in.
RS version: 1.9.15
RSA version: 0.7.3
modpack atm-6 1.7.8


Validate accept an audience secret parameter on webtask creation, and…

… use it to validate tokens.

This more appropriately addresses #27

Hey @fsargent, thanks for your initiative. We have this on our radar but can't commit to any specific timeline right now.
To facilitate reviewing, could you share a bit more context about why these changes are needed and how the PR addresses this?

hi @ggoodman, Tokens issued by Auth0 don't have the audience parameter as equalling the client ID. Instead, the audience parameter is specified by the Auth0 tenant depending on what API you wish to give permissions to.  This change allows for people to specify what they'll allow or accept for the audience parameter.

https://auth0.com/docs/tokens/access-token#access-token-format

Hi @ggoodman,
First off, thanks for the detailed response.
You're absolutely right, I'm hoping simply to authenticate incoming requests that have an Access Token in the Authorization header.
I'll look into the other JWT package.
From my reading of the Auth0 documentation and OAuth2 spec the id_token was not used at all for authentication, but instead was a payload containing the user's information, link to their gravatar, etc.
https://auth0.com/docs/api-auth/why-use-access-tokens-to-secure-apis
In the scenario where I'd use the auth0 package to validate a JWT sent from a client to a webtask, the webtask would be considered a secure API, not a client.
Then again, I guess I can do that with the other library.
Thanks!


Support starting the editor from a script

I want to use Elvish in my CI to check for syntax errors and the like. However, I'm unable to do this, because passing the source code to elvish -c throws the following error:
compilation error: cannot find variable $edit:completion:arg-completer

Is there another way to do this? I tried writing to a file and running elvish file.elv but I got the same error.

The editor is currently only initialized in interactive mode. I repurposed this issue to track the ability to start the editor from a script.

Fair enough. I'm not sure if it's unreasonable to expect the editor to start up inside a script, but I'd expect at least the -compileonly flag to work in this case.

In the recent past I have seen a handful of questions on IRC, and Github issues, asking that the edit module be accessible in a non interactive shell context. None of which have justified exposing the edit namespace in a non-interactive context.
@ajeetdsouza: Can you provide more context on why you are using commands in a non-interactive context that only make sense in an interactive context? How should the various edit module commands behave in a non-interactive context?

but I'd expect at least the -compileonly flag to work in this case.

Why do you expect that to work? You asked Elvish to compile code that is only valid in an interactive context in a non interactive context. This is the sort of thing where the script command is typically used.

My main use case is - I have Elvish completion scripts in my repository, and I'd like to add a workflow to my CI to check for invalid syntax. Since it's a completion script, it has edit: commands.

The challenge is finding an elegant way to make the interactive edit module useful in non-interactive Elvish scripts without creating other problems; e.g., panics from edit module code because the shell is not actually interactive.

@krader1961 shouldn't most edit commands be a no-op in a non-interactive setting? Or is there something that might break as a result?


Separate AbstractSymbolBlock from AbstractBlock

Right now, the AbstractSymbolBlock inherits from AbstractBlock. However, the
AbstractBlock parameters system and getParameters implies that it is always
possible to get the parameters for a block. While this should be true for a
correctly written DJL block, it is not always true for symbol blocks.
So, this change separates them to ensure that trying to get parameters when it
is not possible returns the exception reflecting that the operation is
unsupported. The shared functionality between AbstractSymbolBlock and
AbstractBlock was moved to a common base class, AbstractBaseBlock.

Codecov Report

Merging #1555 (f3ddb85) into master (bb5073f) will decrease coverage by 1.41%.
The diff coverage is 51.56%.

@@             Coverage Diff              @@
##             master    #1555      +/-   ##
============================================
- Coverage     72.08%   70.67%   -1.42%
- Complexity     5126     5371     +245
============================================
  Files           473      502      +29
  Lines         21970    23474    +1504
  Branches       2351     2550     +199
============================================
+ Hits          15838    16591     +753
- Misses         4925     5609     +684
- Partials       1207     1274      +67

Impacted Files
Coverage Δ

api/src/main/java/ai/djl/modality/cv/Image.java
69.23% <ø> (-4.11%)
:arrow_down:

...i/djl/modality/cv/translator/BigGANTranslator.java
21.42% <ø> (-5.24%)
:arrow_down:

...odality/cv/translator/BigGANTranslatorFactory.java
33.33% <0.00%> (+8.33%)
:arrow_up:

...nslator/InstanceSegmentationTranslatorFactory.java
14.28% <0.00%> (-3.90%)
:arrow_down:

.../modality/cv/translator/YoloTranslatorFactory.java
8.33% <0.00%> (-1.67%)
:arrow_down:

...i/djl/modality/cv/translator/YoloV5Translator.java
5.69% <0.00%> (ø)

...odality/cv/translator/YoloV5TranslatorFactory.java
8.33% <0.00%> (-1.67%)
:arrow_down:

...pi/src/main/java/ai/djl/ndarray/BytesSupplier.java
54.54% <0.00%> (-12.13%)
:arrow_down:

...pi/src/main/java/ai/djl/repository/Repository.java
83.33% <ø> (ø)

...l/training/loss/SigmoidBinaryCrossEntropyLoss.java
64.00% <0.00%> (ø)

... and 220 more

Continue to review full report at Codecov.

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


When creating a new tile, the tile border is left on screen, even after moving the tile.

See the video.
https://user-images.githubusercontent.com/30846057/153761498-7fd9f7f6-9f57-4b91-88bd-c9056e6a4972.mp4
I've used FindTheCulprit to narrow it down to Perfect Vision, and disabled all modules other than perfect vision to confirm.
Environment:
Foundry VTT 9.249
DnD5e System 1.5.7
PerfectVision 3.6.13
Please let me know if you need other information.
Thanks!

Oh, refreshing eliminates the left-over border, so it appears to be temporary. Also, it's not interactive; can't click on it or move it, so it appears to be just a graphics glitch.

Thanks for the report! Turns out it's actually caused by a core Foundry bug (I reported it). I included a fix for this issue in the latest PV release.

You know, I kinda figured it had to be something in core. Made no sense
that PV should be affecting tile placement like that. Thanks for letting me
know and for the fix.
On Sun, Feb 13, 2022 at 11:28 AM dev7355608 @.***>
wrote:

Thanks for the report! Turns out it's actually caused by a core Foundry
bug (I reported it). I included a fix for this issue in the latest PV
release.
—
Reply to this email directly, view it on GitHub
https://github.com/dev7355608/perfect-vision/issues/214#issuecomment-1038281253,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHLKY2PQE6OSWOHZNKO7UJTU27S3PANCNFSM5OJHGOZA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>


Improve "Ready to submit" notifications

I use the gerrit-monitor with chromium-review.googlesource.com
I would really like it if I got "Ready to submit" notifications even if the Verified label has no votes, since normally I will be the one adding that label, and it seems to get cleared frequently.
Likewise I would like to NOT get "ready to submit" notifications if the cl is already running in the commit queue.
Love the chrome extension.

This is probably caused by the Attention-Set feature of Gerrit.
The CQ bot changes the list of people in the Attention-Set when it is done running (or when it starts running sometime). It will add back the author. There are plans to improve how/when the CQ bot changes the Attention-Set, but they will probably never match 100% of how the people want to be notified (e.g. some people wants to be notified after each successful runs of the CQ, while others may only be interested by failures).
If you've configured the extension to use the Attention-Set (this is the default since a few releases), you may get notified when the CQ bot changes the Attention-Set. You can try to change the configuration of the extension to ignore the Attention-Set and instead check who made the last comment to the CL.
To do that, go into the extension configuration page and select "Disabled" for "Only use Attention Set to judge required attention" option.


Move maxRetries config to aux db

Sorry Erik, Now there is conflict on the patch, due to other patch update. Could you update the patch. Patch looks good to me. I can test it when patch is updated.

Are we using ReqMgr aux db for T0 agents?

test this please.

test this please

test this please

test this please

test this please

@goughes, Erik, could you squash the commit?
Error seems to be temporary error. So I am running the test again.

test this please

test this please

test this please

FYI, T0 doesn't really need maxRetries to be in the WMAgent config template. We override it anyways.
https://github.com/dmwm/T0/blob/master/etc/Tier0Config.py#L27


Pointer convertors for enum types are not generated.

No methods converting enum literal to a pointer value of same type are generated by current CLI.

We are having the same problems. So with latest CLI it breaks a current working version.

We are having the same problems. So with latest CLI it breaks a current working version.

@roberth1988 I doubt they were generated before (but correct me if i'm wrong).
This was intended as a feature request to avoid writing your own tedious literal-to-pointer converters, however simple should probably be automated by API stub generator.

@roberth1988 I doubt they were generated before (but correct me if i'm wrong).
This was intended as a feature request to avoid writing your own tedious literal-to-pointer converters, however simple should probably be automated by API stub generator.

@iamtakingiteasy no this has never been the case. Looks like this is a request for enhancement.

@iamtakingiteasy no this has never been the case. Looks like this is a request for enhancement.

Hmm, maybe I understand it wrongly. My current code is working properly with 0.25.
Once I try to Regenerate all things with 0.25 based on the same swagger I got these changes:
`        // environment
// Required: true

  Environment EnvironmentName `json:"environment"`

  Environment *EnvironmentName `json:"environment"`

`
Happens on all my Enum fields currently...
`
const (
// EnvironmentNameDev captures enum value "dev"
EnvironmentNameDev EnvironmentName = "dev"

// EnvironmentNameTest captures enum value "test"
EnvironmentNameTest EnvironmentName = "test"

// EnvironmentNameQas captures enum value "qas"
EnvironmentNameQas EnvironmentName = "qas"

// EnvironmentNameProd captures enum value "prod"
EnvironmentNameProd EnvironmentName = "prod"

// EnvironmentNameMock captures enum value "mock"
EnvironmentNameMock EnvironmentName = "mock"

)
`
so before I used to use:
apimodel.EnvironmentName(c.EnvironmentName)
So the code is broken when I use 0.26 - what's the best practice here?

Hmm, maybe I understand it wrongly. My current code is working properly with 0.25.
Once I try to Regenerate all things with 0.25 based on the same swagger I got these changes:
`        // environment
// Required: true

  Environment EnvironmentName `json:"environment"`

  Environment *EnvironmentName `json:"environment"`

`
Happens on all my Enum fields currently...
`
const (
// EnvironmentNameDev captures enum value "dev"
EnvironmentNameDev EnvironmentName = "dev"

// EnvironmentNameTest captures enum value "test"
EnvironmentNameTest EnvironmentName = "test"

// EnvironmentNameQas captures enum value "qas"
EnvironmentNameQas EnvironmentName = "qas"

// EnvironmentNameProd captures enum value "prod"
EnvironmentNameProd EnvironmentName = "prod"

// EnvironmentNameMock captures enum value "mock"
EnvironmentNameMock EnvironmentName = "mock"

)
`
so before I used to use:
apimodel.EnvironmentName(c.EnvironmentName)
So the code is broken when I use 0.26 - what's the best practice here?

@roberth1988 you are converting incompatible types (pointer vs non-pointer).
What is interesting here is that it seems that you used to get a non-pointer value for a required property and no this field is generated as a pointer. Could you share the spec that generates this model. I'd be interested to figure out why it used to be non-pointer and the target generated type has changed with v0.26.

@roberth1988 you are converting incompatible types (pointer vs non-pointer).
What is interesting here is that it seems that you used to get a non-pointer value for a required property and no this field is generated as a pointer. Could you share the spec that generates this model. I'd be interested to figure out why it used to be non-pointer and the target generated type has changed with v0.26.

ok so there are different mixed issues here:

@roberth1988 's actual problem is that for some reason, the codegen moved some fields to pointers when they were not.
@iamtakingiteasy  's point is indeed an enhancement. I am showing a proposal below.

@roberth1988 your issue is different, even though it shares the same symptoms. Could you please open a separate issue with your spec and excerpts of generated code before/after v0.26.0, so we can help you out more efficiently?

ok so there are different mixed issues here:

@roberth1988 's actual problem is that for some reason, the codegen moved some fields to pointers when they were not.
@iamtakingiteasy  's point is indeed an enhancement. I am showing a proposal below.

@roberth1988 your issue is different, even though it shares the same symptoms. Could you please open a separate issue with your spec and excerpts of generated code before/after v0.26.0, so we can help you out more efficiently?

@iamtakingiteasy regarding your request, how about a help factory like this one?
I am sticking to the string case only, since that the only case now for which we generate const.
// SodaBrand Some top level description
//
// swagger:model SodaBrand
type SodaBrand string

func NewSodaBrand(value SodaBrand) *SodaBrand {
	v := value
	return &v
}

const (

	// SodaBrandOTHERBRAND captures enum value "OTHER_BRAND"
	SodaBrandOTHERBRAND SodaBrand = "OTHER_BRAND"

	// SodaBrandPEPSI captures enum value "PEPSI"
	SodaBrandPEPSI SodaBrand = "PEPSI"

	// SodaBrandCOKE captures enum value "COKE"
	SodaBrandCOKE SodaBrand = "COKE"

	// SodaBrandCACTUSCOOLER captures enum value "CACTUS_COOLER"
	SodaBrandCACTUSCOOLER SodaBrand = "CACTUS_COOLER"

	// SodaBrandJOLT captures enum value "JOLT"
	SodaBrandJOLT SodaBrand = "JOLT"
)

@iamtakingiteasy regarding your request, how about a help factory like this one?
I am sticking to the string case only, since that the only case now for which we generate const.
// SodaBrand Some top level description
//
// swagger:model SodaBrand
type SodaBrand string

func NewSodaBrand(value SodaBrand) *SodaBrand {
	v := value
	return &v
}

const (

	// SodaBrandOTHERBRAND captures enum value "OTHER_BRAND"
	SodaBrandOTHERBRAND SodaBrand = "OTHER_BRAND"

	// SodaBrandPEPSI captures enum value "PEPSI"
	SodaBrandPEPSI SodaBrand = "PEPSI"

	// SodaBrandCOKE captures enum value "COKE"
	SodaBrandCOKE SodaBrand = "COKE"

	// SodaBrandCACTUSCOOLER captures enum value "CACTUS_COOLER"
	SodaBrandCACTUSCOOLER SodaBrand = "CACTUS_COOLER"

	// SodaBrandJOLT captures enum value "JOLT"
	SodaBrandJOLT SodaBrand = "JOLT"
)

or maybe more flexible:

func NewSodaBrand(value ...SodaBrand) *SodaBrand {
	var v *SodaBrand
        for _, w := range value {
            *v = w
        }
	return v
}

or maybe more flexible:

func NewSodaBrand(value ...SodaBrand) *SodaBrand {
	var v *SodaBrand
        for _, w := range value {
            *v = w
        }
	return v
}

func NewSodaBrand(value SodaBrand) *SodaBrand {
	v := value
	return &v
}

This looks fine, but thanks to go's type system and GC you don't even need any other variable than argument itself:
func NewSodaBrand(value SodaBrand) *SodaBrand {
	return &value
}

Regarding your follow-up:

func NewSodaBrand(value ...SodaBrand) *SodaBrand {
	var v *SodaBrand
        for _, w := range value {
            *v = w
        }
	return v
}

This should produce nil-pointer dereference and I don't see a point assigning same local variable over and over again from list of arguments.
Maybe you meant array version of same function (I'm using make instead of append to reduce number of possible reallocations):
func NewSodaBrandArray(values ...SodaBrand) (arr []*SodaBrand) {
	arr = make([]*SodaBrand, len(values))

	for i := range values {
		arr[i] = &values[i]
	}

	return
}

func NewSodaBrand(value SodaBrand) *SodaBrand {
	v := value
	return &v
}

This looks fine, but thanks to go's type system and GC you don't even need any other variable than argument itself:
func NewSodaBrand(value SodaBrand) *SodaBrand {
	return &value
}

Regarding your follow-up:

func NewSodaBrand(value ...SodaBrand) *SodaBrand {
	var v *SodaBrand
        for _, w := range value {
            *v = w
        }
	return v
}

This should produce nil-pointer dereference and I don't see a point assigning same local variable over and over again from list of arguments.
Maybe you meant array version of same function (I'm using make instead of append to reduce number of possible reallocations):
func NewSodaBrandArray(values ...SodaBrand) (arr []*SodaBrand) {
	arr = make([]*SodaBrand, len(values))

	for i := range values {
		arr[i] = &values[i]
	}

	return
}

@iamtakingiteasy yeah you're right, return a nil pointer is not a good idea.
The vararg version just came on top of my mind as I know of some other issue (#1393) for which the obvious solution
would be to generalize factory functions (i.e. New{{ model }}) for all generated models. This shouldn't conflict with a specific factory for enumerated types...

@iamtakingiteasy yeah you're right, return a nil pointer is not a good idea.
The vararg version just came on top of my mind as I know of some other issue (#1393) for which the obvious solution
would be to generalize factory functions (i.e. New{{ model }}) for all generated models. This shouldn't conflict with a specific factory for enumerated types...


Please pick up handles from display names

I guess it isn't surprising given what cryptobros did with .eth "names".
Example users that link their mastodon handles in their name:

https://twitter.com/NoraDotCodes
https://twitter.com/obfuscurity

Sorry, seems like you did already. obfuscurity was found, NoraDotCodes not

Thanks for the feedback. I put the account in my tester list and will report back.

I forgot what fixed it (regex or timeout), but it's fixed now.

thank you for this as well! By the way, what was the reason for filtering handles at all?

Mail addresses.


Please make config node

It's possible to add an config node to be able configure path instead hardcoded /ui,  change header text and left menu items ?

As this is a one time setting, it should rather be in Node-RED's settings.js than a config node.

Spoke to soon. Saw that it was available in config.json (however, shouldn't it be in RED's settings.json?

The config.json file doesn't really work as it is inside the installed npm package and will therefore get replaced when updating. As Emil says, this should be in the NR settings.

Is this consistent with other node-red plugins?
I know the file gets replaced on each update but is it fine to have a monolithic config file?

Yeah settings.js is how other nodes does it and it's the preferred way. See http://nodered.org/docs/configuration.html
I've been using it for a long time (e.g node-red-contrib-telldus) without any user problems.
If the settings.js is in your Node-RED home directory it won't get overwritten when updated.
—
Sent from Mailbox
On Mon, Nov 16, 2015 at 8:26 AM, Andrei Tatar<EMAIL_ADDRESS>wrote:

Is this consistent with other node-red plugins?
I know the file gets replaced on each update but is it fine to have a monolithic config file?
Reply to this email directly or view it on GitHub:
https://github.com/andrei-tatar/node-red-contrib-ui/issues/1#issuecomment-156945672

OK, I will update the plugin to use the node settings.

For NR embedded use, the settings are passed to RED.init. This is the same as the settings.js file when used with a global install (which I don't recommend as it causes other issues including security issues). Here is an example server.js which I use to start NR on my Pi home automation system:
/*jshint devel: true, node: true*/

/**
  * Start an embedded Node-Red instance
  */

var http    = require('http'),
    path    = require("path"),		// Node core library. path library for cross-platform file system specs
	fs		= require("fs"),		// Node core library. Filing system library for access to files & folders on the OS
    express = require("express"),	// THE std library for serving HTTP
    RED     = require("node-red"),
	_		= require("lodash")		// lodash (improved underscore) for JS utility fns
;

// Config vars - NB: LAN details are LOCAL. If accessing from the WAN (Internet), use the WAN details instead
var mqttSrv    = '<IP_ADDRESS>',  // The LAN address for the MQTT server
    mqttWsPort = '9001',           // The LAN port for the websocket interface to the MQTT server
    nrSrv      = '<IP_ADDRESS>',  // The LAN address for this Node-Red server
    nrPort     = '1880'            // The LAN port for this systems web interface
;
var wanMqttSrv    = '<IP_ADDRESS>',  // The WAN address for the MQTT server
    wanMqttWsPort = '9001',           // The WAN port for the websocket interface to the MQTT server
    wanNrSrv      = '<IP_ADDRESS>',  // The WAN address for this Node-Red server
    wanNrPort     = '8000'            // The WAN port for this systems web interface
;

// Create an Express app
var app = express();

// Add a simple route for static content served from 'public'
app.use( "/", express.static( "public" ) );

// Add static route for bower components
app.use( '/bower_components', express.static( path.join(__dirname, '/bower_components') ) );

// Create HTTP server on port 8000 for the admin UI and any pages served by node-red
var httpServer = http.createServer( app );

// Create the settings object - see default settings.js file for other options
var nrSettings = {
    httpAdminRoot : "/red",			// Access the admin web i/f from http://<nrSrv>/red
    httpNodeRoot  : "/",			// Access other NR served pages from http://<nrSrv>/
    userDir		  : path.join(__dirname, '.nodered'),	// default: $HOME/.node-red
    nodesDir	  : path.join(__dirname, 'nodes'),		// adds extra locn, defaults are userDir/nodes & node-red/nodes
    verbose		  : true,			// For better debugging
    debugMaxLength: 2048,			// max length of debug output
	// Reorder the node pallette
    paletteCategories: [
        'subflows', 'input', 'output', 'function', 'storage', 'advanced', 'formats', 'Raspberry Pi', 'social', 'analysis'
    ],
    functionGlobalContext: {        // enables and pre-populates the context.global variable
        // os:require('os'),
        // arduino:require('duino') // directly control Arduino's over serial, https://www.npmjs.com/package/duino
        // -- Pass config variables into NR for reference -- //
        'mqttSrv'       : mqttSrv,
        'mqttWsPort'    : mqttWsPort,
        'nrSrv'         : nrSrv,
        'nrPort'        : nrPort,
        'wanMqttSrv'    : wanMqttSrv,
        'wanMqttWsPort' : wanMqttWsPort,
        'wanNrSrv'      : wanNrSrv,
        'wanNrPort'     : wanNrPort,
		// -- Pass in Libraries for convenience in function nodes -- //
        'path'          : path,		// path library for cross-platform file system specs
		'fs'			: fs,		// filing system library for access to files & folders on the OS
		'_'				: _			// lodash (improved underscore) for JS utility fns
    }
    //httpStatic: '/home/pi/node/nr/static', // only for standalone NR so not relavent here
};

// Initialise the runtime with a server and settings
RED.init( httpServer, nrSettings );

// Serve the editor UI from /red
app.use( nrSettings.httpAdminRoot, RED.httpAdmin );

// Serve the http nodes UI from /
app.use( nrSettings.httpNodeRoot, RED.httpNode );

// Make the HTTP server start listening on port 8000
httpServer.listen( nrPort );

// Start the node-red runtime
RED.start();

config.json was removed
you can add to node-red settings file:
ui: {
  path: 'ui', //the path for the UI (default 'ui')
  title: 'some title', //the title in the browser for the UI page (default 'Node-Red UI')
  defaultGroup: 'some name', //the default group name if none specified (default: 'Default')
}

Hello Andrei,
I tried to change title in the browser using your instruction above, but w/o success, i.e. browser title is still "Node-RED UI". Here is snippet from /home/pi/.node-red/settings.js:
//var fs = require("fs");

ui = {
    path: 'ui',
    title: 'Nodered Playground',
    defaultGroup: 'some name'
}

module.exports = {

Console output when run node-red-pi :
pi@raspberrypi:~ $ node-red-pi -v
OPTIONS=
ARGS= -v

Welcome to Node-RED
===================

19 Jan 22:29:39 - [info] Node-RED version: v0.12.5
19 Jan 22:29:39 - [info] Node.js  version: v4.2.4
19 Jan 22:29:39 - [info] Loading palette nodes
19 Jan 22:29:49 - [info] Dashboard up and running
19 Jan 22:29:52 - [info] UI started at /ui
19 Jan 22:29:54 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Jan 22:29:54 - [info] User directory : /home/pi/.node-red
19 Jan 22:29:54 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
19 Jan 22:29:54 - [info] Server now running at http://<IP_ADDRESS>:1880/
19 Jan 22:29:54 - [info] Starting flows
19 Jan 22:29:54 - [info] Started flows

Thank you.

UPDATE: oh, I should put your snippet into module.exports = { ... } of the settings file.