Allow generation of diagrams using third-party diagramming tools

Originally reported on Google Code with ID 702

There is  growing list of third-party tools for drawing UML diagrams.
Generating approproate Javascript versions using some of these tools would be useful.
See
http://modeling-languages.com/javascript-drawing-libraries-diagrams/

Reported by @umple on 2015-04-07 14:49:40

The goals of the project
Implement the use of an abstracted API that draws interactive diagrams, with fully-featured formatting capabilities.
Features
It should:

make it easy to draw a variety of diagrams, such as class and state-machine diagrams
be easily extensible to new diagram types
allow the user to edit the UML (or other) model directly from the diagram, sending changes back to the server for updating the text view
allow the user to export the diagram as a graphic for inclusion in documents

Project Constraints
The scope of work should be restricted to the client-side as much as possible.
Changes to client-server system configuration are out-of-scope.
The selection criteria for a 3rd party JS library

Library
Open-Source
Active
Full-Featured Format-ting
Zooms & Pans Views
User Editable
Ease of Use

JointJS
MPL
√
√
TBD
client only
Already draws UML class and state-machine diagrams

Raphael
MIT
TBD
TBD
TBD
TBD
TBD

Draw2D
GPL2
TBD
TBD
TBD
TBD
TBD

FabricJS
MIT
TBD
TBD
TBD
TBD
TBD

PaperJS
MIT
TBD
TBD
TBD
TBD
TBD

JsPlumb
MIT/GPL2
TBD
TBD
TBD
TBD
TBD

P5JS
TBD
TBD
TBD
TBD
TBD
TBD

CytoscapeJS
MIT
X
TBD
TBD
TBD
TBD

D3
BSD
√
TBD
TBD
TBD
Significant learning curve, would require extending for each diagram object

Dagre-D3
MIT
X
TBD
TBD
TBD
Extends D3 to draw graphs, demo

Great work. as we talked let first choose what will be the best candidate :-)

OK. Update the table if you can, but rule out a) Any not being actively developed (updates in 2016), b) Those that cannot easily draw class and fully nested class and state diagrams; c) GPL licensed code, as this is incompatible with MIT and forces GPL on us.
The exception to c would be if we can have people who set up UmpleOnline install the js code from the third party directly so we don't have to clone it or modify it.
Ideally UmpleOnline would iniitally just have the new library as an alternative drawing technology. We would maybe switch to it as default (leaving the others as alternatives) once we have stabilized this work.

I believe that I have completed an adequate comparison of the FOSS JavaScript libraries for producing either diagrams, graphs, or drawings.
The only library that is ready to produce UML diagrams is JointJS. While a few of the other libraries have shown examples of state-machine diagrams, none offers an API that enables the user to edit the diagrams.
As for provisioning the user with the JS library, I would suggest that our web page should only provide a <src> link to a content-delivery network (CDN) that provides the library.
I like the idea that this project should, at first, be thought of simply providing an alternative to the current drawing methods. This way, we can get something out there sooner.

Great. Go ahead then. There is already a switch in the options menu and with 'hot keys' to switch diagram type.
The biggest initial challenge will be generating the needed input for their tool. Start with this as a new generator (we have many generators). Generate using UmpleTL of course. Start with class diagrams. To be even more agile, just have it display the raw classes. After that works. Add attributes. Then associations and generalizations, and other details (interfaces, methods). Once all is perfect, you can move on to state machines if you have time.

In JointJS, there is a class called joint.shapes.uml.Class that is used to instantiate UML classes. It is sub-classed to create Interface and Abstract classes.
Given the following umpleClass delivered from the server:
class1 = {
	"position": {"x": 543, "y": 212, "width": 140, "height": 108},
	"attributes": [
		{ "type" : "String", "name" : "startTime", "modifier" : "", "traceColor" : "black" },
		{ "type" : "String", "name" : "endTime", "modifier" : "", "traceColor" : "black" },
		{ "type" : "String", "name" : "status", "modifier" : "", "traceColor" : "black" }
		],
	"methods": [],
	"id": "TimeSlot",
	"name": "TimeSlot",
	"isAbstract": "false",
	"displayColor": "" ,
	"isInterface": "false"
}

, a new JointJS Class object can be instantiated with this code:
new_class1 = new joint.shapes.uml.Class({
	position: class1.position,
	size: class1.position,
	name: addToArray(class1.name),
	attributes: addAttributes(class1.attributes),
	methods: addMethods(class1.methods),
	id: class1.id
});

, where there are short helper methods addToArray(), addAttributes(), and addMethods().
These helper methods help to format the data for the constructor. Please note, however, that the nested object representation of attributes and methods is lost in the JointJS Class definition.
Alternatively, by using the server to produce a different format for the JSON representation of the Umple model, such as:
class2 = {
	position: {"x": 543, "y": 212},
	size: {"width": 140, "height": 108},
	attributes: ["- startTime: String", "- endTIme: String"],
	methods: [],
	id: "TimeSlot",
	name: ["TimeSlot"],
	isAbstract: "false",
	isInterface: "false"
}

, then the JointJS Class could be instantiated with:
new_class2 = new joint.shapes.uml.Class({ class2 });.
I am suggesting that we would keep the isAbstract and isInterface properties in order to determine which class type to instantiate. This template language solution does not address the shortcoming of the simplified methods and attributes in JointJS Class.

Just for the record. There is another library called mxGraph
The website draw.io is based on it.

I have just pushed some basic functionality to the branch. You can see it by checking out the branch, starting up the server locally, and selecting the JointJS class diagram type with one of the demonstration class models.

Great work so far.
Some next steps:
If you select the background, focus should be grabbed (note the yellow border)
it as happens with editable and graphviz. The command keys for doing
things like control-T to hide/show text etc. would then work while there
is focus on the jointjs diagram. This is quite important for consistency.
Also the diagram should be drawn as a constant size of UML elements, and you should be
able to scroll it with scrollbars if it goes off the edge. I note that if
I zoom the window in, the scrollbars appear so just drawing with constant
size should be all that is needed.
I would prefer a slightly lighter shade of grey too.
Then, onward with editing or state machines (I leave it up to you which you prefer).

I am now investigating how to implement the display of state machines with the JointJS library, including the display of nested state machines and mixed class / state machine diagrams.
As I see them, the high-level tasks are:

Design a JSON data format that properly describes the state machine
Revise an existing or create a new generator to generate this JSON data
Revise the server code to process this new data request type
Design and implement a diagram interface that provides an intuitive way to explore the mixed class diagram and multi-level state machine

My first big question is about the best way to accomplish # 2.
Do I:

extend Generator_CodeJson.ump to generate the additional JSON to describe the state machines; this would require ensuring that the client's Editable Diagram parser ignores this extra data
extend Generator_CodeJson.ump to generate the additional JSON, but it does so only in response to an additional build option argument coming from the client
create a new Generator_ ... ump to create the mixed class and state machine JSON

Are there other options as well?
All suggestions would be appreciated!

Unless you can see that it would result in extra complexity, I would have thought that your third option: "create a new Generator_ ... ump to create the mixed class and state machine JSON" would be the better one. My second choice would be your second option.
There is an alternative argument that says all aspects of a model should be made available to the UI, (your option 1) such that it can generate code which mixes class and state diagrams. However I think that from an agile perspective, the third option is better. A more complex UI could always request both results.
One more thing: I note in the current code that if I click on a class it does not highlight the respective code in the text pane. Both the graphviz and the original editable class diagram did this.

I would go with option 3 but design the generator in a way it could be reused later. In big systems, for example, we might not want to have state machines generated all the time and need to have them when they are required (which shows the usefulness of option 2).
Option 1 looks a little bit tricky because it might break the current editor and also need debugging which is time-consuming.
To sum up, I would say reuse the current code generator for JASON under a new generator (which is just duplication), then mix state machines with it. However, allow future developers to easy disable state machine generation for class diagrams.

In discussion today with Vahdat, we reviewed the Umple state machine model, how umpleonline draws the state machines in GraphViz, and how we would like to see them drawn with JointJS.
Generally, we seem to be happy with the GraphViz rendering, but there are opportunities to enhance the diagrams:

actions or transitions with multiple behaviours generally consist of a lot text; some way of hiding / showing, or at least hinting of its presence (with an ellipsis for instance) would be preferred
keywords such as after, queued, and pooled should be colour-formatted and added to the state machine and transition labels (as appropriate)
dotted lines to separate orthogonal regions of composite states should be added

Also, there are a few other items offered for discussion:

any state qualified with the final keyword should be rendered with the UML standard symbol for a final state
when a state has multiple out-transitions, show a single one connected to a pseudo-state from which all of the transitions propagate

I agree with much of the last post, but not the very last point.

Please consider tthat the last point is not about all transitions. It should be related to transitions with the same event names. Having pseudo-state is not necessary in the current situation of Umple and I also like the current approach, but I can consider the case it which it would be beneficial. For example, if one day we extend the sytax of transitions to have something like event [guard] -> S1 else S2; it would be much better to have the proper pseudo-state.
@marc22alain let's not have the pseudo-state (joint) and follow the approach we have in Graphviz.

OK. I see future extensions allowing this.

I've pushed the basic functions of adding class/associations to the branch issue#600term.
As discussed with Vahdat, I will pop up a window beside the class object to let the user edit the class instead of editing it right on the class object (because JointJS does not have the function out of the box)
a small bug I found is that the size of jjsPaper does not change when the browser window size changes. I will work on it.

As we discussed before, there are two options to edit the properties of a class object in JoinsJS paper.

pop up a property dialog.
edit on the object (just like editable class) diagram.

I chose to go with the first approach because it is easier to implement and easy to use, the drawbacks of the first approach are distracting user and inconsistency.
I have implemented basic features for the first approach, and I've recorded a demo here (please select the highest quality to watch): https://youtu.be/WswuVwQSgKM
While I am working on the first approach, I found one way to implement the second approach is to create my own UML object instead of using the JointJS default ones (see examples here: http://resources.jointjs.com/tutorial/html-elements)
Should I keep working on the first approach? If so, I will fix bugs on my current implementation and have a PR by next Friday.
Or should I start to work on the second approach? If so, I should have the basic features of the second approach by next Friday.
If you have a better idea, also please let me know.
Also, as I talked with Vahdat, when the mouse move on the link and about to delete it, a red 'x' should be displayed instead of a 'hand' cursor. This features is implemented by JoinsJS already (see the video above), However, it does not display properly in umpleonline, and I am still investigating the reason.
Last, the bug relates to the JointJS paper size when resizing the browser has been fixed, it will be push together with my next PR.

closed by error.

Here is a summary of the design of drawing graph/generate codes. Marc has created lots of functions to convert the message received from server to JointJS object. For the past few weeks, I was focusing on two things:

Draw graph on the JointJS paper.

to simulate the action that drags the class object to the paper, I have a separate hidden JointJS paper with a class object on it, when the user clicks the class tool, the JointJS paper will display and 'fly' with the mouse. Then, when the user clicks the actual JointJS paper on canvas, the class object is copied to the canvas where the mouse clicked. Last, we hide the separate JointJS paper.
to edit the class object in the graph, a properties dialog will pop up beside the class object. The user can change classname, edit/delete attributes in the properties dialog. Currently, add/edit methods has not been implemented but should be easy to add later.
association and generalization tools: connected the next two objects that are clicked. By default association is --, and the first clicked object the the parent for generalization.
another function should be added for association/generalization: when click the first object, other available objects should be highlighted.
Sometimes, the layout of the graph is werid, for example, select JointJS diagram --> Under tools section --> Load --> select 'AccessControl' example. We could implement a method that automatically format the objects in the paper nicely. However, this issue only appears when there is an association link to the object itself. So I will try fix the self link first to see if the layout issue resolved.

constructing message send to the server to generate Umple code.

after the object is drawn in the paper, I will construct actionCode and then use Action.ajax(Action.updateUmpleTextCallback,actionCode);  to send the information back to server, then the umple code will be generated.
add new class actioncode

action=addClass&actionCode={
   "displayColor":"transparent",
   "position":{
      "x":"220",
      "y":"188",
      "width":"109",
      "height":"41"
   },
   "attributes":[

   ],
   "methods":[

   ],
   "interfaces":[

   ],
   "id":"NewClass",
   "name":"NewClass"
}

edit class actioncode

action=editClass&actionCode={
   "displayColor":"transparent",
   "position":{
      "x":"144",
      "y":"185",
      "width":"109",
      "height":"58"
   },
   "attributes":[
      {
         "type":"String",
         "name":"myString",
         "textColor":"black",
         "aColor":"black",
         "newType":"String",
         "newName":"myString"
      }
   ],
   "methods":[

   ],
   "interfaces":[

   ],
   "id":"NewClass23",
   "name":"NewClass23",
   "isInterface":"false",
   "isAbstract":"false",
   "oldname":"NewClass2"
}

add association actioncode

action=addAssociation&actionCode=
{
   "classOnePosition":{
      "x":"22",
      "y":"231",
      "width":"109",
      "height":"41"
   },
   "classTwoPosition":{
      "x":"367",
      "y":"252",
      "width":"109",
      "height":"41"
   },
   "offsetOnePosition":{
      "x":"109",
      "y":"21",
      "width":"0",
      "height":"0"
   },
   "offsetTwoPosition":{
      "x":"0",
      "y":"24",
      "width":"0",
      "height":"0"
   },
   "multiplicityOne":"*",
   "multiplicityTwo":"*",
   "name":"NewClass__NewClass1",
   "roleOne":"",
   "roleTwo":"",
   "isSymmetricReflexive":"false",
   "isLeftNavigable":"true",
   "isRightNavigable":"true",
   "isLeftComposition":"false",
   "isRightComposition":"false",
   "color":"black",
   "id":"umpleAssociation_0",
   "classOneId":"NewClass",
   "classTwoId":"NewClass1"
}

add generalization actioncode

action=addGeneralization&actionCode=
{
   "parentId":"NewClass1",
   "childId":"NewClass",
   "parentPosition":{
      "x":"1161",
      "y":"396",
      "width":"0",
      "height":"0"
   },
   "childPosition":{
      "x":"233",
      "y":"247",
      "width":"0",
      "height":"0"
   }
}

most of the information can be obtained by paper.model.toJSON(), except for association.offsetOnePosition and association.offsetTwoPosition, I am not sure what are those two used for. I set all the values to 0 and it still works fine.
Edit class attributes: instead of tracking which attributes were added/removed/renamed, I just sent one message to the server which removes all the attributes from the old JSON and adds attributes in the new JSON. This way will save lots of calls to the server, however, it sometimes generates error in the umple code that I cannot track. I will still investigate this, if it does not work properly, I might send the request to server separately.
Moving element: Currently, I do not send any message to server when user only moves the object in paper without editing. The problem with that is the server won't be able to track where the objects are. we can solve it by tracking the move of the object and send message to serve every time it moves (just like editable class).

@vahdat-ab mentioned that in the current test website, when grab a class and put it in the paper, it creates two elements. It might because I didn't cancel the click event when switch to another diagram or switch tools. I cannot recreate it in my local machine so this might be solved when I was working on the code, I will test this after my next next PR.

I update the location of the class object when the location changed, and it's saved. For the location of association, I am not able to save it because JointJS does not save the location of the association, it just connects two objects using the shortest path. Here is  what JointJS association JSON look like:
{
   "type":"uml.Association",
   "source":{
      "id":"1ccb2ce6-548d-4bd1-aec3-cddaad8d6395"
   },
   "target":{
      "id":"29cd0c15-bcc9-4555-ae39-662d72995812"
   },
   "id":"61b8d44d-1e21-4364-90c2-da8ebc1f81c3",
   "z":4,
   "attrs":{
   }
}

However, what JointJS will save is the breakpoints on the association, and the JSON will like this with two breakpoints:
{
   "type":"uml.Association",
   "source":{
      "id":"1ccb2ce6-548d-4bd1-aec3-cddaad8d6395"
   },
   "target":{
      "id":"29cd0c15-bcc9-4555-ae39-662d72995812"
   },
   "id":"61b8d44d-1e21-4364-90c2-da8ebc1f81c3",
   "z":4,
   "vertices":[
      {
         "x":196,
         "y":290
      },
      {
         "x":780,
         "y":288
      }
   ],
   "attrs":{
   }
}

I think as long as the breakpoints are saved, the layout of the graph will always be the same even without saving the location (because it will always connect with the shortest path, and saving the location becomes unnecessary).
Take a look at this quick 20 seconds demo video to see what I meant.
https://youtu.be/kYKRWD4O1Yo
So, should I just leave the location of the associations unsaved until we can save the breakpoints to the server? @vahdat-ab @TimLethbridge

@TimLethbridge I prefer you comment on this subject.

The shortest path may not avoid overlaps in many diagrams and will often result in connections that don't look the way the user wants.
People want very precise and reproducible diagrams to be saved. What you are saying is that for joint.js it is not possible to save the connection points to the classes themselves. We may have to modify joint.js in the future to fix this.
You are also saying that for now the split points in associations are not saved. If we can't save the end points then it would be absolutely critical to save the split points. This feature would be fundamentally incomplete until that is done.
For now do not 'delete' the association specifications, since they would be needed when the diagram is loaded in another diagram type. We are going to have to add additional syntax these to describe the split points, and then make sure that other diagram types either use these too or do not incorrectly overwrite them.
And please, please, get rid of the colour and make the borders of classes thin like the other diagram types. The font of the class name should be similar in size to other diagram types, and the font of the attributes and other aspects should either be the same or only very slightly smaller.

The shortest path will not be able to avoid the overlaps. However, when the locations of split points are saved, we will not need to save the location of the connection points because the saved split points will be able to reproduce the diagram precisely. So I believe we do not need to modify joint.js to save the connection points as long as we have the split points, and users will be able to avoid overlaps by just using the split points. (actually, it is more accurate to have split points than just two end points)
Also, I fixed the color/font and you can take a look at this picture jointjs class
My next step:
To be able to edit in the class object using joint.js, I created a custom JointJS view for class using the method that recommended in the document. The new custom element I created called joint.shapes.umpleuml.Class.
Marc was using the jointJS default UML class element joint.shapes.uml.Class to draw the graph from the umple code, which is not editable. To make the elements also editable when generated from the umple code, I will need to change a lot of his code. Please comment on the to let me that I can go ahead and change them.
I have pushed my current code in branch 'issue600editinggraph'. if you want to take a look at the custom Class element, it is in 'umpleonline/scripts/jjs/joint.shapes.umpleumple.js'. I assume we need to do the same for state machine if want editing in the graph.

I checked you latest commits and these are what I found:

When you define methods textually it doesn't show up in the diagram.

The default auto layout is not good. It must avoid overlapping.

Is it possible to remove "x" icon from the top left side and show it when the class is selected?

When you design continuously, after a while I cannot move elements. It happened when I added an association to a class. In fact, that happens when there is an error coming from the compiler.

The way methods' parameters are defined should be consistent with the way attributes are defined. For example, one of these two should be ok.
String str; -> String getData(String str);
str:String -> String getData(str: String)

When attributes are added they should appear after the keyword isA.

I would be better to have font size a little bit bigger than icons.

It is possible to remove 'x' iron and only display it when selected.
I will fix other issues you mentioned.

Just want to add some notes here to make it clear:

As I mentioned above, JointJS uses SVG which does not have contentEditable functionality. That is why we need some hacky solution to make the text editable in our elements.
The method I used is on this website, which draws HTML input in front of the Elements.
A different approach might be to use foreignObject.
In the future (maybe 1 ~ 2 year), the hack won't be needed since SVG 2.0 will support contentEditable functionality.

I wrote an editable State Machine Element, and here is what it look like in umple: link (pretty much works the same as the one for Class)
However, even the element is editable, editing the element will not affect the umple code. We might need to write some functions in the back-end to support, I will look it up next week see if I can make it work (maybe I cannot)
I am still working on the auto-layout for nested state machine and avoiding overlapping for links.
Below are some bugs I fixed:

Now the remove icon 'x' will be visible when clicking the 'delete' button in the tool section and will be removed when 'delete' button is clicked again.
methods textually will show up in the diagram, could you please provide a specific case?
I am going to handle the cases when there is error coming from compiler (not done yet)
define method with parameter in graph is fixed (not commited yet)
The format to define a method in graph is + test() : String, the plus sign indicates the return type. However, when there is no sign at the beginning, should I set it to private by default?
When attributes are added they should appear after the keyword isA: In the editable class diagram, the order of 'isA' and attributes depends on which one was added first. Should I try to change this feature?
current font size is 12 which I think is big, so I will make the icon smaller.

Thanks.

I wrote an editable State Machine Element, and here is what it look like in umple

Change the transition arrows to be like the one we have for associations.

I will look it up next week see if I can make it work

Even, you can satisfy this, make sure textual to graphical work correctly.

I am still working on the auto-layout for nested state machine and avoiding overlapping for links.

Good. This is important as well.

methods textually will show up in the diagram, could you please provide a specific case?

I didn't get what you want.

The format to define a method in graph is + test() : String, the plus sign indicates the return type. However, when there is no sign at the beginning, should I set it to private by default?

The sign + shows if it is public or not. If people directly put - then make it private. Wth sign +, keep it as.  The Umple compiler will consider that as public.

When attributes are added they should appear after the keyword isA: In the editable class diagram, the order of 'isA' and attributes depends on which one was added first. Should I try to change this feature?

Not a hight priority task. If it's easy to do it otherwise focus on other tasks.

methods textually will show up in the diagram, could you please provide a specific case?
I didn't get what you want.
In the previous message, you mentioned that When you define methods textually it doesn't show up in the diagram., However, It does show up in the diagram when I tested that. So that might be a bug that I am not aware of. Could you provide an example situation? (don't bother to rebuild the branch and test, you can just generally describe what you did so that I can test around it )

I don't remember now :-) . Maybe, it's been fixed. I'll check it in your PR.

Remember that you have to click the option to see methods ...

should the comments be included in the state machine diagram? for example, this is how it work right now. image

No, comments should appear only in tool tips.

There are few bugs can be fixed with JointJS diagram in the future:

When adding split points to the link, the information should be saved so that the graph will be kept the same when reloading.

It is fine to add/remove a link (associations and generalizations). However, a link can be re-direct to another object in the graph, when re-direct, we should be able to just call a single function to update the code instead of calling remove and then add.

When the format of the class attribute or method is not correct, we need to throw an error to notify users.

For JointJS state machine, umple code need to be updated when the diagram changes

Some examples cannot be loaded, like "Geometric system", it seems like the JSON that received from the server is not in a correct format. Some commas are missing.

When holding ALT and scrolling the mouse, the graph should be able to zoom in and out. However, because the customized JointJS class was used, and the HTML element rendered above the JointJS element won't zoom. To fix this problem, we need to update the HTML element when the JointJS element changes.

Priorities to get joint.js capability complete:
a) When the joint.js diagram is edited, update the model in the same way as our editable diagrams update it. Currently updates are ignored. (This is item 4 above).
b) Fine-tuning of the look of the diagram. Currently the boxes around classes are too thick.
c) Other issues in the above list of bugs.
d) State diagrams in joint.js (if this is possible).

@runqingz
I suggested Umple to a researcher who does an experimental study on modeling IDE.
We could not draw associations and generalization graphically in JointJS. I know it is there but I personally could make it. It might be disabled. However, we need to make it clear. Please have a look at it and if it is there let me know how it is done.
Another point is that if we select a class graphically the related text must be highlighted. This is done in the default graphical view for Umple code.

@vahdat-ab all the features you are mentioning exist; however as we discussed, they are all currently triggered only if you click on the corresponding portion of the graph when your cursor is a compass like cursor (always work if you click on the class icon). I guess it was implemented like this to distinguish between text edit and graph editing.

This master issue is being kept open for reference. Specialized issues to be worked on to continue joint.js are #1140 #1137 #1131 #1132


Nuxt 3.7 is ignoring devServer on nuxt.config.ts

Environment

Operating System: Darwin
Node Version:     v20.5.1
Nuxt Version:     3.7.0
CLI Version:      3.7.0
Nitro Version:    2.6.1
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      css, modules, pinia, image, runtimeConfig, app, devServer, devtools
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
just create a new project using npx nuxi@latest init my-app and add
devServer: { 		host: DEV_URL, 		https: { 			key: DEV_KEY, 			cert: DEV_CERT 		} 	},
to nuxt.config.ts
Describe the bug
When using pnpm dev on previous versions, it used to log on the terminal my localhost ip and my dns + https, but now even when using --host to reveal, it just logs localhost and my ip, both http like bellow
Nuxt 3.7.0 with Nitro 2.6.1 ➜ Local:    http://localhost:3000/  ➜ Network:  http://<IP_ADDRESS>:3000/ [QR code ⬇ ]
And when using the dns on the browser, it doesnt work.
Additional context
I dont really know if its a bug or theres a new way to use a dns and cert on nuxt 3.7, I couldnt find it on the the release note.
Thanks for the help! ❤
Logs
No response

Same problem on my side also #22842


Fix Calibration Serialization

make model field a string instead of CameraModel to support direct json serialization

I wonder if we need the CameraModel at all. Can't we simply use a Literal string? It might feel a little more fragile, but using static type checkers will prevent us from typos.

I mostly like the ability to write CameraModel.PINHOLE

I ended up using @pascalzauberzeug 's suggestion of deriving from str and Enum.
Also removed all to_dict functions since they should be unnecessary now.

How did the test go? Can we merge this?

@codingpaula We didn't get to it yet, but I will do it now and merge when I'm done

Seems to work! I will merge it
{
    "cameras": {
        "32e4-9230-platform-3610000.xhci-usb-0:2.1:1.0": {
            "id": "32e4-9230-platform-3610000.xhci-usb-0:2.1:1.0",
            "name": "32e4-9230-platform-3610000.xhci-usb-0:2.1:1.0",
            "connect_after_init": true,
            "streaming": true,
            "focal_length": 1830,
            "calibration": {
                "intrinsics": {
                    "model": "pinhole",
                    "matrix": [
                        [
                            1433.6721216716353,
                            0.0,
<PHONE_NUMBER>468386
                        ],
                        [
                            0.0,
                            1370.2101675446997,
<PHONE_NUMBER>171041
                        ],
                        [
                            0.0,
                            0.0,
                            1.0
                        ]
                    ],
                    "distortion": [
                        -0.01557127473024067,
                        -56.25674323172758,
                        0.23577466596211383,
                        0.011342764817018949,
<PHONE_NUMBER>391272
                    ],
                    "xi": 0.0,
                    "rotation": {
                        "R": [
                            [
                                1.0,
                                0.0,
                                0.0
                            ],
                            [
                                0.0,
                                1.0,
                                0.0
                            ],
                            [
                                0.0,
                                0.0,
                                1.0
                            ]
                        ]
                    },
                    "size": {
                        "width": 720,
                        "height": 560
                    }
                },
                "extrinsics": {
                    "rotation": {
                        "R": [
                            [
                                -0.005087957942356058,
                                0.9070537937934018,
                                -0.42098399951657745
                            ],
                            [
                                0.9967070483093687,
                                -0.02946986293924958,
                                -0.075541955420596
                            ],
                            [
                                -0.08092695802019419,
                                -0.419982073835704,
                                -0.9039169680464345
                            ]
                        ]
                    },
                    "translation": [
                        0.5757624106417404,
                        0.0740620510871811,
                        1.1604844656286453
                    ]
                }
            },
            "auto_exposure": true,
            "exposure": false,
            "width": 1280,
            "height": 720,
            "fps": 9
        }
    }
}


Improve build-html regexp

It shouldn't need comments to work properly. Just replace the script tags.

Fixed in 2420d36f1e127ba8286761987c84b63e88ca297c


Translate the basic strings to Italian

Hi! I really love your project and, since I saw that you are adding translations in various languages to it, I would be happy to contribute by adding the italian translation if you want. Let me know about it :3 @tonybaloney

Yes please,

Sure! Just opened the pr


Using any existing packages which use client-go library.

Tried github.com/pytimer/k8sutil/apply. The apply took long time and got throttling. It looks the API has been hit with too many data when connected directly.
Solution:
To try wrapper like terratest or kubectl

Use https://github.com/spf13/cobra/blob/master/user_guide.md#using-the-cobra-generator to add commands to trigger different pipeline


Release 6.0.0

compatibility changes for Q-server@9 regarding the change from export-options-schema to display-options-schema

@manuelroth I added your changes to dev branch into the release branch. still happy with a release like that?

@benib yes thats great. Thank you


Python CLI script to open the location specified

I would like to work on this issue
Script Title -
what will change -
Instructions

Create a new folder for your script and file/folder name should be appropriate.
Create a README.md in your folder for program Instructions
add requirements.txt if needed

Please add/delete options that are not relevant.

[✓] Adding New Code
[✓] Improving Code
[✓] Improving Documentation
[✓] Bug Fix

Programming Language

[✓] Python

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server  - https://discord.gg/FXyh2S3
Happy Coding,

I would like to work on this issue.


RGB COLORS

can you add RGB color and an option to automatically open a book when players enter the server ........
this is a good plugin but is limited to just one book https://www.spigotmc.org/resources/booknews-1-8-1-19-2.61163/
:) love you plugin just let you know

Read the wiki to know how to create more books.

i will but what about RGB color? and book that will automatly open when someone joins

There is already an option to open the book when players join in the config.yml.
If you want to know something about the text formatting check the MiniMessage documentation, since InteractiveBooks uses it.
For RGB is <#xxxxxx>


QueryBuilder - Does not support JOIN in UPDATE

I see in database classes that there's no support for update with joins.
More info here:
MYSQL - https://www.mysqltutorial.org/mysql-update-join/
PostgreSQL - Does Not Support It
SQLite - Does Not Support It
MSSQL - https://www.sqlshack.com/an-overview-of-sql-server-update-join/
The same feature lack on CI3 as well https://github.com/bcit-ci/CodeIgniter/issues/5941

QueryBuilder provides the ability to work with any database. If this feature is not supported in all databases, then QueryBuilder cannot provide it for everyone. Any time You can switch from one database to another and your code still working.
You can use custom queries instead.

I was into Builder lately and in fact I saw exceptions from this rule
(driver specific exceptions)  :). But I have to say that IMHO join in
update is not as common as it require it to be implemented as long as we
could use query for this. :/
On Sun, Apr 5, 2020, 12:21 Oleksandr Trelin<EMAIL_ADDRESS>wrote:

QueryBuilder provides the ability to work with any database. If this
feature is not supported in all databases, then QueryBuilder cannot provide
it for everyone. Any time You can switch from one database to another and
your code still working.
You can use custom queries instead.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/codeigniter4/CodeIgniter4/issues/2799#issuecomment-609393209,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACAGMUQYAL46BJ7UM6IE3ULRLBLT5ANCNFSM4L6CEOZQ
.

Regadring the CI4 it should not be that hard to implement as it only needs to be implemented in MySQL driver. I've created the issue for reference here. I will work on that and submit PR

The same thing can be accomplished with Postgres so a way to do that would also have to be implemented. Additionally, a way of dealing with it in SQLite would need to be handled if at all possible since SQLite is often used for running tests even when the site would use MySQL or Postgres. So, it's not as simple as it seems.
Additionally, the goal with the Query Builder is to provide a consistent API across all database drivers that we support. We avoid adding any engine-specific functions to the Builder, since you can still hand-write queries for anything more specific needed.


sequence performance optimization

When I add several thousand keyframes in the sequence, the panel becomes very sluggish. Is there a possibility to optimize this issue? Thank you

Hello, I'm very sorry to bother you. Has this issue been resolved or is it planned to be resolved? Looking forward to your reply. @AriaMinaei

@Johnly1986 In my tests, Theatre handles thousands of keyframes pretty smoothly, so this particular issue is probably unrelated to Theatre, but if you can share a codesandbox reproduction, we can take a look and let you know for sure.

@Johnly1986 In my tests, Theatre handles thousands of keyframes pretty smoothly, so this particular issue is probably unrelated to Theatre, but if you can share a codesandbox reproduction, we can take a look and let you know for sure.

It's a great honor to have a conversation with you and pay attention to this issue. You can check the sandbox reproduction in the link provided below
https://codesandbox.io/p/sandbox/strange-dirac-cj4lxh?file=%2Fdata%2Fmyitems.mjs%3A30%2C14
When I drag the scroll bar and keyframes in the Sequence panel, there is still a lag.

@Johnly1986 so I did a quick test, but removed the console.log() calls because those just overwhelm the devtools with a bunch of calls every frame.
For me, playback itself was smooth, but the UI isn't buttery smooth anymore. Usable, but not smooth. Here is a video:
https://github.com/theatre-js/theatre/assets/593118/ace3906f-ae38-44e3-b50c-afc336a13037
In this case, the keyframes are in one sequence instead of being spread along multiple sequences, so they all get rendered at the same time in the UI. We haven't optimized for that yet. I always wanted to re-do the sequence editor so it uses THREE.js instead of SVG and then it could handle probably millions of keyfreames, but so far that hasn't been a priority because most people don't have such a large number of keyframes in their sequences. But if the use-case becomes more popular, I'll make sure the THREE.js rewrite gets done.
What's your use-case?

@AriaMinaei Hey there! I’m working on this roaming system for a 3D program where everything is automatically generated - scenes, paths, you name it, the theatre is wonderful. But here’s the thing, it creates a ton of keyframes, especially when I’m messing around with splines. Usually, I need to do some extra editing in the sequences that are already there. The only bummer is that the editing can get a bit laggy in the theatre. I know I’m not alone in needing this fixed, so if you could sort it out soon, that’d be awesome!


Git information in standard theme

Hi everyone.
Why can't I see any git information with the standard theme? Is there a variable to export or do I have to modify the theme file?
Thank you

Hi, so do I, any update about this ?

This issue is very stale, so I close it. Thanks for contributing and posting!


Refactor Analytics code to seperate tagging filtering from implementation

Currently, the analytics code is built synchronously. We need to break the code to multiple stages allowing dynamic build of the analytics based on need of the specific use cases. Also, there will be a reflection of that in the UI to make sure the  tabs are build dynamically based on the analytics stages

Done :-)


Handle column number discrepancy more gracefully

If not all rows have the same number of columns, exit with an
error message and status.  This is only a mild improvement
over the existing exception that happens.  Ideally, the code
should report the number of the first line that doesn't
have the same number of columns as the initial line.

Hey, this looks like a great start! It's already much better than the current state. Thanks for the PR.


add helm for cni

What type of PR is this?

/kind feature
add helm to support installing cni feature
What this PR does / why we need it:
This proposal provides a helm installation fixed for cni feature
Which issue(s) this PR fixes:

Fixes https://github.com/kubeedge/edgemesh/issues/465
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/lgtm
/approve


Fix alter column with default null

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Fixed issues
yiisoft/db-migration#11

@Tigrov Add line to changelog only.


❓👂 Question/Feedback - Deprecated Default Policy

Hi,
In the alzDefaults the following policy is deprecated: [Deprecated]: Configure diagnostic settings for storage accounts to Log Analytics workspace (/providers/Microsoft.Authorization/policyDefinitions/6f8f98a4-f108-47cb-8e98-91a0d85cd474) and needs updating to this one: /providers/Microsoft.Authorization/policyDefinitions/59759c62-9a22-4cdf-ae64-074495983fef
I've tried doing it myself but the Initiative doesn't appear to update, could someone assist?
Thanks

Hey @awoodsimpson,
We fixed this upstream in the ESLZ repo here https://github.com/Azure/Enterprise-Scale/issues/1034 we just are yet to pull this in and cut a release for ALZ-Bicep.
We will be cutting one before the end of February and this will include the update initiative and definitions

Hey @awoodsimpson,
We fixed this upstream in the ESLZ repo here Azure/Enterprise-Scale#1034 we just are yet to pull this in and cut a release for ALZ-Bicep.
We will be cutting one before the end of February and this will include the update initiative and definitions

Thanks @jtracey93

This will be out out in release v0.13.0 which will be out today


rawInputBinding

Hi.
I love this solution ! thank you.
one question more than an issue.
is there a way to assign a RawKey from a string. the reverse of "key.ToString()"
I'd like to rebind the key mapping, so i need a way to re-assign the list of "RawKey key" on my app start-up.

I think you can use (RawKey)System.Enum.Parse(typeof(RawKey), "whatever string")

Thanks for your reply. In the meantime, i choose a different solution. i compare the string instead of the RawKey directly
function called by (  RawKeyInput.OnKeyDown += LogKeyDown; ):
private void LogKeyDown(RawKey key)
{
if (reBindPanel.activeSelf) // active when a rebind key button is pressed , BpToRebind set to the caller button
{
//change the text of the button by the key pressed string . I got another button to apply the key rebind that store the button text to KeyStringNext, KeyStringPrec, etc...
BpToRebind.transform.Find("Text").GetComponent().text = key.ToString();
reBindPanel.SetActive(false); // hide the panel " Press a key to rebind xxxx "
}
else
{
if (key.ToString() == KeyStringNext) nextFunction();
if (key.ToString() == KeyStringPrev) PrevFunction();
.....


feat:Addition_Of_about_page

fixes #4
please kindly check it and marge it.

Kindly read the Readme. Ms file and share demo website link

Uploading about_JGEC_vid.mp4…

https://github.com/rko0211/jgec-previous-year-question-paper/assets/135215478/b36f4fd7-3e48-4e44-bfa9-8feb7ad8a669

Hey please don't use card system here just use paragraph and images. Do changes this and send me the website link after that i will merge your PR. and Kindly work on updated branch always. Thank you very much for your contribution.

Hey please don't use card system here just use paragraph and images. Do changes this and send me the website link after that i will merge your PR. and Kindly work on updated branch always. Thank you very much for your contribution.

Which you want from me sir....
1.Upwords image and downwards description and name
2. Right side image and left side description and name.
3. Vice-versa of 2.
I will send PR tomorrow

Hey please don't use card system here just use paragraph and images. Do changes this and send me the website link after that i will merge your PR. and Kindly work on updated branch always. Thank you very much for your contribution.

Which you want from me sir....
1.Upwords image and downwards description and name 2. Right side image and left side description and name. 3. Vice-versa of 2.
I will send PR tomorrow

Iya.. Ok

Kindly send the PR in test branch not in Main branch


Run CodeFormatter for Utility module

PR Summary
Auto fix code formatting in Utility module with CodeFormatter utility. No manual changes.
Please review commit by commit.
PR Context
There have been some formatting errors in the last year.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[x] Make sure you've added a new test if existing tests do not effectively test the code changed

@iSazonov, your last commit had 1 failures in PowerShell-CI-linux
Validate 'Save-Help -DestinationPath for one PowerShell Core modules..Validate Save-Help for the 'Microsoft.PowerShell.Core' module
Expected $null, but got 'Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_en-US_HelpContent.zip'.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/engine/Help/UpdatableHelpSystem.Tests.ps1: line 332
332:     $expectedCompressedFile | Should -Be $compressedFile

@PoshChan Please restart windows

@iSazonov, I do not understand: Please restart windows
Commands available in this repo for you:

retry <target> this will attempt to retry only the failed jobs for the target pipeline
rebuild <target> this will perform a complete rebuild of the target pipeline, rerun can be used in place of rebuild
Supported values for <target> which can be a comma separated list are: static,windows,macos,linux,all
get failures this will attempt to get the latest failures for all of the target pipelines
remind me in <value> <units> this will create a reminder that will be posted after the specified duration
<value> is a number, and <units> can be minutes, hours, or days (singular or plural)

@PoshChan Please rebuild windows

@iSazonov, successfully started rebuild of PowerShell-CI-Windows


add integration test

Hello,
I prepared POC of integration test (due to #26). This test checks if syntax checking works, which proves that monaco-editor works with yaml-language-server as expected (which is the main goal of monaco-yaml). I used playwright. To run test:

npm i
npx playwright install
npm run test
To understand how it works, you can use npx playwright test --config=test/playwright.config.ts --headed

Let me know if you like it and what can be improved.

@mhsdesign we may want to add tests for monaco-tailwindcss based on the same setup.

Thanks for the effort @domsew will look into it

I merged it, because it’s already good as-is. I have one follow-up question: Can we get code coverage? I understand this may be complex, given that we build a test project from already bundled sources.

Can we get code coverage?

I believe it is possible and in fact this is a great idea. Playwright supports chromium built in V8 code coverage link, which is awesome feature. It would require to change test build procedure and choose the best possible reporter (unfortunately there is no default one). Furthermore we need to figure out how to exclude dependency code from the analisis. If I have some time, I'll experiment with it a bit.


OIDC4VCI Talao Android fails on authorization code flow

The wallet does not open with the url https://app.talao.co/app/download/callback?


scikit-sparse installed but not detected?

I'm trying to use LogisticGAM with a really sparse pandas dataframe. But I'm getting this warning:
/home/echo66/.local/share/virtualenvs/pygam-505CBPMV/lib/python3.6/site-packages/pygam/utils.py:78: UserWarning: Could not import Scikit-Sparse or Suite-Sparse.
This will slow down optimization for models with monotonicity/convexity penalties and many splines.
See installation instructions for installing Scikit-Sparse and Suite-Sparse via Conda.
  warnings.warn(msg)

@echo66 hmm that's annoying...
the import for scikit-sparse also checks for nose. do you have that installed too?
(if not, you can definitely install with conda, maybe pip too)
either way, pyGAM should be quite fast on sparse problems even without scikit sparse (?)
please let me know,
dani

Thanks! That solved the issue (I'm using pipenv).
Regarding speed, I'm using a dataset with shape (10000, 18). After applying one hot encoding, I get a shape of (10000, 638). I started the fitting procedure 10 minutes ago and I'm still waiting for it to finish.
My CPU is a quadcore i7-7700HQ, with 16 GB RAM.

mmm i see. that is quite a big matrix.
are you working on a linear problem, or something more exotic?
also, are you using any constraints?.
since pyGAM uses p-irls to do MLE, the optimization is usually dominated by the QR factorization in every iteration, except when using constraints, in which case the (scikit sparse) cholesky factorization begins to matter.
There exists a library for solving sparse QR factorization problems, but in my limited experiments I found no benefit :/
@echo66 please let me know how long it takes, and if it works etc
-dani

I'm not using any constraints.

@echo66 by linear i mean normal distribution with identity link function.
this type of model only requires one itertion of the optimizer, while any other will require > 1

@echo66 did it coverge?
and which type of model are you using?

ah, whoops i see that you are using a logistic gam. i misread your first message. sorry about that.

Regarding the distribution, I didn't change the distribution with things like cox-box transformation. I was just trying to experiment with pyGAM in the same manner people do with logistic regression in scikit. By the way, most of the features are binary because of OHE.

i see. no, adding restrictions will not make things faster, but instead add another, possibly greater, computational burden.
did your model converge?
your question raises an important issue for pyGAM regarding the treatment of categorical variables. the current, lazy implementation fits a coefficient for every category, when really you only need n-1 coefficients  for a variable with n categories.
this approach poses statistical problems, since the coefficient values are harder to decipher, but also computational problems!
for example you mentioned that your model has mostly binary categories, which means we should need only half as many model parameters as pygam currently allocates. .
and since qr factorizations costs ~O(m*(n^2)) for a m by n matrix, we would get a 4x speedup on your model ...

@echo66
thats ok, im just curious about that and am always looking to improve pyGAM.
perhaps we should close this issue and continue the conversation as needed.
dani


Integrate benchmarks into pallets

The current benchmarks are not integrated into the pallet's function headers. The generated weights need to be added to the pallets.

[ ] Create new autogenerated weights. Current autogenerated weights with commands are available here
[ ] Add weights to function headers.

Fore more information on benchmarking: https://docs.substrate.io/v3/runtime/benchmarking/
Budget for task: $40

This is being resolved here: https://github.com/UniversalDot/universal-dot-node/pull/30


Outlined checks without IDs

Prerequisites

[X] I have searched for duplicate or closed issues
[X] I have validated any HTML to avoid common problems
[X] I have read the contributing guidelines

Describe the issue
Hi,
This is neither the bug nor the feature request. The closest I could classify this is the improvement request.
In short, when using Outlined checks all the examples show that the input element has an id attribute, which label element references in its for attribute. This seems like a waste of time since we need to provide unique values for all those ids on the page, which can quickly get troublesome when adding elements in a loop, for example, when displaying search results or so. We usually need to come up with some unique patterns for those ids making sure those won't repeat on the same page.
A simple html alternative is not to use id/for pair, but to simply put the input element inside the label element. Given that the input element is hidden anyway, it won't affect the content displayed within the label element.
In short, is it too much of a work to change the id/for pair approach with nested input inside the label element?
More info on implicit labels: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#defining_an_implicit_label
Example: Click me <input type="text" />
Thanks.
Reduced test cases
<input type="checkbox" class="btn-check" id="btn-check-outlined" autocomplete="off">
Single toggle

could become

    <input type="checkbox" class="btn-check" autocomplete="off">Single toggle

What operating system(s) are you seeing the problem on?
Windows, Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox, Microsoft Edge
What version of Bootstrap are you using?
5.3

this was not possible until the arrival of the :has() selector (as you'd need to style the parent label element based on the state of the child input.
something for version 6 perhaps

Uploading bugreport-aruba_reteu-RONS31.267-94-14-2024-09-02-19-33-02.zip…

Uploading bugreport-aruba_reteu-RONS31.267-94-14-2024-09-02-19-33-02.zip…

Please don't upload zip files. For security reasons, I'll edit your message to drop it. Feel free to link to repositories, CodePens, StackBlitzes (etc.) instead.

Duplicate of #

Are multiple labels for the same input possible with implicit labels? Some forms may require multiple labels and / or custom layout.


Add Ant to the data engineer team

This will add @AntFMoJ to the data engineering GitHub team.

PNC agreement signed and submitted.


Implement List or map: remember last used #649

I introduced a MAP/LIST enum, and used this to determine which mode we are in, then toggle if the map/list button is pressed. When Switching modes a shared preference is updated, this is used to initial set the current mode when opening the activity.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@4b7ead6). Click here to learn what that means.
The diff coverage is 26.92%.

@@           Coverage Diff            @@
##             master    #898   +/-   ##
========================================
  Coverage          ?   6.28%
========================================
  Files             ?      97
  Lines             ?    5094
  Branches          ?     479
========================================
  Hits              ?     320
  Misses            ?    4747
  Partials          ?      27

Impacted Files
Coverage Δ

...fr/free/nrw/commons/nearby/NearbyActivityMode.java
100% <100%> (ø)

...ava/fr/free/nrw/commons/nearby/NearbyActivity.java
38.85% <17.39%> (ø)

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 4b7ead6...7e777b3. Read the comment docs.

I haven't tested, but it looks good :-)

Thanks for the feed back, I will consider these suggestions and see if I can improve on what I have so far.  I'll try and push to my fork in the next few days.

Code updated with suggestions.  I think this is done now.

Looks good to me, thanks for the contribution!


Fixes bug that if only backlist is supplied incorrectly getting 403 error

If this middleware is used without whitelist and only with backlist is supplied, it incorrectly things that not blacklisted IPs are bad.
F.e.:
Dispatcher::run([
    (new Middlewares\Firewall(null))
        ->blacklist([
            '<IP_ADDRESS>',
            '<IP_ADDRESS>',
        ])
]);

Incorrectly thinks that if user comes from IP <IP_ADDRESS> that with such IP is something wrong.
It seems for this case changing IpFirewall default state value helps because in that case IP validation works with rule not $whited && !$blacked but with !$blacked || $whited. And that is what we need for this case.

Hmm... It seems there is a problem with current tests. I didn't touched that part where tests are failing... :/

LGTM. Don't worry about the tests, it's a different issue. I'm going to fix it and release a new version. Thanks!


Problems integrating CORS

Q
A

Bug?
no

New Feature?
no

Framework
Lumen

Framework version
v5.4.7

Package version
v1.0.0-beta8

PHP version
7.0.x

Actual Behaviour
Initially installed barryvdh/laravel-cors to add CORS-Headers to every response. Since this wasn't working (tried all fixes suggested in issues of both dingo and laravel-cors repos) I ended up adding a custom middleware to be able to respond to HEAD/OPTIONS requests:
class CorsMiddleware
{
	/**
	 * Handle an incoming request.
	 *
	 * @param  \Illuminate\Http\Request  $request
	 * @param  \Closure  $next
	 * @return mixed
	 */
	public function handle($request, Closure $next)
	{

		//Intercepts OPTIONS requests
		if($request->isMethod('OPTIONS') || $request->isMethod('HEAD')) {
			$response = response('', 200);
		} else {
			// Pass the request to the next middleware
			$response = $next($request);
		}

		// Adds headers to the response
		$response->header('Access-Control-Allow-Methods', 'HEAD, GET, POST, PUT, PATCH, DELETE');
		$response->header('Access-Control-Allow-Headers', $request->header('Access-Control-Request-Headers'));
		$response->header('Access-Control-Allow-Origin', '*');

		// Sends it
		return $response;
	}
}

Expected Behaviour
CORS headers are now added as expected and API stopped responding with 405 errors for OPTIONS/HEAD requests.
However, all responses now show HEAD, GET, POST, PUT, PATCH, DELETE as allowed methods, which is not the case for many resources. Is there a way to access the dingo routing table from the middle to extract the registered methods to provide a dynamic list of allowed methods?
Thanks!

Side node . For me to work with dingo, lumen and barryvdh/laravel-cors  I extended HandleCors and added this:

       $this->events->listen(ResponseWasMorphed::class, function (ResponseWasMorphed $event) use ($cors, $request) {
            $cors->addActualRequestHeaders($event->response, $request);
        });

        return $next($request);


Still using static IPs

When moving to SolOS 8.7 features we should have moved to DNS names and not static IPs.  This will be the first step to be able to run in customers virtual networks.

This issue is resolved by https://github.com/SolaceProducts/solace-azure-quickstart-template/pull/21 and c

... and can be closed.

Closing fixed in #21


(Details, Contributions, Changelog, Documentation, Settings)

Configuring extensions can be difficult and frustrating. It's a kind of obstacle course:
You have to...

Figure out the exact matching name of the extension which distinguishes it from other extensions in the category
Open up Settings
Open up Extensions, navigate and manually find it by name, or:
Search for the extension by typing in the name
❗While doing so, you attempt to switch back over to the Extension's tab to read some information it has provided about configuration on the Details page.
ouch All context in the Extension tab is lost. Your scroll is back at the top of the page, and the extension page reloads. What were you reading?
Scroll down again and find the thing you were reading about.
Switch back to Settings tab, configure a setting
Now you naively attempt to switch back over to the Extension tab to use the Contributions section to read about a few commands.
Switch back to Settings tab, configure a setting
❗Now you switch back to your Extension tab
ouch All context in the Extension tab is lost. You're back at the Detail page. Contributions section is gone? What were you looking at? Where were you scrolled to?
Switch back to Contributions section again, scroll down and find the commands again.
...and on and on.

To be honest, it is horrible.
Therefore I propose the following additions for the Extension tab:
Features:

Remembers which subsection is open in the Extension tab
Remembers the scroll position in subsection of Extension tab
Direct access to documentation and settings

New sections in Extension tab:

Documentation
Settings

Documentation:

The developer can provide clear documentation here which is separate from the project's overview.

Settings:

All settings for the Extension are displayed here using the graphical configurator.

These enhancements would greatly help Visual Studio Code with ease of use, therefore please support this positive effort.

This is not fixed in Insider and does not duplicate #58341. If you test the steps I have outlined on Insider, you will notice how the context and Contributions section is lost.
I have proposed a more general fix which integrations the idea for reading about and configuring an extension in one place without having to switch tabs.


Color change in theme upload error dialog box.

Closes #9476

added midgrey color to text on upload fail while night mode is on

Coverage remained the same at 71.895% when pulling 993f2280337adcf1c119b85672294b53024c50d1 on hey24sheep:master into 04b8dbb8550ebef2f739e28ae7cc5df830ea2950 on TryGhost:master.


Log slightly more helpful database information

By default the generator assumes postgres, root, etc. in the connection URL. This is probably fine but running npm start will fail. This commit simply tells users to verify the info and the general location to look for it.

Yes! Much more helpful. Thanks @thejones! :smile:


Support for walletconnect on ethereum?

Hi tangem team,
I'm considering a purchase of the Tangem Multicurrency Hardware Wallet Pack
I wanted to ask if there is support for walletconnect on the iPhone app. (This is the only thing that's stopping me)

We do support wallet connect in Tangem app. Sdk provides only API for working with Tangem card.


Encoding mess recap

This is a recap of the encoding problem we face(d).

The queries listed in pg_stat_activity are encoded with the collation of the database the run into. (#149)

So if we had this:
denis@postgres=# CREATE DATABASE latin1 ENCODING 'latin1' TEMPLATE template0 LC_COLLATE 'fr_FR.latin1' LC_CTYPE 'fr_FR.latin1';
CREATE DATABASE
denis@postgres=# \c latin1
You are now connected to database "latin1" as user "denis".
denis@latin1=# CREATE TABLE test (data text);
CREATE TABLE
denis@latin1=# BEGIN;
BEGIN
denis@latin1=# INSERT INTO test VALUES ('é');
INSERT 0 1

PostgreSQL used to complain and crash pg_activity:
>>> conn = psycopg2.connect(database="postgres")
>>> conn.encoding
'UTF8'
>>> cur = conn.cursor()
>>> cur.execute("select query from pg_stat_activity")
>>> cur.fetchall()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 26: invalid continuation byte

We added a conversion in the query :
convert_from(sq.query::bytea, coalesce(pg_catalog.pg_encoding_to_char(b.encoding), 'UTF8')) AS query

It still failed in some cases (#275) where we have \'s. The following kind of queries:

SELECT '\It`s gona crash', pg_sleep(10);
select '123' ~ '\d+', pg_sleep(3);
select 'Hello world!\n', pg_sleep(3);

would fail with:
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type bytea

We added a replace in the query :
convert_from(replace(a.query, '\', '\\')::bytea, coalesce(pg_catalog.pg_encoding_to_char(b.encoding), 'UTF8')) AS query

It still doesn't do it because some times strings end up as non valid bytea sequences (#302)

psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type bytea

For all these problems, the query crashes so even if we catch the exception we have nothing to display. So it would be better to manage this in the python where we would have a more granularity.
Solutions:

get the string from PostgreSQL and convert to the correct collation in python wouldn't work (it's no1).

get a bytea and convert in Python wouldn't work it's no2&3

asking psycopg2 to return bytes instead of unicode strings as proposed by @dvarrazzo a long time ago . This would convert all strings to bytes so we have to convert all of them in pg_activity based on the collation we fetch in pg_database.encoding. I tried this with a custom cursor factory to do the automatic conversion when we have bytes in the resultset (except i didn't drop the replace and cast in the query which we should do). It's looks rather complicated. Is there another solution ?

Can you register a custom typecaster for the text type, to return data.decode(conn.encoding, 'replace')?

As discuss, let's:

add the register_type() only for the cursors that need it;
keep the data in bytes until we display them to avoid doing work on stuff we don't need.

Can you register a custom typecaster for the text type, to return data.decode(conn.encoding, 'replace')?

As far as I understand, the problem is that the encoding we need to decode the query field from pg_stat_activity is probably not the connection encoding in general; rather it's the  encoding of the database the query is running in.

Ah sorry: creating a specific typecaster doesn't work in psycopg2 because the decode is done internally, before passing the data to the Python function, which receive a str. This comes from the fact that psycopg2 is pretty much totally text-based. In psycopg 3 it can be done, because it's binary-based and the dumpers receive bytes, but let's first see if it's useful.
If you only need to survive the accident of receiving a badly encoded char, getting bytea from the query seems enough:
# Conn 1, in bad encoding

conn = psycopg2.connect("dbname=latin1 client_encoding=sql_ascii")
cur = conn.cursor()
cur.execute("select 'à'".encode("latin1"))

# Conn 2 in utf8
...
cur.execute("select query::bytea from pg_stat_activity where datname = 'latin1'");

In [20]: cur.fetchall()
Out[20]: [(<memory at 0x7fb89ed57dc0>,)]

In [21]: bytes(_20[0][0])
Out[21]: b"select '\xe0', pg_sleep(10)"

In [22]: bytes(_20[0][0]).decode("utf8", "replace")
Out[22]: "select '�', pg_sleep(10)"

do you need to know more precisely the content of the query?

I think we would still hit problem number 3 (which we unfortunately didn't reproduce, this doesn't help..)

Yes, problem n°3 being query::bytea producing invalid_text_representation: invalid input syntax for type bytea on postgres side.
But, indeed, it might be worth moving to psycopg 3 while working on this issue.

In psycopg3 the problem can be solved easily, because the decoding step is in the loader:
In [1]: import psycopg

In [2]: conn1 = psycopg.connect("dbname=latin1 client_encoding=sql_ascii")

In [3]: conn1.execute("select 'à'".encode("latin1"))
Out[3]: <psycopg.Cursor [TUPLES_OK] [INTRANS] (user=piro database=latin1) at 0x7f378203b740>

In [4]: conn = psycopg.connect()

In [5]: conn.execute("select query from pg_stat_activity where datname = 'latin1'").fetchone()[0]
Traceback (most recent call last)
...
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 8: invalid continuation byte

In [6]: class SafeText(psycopg.types.string.TextLoader):
   ...:     def load(self, data):
   ...:         try:
   ...:             return super().load(data)
   ...:         except Exception:
   ...:             return bytes(data).decode(self._encoding, "replace")
   ...:

In [7]: conn.adapters.register_loader("text", SafeText)

In [8]: conn.execute("select query from pg_stat_activity where datname = 'latin1'").fetchone()[0]
Out[8]: "select '�'"

you can even use extra knowledge about the encoding of the database you are reading the query from, and use that one in the custom loader, instead of self._encoding.

(rather than the above, subclassing the built-in TextLoader, it would be wiser to write a Loader instance from scratch, starting by copying TextLoader from the source code, because _encoding is not part of the public interface).

Not, it's not widely available in distributions yet; which is indeed a
problem for us.

Is pg_activity packaged in distributions? Other programs are starting to be based on it (pgadmin, pgcli...), so I'm expecting it to land in distros soon.

Yes, pg_activity packaged either directly in most distributions or through PGDG repository (which many postgres-people use obviously) and so recent versions are even available, through backports, in most stable or LTS distributions.
Psycopg 3 is packaged by Debian https://tracker.debian.org/pkg/psycopg3 [^1], but not yet available in stable. For RPM-based distributions, it's packaged by PGDG so that would work for us.
In pg_activity I think we cannot really move faster than distributions... unless our users accept to stay on an old version which is not quite our policy.
[^1]: strangely, it's named psycopg3!

strangely, it's named psycopg3!

ahah, I forgot https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016031

So, if psycopg 3 was packaged in apt pgdg too, pg_activity would be mostly covered, right?

Yes.

So, the approach I'm taking to hopefully fix these issues is the following:

load TEXT values as bytes whenever there's a query column from pg_stat_activity (or similar) involved
also load database encoding (not the one we're connected to, the one the query is running in)
decode bytes values when loading each row with this database encoding (using a row factory, as this cannot be done with a psycopg Loader -- as far as I understand -- because we need the whole row, not a single value)
use .decode(..., errors="replace") to prevent crash


AngelScript array length bug

array<string> a = {
    "1",
    "2",
    "3", // with trailing comma
};
print(a.length() + "\n"); // 4

array<string> b = {
    "1",
    "2",
    "3" // without trailing comma
};
print(b.length() + "\n"); // 3

Not a part of UjAPI and it’s not a bug, a “comma” indicates there is another item after it, it can be empty but still will be a part of the array.


The results from Numba version of the code not matching Python results. Possible casting issue.

Hi, Stan (@seibert)
We met at the AnacondaCon and you helped me to speedup my code 1000 times with simple numba.
Let me thank you again for our useful discussions!
The code was updated recently and we noticed a problem with casting which is not a problem in Python.
Both of the codes below are working fine in pure python - the difference appears only when we move to jitted versions of both of them. BTW, I used jit(nopython=True).
Here is an example of the bad code which essentially generates zeros (due to integer division in power operator):
		        # --- LINE 293 ---
        #   $const2429.25 = const(int, 10)  :: int64
        #   $const2429.26 = const(int, -3)  :: int64
        #   $2429.27 = $const2429.25 ** $const2429.26  :: int64
        #   $2429.28 = Z1 * $2429.27  :: float64
        #   $2429.30 = $2429.28 /? M  :: float64
        #   $const2429.33 = const(int, 10)  :: int64
        #   $const2429.34 = const(int, -3)  :: int64
        #   $2429.35 = $const2429.33 ** $const2429.34  :: int64
        #   $2429.36 = X1 * $2429.35  :: float64
        #   $2429.38 = $2429.36 /? N  :: float64
        #   $2429.39 = arrayexpr(expr=('*', [('*', [Var(pabs, drift.py (40)), Var($2429.30, drift.py (293))]), Var($2429.38, drift.py (293))]), ty=array(float64, 2d, C))  :: array(float64, 2d, C)
        #   $const2429.41 = const(ellipsis, Ellipsis)  :: ...
        #   Force[Ellipsis] = $2429.39

        Force[...] = pabs*(Z1*10**-03/M)*(X1*10**-03/N);

This is corrected code which is matching output from pure python code:
		# --- LINE 293 ---
        #   $const2429.25 = const(float, 10.0)  :: float64
        #   $const2429.26 = const(int, -3)  :: int64
        #   $2429.27 = $const2429.25 ** $const2429.26  :: float64
        #   $2429.28 = Z1 * $2429.27  :: float64
        #   $2429.30 = $2429.28 /? M  :: float64
        #   $const2429.33 = const(float, 10.0)  :: float64
        #   $const2429.34 = const(int, -3)  :: int64
        #   $2429.35 = $const2429.33 ** $const2429.34  :: float64
        #   $2429.36 = X1 * $2429.35  :: float64
        #   $2429.38 = $2429.36 /? N  :: float64
        #   $2429.39 = arrayexpr(expr=('*', [('*', [Var(pabs, drift.py (40)), Var($2429.30, drift.py (293))]), Var($2429.38, drift.py (293))]), ty=array(float64, 2d, C))  :: array(float64, 2d, C)
        #   $const2429.41 = const(ellipsis, Ellipsis)  :: ...
        #   Force[Ellipsis] = $2429.39

        Force[...] = pabs*(Z1*10.0**-03/M)*(X1*10.0**-03/N);

Actual function signature is this:
[(int64,
  int64,
  int64,
  int64,
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 1d, C),
  array(float64, 3d, C),
  array(float64, 3d, C),
  array(float64, 1d, C),
  array(float64, 3d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  array(float64, 2d, C),
  float64,
  array(float64, 0d, C))]

And call example is this:
jitprocessPoint(A3,N,M,ITER,
                     UMTM,FNMTM,HerzDiam,wedconv,camang,GTSRR,
                     FrFM,FraspF,MUFM,MUwal,MUthin,UFM,shFM,FHFM,convergence,
                     p,pabs,const3mat,Mumat,Force,X,Z,sum,
                     P,PABS,niter,CONST3,
                     #Added due to the 02_03_17 Changes
                     hconst,pelast,Deflection,
                     Toil,PVcoeff)

First 3 lines of LLVM code essentially illustrates the problem.
The funny thing is that I couldn't isolate or replicate the problem outside of my function. Unfortunately I can't share the function with you - so that you could replicate the problem - but I hope that types inspection helps you to track it down.

I can replicate the problem just with:
@jit
def foo(x, y):
     return x ** y

for any integer arguments and that y < 0

Indeed. I tried something like that - but it did the right calculation...
Simplicity is all we need. Thanks for replicating the issue!

The problem here is really what to do for int ** int. Both numba and numpy use int has the result.  Numpy would raise if it is doing a negative power on int.  Pure python will return float in that case.  Numba is however calculating it in int and resulting in zero.
@thoth291 ,  since all we need is 0.001 constant, you can write 1e-3 and it will surely by a float and save a calculation.

Yes - solving the instance of this problem is not an issue. I'm just worried that the Python and Numba interprets the same expression differently. Things like that makes one nervous about dealing with Numba...
Just wanted to make sure if I should expect any kind of consistency between Python and Numba code...


Fixes to previous merge request

I removed comments and re-formatted the code to match rustfmt.

I fixed those items in the pull-request, this should all be good to go.

Nevermind actually. looks like these changes have been made already.

Hello :-D I ended amending the commit in #1 and it was merged in c7e87c68


add gitlab for --app-config-url=none path

Related To: #666

What changed?
Removes hardcoded github code and allows the path --a
until the deploy key stuff is setup for add the outcome is Error: error setting up deploy keys: error getting account type: could not get account type GET https://gitlab.com/api/v4/groups/J-Thompson12: 404 {message: 404 Group Not Found}

Why?

How did you test it?
manually and acceptance tests

Release notes

Documentation Changes

@J-Thompson12 LGTM, but lets wait for another reviewer to take a look. Can you create yourself a Gitlab org and test manually for now?
It's ok to add the Gitlab story in small pieces, and this PR makes the code base better, so don't feel like you have to solve the whole Gitlab story in one go. Let's keep the issue open until we know that Gitlab works.


Fix infinite loop in validation

Fixes https://crbug.com/38548

Fixes an issue in structured exit checking where an invalid merge
could result in an infinite traversal

The ubsan failure looks unrelated.  Something is using a deprecated clang option?

Ah, the UBSAN flow is new: #4512

I have fixed the issues with the UBSan configuration, so if you pull and rebase that check should now pass.

(Or just merge on the basis that we know the UBSan config failure isn't related.)


Fix Relative Imports Issue

The project currently has issues with relative imports that can cause problems when running the code or setting up the environment. This issue needs to be addressed to ensure that all imports work correctly and the codebase remains functional across different setups.

a54e6e0a27f9c51b45a1d5c88e5df9a50a02ba3e


IfThenElse Returning String

val input_file_name = if (!run_on_board) "/home/jcamach2/spatial-lang/apps/src/Rosetta/3D-Rendering/input_triangles.csv" else "/home/jcamach2/Rendering3D/input_triangles.csv"

gives the error
[error] /local/ssd/home/mattfel/spatial/test/spatial/tests/feature/unit/hotfix.scala:211:25: ambiguous reference to overloaded definition,
[error] both method __ifThenElse in trait SpatialVirtualization of type [A](cond: spatial.lang.Bit, thenBr: => argon.Sym[A], elseBr: => argon.Sym[A])(implicit ov3: utils.Overloads.Overload3, implicit ctx: forge.SrcCtx, implicit state: argon.State)A
[error] and  method __ifThenElse in trait SpatialVirtualization of type [A](cond: spatial.lang.Bit, thenBr: => argon.Literal, elseBr: => argon.Sym[A])(implicit evidence$4: argon.Type[A], implicit ov2: utils.Overloads.Overload2, implicit ctx: forge.SrcCtx, implicit state: argon.State)A
[error] match argument types (Boolean,String,String)
[error] 		val input_file_name = if (!run_on_board) "/home/jcamach2/spatial-lang/apps/src/Rosetta/3D-Rendering/input_triangles.csv" else "/home/jcamach2/Rendering3D/input_triangles.csv"
[error] 		                      ^

This is a reminder for me or someone to look into this

Confirmed, but not sure why this is happening. Literal should have lower priority than Sym[Text] here

Similar problem for Boolean / Bit. Looks like any time there's exactly one conversion from unstaged type to Sym, we don't want to make the Literal implicit also available.


Provide a way to add HTTP Headers to the authenticate call

I'm using this package to authenticate with my backend server.  I'd like to be able to pass some header values along with the URL open call to my server.  As far as I can tell this isn't supported today.

That sounds like a great feature request which I will take a look at after my vacation (in around two to three weeks)! 😊

I have a huge refactor planned which should be able to tackle this task. However, it will need quite some time

The huge refactor is online in version 3.0.0-alpha.1. However, there seems to be very limited support for headers from url_launcher's side of things. Due to this, I will postpone this a bit more until I find a better solution to make url_launcher accomplish that

Looks like url_launcher supports headers now https://pub.dev/documentation/url_launcher/latest/url_launcher/launch.html

I just wanted to push my changes, but I noticed that they are not even applied on Android since we are not using url_launcher on Android - in favor of a native solution. Hence, this is still not possible (and the headers parameter @kwent mentioned was already available when this issue was created and I was even aware of it)

Sounds good thanks for being on top of this and clarifying the situation!
On Wed, Mar 13, 2024 at 9:40 AM Nico Mexis @.***> wrote:

I just wanted to push my changes, but I noticed that they are not even
applied on Android since we are not using url_launcher on Android - in
favor of a native solution. Hence, this is still not possible (and the
headers parameter @kwent https://github.com/kwent mentioned was already
available when this issue was created and I was even aware of it)
—
Reply to this email directly, view it on GitHub
https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/57#issuecomment-1994928097,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGWZJC2MWDY3R7R3GZ7ZVLYYB6OZAVCNFSM6AAAAAA3LYWWTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUHEZDQMBZG4
.
You are receiving this because you were mentioned.Message ID:
@.***>


State validation for anonymous login

#https://github.ibm.com/security-services/appid-project-management/issues/1530

Coverage decreased (-0.9%) to 77.886% when pulling b80f8f134cf99420131f35466e7ffd404f10d4f4 on Anonymous-stateValidation into a549f94cc65f2b3f3eea58921901ec4fb04779e3 on development.


Bugfix/memory leak

fix issue #210.
update eventmachine.
I guess so memory_leak is caused by https://github.com/eventmachine/eventmachine/issues/585.

Done on master.


IBM Java 8

I'm doing the VS Code set up and IBM Java 8 is a prerequisite for IBM Z Open Editor.  I'm using Windows 10 but I'm not sure which version of IBM Java 8 to use.  Should I install IBM Eclipse or should I use the Linux install.  I enabled Linux on my laptop.
I'm a little confused.  I'm not sure where to configure Java either.

(Suggestion) Follow this, STEP by STEP: https://github.com/openmainframeproject/cobol-programming-course/issues/53

@gowide00 Do not worry. I advise you to work in Windows 10.

(Suggestion) Follow this, STEP by STEP: #53

Thanks this solved my initial solution.  The return email I received with a Mainframe ID and password had a link to Open Mainframe Project Slack but my email wasn't registered with Slack.  I have another question but I'm unable to post on Slack because I can't get in.

@gowide00
I don’t remember how I got access to Slack, but try here:
https://slack.com/signin


Support for explorer filters

A nice feature to add should be the support of explorer filters, ie: *.vcxproj.filters files

#64 Duplicated


Added section on subscription expiration.

Also, moved support topic earlier, fixed formatting bugs in that section.

Closing per Nishant: "We discussed in scrum and decided not to make it public."


define mobile code

in the Technology Terms.  Need to distinguish between mobile code and add-ons.

Mobile Code defined per CNSSI No. 4009.  Update to be pushed today or tomorrow.

We really need to define mobile code in this EP; sending people to the App PP is annoying.  Ease of use is a priority.

To maintain consistency between the documents the definition from the App has been inserted except Javascript is excluded as an example.  The definition reads as follows:
"Software transmitted from a remote system for execution within a limited execution environment on the local system. Typically, there is no persistent installation and execution begins without the user's consent or even notification. Examples of mobile code technologies include" "Java applets, Adobe Flash, and Microsoft Silverlight." JavaScript is not included in references to mobile code in this browser EP.

This update will be pushed by COB today.


Force y-axis to start at 0 with a MultiChart

Hi there,
how can i set the start value of the y-axis to 0 while the end of it stays dynamicly?
Thanks!

http://plnkr.co/edit/1SEDKQi4fHSu2h6uUdF1?p=preview

it seems that this is no longer working ?????

I am having the same problem in my app, where the axis are ignoring the forceY parameters...


X11: Don't queue events internally, fix XIM input method support

Description
This PR is a (good enough) fix to #1840.
It fixes the existing XIM code, supporting input methods (at least with Fcitx5).
How to test
Dump all the KeyPressed/TextInput event from any window. If you don't have a input method, nothing should change. If you do have one, it should be working now.
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "Window");
    window.setFramerateLimit(60);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            switch (e.type) {
                case sf::Event::Closed:
                    win.close();
                    break;
                case sf::Event::KeyPressed:
                    printf("Key pressed: %d\n", (int)e.key.code);
                    break;
                case sf::Event::KeyReleased:
                    printf("Key released: %d\n", (int)e.key.code);
                    break;
                case sf::Event::TextEntered:
                    printf("Text entered: %d\n", (int)e.text.unicode);
                    break;
            }
        }

        window.clear();
        window.display();
    }
}

I added a printf() in checkEvent():
// Filter the events received by windows (only allow those matching a specific window)
Bool checkEvent(::Display*, XEvent* event, XPointer userData)
{
	printf("CheckEvent: event type=%d, window=%ld, user=%ld\n",event->type,event->xany.window, userData);
	// Just check if the event matches the window
	return event->xany.window == reinterpret_cast< ::Window >(userData);
}

Looks like upon keypresses, the IME is firing ClientMessage events into the queue with a different Window ID:
...
CheckEvent: event type=33, window=94371847, user=94371845
CheckEvent: event type=33, window=94371847, user=94371845
CheckEvent: event type=33, window=94371847, user=94371845
... (33 = ClientMessage)

I added a || event->type == ClientMessage to the condition and the IME worked again, at least for a single window.
This is what happened when I press a key:
                   This is the output: | CheckEvent: event type=2, window=94371845, user=94371845
The first KeyPress event is filtered.  | event type=2, filtered
A ClientMessage is sent by the IME.    | CheckEvent: event type=33, window=94371847, user=94371845
The ClientMessage is also filtered.    | event type=33, filtered
After that, the real KeyPress is sent. | CheckEvent: event type=2, window=94371845, user=94371845
This event is (at last!) not filtered. | event type=2

Main: Event::TextEntered, keycode=99(c)

Gonna test it with multiple windows.

With 2 windows, the IME sometimes glitches out if we switch to the other window while typing something.
I looked up some documentations, and it seems that the XIM object is per-display, and the XIC context is bound to a specific window. So I saved the XIM object to the namespace WindowsImplX11Impl and have all the window share the same XIM object. It works now! It still need to be mutex-protected though.
This is the snippet I used to test:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>

sf::RenderWindow win1,win2;

bool processEvent(sf::Event& event,int win){
	switch(event.type){
	case sf::Event::Closed:
		win1.close();
		win2.close();
		return false;
	case sf::Event::KeyPressed:
		printf("(Win%d) Key Pressed: %d\n",win,event.key.code);
		break;
	case sf::Event::TextEntered:
		printf("(Win%d) Text Entered: %d\n",win,event.text.unicode);
		break;
	}

	return true;
}

int main(int argc, char* argv[])
{
	win1.create(sf::VideoMode(400, 200), "Window1");
	win1.setVerticalSyncEnabled(true);
	win2.create(sf::VideoMode(400, 200),"Window2");
	win2.setVerticalSyncEnabled(true);

	while (win1.isOpen() && win2.isOpen()) {
		sf::Event event;
		while (win1.pollEvent(event))
			if(!processEvent(event,1))
				return 0;
		while(win2.pollEvent(event))
			if(!processEvent(event,2))
				return 0;

		win1.clear(sf::Color::Magenta);
		win2.clear(sf::Color::Cyan);
		win1.display();
		win2.display();
	}
	return 0;
}

The updated code uses XCheckIfEvent to pick out events only for a single window.
It also keeps a global XIM object instead of creating a new one with every window. Maybe the commit name should include that?

Rebased with latest master. @eXpl0it3r Any updates?

I don't know much about the whole X11 setup and hope @binary1248 can have a closer look at this 🙂

SFMLBuildMaster: Build this please.

I still don't quite understand why it was necessary to make such significant changes to the logic around m_events. m_events was introduced in #1291 to fix #1223. Removing this code risks re-introducing the bug the code was written to prevent.
I would prefer this PR is modified to affect the existing m_events logic as little as possible.
Alternatively, this would have to be tested on multiple different systems/configurations to verify that the original bug is not re-introduced. Maybe @naezith or @texus could help with this since they worked on the issue.

I would prefer this PR is modified to affect the existing m_events logic as little as possible.

This is possible. The only things we need to do are:

setlocale(LC_ALL, "") on XIM creation
Call XFilterEvent(&event, None) on ClientMessage events
Global XIM context across SFML windows (XICs are per-window)
Send multiple TextInput events from one X event (there may be multiple codepoints in a single UTF-8 string from the raw event)

Working on it. Should we change the commit/pr name?

Rebased with latest master.
Sorry for the mess... It was indeed not necessary to change this much. To my defense, there are very little and even conflicting information on how to handle XIM correctly, not to mention with multiple windows.
I removed m_events because I observed some strange KeyPress events being sent both to the IM and the application early on while hacking the code. It was not necessarily related to m_events itself, but more likely because of not calling XFilterEvent() properly, or even the crappy test snippet I was using. The drastic code changes in the first commit were more of a guess and less of reasoning, and you have my more sincere apologies for that...
I rewrote the code, pushed the second commit and was never able to repeat the bug.

Just being curious, is it possible for this pull request to make it into SFML 2.6.0? I sure can do a back port.

There is no need to apologize for standard development practice. 😉
After all is said and done this PR should/would be squashed and rebased anyway, so any intermediate steps wouldn't have become part of the commit history.
Regarding the backport to 2.6.0: @eXpl0it3r will have to comment on that. I personally don't have anything against it.

All fixed. You really have those eagle eyes👍

Yeah, I think it could be a great addition and is isolated enough for SFML 2.6.
Could you rebase the commit onto the 2.6.x branch and change the PR target to the 2.6.x branch?

@eXpl0it3r I still don't quite get it. Is it the case that the feature changes on 2.6.x will be ported to 3.0 once all the major API changes are sorted out? That sounds like a major undertaking.

No, we'll continuously merge changes from 2.6.x to master.
It's a bit work, but at the same time, we don't really plan to add much more to SFML 2.6

Rebased with 2.6.x.

SFMLBuildMaster: Build this please.

Looks good to me, although I must admit I don't really have the technical expertise or experience to test these changes because I have never had to type using an input method before. Perhaps there are others willing to give this a try.

Thank you for diving into this! 🙂

I noticed since this commit that more events are generated, which looks like a bug to me.
Testing with SFML-Input and SFML feature/scancode branch on Ubuntu 20.04: when pressing a key, two KeyPressed events are generated with a small delay between them, instead of one event. If the key is held down, many KeyPressed events are regularly generated when the key is down (which is normal) but also after the key is released (not normal) for some time.
I did not test the new support input method though. I never used such input method.

@kimci86 Can you try again with export XMODIFIERS=@im=none? This effectively disables the entire mess with XIM.
Maybe you have the input method framework IBus installed. It comes with GNOME and is notoriously hard to replace, many of us end up giving up GNOME just to not use IBus.

Running again with XMODIFIERS=@im=none restores the expected behavior indeed :+1:
GTK_IM_MODULE is empty and QT_IM_MODULE is ibus in my environment.
Is there a way to have this behavior by default, without having to set an environment variable?

@kimci86 IBus is, how to say... Neglected. It kind of works, but most people who care more about input methods often use others like Fcitx or Uim. Also it's part of good-old GNOME. The fault is most likely IBus's IMHO.

Is there a way to have this behavior by default, without having to set an environment variable?

AFAIK I'm afraid no, but I'm not an expert. I've never used IBus before. Gonna do some testing.

@kimci86 Oh no, the fault is mine in fact...
If you look at WindowImplX11.cpp:L1880
// Key down event
case KeyPress:
{
	// Fill the event parameters
	Event event;
	event.type        = Event::KeyPressed;
	event.key.code    = (......)
	pushEvent(event);

	// Generate a TextEntered event
	if (!XFilterEvent(&windowEvent, None)) // Feed the event to the IME, discard it if requested
	{
		event.type = Event::TextEntered;
		......
	}
}

Clearly there's something wrong here, and the if (!XFilterEvent(&windowEvent, None)) should go before sending the KeyPress event. I'm sorry...
I wasn't able to catch that mainly because when the IME takes some text, IBus sends a KeyPress without text input attached, while Fcitx and XWayland (what I use) sends no KeyPress at all. Thus if the previous event is not filtered, it gets duplicated by IBus.


Dev esteban args and output

:tada: This PR is included in version 1.4.0 :tada:
The release is available on:

GitHub release
v1.4.0

Your semantic-release bot :package::rocket:


Print screenshot with single frequency characteristics

Right now, when you move the mouse on the Smith chart, it will show the characteristics for that particular frequency, but it's not possible to export that as a screenshot file: the moment you move the mouse away, the characteristics disappear.

It would be great if there were a way to print that.
Tom

OK Tom, I've made a change so that if you now press the middle mouse button when there is a live marker, it's position is frozen.
If is freed when a new trace retrieved (from the 8753 or disk), or you can press the left or right mouse button (when in the display) to unfreeze.

Fantastic!
Thanks!
Tom